aboutsummaryrefslogtreecommitdiff
path: root/modules/neovim
diff options
context:
space:
mode:
authorStefan Weigl-Bosker <stefan@s00.xyz>2025-03-20 19:37:14 -0400
committerStefan Weigl-Bosker <stefan@s00.xyz>2025-03-20 19:37:14 -0400
commite2fe74863e48c5f05b18fac38b73e7a3e0bf1375 (patch)
tree062f4a875ba27e18bc9112f10369038285cf5621 /modules/neovim
parente17372b6effdda94c784429fac1b2475f7558d42 (diff)
downloadhome-e2fe74863e48c5f05b18fac38b73e7a3e0bf1375.tar.gz
tmux
Diffstat (limited to 'modules/neovim')
-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", {