diff options
| author | Aotrix <[email protected]> | 2025-02-23 03:46:30 +0100 |
|---|---|---|
| committer | Aotrix <[email protected]> | 2025-02-23 03:46:30 +0100 |
| commit | 332716c04734a4f8afc273f9bee9f3fc3c7c2402 (patch) | |
| tree | a421f6c493ace508934333c107000566b4c389eb | |
| parent | 827193de75ecd7dd8da83272aafd036e12d9a573 (diff) | |
enabled treesitter for C++
| -rw-r--r-- | lua/aotrix/plugins/treesitter.lua | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lua/aotrix/plugins/treesitter.lua b/lua/aotrix/plugins/treesitter.lua index 09dc61c..7891b2c 100644 --- a/lua/aotrix/plugins/treesitter.lua +++ b/lua/aotrix/plugins/treesitter.lua @@ -26,15 +26,14 @@ return { -- the name of the parser) -- list of language that will be disabled -- disable = { "c", "rust" }, - disable = { "cpp" }, -- 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, vim.api.nvim_buf_get_name(buf)) - -- if ok and stats and stats.size > max_filesize then - -- return true - -- end - -- end, + disable = function(lang, 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, -- Setting this to true will run `:h syntax` and tree-sitter at the same time. -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). |
