pojokcodeid.nvim-lazy/lua/user/treesitter.lua

39 lines
916 B
Lua
Raw Normal View History

2023-02-20 09:25:28 +07:00
local status_ok, configs = pcall(require, "nvim-treesitter.configs")
if not status_ok then
return
end
configs.setup({
2023-02-05 09:19:15 +07:00
ignore_install = { "phpdoc" }, -- List of parsers to ignore installing
2023-01-15 00:57:57 +07:00
highlight = {
enable = true,
2023-02-05 09:19:15 +07:00
disable = { "css" }, -- list of language that will be disabled
2023-02-05 01:44:41 +07:00
additional_vim_regex_highlighting = false,
2023-01-15 00:57:57 +07:00
},
context_commentstring = {
enable = true,
enable_autocmd = false,
2023-02-05 09:19:15 +07:00
config = {
-- Languages that have a single comment style
typescript = "// %s",
css = "/* %s */",
scss = "/* %s */",
html = "<!-- %s -->",
svelte = "<!-- %s -->",
vue = "<!-- %s -->",
json = "",
},
2023-01-15 00:57:57 +07:00
},
rainbow = {
enable = true,
disable = { "html" },
extended_mode = false,
max_file_lines = nil,
},
2023-02-05 01:44:41 +07:00
autotag = { enable = true },
incremental_selection = { enable = true },
indent = { enable = true, disable = { "python", "css" } },
autopairs = {
enable = true,
},
2023-01-15 00:57:57 +07:00
})