Neovim LSP, Treesitter, and Plugins/Configure nvim-treesitter

Install parsers and enable syntax-aware modules.

Section: Treesitter

Configure nvim-treesitter

lua
lua
require("nvim-treesitter.configs").setup({
  ensure_installed = { "lua", "vim", "javascript", "typescript" },
  highlight = { enable = true },
  indent = { enable = true },
})
Explanation

Treesitter improves syntax-aware highlighting and related editor features.

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 Treesitter
Use Treesitter textobjects
Select functions and classes structurally.
OpenIn sheetluasame section
Go to definition
Jump to the definition of the symbol under cursor.
OpenIn sheetlua1 tag match
Bootstrap lazy.nvim
Clone lazy.nvim automatically if missing.
OpenIn sheetlua1 tag match
Find references
List all references to a symbol.
OpenIn sheetlua1 tag match
Declare plugins with lazy.nvim
Register plugins and dependencies in Lua.
OpenIn sheetlua1 tag match
Show hover docs
Display hover information from the language server.
OpenIn sheetlua1 tag match