renaming things

This commit is contained in:
2026-06-22 22:14:14 +02:00
parent 48fdfaeb2c
commit 92b952bdb3
2 changed files with 19 additions and 0 deletions

View File

@@ -67,6 +67,24 @@ Leave terminal mode and return to normal mode:
```
## LSP
When an LSP server is attached to the current buffer:
- `gd` go to definition
- `gD` go to declaration
- `grd` list references
- `grn` rename symbol
- `<C-Space>` trigger completion
Diagnostics:
- `g.` open diagnostic float
- `gl` send diagnostics to the location list
- `g]` jump to next error
- `g[` jump to previous error
## Tree-sitter
Tree-sitter is managed with `nvim-treesitter` via `vim.pack`.

View File

@@ -32,6 +32,7 @@ vim.api.nvim_create_autocmd("LspAttach", {
vim.keymap.set("n", "gd", vim.lsp.buf.definition, { buffer = ev.buf })
vim.keymap.set("n", "gD", vim.lsp.buf.declaration, { buffer = ev.buf })
vim.keymap.set("n", "grd", vim.lsp.buf.references, { buffer = ev.buf })
vim.keymap.set("n", "grn", vim.lsp.buf.rename, { buffer = ev.buf })
vim.keymap.set("i", "<C-Space>", vim.lsp.completion.get, { buffer = ev.buf })
end,
})