What
The config currently maps only gd (definition) and gr (references) for LSP. The other high-value LSP actions — hover docs, rename, code action, and insert-mode signature help — have no keymaps and are only reachable via :lua vim.lsp.buf.*().
Where
lua/config/plugin_config.lua — inside a LspAttach autocmd (as already recommended in issue #27).
Why it matters
With six active LSPs (lua, python, c/cpp, ts/js, rust, go, swift), these operations are used constantly. Without keymaps they're effectively inaccessible. K for hover is the Neovim convention (it already falls back to keywordprg in non-LSP buffers so a buffer-local binding is safe). Rename and code action are unavailable any other way.
Suggested keymaps
vim.api.nvim_create_autocmd("LspAttach", {
callback = function(ev)
local opts = { buffer = ev.buf }
-- navigation (see also issue #27)
vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts)
vim.keymap.set("n", "gr", vim.lsp.buf.references, opts)
-- hover / signature
vim.keymap.set("n", "K", vim.lsp.buf.hover, opts)
vim.keymap.set("i", "<C-k>", vim.lsp.buf.signature_help, opts)
-- edit
vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, opts)
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, opts)
-- workspace
vim.keymap.set("n", "<leader>D", vim.lsp.buf.type_definition, opts)
end,
})
<leader>rn / <leader>ca are free in the current keymap and follow the convention used by most Neovim starter configs. K is buffer-local so it only overrides the built-in keywordprg lookup in LSP-attached buffers.
Notes
What
The config currently maps only
gd(definition) andgr(references) for LSP. The other high-value LSP actions — hover docs, rename, code action, and insert-mode signature help — have no keymaps and are only reachable via:lua vim.lsp.buf.*().Where
lua/config/plugin_config.lua— inside aLspAttachautocmd (as already recommended in issue #27).Why it matters
With six active LSPs (lua, python, c/cpp, ts/js, rust, go, swift), these operations are used constantly. Without keymaps they're effectively inaccessible.
Kfor hover is the Neovim convention (it already falls back tokeywordprgin non-LSP buffers so a buffer-local binding is safe). Rename and code action are unavailable any other way.Suggested keymaps
<leader>rn/<leader>caare free in the current keymap and follow the convention used by most Neovim starter configs.Kis buffer-local so it only overrides the built-inkeywordprglookup in LSP-attached buffers.Notes
LspAttachblock (including thegd/grfrom [audit] gd/gr LSP keymaps set globally — override vim builtins in every buffer #27) keeps LSP config in one place inplugin_config.lua.vim.lsp.buf.code_actionwith a floating menu by default — no extra UI plugin needed.