From 9c20fdbd2251afe4b25010c9be4868768a59faf3 Mon Sep 17 00:00:00 2001 From: Oscar Wallberg Date: Tue, 10 Dec 2024 15:10:13 +0100 Subject: [PATCH] fix: do not auto fold when opening buffers --- lua/core/options.lua | 2 ++ lua/plugins/treesitter.lua | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/core/options.lua b/lua/core/options.lua index fdd8cb9..3bc859b 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -21,6 +21,8 @@ vim.opt.expandtab = true vim.opt.shiftwidth = 4 vim.opt.smarttab = false -- Folds are configured in nvim-treesitter, so this is only for fallback +vim.opt.foldenable = false +vim.opt.foldlevel = 99 vim.opt.foldlevelstart = 99 vim.opt.foldmethod = "indent" vim.opt.foldignore = "" diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index bbb3580..996fbe5 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -34,7 +34,6 @@ return { vim.opt.foldmethod = "expr" vim.opt.foldexpr = "nvim_treesitter#foldexpr()" - vim.opt.foldenable = true -- Disable LSP semantic highlighting for comments because it will otherwise -- override highlights from `comment`.