aboutsummaryrefslogtreecommitdiff
path: root/modules/neovim/nvim/lua
diff options
context:
space:
mode:
Diffstat (limited to 'modules/neovim/nvim/lua')
-rw-r--r--modules/neovim/nvim/lua/config/lsp.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/neovim/nvim/lua/config/lsp.lua b/modules/neovim/nvim/lua/config/lsp.lua
index 887dbe7..3313fff 100644
--- a/modules/neovim/nvim/lua/config/lsp.lua
+++ b/modules/neovim/nvim/lua/config/lsp.lua
@@ -38,7 +38,18 @@ vim.diagnostic.config({
vim.api.nvim_create_autocmd("LspAttach", { callback = function(args)
local client = vim.lsp.get_client_by_id(args.data.client_id)
+ vim.keymap.set('n', 'grr', function()
+ vim.lsp.buf.references()
+ end, { desc = "Code references (LSP)" })
+
+ vim.keymap.set('n', 'gd', function()
+ vim.lsp.buf.definition()
+ end, { desc = "Goto definition (LSP)" })
+
vim.keymap.set('n', 'E', '<cmd>lua vim.lsp.buf.hover()<CR>', { silent = true })
+ if client:supports_method(methods.textDocument_inlayHint) then
+ vim.lsp.inlay_hint.enable()
+ end
if client:supports_method(methods.textDocument_formatting) then
vim.api.nvim_create_autocmd("BufWritePre", {