mirror of
https://github.com/pratiktri/dotfiles.git
synced 2026-02-04 16:41:43 +05:30
fix(neovim): Update nvim-ufo config to fix code folding issue
This commit is contained in:
@@ -6,7 +6,7 @@ return {
|
|||||||
-- Better code folding
|
-- Better code folding
|
||||||
{
|
{
|
||||||
"kevinhwang91/nvim-ufo",
|
"kevinhwang91/nvim-ufo",
|
||||||
version = "v1.4.0",
|
version = "v1.5.0",
|
||||||
cond = require("config.util").is_not_vscode(),
|
cond = require("config.util").is_not_vscode(),
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
@@ -31,7 +31,7 @@ return {
|
|||||||
return { "treesitter", "indent" }
|
return { "treesitter", "indent" }
|
||||||
end,
|
end,
|
||||||
open_fold_hl_timeout = 0,
|
open_fold_hl_timeout = 0,
|
||||||
close_fold_kinds_for_ft = { "imports", "comment" },
|
close_fold_kinds_for_ft = { default = { "imports", "comment" } },
|
||||||
fold_virt_text_handler = function(virtText, lnum, endLnum, width, truncate)
|
fold_virt_text_handler = function(virtText, lnum, endLnum, width, truncate)
|
||||||
local newVirtText = {}
|
local newVirtText = {}
|
||||||
local totalLines = vim.api.nvim_buf_line_count(0)
|
local totalLines = vim.api.nvim_buf_line_count(0)
|
||||||
@@ -81,8 +81,6 @@ return {
|
|||||||
|
|
||||||
vim.keymap.set("n", "zR", require("ufo").openAllFolds)
|
vim.keymap.set("n", "zR", require("ufo").openAllFolds)
|
||||||
vim.keymap.set("n", "zM", require("ufo").closeAllFolds)
|
vim.keymap.set("n", "zM", require("ufo").closeAllFolds)
|
||||||
|
|
||||||
require("ufo").setup()
|
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user