fix treesitter broken

This commit is contained in:
DefectingCat
2023-12-27 09:39:58 +08:00
parent bc191808a0
commit b7cab7441f
3 changed files with 28 additions and 42 deletions

View File

@ -2,7 +2,7 @@
local M = {}
M.ui = {
transparency = true,
transparency = false,
theme = "catppuccin",
statusline = {
theme = "default", -- default/vscode/vscode_colored/minimal

View File

@ -1,38 +0,0 @@
local opts = {
ensure_installed = {
-- defaults
"vim",
"vimdoc",
"lua",
-- web dev
"html",
"css",
"javascript",
"typescript",
"tsx",
"json",
"vue",
"markdown",
"markdown_inline",
"jsdoc",
"scss",
-- low level
"rust",
"toml",
"go",
},
autotag = {
enable = true,
},
highlight = {
disable = function(_, buf)
local max_filesize = 100 * 1024 -- 100 KB
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
if ok and stats and stats.size > max_filesize then
return true
end
end,
},
}
return opts

View File

@ -66,9 +66,33 @@ local plugins = {
},
{
"nvim-treesitter/nvim-treesitter",
opts = function()
return "custom.configs.treesitter"
end,
opts = {
ensure_installed = {
-- defaults
"vim",
"vimdoc",
"lua",
-- web dev
"html",
"css",
"javascript",
"typescript",
"tsx",
"json",
"vue",
"markdown",
"markdown_inline",
"jsdoc",
"scss",
-- low level
"rust",
"toml",
"go",
},
autotag = {
enable = true,
},
},
},
{
"nvimtools/none-ls.nvim",