From 636eba77d7fe1fe649cab1388ba7c80dc3f5d5da Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Sun, 28 Apr 2024 12:23:41 +0200 Subject: [PATCH 1/2] treesitter: fix example --- modules/plugins/treesitter/treesitter.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/plugins/treesitter/treesitter.nix b/modules/plugins/treesitter/treesitter.nix index 8b06642..322d2eb 100644 --- a/modules/plugins/treesitter/treesitter.nix +++ b/modules/plugins/treesitter/treesitter.nix @@ -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 From 8c5a63e72c0adb162f00067611b61e2a4f7822cb Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Sun, 28 Apr 2024 12:23:59 +0200 Subject: [PATCH 2/2] treesitter: cleanup unused --- modules/plugins/treesitter/config.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/plugins/treesitter/config.nix b/modules/plugins/treesitter/config.nix index 9c50753..61bfefe 100644 --- a/modules/plugins/treesitter/config.nix +++ b/modules/plugins/treesitter/config.nix @@ -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;