fix gd, and textobjects

main
Mathias Rothenhaeusler 2025-11-03 20:40:56 +01:00
parent 8d52d1ae69
commit 4304241960
2 changed files with 4 additions and 1 deletions

View File

@ -183,6 +183,9 @@ require('lazy').setup({
}, },
indent = { enable = true, disable = { 'ruby' } }, indent = { enable = true, disable = { 'ruby' } },
}, },
dependencies = {
'nvim-treesitter/nvim-treesitter-textobjects',
},
-- There are additional nvim-treesitter modules that you can use to interact -- There are additional nvim-treesitter modules that you can use to interact
-- with nvim-treesitter. You should go explore a few and see what interests you: -- with nvim-treesitter. You should go explore a few and see what interests you:
-- --

View File

@ -43,7 +43,7 @@ local on_attach = function(_, bufnr)
local opts = { noremap = true, silent = true, buffer = bufnr } local opts = { noremap = true, silent = true, buffer = bufnr }
keymap.set("n", "g0", "<cmd>lua vim.lsp.buf.document_symbol()<CR>", opts) keymap.set("n", "g0", "<cmd>lua vim.lsp.buf.document_symbol()<CR>", opts)
keymap.set("n", "gd", "<cmd>Telescope lsp_definitions<CR>", opts) keymap.set("n", "gd", "<cmd>lua vim.lsp.buf.definition()<CR>", opts)
keymap.set("n", "gi", "<cmd>lua vim.lsp.buf.implementation()<CR>", opts) keymap.set("n", "gi", "<cmd>lua vim.lsp.buf.implementation()<CR>", opts)
keymap.set("n", "<leader>l", smart_format, opts) keymap.set("n", "<leader>l", smart_format, opts)
keymap.set("n", "<leader>rn", "<cmd>lua vim.lsp.buf.rename()<CR>", opts) keymap.set("n", "<leader>rn", "<cmd>lua vim.lsp.buf.rename()<CR>", opts)