Perform a semantic rename through LSP.

Section: Built-in LSP workflows

Rename a symbol

lua
lua
vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename)
Explanation

Safer and broader than plain text replacement.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Built-in LSP workflows
Go to definition
Jump to the definition of the symbol under cursor.
OpenIn sheetluasame section
Find references
List all references to a symbol.
OpenIn sheetluasame section
Show hover docs
Display hover information from the language server.
OpenIn sheetluasame section
Configure nvim-treesitter
Install parsers and enable syntax-aware modules.
OpenIn sheetlua1 tag match
Bootstrap lazy.nvim
Clone lazy.nvim automatically if missing.
OpenIn sheetlua1 tag match
Use Treesitter textobjects
Select functions and classes structurally.
OpenIn sheetlua1 tag match