fix nvim.ufo config

This commit is contained in:
Ray Elliott 2022-09-27 09:39:29 +01:00
parent 0eb551ebb2
commit c70f5660e8
2 changed files with 8 additions and 11 deletions

View File

@ -115,11 +115,6 @@ end
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
capabilities.textDocument.completion.completionItem.snippetSupport = true
-- nvim-ufo
capabilities.textDocument.foldingRange = {
dynamicRegistration = false,
lineFoldingOnly = true
}
for _, lsp in ipairs(servers) do
nvim_lsp[lsp].setup {
@ -129,12 +124,6 @@ for _, lsp in ipairs(servers) do
}
end
-- nvim-ufo
require('ufo').setup()
vim.keymap.set('n', 'gH', function()
local winid = require('ufo').peekFoldedLinesUnderCursor()
end)
local runtime_path = vim.split(package.path, ';')
table.insert(runtime_path, "lua/?.lua")
table.insert(runtime_path, "lua/?/init.lua")

View File

@ -11,3 +11,11 @@ require("cmp").setup({
-- nvim-ts-autotag
require'nvim-treesitter.configs'.setup {autotag = {enable = true}}
------
-- nvim-ufo
require('ufo').setup({
provider_selector = function(bufnr, filetype, buftype)
return {'treesitter', 'indent'}
end
})
------