Use transparent foldtext feature

Removes an old workaround to show the first line of text in the fold
rather than a message.
This commit is contained in:
Kenneth Benzie 2025-06-18 12:44:46 +01:00
parent 1704b2f482
commit d0b4e419e6

View File

@ -81,13 +81,8 @@ vim.opt.joinspaces = false
vim.opt.foldlevel = 20 vim.opt.foldlevel = 20
vim.opt.foldmethod = 'expr' vim.opt.foldmethod = 'expr'
vim.opt.foldexpr = 'nvim_treesitter#foldexpr()' vim.opt.foldexpr = 'nvim_treesitter#foldexpr()'
vim.opt.foldtext = ''
vim.opt.fillchars = 'fold: ' vim.opt.fillchars = 'fold: '
-- FIXME: Replace this with transparent fold text in 0.10
-- https://github.com/neovim/neovim/pull/20750
function _G.fold_text()
return vim.fn.getline(vim.v.foldstart)
end
vim.opt.foldtext = 'v:lua.fold_text()'
-- Enable all mouse features -- Enable all mouse features
vim.opt.mouse = 'a' vim.opt.mouse = 'a'