From 92b952bdb3e2f656600eb723fd44a78c29d32f39 Mon Sep 17 00:00:00 2001 From: Roman Date: Mon, 22 Jun 2026 22:14:14 +0200 Subject: [PATCH] renaming things --- nvim/.config/nvim/README.md | 18 ++++++++++++++++++ nvim/.config/nvim/lua/romanzy/remap.lua | 1 + 2 files changed, 19 insertions(+) diff --git a/nvim/.config/nvim/README.md b/nvim/.config/nvim/README.md index c309ae3..83f1371 100644 --- a/nvim/.config/nvim/README.md +++ b/nvim/.config/nvim/README.md @@ -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 +- `` 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`. diff --git a/nvim/.config/nvim/lua/romanzy/remap.lua b/nvim/.config/nvim/lua/romanzy/remap.lua index 8ee47ba..d8377ab 100644 --- a/nvim/.config/nvim/lua/romanzy/remap.lua +++ b/nvim/.config/nvim/lua/romanzy/remap.lua @@ -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", "", vim.lsp.completion.get, { buffer = ev.buf }) end, })