mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
Update nvim-ufo settings
This commit is contained in:
parent
8af8ebd72a
commit
fd6df981cd
@ -110,6 +110,11 @@ local custom_attach = function(client, bufnr)
|
||||
end
|
||||
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
-- required by nvim-ufo
|
||||
capabilities.textDocument.foldingRange = {
|
||||
dynamicRegistration = false,
|
||||
lineFoldingOnly = true
|
||||
}
|
||||
|
||||
local lspconfig = require("lspconfig")
|
||||
|
||||
|
||||
@ -30,10 +30,9 @@ local handler = function(virtText, lnum, endLnum, width, truncate)
|
||||
return newVirtText
|
||||
end
|
||||
|
||||
local opts = {}
|
||||
opts["fold_virt_text_handler"] = handler
|
||||
|
||||
require("ufo").setup(opts)
|
||||
require("ufo").setup {
|
||||
fold_virt_text_handler = handler,
|
||||
}
|
||||
|
||||
vim.keymap.set("n", "zR", require("ufo").openAllFolds)
|
||||
vim.keymap.set("n", "zM", require("ufo").closeAllFolds)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user