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-03-03 19:15:17 +07:00
|
|
|
ensure_installed = {
|
|
|
|
"lua",
|
|
|
|
"vim",
|
|
|
|
},
|
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-11-01 10:36:43 +07:00
|
|
|
disable = { "css" }, -- list of language that will be disabled
|
|
|
|
additional_vim_regex_highlighting = false,
|
|
|
|
},
|
2023-12-02 00:29:19 +07:00
|
|
|
-- context_commentstring = {
|
|
|
|
-- enable = true,
|
|
|
|
-- enable_autocmd = false,
|
|
|
|
-- config = {
|
|
|
|
-- Languages that have a single comment style
|
|
|
|
-- typescript = "// %s",
|
|
|
|
-- css = "/* %s */",
|
|
|
|
-- scss = "/* %s */",
|
|
|
|
-- html = "<!-- %s -->",
|
|
|
|
-- svelte = "<!-- %s -->",
|
|
|
|
-- vue = "<!-- %s -->",
|
|
|
|
-- jsx = "{/* %s */}",
|
|
|
|
-- json = "",
|
|
|
|
-- },
|
|
|
|
-- },
|
2023-01-15 00:57:57 +07:00
|
|
|
rainbow = {
|
|
|
|
enable = true,
|
2024-02-18 21:29:22 +07:00
|
|
|
disable = { "html", "jsx" },
|
2023-11-03 22:39:25 +07:00
|
|
|
equery = "rainbow-parens",
|
|
|
|
strategy = require("ts-rainbow").strategy.global,
|
2023-01-15 00:57:57 +07:00
|
|
|
},
|
2024-02-18 21:29:22 +07:00
|
|
|
-- autotag = { enable = true, enable_rename = true, enable_close = true, enable_close_on_slash = true },
|
2023-02-05 01:44:41 +07:00
|
|
|
incremental_selection = { enable = true },
|
|
|
|
indent = { enable = true, disable = { "python", "css" } },
|
|
|
|
autopairs = {
|
|
|
|
enable = true,
|
|
|
|
},
|
2023-01-15 00:57:57 +07:00
|
|
|
})
|