Skip to content

Commit

Permalink
fix(neovim): fix goto definition
Browse files Browse the repository at this point in the history
  • Loading branch information
samueljoli committed Nov 18, 2024
1 parent 4d2174e commit 297af8e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/home-manager/programs/neovim/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ in
extraLuaConfig = ''
${builtins.readFile ./options.lua}
${builtins.readFile ./keymaps.lua}
${builtins.readFile ./lsp.lua}
${builtins.readFile ./cyberpunk.lua}
${builtins.readFile ./tokyo_night.lua}
${builtins.readFile ./treesitter.lua}
Expand All @@ -26,7 +27,6 @@ in
${builtins.readFile ./autopairs.lua}
${builtins.readFile ./heirline.lua}
${builtins.readFile ./lazydev.lua}
${builtins.readFile ./lsp.lua}
${builtins.readFile ./conform.lua}
${builtins.readFile ./cmp.lua}
${builtins.readFile ./grug.lua}
Expand Down
3 changes: 2 additions & 1 deletion modules/home-manager/programs/neovim/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ vim.api.nvim_create_autocmd("LspAttach", {
-- Jump to the definition of the word under your cursor.
-- This is where a variable was first declared, or where a function is defined, etc.
-- To jump back, press <C-t>.
map("gd", require("telescope.builtin").lsp_definitions, "[G]oto [D]efinition")
-- map("gd", require("telescope.builtin").lsp_definitions, "[G]oto [D]efinition")
map("gd", vim.lsp.buf.definition, "[G]oto [D]efinition")

-- Find references for the word under your cursor.
map("gr", require("telescope.builtin").lsp_references, "[G]oto [R]eferences")
Expand Down

0 comments on commit 297af8e

Please sign in to comment.