mirror of
https://git.aramjonghu.nl/AramJonghu/nvim.git
synced 2026-06-07 00:48:24 +02:00
treesitter is cool
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
require("nvim-treesitter.config").setup {
|
||||
ensure_installed = "all",
|
||||
sync_install = true,
|
||||
auto_install = true,
|
||||
highlight = { enable = true, additional_vim_regex_highlighting = false },
|
||||
indent = { enable = true, disable = {} },
|
||||
autotag = { enable = true },
|
||||
}
|
||||
local treesitter = require "nvim-treesitter"
|
||||
|
||||
treesitter.install { "all" }
|
||||
|
||||
local parsers = treesitter.get_installed()
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = parsers,
|
||||
callback = function()
|
||||
vim.treesitter.start()
|
||||
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
|
||||
end,
|
||||
})
|
||||
|
||||
@@ -66,6 +66,9 @@ return {
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
lazy = false,
|
||||
branch = "main",
|
||||
build = ":TSUpdate",
|
||||
config = function()
|
||||
require "config.treesitter"
|
||||
end,
|
||||
|
||||
Reference in New Issue
Block a user