From 5518885b31ff2b3a8d097f5601f9c32b00b03afc Mon Sep 17 00:00:00 2001 From: "asep.komarudin" Date: Thu, 28 Mar 2024 18:40:37 +0700 Subject: [PATCH] add: update config ufo --- lua/custom/plugins/nvimufo.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/custom/plugins/nvimufo.lua b/lua/custom/plugins/nvimufo.lua index 0c17511..85f150d 100644 --- a/lua/custom/plugins/nvimufo.lua +++ b/lua/custom/plugins/nvimufo.lua @@ -17,7 +17,7 @@ return { end, }, }, - event = "BufRead", + event = "BufReadPost", config = function() vim.o.foldcolumn = "1" -- '0' is not bad vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value @@ -28,7 +28,7 @@ return { -- these are "extra", change them as you like vim.keymap.set("n", "zR", require("ufo").openAllFolds) vim.keymap.set("n", "zM", require("ufo").closeAllFolds) - + vim.cmd("highlight FoldColumn guifg=" .. vim.fn.synIDattr(vim.fn.synIDtrans(vim.fn.hlID("Comment")), "fg")) -- Option 3: treesitter as a main provider instead -- Only depend on `nvim-treesitter/queries/filetype/folds.scm`, -- performance and stability are better than `foldmethod=nvim_treesitter#foldexpr()`