auto tree sit
This commit is contained in:
parent
9c884fb841
commit
3c84ec54bf
1 changed files with 18 additions and 11 deletions
|
@ -1,9 +1,18 @@
|
||||||
|
local auto = true
|
||||||
|
local output = vim.fn.system({
|
||||||
|
"which",
|
||||||
|
"tree-sitter",
|
||||||
|
})
|
||||||
|
if output == nil or output == "" then
|
||||||
|
auto = false
|
||||||
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
dependencies = { "windwp/nvim-ts-autotag", "JoosepAlviste/nvim-ts-context-commentstring" },
|
dependencies = { "windwp/nvim-ts-autotag", "JoosepAlviste/nvim-ts-context-commentstring" },
|
||||||
build = ":TSUpdate",
|
build = ":TSUpdate",
|
||||||
event = "BufRead",
|
event = "BufRead",
|
||||||
cmd = {
|
cmd = {
|
||||||
"TSBufDisable",
|
"TSBufDisable",
|
||||||
"TSBufEnable",
|
"TSBufEnable",
|
||||||
"TSBufToggle",
|
"TSBufToggle",
|
||||||
|
@ -57,24 +66,22 @@ return {
|
||||||
"vue",
|
"vue",
|
||||||
"yaml",
|
"yaml",
|
||||||
},
|
},
|
||||||
auto_install = false,
|
auto_install = auto,
|
||||||
highlight = {
|
highlight = {
|
||||||
enable = true,
|
enable = true,
|
||||||
use_languagetree = true,
|
use_languagetree = true,
|
||||||
-- disable = function(_, bufnr) return vim.api.nvim_buf_line_count(bufnr) > 10000 end,
|
-- disable = function(_, bufnr) return vim.api.nvim_buf_line_count(bufnr) > 10000 end,
|
||||||
additional_vim_regex_highlighting = false,
|
additional_vim_regex_highlighting = false,
|
||||||
},
|
},
|
||||||
incremental_selection = { enable = true },
|
incremental_selection = { enable = true },
|
||||||
ident = { enable = true },
|
ident = { enable = true },
|
||||||
autotag = { enable = true },
|
autotag = { enable = true },
|
||||||
context_commentstring = { enable = true, enable_autocmd = false },
|
context_commentstring = { enable = true, enable_autocmd = false },
|
||||||
rainbow = {
|
rainbow = {
|
||||||
enable = true,
|
enable = true,
|
||||||
extended_mode = true,
|
extended_mode = true,
|
||||||
max_file_lines = nil,
|
max_file_lines = nil,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"nvim-treesitter/playground",
|
"nvim-treesitter/playground",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue