From 714f006a3431166abe40950a216858cdb101ea40 Mon Sep 17 00:00:00 2001 From: diniamo Date: Sat, 13 Jul 2024 18:02:46 +0200 Subject: [PATCH] plugins/treesitter: remove vim.cmd hack --- modules/plugins/treesitter/config.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/plugins/treesitter/config.nix b/modules/plugins/treesitter/config.nix index 76822d9..bcd451f 100644 --- a/modules/plugins/treesitter/config.nix +++ b/modules/plugins/treesitter/config.nix @@ -37,11 +37,10 @@ in { }; # For some reason treesitter highlighting does not work on start if this is set before syntax on - # HACK: is there a way to convert the foldexpr line to lua? luaConfigRC.treesitter-fold = mkIf cfg.fold (entryBefore ["basic"] '' -- This is required by treesitter-context to handle folds vim.o.foldmethod = "expr" - vim.cmd("set foldexpr=nvim_treesitter#foldexpr())" + vim.o.foldexpr = "nvim_treesitter#foldexpr()" -- This is optional, but is set rather as a sane default. -- If unset, opened files will be folded by automatically as