删除treesitter预设
This commit is contained in:
parent
3e318b17e8
commit
c9245a9d51
@ -1,7 +1,7 @@
|
||||
local G = require("G")
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
-- A list of parser names, or "all" (the four listed parsers should always be installed)
|
||||
ensure_installed = { "javascript", "typescript", "html", "css", "vue", "c", "lua", "vim", "help"},
|
||||
ensure_installed = {},
|
||||
|
||||
indent = { enable = true },
|
||||
-- Install parsers synchronously (only applied to `ensure_installed`)
|
||||
@ -29,7 +29,7 @@ require'nvim-treesitter.configs'.setup {
|
||||
-- Or use a function for more flexibility, e.g. to disable slow treesitter highlight for large files
|
||||
disable = function(lang, buf)
|
||||
local max_filesize = 100 * 1024 -- 100 KB
|
||||
local ok, stats = pcall(vim.loop.fs_stat, G.api.nvim_buf_get_name(buf))
|
||||
local ok, stats = pcall(G.loop.fs_stat, G.api.nvim_buf_get_name(buf))
|
||||
if ok and stats and stats.size > max_filesize then
|
||||
return true
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user