mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-26 15:06:45 +00:00
treesitter: fix example
This commit is contained in:
parent
57b5585372
commit
636eba77d7
1 changed files with 1 additions and 1 deletions
|
@ -97,7 +97,7 @@ in {
|
||||||
example = literalMD ''
|
example = literalMD ''
|
||||||
```lua
|
```lua
|
||||||
-- Disable slow treesitter highlight for large files
|
-- Disable slow treesitter highlight for large files
|
||||||
disable = function(lang, buf)
|
function(lang, buf)
|
||||||
local max_filesize = 1000 * 1024 -- 1MB
|
local max_filesize = 1000 * 1024 -- 1MB
|
||||||
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
|
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
|
if ok and stats and stats.size > max_filesize then
|
||||||
|
|
Loading…
Reference in a new issue