fix nvim.ufo config
This commit is contained in:
parent
0eb551ebb2
commit
c70f5660e8
|
@ -115,11 +115,6 @@ end
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
|
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
|
||||||
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
||||||
-- nvim-ufo
|
|
||||||
capabilities.textDocument.foldingRange = {
|
|
||||||
dynamicRegistration = false,
|
|
||||||
lineFoldingOnly = true
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, lsp in ipairs(servers) do
|
for _, lsp in ipairs(servers) do
|
||||||
nvim_lsp[lsp].setup {
|
nvim_lsp[lsp].setup {
|
||||||
|
@ -129,12 +124,6 @@ for _, lsp in ipairs(servers) do
|
||||||
}
|
}
|
||||||
end
|
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, ';')
|
local runtime_path = vim.split(package.path, ';')
|
||||||
table.insert(runtime_path, "lua/?.lua")
|
table.insert(runtime_path, "lua/?.lua")
|
||||||
table.insert(runtime_path, "lua/?/init.lua")
|
table.insert(runtime_path, "lua/?/init.lua")
|
||||||
|
|
|
@ -11,3 +11,11 @@ require("cmp").setup({
|
||||||
-- nvim-ts-autotag
|
-- nvim-ts-autotag
|
||||||
require'nvim-treesitter.configs'.setup {autotag = {enable = true}}
|
require'nvim-treesitter.configs'.setup {autotag = {enable = true}}
|
||||||
------
|
------
|
||||||
|
|
||||||
|
-- nvim-ufo
|
||||||
|
require('ufo').setup({
|
||||||
|
provider_selector = function(bufnr, filetype, buftype)
|
||||||
|
return {'treesitter', 'indent'}
|
||||||
|
end
|
||||||
|
})
|
||||||
|
------
|
||||||
|
|
Loading…
Reference in New Issue