neovim: Use rust-tools for actions in K binding
This commit is contained in:
parent
04778808d9
commit
9c5ba0d040
1 changed files with 8 additions and 2 deletions
|
|
@ -384,7 +384,9 @@ return {
|
||||||
|
|
||||||
-- rust-analyzer will be configured by rust-tools. Don't use lspconfig
|
-- rust-analyzer will be configured by rust-tools. Don't use lspconfig
|
||||||
-- directly (or through the default setup) for this.
|
-- directly (or through the default setup) for this.
|
||||||
require('rust-tools').setup({
|
local rt = require('rust-tools')
|
||||||
|
|
||||||
|
rt.setup({
|
||||||
tools = {
|
tools = {
|
||||||
autoSetHints = true,
|
autoSetHints = true,
|
||||||
hover_with_actions = false,
|
hover_with_actions = false,
|
||||||
|
|
@ -402,7 +404,11 @@ return {
|
||||||
server = {
|
server = {
|
||||||
standalone = false,
|
standalone = false,
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
on_attach = on_attach,
|
on_attach = function(client, bufno)
|
||||||
|
on_attach(client, bufno)
|
||||||
|
|
||||||
|
vim.keymap.set("n", "K", rt.hover_actions.hover_actions, { buffer = bufno })
|
||||||
|
end,
|
||||||
settings = lsp_settings.rust_analyzer,
|
settings = lsp_settings.rust_analyzer,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue