add support crates.nvim
This commit is contained in:
parent
bf3e4855b9
commit
7b3220b36d
3 changed files with 30 additions and 2 deletions
|
|
@ -1,5 +1,7 @@
|
||||||
{
|
{
|
||||||
"blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" },
|
"blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" },
|
||||||
|
"blink.compat": { "branch": "main", "commit": "1454f14a8d855a578ceeba77c62538fa1459a67c" },
|
||||||
|
"crates.nvim": { "branch": "main", "commit": "0f536967abd097d9a4275087483f15d012418740" },
|
||||||
"fidget.nvim": { "branch": "main", "commit": "889e2e96edef4e144965571d46f7a77bcc4d0ddf" },
|
"fidget.nvim": { "branch": "main", "commit": "889e2e96edef4e144965571d46f7a77bcc4d0ddf" },
|
||||||
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
|
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
|
||||||
"fzf-lua": { "branch": "main", "commit": "1e866cce085cc6df3d3e4fb59f00105fa84cef6c" },
|
"fzf-lua": { "branch": "main", "commit": "1e866cce085cc6df3d3e4fb59f00105fa84cef6c" },
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
return {
|
return {
|
||||||
'saghen/blink.cmp',
|
'saghen/blink.cmp',
|
||||||
dependencies = { 'rafamadriz/friendly-snippets' },
|
dependencies = { 'rafamadriz/friendly-snippets', 'saghen/blink.compat' },
|
||||||
version = '1.*',
|
version = '1.*',
|
||||||
|
|
||||||
---@module 'blink.cmp'
|
---@module 'blink.cmp'
|
||||||
|
|
@ -30,7 +30,16 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
sources = {
|
sources = {
|
||||||
default = { 'lsp', 'path', 'snippets', 'buffer' }
|
default = { 'lsp', 'path', 'snippets', 'buffer' },
|
||||||
|
per_filetype = {
|
||||||
|
toml = { 'lsp', 'path', 'snippets', 'buffer', 'crates' },
|
||||||
|
},
|
||||||
|
providers = {
|
||||||
|
crates = {
|
||||||
|
name = 'crates',
|
||||||
|
module = 'blink.compat.source',
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
fuzzy = {
|
fuzzy = {
|
||||||
implementation = 'prefer_rust_with_warning',
|
implementation = 'prefer_rust_with_warning',
|
||||||
|
|
|
||||||
17
lua/plugins/crates.lua
Normal file
17
lua/plugins/crates.lua
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
return {
|
||||||
|
'Saecki/crates.nvim',
|
||||||
|
event = { 'BufRead Cargo.toml' },
|
||||||
|
opts = {
|
||||||
|
completion = {
|
||||||
|
crates = {
|
||||||
|
enabled = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
lsp = {
|
||||||
|
enabled = true,
|
||||||
|
actions = true,
|
||||||
|
completion = true,
|
||||||
|
hover = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue