vim.keymap.set("n", "gd", vim.lsp.buf.definition)A core LSP navigation mapping.
Language-aware development workflows in Neovim with built-in LSP, Treesitter, and plugin managers.
Use Neovim’s built-in LSP features for semantic code navigation.
vim.keymap.set("n", "gd", vim.lsp.buf.definition)A core LSP navigation mapping.
vim.keymap.set("n", "gr", vim.lsp.buf.references)Helpful for refactors and impact analysis.
vim.keymap.set("n", "K", vim.lsp.buf.hover)Commonly used for signatures, docs, and type details.
vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename)Safer and broader than plain text replacement.
Enable structural parsing for better highlighting and editing.
require("nvim-treesitter.configs").setup({
ensure_installed = { "lua", "vim", "javascript", "typescript" },
highlight = { enable = true },
indent = { enable = true },
})Treesitter improves syntax-aware highlighting and related editor features.
-- usually configured via nvim-treesitter-textobjectsTreesitter textobjects can make editing much more semantic.
Install and organize plugins cleanly in modern Neovim.
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath })
end
vim.opt.rtp:prepend(lazypath)A common modern bootstrap pattern for plugin management.
require("lazy").setup({
{ "nvim-treesitter/nvim-treesitter" },
{ "neovim/nvim-lspconfig" },
{ "nvim-telescope/telescope.nvim", dependencies = { "nvim-lua/plenary.nvim" } },
})This keeps plugin definitions in Lua and supports lazy loading.
:checkhealthOne of the best first steps when debugging Neovim environments.