This commit is contained in:
asep komarudin 2023-11-01 10:10:51 +07:00
parent 721a871f36
commit e52160557a
3 changed files with 45 additions and 17 deletions

View file

@ -1,5 +1,5 @@
return { return {
-- "nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
-- config = function() -- config = function()
-- -- require("nvim-treesitter.configs").setup({ -- -- require("nvim-treesitter.configs").setup({
-- -- ensure_installed = { "html", "css", "javascript" }, -- -- ensure_installed = { "html", "css", "javascript" },

View file

@ -10,23 +10,9 @@ configs.setup({
ignore_install = { "phpdoc" }, -- List of parsers to ignore installing ignore_install = { "phpdoc" }, -- List of parsers to ignore installing
highlight = { highlight = {
enable = true, enable = true,
disable = { "css" }, -- list of language that will be disabled disable = function(_, bufnr) return vim.b[bufnr].large_buf end,
additional_vim_regex_highlighting = false,
},
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 -->",
json = "",
},
}, },
context_commentstring = { enable = true, enable_autocmd = false },
rainbow = { rainbow = {
enable = true, enable = true,
disable = { "html" }, disable = { "html" },

View file

@ -0,0 +1,42 @@
local status_ok, configs = pcall(require, "nvim-treesitter.configs")
if not status_ok then
return
end
configs.setup({
ensure_installed = {
"lua",
"vim",
},
ignore_install = { "phpdoc" }, -- List of parsers to ignore installing
highlight = {
enable = true,
disable = { "css" }, -- list of language that will be disabled
additional_vim_regex_highlighting = false,
},
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 -->",
json = "",
},
},
rainbow = {
enable = true,
disable = { "html" },
extended_mode = false,
max_file_lines = nil,
},
autotag = { enable = true },
incremental_selection = { enable = true },
indent = { enable = true, disable = { "python", "css" } },
autopairs = {
enable = true,
},
})