From 9d088fe9d5d2e5875943478c6747f78f16cfe14b Mon Sep 17 00:00:00 2001 From: Rokas Puzonas Date: Thu, 11 May 2023 17:31:02 +0300 Subject: [PATCH] disable ufo --- lua/config/ufo.lua | 5 ++++- lua/plugins.lua | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lua/config/ufo.lua b/lua/config/ufo.lua index a1822fa..fad5d13 100644 --- a/lua/config/ufo.lua +++ b/lua/config/ufo.lua @@ -2,9 +2,12 @@ return { "kevinhwang91/nvim-ufo", requires = {"kevinhwang91/promise-async", "nvim-treesitter/nvim-treesitter"}, config = function () + local default = {"treesitter", "indent"} + local filetypes = { c = {'indent'} } + require("ufo").setup({ provider_selector = function(bufnr, filetype, buftype) - return {"treesitter", "indent"} + return filetypes[filetype] or default end }) vim.api.nvim_set_hl(0, "UfoFoldedBg", { link = "ColorColumn" }) diff --git a/lua/plugins.lua b/lua/plugins.lua index 4adb370..9ac3cef 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -32,7 +32,7 @@ return function(use) use_config "ts-playground" use_config "diffview" use_config "git-conflict" - use_config "ufo" + -- use_config "ufo" use { "nvim-telescope/telescope.nvim",