diff --git a/init.plugins.vim b/init.plugins.vim index ba0c85e..ab8c046 100644 --- a/init.plugins.vim +++ b/init.plugins.vim @@ -10,6 +10,10 @@ call plug#begin('~/.config/nvim/bundle') " https://github.com/simrat39/rust-tools.nvim Plug 'simrat39/rust-tools.nvim' +" https://github.com/kevinhwang91/ +Plug 'kevinhwang91/promise-async' +Plug 'kevinhwang91/nvim-ufo' + " colorscheme (temporary) Plug 'https://github.com/marko-cerovac/material.nvim', { 'branch': 'main' } let g:material_style = 'lighter' diff --git a/lua/init-lsp.lua b/lua/init-lsp.lua index e9ba36a..97d12cd 100644 --- a/lua/init-lsp.lua +++ b/lua/init-lsp.lua @@ -113,6 +113,11 @@ 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 { @@ -122,6 +127,12 @@ 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")