30 lines
599 B
Lua
30 lines
599 B
Lua
-- lua/user/treesitter.lua
|
|
local ok, configs = pcall(require, "nvim-treesitter.configs")
|
|
if not ok then
|
|
vim.notify("nvim-treesitter not found!", vim.log.levels.WARN)
|
|
return
|
|
end
|
|
|
|
configs.setup({
|
|
ensure_installed = {
|
|
"markdown",
|
|
"lua",
|
|
"python",
|
|
"java",
|
|
"c",
|
|
"cpp",
|
|
"javascript",
|
|
"kotlin",
|
|
"go",
|
|
},
|
|
highlight = {
|
|
enable = true,
|
|
use_language_tree = true,
|
|
},
|
|
incremental_selection = { enable = true },
|
|
indent = { enable = true },
|
|
context_commentstring = { enable = true },
|
|
autopairs = { enable = true },
|
|
rainbow = { enable = true },
|
|
})
|
|
|