Compare commits

...

2 commits

Author SHA1 Message Date
leafee98 4a656ab848 remove unsed language list for treesitter 2024-08-05 22:20:19 +08:00
leafee98 144de1986c simplify treesitter config 2024-08-05 22:01:51 +08:00

View file

@ -1,55 +1,3 @@
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",
}
if custom.full_feature then
ensure = full_ensure
else
ensure = basic_ensure
end
return { return {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
name = "nvim-treesitter", name = "nvim-treesitter",
@ -58,16 +6,16 @@ return {
opts = { opts = {
indent = { enable = true }, indent = { enable = true },
highlight = { enable = true }, highlight = { enable = true },
ensure_installed = ensure, ensure_installed = {},
auto_install = true, auto_install = true,
sync_install = false, sync_install = false,
}, },
config = function (this, opts) --config = function (this, opts)
require(this.name .. ".configs").setup(opts); -- require(this.name .. ".configs").setup(opts);
if custom.proxy_url ~= "" then -- if custom.proxy_url ~= "" then
require(this.name .. ".install").command_extra_args = { -- require(this.name .. ".install").command_extra_args = {
curl = { "--proxy", custom.proxy_url } -- curl = { "--proxy", custom.proxy_url }
} -- }
end -- end
end --end,
} }