2023-05-22 14:33:21 +00:00
|
|
|
local full_ensure = {
|
|
|
|
"bash",
|
|
|
|
"c",
|
|
|
|
"cmake",
|
|
|
|
"cpp",
|
|
|
|
"css",
|
|
|
|
"diff",
|
|
|
|
"dockerfile",
|
|
|
|
"git_config",
|
|
|
|
"git_rebase",
|
|
|
|
"gitattributes",
|
|
|
|
"gitcommit",
|
|
|
|
"gitignore",
|
|
|
|
"go",
|
|
|
|
"gomod",
|
|
|
|
"gosum",
|
|
|
|
"html",
|
|
|
|
"java",
|
|
|
|
"javascript",
|
|
|
|
"json",
|
|
|
|
"json5",
|
|
|
|
"jsonc",
|
|
|
|
"lua",
|
|
|
|
"luadoc",
|
|
|
|
"luau",
|
|
|
|
"make",
|
|
|
|
"markdown",
|
|
|
|
"markdown_inline",
|
|
|
|
"python",
|
|
|
|
"rust",
|
|
|
|
"scss",
|
|
|
|
"sql",
|
|
|
|
"toml",
|
|
|
|
"vim",
|
|
|
|
"vimdoc",
|
|
|
|
"yaml"
|
|
|
|
}
|
|
|
|
|
|
|
|
local basic_ensure = {
|
|
|
|
"toml",
|
|
|
|
"json",
|
|
|
|
"json5",
|
|
|
|
"jsonc",
|
|
|
|
"yaml",
|
|
|
|
}
|
|
|
|
|
2023-07-21 08:29:53 +00:00
|
|
|
if custom.full_feature then
|
2023-05-22 14:33:21 +00:00
|
|
|
ensure = full_ensure
|
|
|
|
else
|
|
|
|
ensure = basic_ensure
|
|
|
|
end
|
|
|
|
|
|
|
|
return {
|
|
|
|
"nvim-treesitter/nvim-treesitter",
|
2023-07-08 08:20:31 +00:00
|
|
|
name = "nvim-treesitter",
|
2023-12-14 09:45:05 +00:00
|
|
|
event = "VeryLazy",
|
2023-07-08 08:20:31 +00:00
|
|
|
build = ":TSUpdate",
|
2023-05-22 14:33:21 +00:00
|
|
|
opts = {
|
|
|
|
indent = { enable = true },
|
|
|
|
highlight = { enable = true },
|
|
|
|
ensure_installed = ensure,
|
|
|
|
auto_install = true,
|
|
|
|
sync_install = false,
|
|
|
|
},
|
2023-07-08 08:20:31 +00:00
|
|
|
config = function (this, opts)
|
|
|
|
require(this.name .. ".configs").setup(opts);
|
2023-07-21 08:29:53 +00:00
|
|
|
if custom.proxy_url ~= "" then
|
|
|
|
require(this.name .. ".install").command_extra_args = {
|
|
|
|
curl = { "--proxy", custom.proxy_url }
|
|
|
|
}
|
|
|
|
end
|
2023-07-08 08:20:31 +00:00
|
|
|
end
|
2023-05-22 14:33:21 +00:00
|
|
|
}
|