|
|
|
|
@ -11,10 +11,19 @@ vim.api.nvim_create_autocmd('PackChanged', {
|
|
|
|
|
end
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
vim.api.nvim_create_autocmd('FileType', {
|
|
|
|
|
callback = function()
|
|
|
|
|
-- Enable treesitter highlighting and disable regex syntax
|
|
|
|
|
pcall(vim.treesitter.start)
|
|
|
|
|
-- Enable treesitter-based indentation
|
|
|
|
|
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
|
|
|
|
|
end,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
vim.pack.add({
|
|
|
|
|
{ src = 'https://github.com/nvim-treesitter/nvim-treesitter', name = 'treesitter', branch = 'main' },
|
|
|
|
|
{ src = 'https://github.com/nvim-treesitter/nvim-treesitter', name = 'treesitter', branch = 'main' },
|
|
|
|
|
{ src = 'https://github.com/nvim-treesitter/nvim-treesitter-context', name = 'treesitter-context' },
|
|
|
|
|
{ src = 'https://github.com/nvim-treesitter/nvim-treesitter-textobjects', name = 'treesitter-textobjects' },
|
|
|
|
|
{ src = 'https://github.com/nvim-treesitter/nvim-treesitter-textobjects', name = 'treesitter-textobjects', branch = 'main' },
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
require("nvim-treesitter").setup()
|
|
|
|
|
|