Add a new keymap for hover

This commit is contained in:
Mohammad Moosazadeh 2024-06-02 18:34:04 -04:00
parent 3c7a328802
commit 0787960bc9
1 changed files with 6 additions and 0 deletions

View File

@ -10,6 +10,12 @@ return {
-- Using ufo provider need remap `zR` and `zM`. If Neovim is 0.6.1, remap yourself -- Using ufo provider need remap `zR` and `zM`. If Neovim is 0.6.1, remap yourself
vim.keymap.set('n', 'zR', require('ufo').openAllFolds) vim.keymap.set('n', 'zR', require('ufo').openAllFolds)
vim.keymap.set('n', 'zM', require('ufo').closeAllFolds) vim.keymap.set('n', 'zM', require('ufo').closeAllFolds)
vim.keymap.set('n', 'zK', function()
local winid = require('ufo').peekFoldedLinesUnderCursor()
if not winid then
vim.lsp.but.hover()
end
end, { desc = 'Peek Fold' })
-- Option 2: nvim lsp as LSP client -- Option 2: nvim lsp as LSP client
-- Tell the server the capability of foldingRange, -- Tell the server the capability of foldingRange,