2022-02-26 15:41:47 +01:00
|
|
|
local wk = require("which-key")
|
|
|
|
|
|
|
|
local keys = {
|
|
|
|
-- Edition and navigation mappins
|
|
|
|
["["] = {
|
|
|
|
name = "Previous",
|
|
|
|
["<space>"] = "Insert blank line above",
|
|
|
|
["<C-L>"] = "Previous location list file",
|
|
|
|
["<C-Q>"] = "Previous quickfix list file",
|
|
|
|
["<C-T>"] = "Previous tag in preview window",
|
|
|
|
a = "Previous argument",
|
|
|
|
A = "First argument",
|
|
|
|
b = "Previous buffer",
|
|
|
|
B = "First buffer",
|
|
|
|
e = "Exchange previous line",
|
|
|
|
f = "Previous file in directory",
|
|
|
|
l = "Previous location list entry",
|
|
|
|
L = "First Location list entry",
|
|
|
|
n = "Previous conflict marker/diff hunk",
|
|
|
|
p = "Paste line above",
|
|
|
|
P = "Paste line above",
|
|
|
|
q = "Previous quickfix list entry",
|
|
|
|
Q = "First quickfix list entry",
|
|
|
|
t = "Previous matching tag",
|
|
|
|
T = "First matching tag",
|
|
|
|
z = "Previous fold",
|
|
|
|
-- Encoding
|
|
|
|
C = "C string encode",
|
|
|
|
u = "URL encode",
|
|
|
|
x = "XML encode",
|
|
|
|
y = "C string encode",
|
2022-03-01 15:08:30 +01:00
|
|
|
-- Custom
|
|
|
|
d = { vim.diagnostic.goto_prev, "Previous diagnostic" }
|
2022-02-26 15:41:47 +01:00
|
|
|
},
|
|
|
|
["]"] = {
|
|
|
|
name = "Next",
|
|
|
|
["<space>"] = "Insert blank line below",
|
|
|
|
["<C-L>"] = "Next location list file",
|
|
|
|
["<C-Q>"] = "Next quickfix list file",
|
|
|
|
["<C-T>"] = "Next tag in preview window",
|
|
|
|
a = "Next argument",
|
|
|
|
A = "Last argument",
|
|
|
|
b = "Next buffer",
|
|
|
|
B = "Last buffer",
|
|
|
|
e = "Exchange next line",
|
|
|
|
f = "Next file in directory",
|
|
|
|
l = "Next location list entry",
|
|
|
|
L = "Last Location list entry",
|
|
|
|
n = "Next conflict marker/diff hunk",
|
|
|
|
p = "Paste line below",
|
|
|
|
P = "Paste line below",
|
|
|
|
q = "Next quickfix list entry",
|
|
|
|
Q = "Last quickfix list entry",
|
|
|
|
t = "Next matching tag",
|
|
|
|
T = "Last matching tag",
|
|
|
|
z = "Next fold",
|
|
|
|
-- Decoding
|
|
|
|
C = "C string decode",
|
|
|
|
u = "URL decode",
|
|
|
|
x = "XML decode",
|
|
|
|
y = "C string decode",
|
2022-03-01 15:08:30 +01:00
|
|
|
-- Custom
|
|
|
|
d = { vim.diagnostic.goto_next, "Next diagnostic" }
|
2022-02-26 15:41:47 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
-- Option mappings
|
|
|
|
["[o"] = {
|
|
|
|
name = "Enable option",
|
|
|
|
b = "Light background",
|
|
|
|
c = "Cursor line",
|
|
|
|
d = "Diff",
|
2023-03-17 17:53:19 +01:00
|
|
|
f = { "<cmd>FormatEnable<CR>", "LSP Formatting" },
|
2022-02-26 15:41:47 +01:00
|
|
|
h = "Search high-lighting",
|
|
|
|
i = "Case insensitive search",
|
|
|
|
l = "List mode",
|
|
|
|
n = "Line numbers",
|
|
|
|
r = "Relative line numbers",
|
2023-03-17 14:08:01 +01:00
|
|
|
p = { "<cmd>lwindow<CR>", "Location list" },
|
|
|
|
q = { "<cmd>cwindow<CR>", "Quickfix list" },
|
2022-02-26 15:41:47 +01:00
|
|
|
u = "Cursor column",
|
|
|
|
v = "Virtual editing",
|
|
|
|
w = "Text wrapping",
|
|
|
|
x = "Cursor line and column",
|
|
|
|
z = "Spell checking",
|
|
|
|
},
|
|
|
|
["]o"] = {
|
|
|
|
name = "Option off",
|
|
|
|
b = "Light background",
|
|
|
|
c = "Cursor line",
|
|
|
|
d = "Diff",
|
2023-03-17 17:53:19 +01:00
|
|
|
f = { "<cmd>FormatDisable<CR>", "LSP Formatting" },
|
2022-02-26 15:41:47 +01:00
|
|
|
h = "Search high-lighting",
|
|
|
|
i = "Case insensitive search",
|
|
|
|
l = "List mode",
|
|
|
|
n = "Line numbers",
|
2023-03-17 14:08:01 +01:00
|
|
|
p = { "<cmd>lclose<CR>", "Location list" },
|
|
|
|
q = { "<cmd>cclose<CR>", "Quickfix list" },
|
2022-02-26 15:41:47 +01:00
|
|
|
r = "Relative line numbers",
|
|
|
|
u = "Cursor column",
|
|
|
|
v = "Virtual editing",
|
|
|
|
w = "Text wrapping",
|
|
|
|
x = "Cursor line and column",
|
|
|
|
z = "Spell checking",
|
|
|
|
},
|
|
|
|
["yo"] = {
|
|
|
|
name = "Option toggle",
|
|
|
|
b = "Light background",
|
|
|
|
c = "Cursor line",
|
|
|
|
d = "Diff",
|
2023-03-17 17:53:19 +01:00
|
|
|
f = { "<cmd>FormatToggle<CR>", "LSP Formatting" },
|
2022-02-26 15:41:47 +01:00
|
|
|
h = "Search high-lighting",
|
|
|
|
i = "Case insensitive search",
|
|
|
|
l = "List mode",
|
|
|
|
n = "Line numbers",
|
2023-03-17 14:08:01 +01:00
|
|
|
p = { "<Plug>(qf_loc_toggle)", "Location list" },
|
|
|
|
q = { "<Plug>(qf_qf_toggle)", "Quickfix list" },
|
2022-02-26 15:41:47 +01:00
|
|
|
r = "Relative line numbers",
|
|
|
|
u = "Cursor column",
|
|
|
|
v = "Virtual editing",
|
|
|
|
w = "Text wrapping",
|
|
|
|
x = "Cursor line and column",
|
|
|
|
z = "Spell checking",
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
wk.register(keys)
|