Add Which-Key
Bad brain no memory. Document Keybinds I must
This commit is contained in:
parent
4484523752
commit
018c3ed289
83
after/plugin/which-key.lua
Normal file
83
after/plugin/which-key.lua
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
local ok, wk = pcall(require,"which-key")
|
||||
|
||||
if not ok then
|
||||
return
|
||||
end
|
||||
|
||||
wk.setup{
|
||||
plugins = {
|
||||
marks = true,
|
||||
registers = true,
|
||||
spelling = {
|
||||
enabled = true,
|
||||
suggestions = 10,
|
||||
},
|
||||
|
||||
presets = {
|
||||
operators = true,
|
||||
motions = true,
|
||||
text_objects = true,
|
||||
windows = true,
|
||||
nav = true,
|
||||
z = true,
|
||||
g = true,
|
||||
},
|
||||
},
|
||||
icons = {
|
||||
breadcrumb = "»",
|
||||
separator = "",
|
||||
group = " ",
|
||||
},
|
||||
popup_mappings = {
|
||||
scroll_down = '<c-d>',
|
||||
scroll_up = '<c-u>',
|
||||
},
|
||||
window = {
|
||||
border = "single",
|
||||
position = "bottom",
|
||||
winblend = 0,
|
||||
},
|
||||
ignore_missing = true,
|
||||
show_help = true,
|
||||
triggers = "auto",
|
||||
|
||||
}
|
||||
|
||||
wk.register(
|
||||
{
|
||||
l = {
|
||||
name = "lsp",
|
||||
ca = {"Code Action"}
|
||||
}
|
||||
|
||||
},
|
||||
{prefix = "<leader>"}
|
||||
)
|
||||
|
||||
---@diagnostic disable-next-line: undefined-global
|
||||
if packer_plugins["vimwiki"] and packer_plugins["vimwiki"].loaded then
|
||||
wk.register(
|
||||
{
|
||||
w = {
|
||||
name = "wiki",
|
||||
w = {"Open wiki index"},
|
||||
t = {"Open wiki index [tab]"},
|
||||
s = {"List wikis"},
|
||||
i = {"Open diary index"},
|
||||
d = {"<cmd>VimwikiMakeDiaryNote<cr>","Open diary today"},
|
||||
D = {"<cmd>VimwikiTabMakeDiaryNote<cr>","Open diary today [tab]"}
|
||||
}
|
||||
},
|
||||
{prefix = "<leader>"}
|
||||
)
|
||||
end
|
||||
|
||||
---@diagnostic disable-next-line: undefined-global
|
||||
if packer_plugins["zen-mode.nvim"] and packer_plugins["zen-mode.nvim"].loaded then
|
||||
wk.register(
|
||||
{prefix = "<leader>"},
|
||||
{
|
||||
z = {"<cmd>ZenMode<cr>","ZenMode"}
|
||||
}
|
||||
)
|
||||
end
|
||||
|
|
@ -35,6 +35,7 @@ return require('packer').startup(function(use)
|
|||
end
|
||||
}
|
||||
use "vimwiki/vimwiki"
|
||||
use "folke/which-key.nvim"
|
||||
|
||||
-------------------------
|
||||
-- Editing Enhancements
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user