Is it possible to remove fold level digits from foldcolumn without any external plugin? I have the following setup (adapted from a Reddit post) and it removes the digits but the folds are not clickable.
local opt = vim.opt
local fn = vim.fn
local fc = vim.opt.fillchars:get()
local function get_fold(lnum)
if fn.foldlevel(lnum) <= fn.foldlevel(lnum - 1) then return ' ' end
return fn.foldclosed(lnum) == -1 and fc.foldopen or fc.foldclose
end
_G.get_statuscol = function()
if vim.opt_local.signcolumn:get() == 'yes' then
return "%s%l%= " .. get_fold(vim.v.lnum) .. " "
else
return ""
end
end
opt.foldmethod = "expr"
opt.foldexpr = "nvim_treesitter#foldexpr()"
opt.statuscolumn = "%!v:lua.get_statuscol()"
Can the behaviour be achieved with folds remaining clickable in foldcolumn?