2024-03-04 14:39:06 -05:00
|
|
|
if (vim.g.enabletreesitter == 1) then
|
|
|
|
local parser_dir
|
2024-03-01 22:30:11 -05:00
|
|
|
|
2024-03-04 14:39:06 -05:00
|
|
|
if (vim.g.treesitterparserdir == nill) then
|
|
|
|
parser_dir = "~/.config/nvim/treesitter-parsers"
|
|
|
|
else
|
|
|
|
parser_dir = vim.g.treesitterparserdir
|
|
|
|
end
|
2024-03-01 21:59:23 -05:00
|
|
|
|
2024-03-04 14:39:06 -05:00
|
|
|
vim.opt.runtimepath:append(parser_dir)
|
2024-03-01 21:59:23 -05:00
|
|
|
|
2024-03-04 14:39:06 -05:00
|
|
|
require'nvim-treesitter.configs'.setup {
|
|
|
|
ensure_installed = { "bash", "c", "cpp", "git_config", "html", "java", "javascript", "json", "lua", "php", "python", "query", "rust", "toml", "typescript", "vim", "vue" },
|
|
|
|
sync_install = false,
|
|
|
|
auto_install = false,
|
|
|
|
parser_install_dir = parser_dir,
|
2024-03-01 21:59:23 -05:00
|
|
|
|
2024-03-04 14:39:06 -05:00
|
|
|
highlight = {
|
|
|
|
enable = true,
|
|
|
|
disable = {},
|
|
|
|
additional_vim_regex_highlighting = false,
|
2024-03-01 21:59:23 -05:00
|
|
|
}
|
2024-03-04 14:39:06 -05:00
|
|
|
}
|
2024-03-01 21:59:23 -05:00
|
|
|
end
|