mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
move keymap set to keys
This commit is contained in:
parent
b3c6e8fb84
commit
690eb0360a
1 changed files with 11 additions and 10 deletions
|
|
@ -49,6 +49,17 @@ return {
|
|||
"kevinhwang91/nvim-ufo",
|
||||
event = { "BufRead", "BufNewFile" },
|
||||
dependencies = { "kevinhwang91/promise-async" },
|
||||
keys = {
|
||||
{
|
||||
"K",
|
||||
function()
|
||||
if not require("ufo").peekFoldedLinesUnderCursor() then
|
||||
vim.lsp.buf.hover()
|
||||
end
|
||||
end,
|
||||
desc = "Peek fold or hover",
|
||||
},
|
||||
},
|
||||
init = function()
|
||||
vim.o.foldcolumn = "1"
|
||||
vim.o.foldlevel = 99
|
||||
|
|
@ -102,15 +113,5 @@ return {
|
|||
},
|
||||
}
|
||||
end,
|
||||
config = function(_, opts)
|
||||
require("ufo").setup(opts)
|
||||
|
||||
local map = require("lazyvim.util").safe_keymap_set
|
||||
map("n", "K", function()
|
||||
if not require("ufo").peekFoldedLinesUnderCursor() then
|
||||
vim.lsp.buf.hover()
|
||||
end
|
||||
end, { desc = "Peek folded lines under cursor or hover" })
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue