Compare commits

...

3 commits

Author SHA1 Message Date
56a8476bc1
Merge pull request #269 from horriblename/fix-weird-luainline
fix treesitter.highlight.disable example
2024-04-28 12:56:18 +00:00
Ching Pei Yang
8c5a63e72c treesitter: cleanup unused 2024-04-28 12:23:59 +02:00
Ching Pei Yang
636eba77d7 treesitter: fix example 2024-04-28 12:23:41 +02:00
2 changed files with 1 additions and 2 deletions

View file

@ -6,7 +6,6 @@
}: let
inherit (lib.modules) mkIf mkMerge;
inherit (lib.lists) optional optionals;
inherit (lib.trivial) boolToString;
inherit (lib.nvim.binds) mkSetBinding addDescriptionsToMappings;
inherit (lib.nvim.lua) toLuaObject;
inherit (lib.nvim.dag) entryBefore entryAfter;

View file

@ -97,7 +97,7 @@ in {
example = literalMD ''
```lua
-- Disable slow treesitter highlight for large files
disable = function(lang, buf)
function(lang, buf)
local max_filesize = 1000 * 1024 -- 1MB
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