mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
update ufo conf (preview)
This commit is contained in:
parent
20964853a4
commit
2a6267bfde
@ -7,6 +7,15 @@ vim.o.foldenable = true
|
||||
vim.keymap.set('n', 'zR', require('ufo').openAllFolds)
|
||||
vim.keymap.set('n', 'zM', require('ufo').closeAllFolds)
|
||||
|
||||
-- preview the foled lines in floating window
|
||||
vim.keymap.set('n', '<tab>p', function()
|
||||
local winid = require('ufo').peekFoldedLinesUnderCursor()
|
||||
if not winid then
|
||||
-- nvimlsp
|
||||
vim.lsp.buf.hover()
|
||||
end
|
||||
end)
|
||||
|
||||
local handler = function(virtText, lnum, endLnum, width, truncate)
|
||||
local newVirtText = {}
|
||||
local suffix = (' %d '):format(endLnum - lnum)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user