feat(nvim/rust): load crates plugin
This commit is contained in:
parent
8ca3f4820d
commit
a909ea3bf3
@ -57,7 +57,9 @@ cmp.setup({
|
||||
keep_all_entries = false,
|
||||
enable_in_context = function() return true end
|
||||
}
|
||||
}, {name = 'conventionalcommits', keyword_length = 1 },
|
||||
},
|
||||
{name = 'conventionalcommits', keyword_length = 1 },
|
||||
{name = 'crates'},
|
||||
},
|
||||
window = {
|
||||
completion = cmp.config.window.bordered(),
|
||||
@ -73,6 +75,7 @@ cmp.setup({
|
||||
path = '📁',
|
||||
spell = '💬',
|
||||
calc = '√',
|
||||
crates = '📦',
|
||||
}
|
||||
item.menu = menu_icon[entry.source.name]
|
||||
return item
|
||||
|
2
rust.lua
2
rust.lua
@ -118,8 +118,10 @@ rt.setup({
|
||||
cmd = {(deps.rust_analyzer_path .. "/bin/rust-analyzer")},
|
||||
capabilities = require("cmp_nvim_lsp").default_capabilities(c),
|
||||
on_attach = function(_, bufnr)
|
||||
require('crates').setup()
|
||||
local keymap_opts = {buffer = bufnr}
|
||||
-- Hover actions
|
||||
-- call twice to focus
|
||||
vim.keymap.set("n", "<leader>h", rt.hover_actions.hover_actions,
|
||||
keymap_opts)
|
||||
-- Code action groups
|
||||
|
Loading…
x
Reference in New Issue
Block a user