chore(nvim): reorder key bindings in whichkey

This commit is contained in:
Stefan Imhoff
2022-12-10 14:51:23 +01:00
parent bb72937d8a
commit b699c1bf4b

View File

@@ -11,18 +11,62 @@ local mappings = {
e = { "<CMD>NvimTreeToggle<CR>", "Explorer" },
f = { "<CMD>Telescope current_buffer_fuzzy_find<CR>", "Find Files" },
h = { "<CMD>nohlsearch<CR>", "No Highlight" },
i = { "<CMD>silent !open -a iA\\ Writer.app '%:p'<CR>", "Open in iA Writer" },
i = { "<CMD>silent !open -a iA\\ Writer.app '%:p'<CR>", "iA Writer" },
j = { "<CMD>b#<CR>", "Toggle Buffers" },
p = { "<CMD>Telescope projects<CR>", "Projects" },
q = { "<CMD>Bdelete!<CR>", "Close Buffer" },
s = {
a = { "<Cmd>lua vim.lsp.buf.code_action()<CR>", "LSP Code Actions" },
d = { "<Cmd>Telescope lsp_definitions<CR>", "LSP Definitions" },
s = { "<Cmd>Telescope lsp_document_symbols<CR>", "LSP Document Symbols" },
w = { "<Cmd>Telescope lsp_workspace_symbols<CR>", "LSP Live Workspace Symbols" },
r = { "<Cmd>Telescope lsp_references<CR>", "LSP References" },
t = { "<Cmd>Telescope lsp_type_definitions<CR>", "LSP Type Definition" },
name = "Search",
"<CMD>lua require('spectre').open_file_search()<CR>",
"Spectre",
},
t = {
name = "Text Editing",
c = { "<CMD>call ToggleColorColumn()<CR>", "Show/Hide Colorcolumn" },
d = { "<CMD>call SpellEn()<CR>", "Set Spelling Language to English" },
e = { "<CMD>call SpellDe()<CR>", "Set Spelling Languate to German" },
l = { "<CMD>set list!<CR>", "List" },
m = { "<CMD>MarkdownPreviewToggle<CR>", "Markdown Preview" },
s = { "<CMD>set spell!<CR>", "Spell Checking" },
w = { "<CMD>call ToggleWrap()<CR>", "Soft wrap/No wrap" },
},
v = { "<CMD>lua require('export-to-vscode').launch()<CR>", "Visual Studio Code" },
w = { "<CMD>w!<CR>", "Save" },
x = { "<CMD>Twilight<CR>", "Twilight Mode" },
z = { "<CMD>ZenMode<CR>", "Zen Mode" },
A = { "<CMD>Alpha<CR>", "Alpha" },
B = {
name = "Bufferline",
p = { "<CMD>BufferLinePick<CR>", "Pick" },
x = { "<CMD>BufferLinePickClose<CR>", "Pick to Close" },
},
E = {
name = "Explorer",
a = { "<CMD>NvimTreeFocus<CR>", "Focus" },
c = { "<CMD>NvimTreeCollapse<CR>", "Collapse Folders" },
f = { "<CMD>NvimTreeFindFile<CR>", "Find File" },
r = { "<CMD>NvimTreeRefresh<CR>", "Refresh" },
},
F = { "<CMD>Telescope live_grep<CR>", "Find Text" },
G = {
name = "Git & GitHub",
b = { "<CMD>BlamerToggle<CR>", "Blame Line" },
g = { "<CMD>GBInteractive<CR>", "Git Blame in GitHub" },
h = { "<CMD>GHInteractive<CR>", "Open in GitHub" },
},
L = {
name = "LSP, FZF & Telescope",
L = {
name = "LSP",
a = { "<CMD>lua vim.lsp.buf.add_workspace_folder()<CR>", "Add Workspace" },
c = { "<Cmd>lua vim.lsp.buf.code_action()<CR>", "LSP Code Action" },
d = { "<Cmd>Telescope lsp_definitions<CR>", "LSP Definitions" },
l = { "<CMD>lua vim.diagnostic.setloclist<CR>", "Set Loclist" },
r = { "<Cmd>Telescope lsp_references<CR>", "LSP References" },
s = { "<Cmd>Telescope lsp_document_symbols<CR>", "LSP Document Symbols" },
t = { "<Cmd>Telescope lsp_type_definitions<CR>", "LSP Type Definition" },
v = { "<CMD>lua vim.lsp.buf.remove_workspace_folder()<CR>", "Remove Workspace" },
w = { "<Cmd>Telescope lsp_workspace_symbols<CR>", "LSP Live Workspace Symbols" },
},
F = {
name = "FZF",
b = { "<Cmd>FzfLua blines<CR>", "Bufferlines" },
@@ -54,14 +98,7 @@ local mappings = {
},
T = {
name = "Telescope",
u = { "<Cmd>Telescope frecency<CR>", "MRU (Frequency)" },
r = { "<Cmd>Telescope resume<CR>", "Resume last search" },
b = { "<Cmd>Telescope bookmarks<CR>", "Browser Bookmarks" },
m = { "<Cmd>Telescope marks<CR>", "Marks" },
n = { "<Cmd>Telescope node_modules list<CR>", "Node Modules" },
k = { "<Cmd>Telescope keymaps<CR>", "Keymaps" },
h = { "<Cmd>Telescope help_tags<CR>", "Help Tags" },
t = { "<Cmd>Telescope tags<CR>", "Tags" },
f = {
name = "Find",
s = { "<Cmd>Telescope find_files<CR>", "Find Files" },
@@ -74,57 +111,15 @@ local mappings = {
b = { "<Cmd>Telescope git_branches<CR>", "Git Branches" },
s = { "<Cmd>Telescope git_status<CR>", "Git Status" },
},
h = { "<Cmd>Telescope help_tags<CR>", "Help Tags" },
k = { "<Cmd>Telescope keymaps<CR>", "Keymaps" },
m = { "<Cmd>Telescope marks<CR>", "Marks" },
n = { "<Cmd>Telescope node_modules list<CR>", "Node Modules" },
p = { "<CMD>Telescope projects<CR>", "Projects" },
r = { "<Cmd>Telescope resume<CR>", "Resume last search" },
t = { "<Cmd>Telescope tags<CR>", "Tags" },
u = { "<Cmd>Telescope frecency<CR>", "MRU (Frequency)" },
},
S = {
name = "Spectre",
f = { "<CMD>lua require('spectre').open_file_search()<CR>", "File Search" },
c = { "<CMD>lua require('spectre').open_visual({select_word=true})<CR>", "Search Current Word" },
},
},
t = {
name = "Text Editing",
c = { "<CMD>call ToggleColorColumn()<CR>", "Show/Hide Colorcolumn" },
d = { "<CMD>call SpellEn()<CR>", "Set Spelling Language to English" },
e = { "<CMD>call SpellDe()<CR>", "Set Spelling Languate to German" },
l = { "<CMD>set list!<CR>", "List" },
m = { "<CMD>MarkdownPreviewToggle<CR>", "Markdown Preview" },
s = { "<CMD>set spell!<CR>", "Spell Checking" },
w = { "<CMD>call ToggleWrap()<CR>", "Soft wrap/No wrap" },
},
v = { "<CMD>lua require('export-to-vscode').launch()<CR>", "Export to Visual Studio Code" },
w = { "<CMD>w!<CR>", "Save" },
x = { "<CMD>Twilight<CR>", "Twilight Mode" },
z = { "<CMD>ZenMode<CR>", "Zen Mode" },
A = { "<CMD>Alpha<CR>", "Alpha" },
B = {
name = "Bufferline",
p = { "<CMD>BufferLinePick<CR>", "Pick" },
x = { "<CMD>BufferLinePickClose<CR>", "Pick to Close" },
},
E = {
name = "Explorer",
a = { "<CMD>NvimTreeFocus<CR>", "Focus" },
c = { "<CMD>NvimTreeCollapse<CR>", "Collapse Folders" },
f = { "<CMD>NvimTreeFindFile<CR>", "Find File" },
r = { "<CMD>NvimTreeRefresh<CR>", "Refresh" },
},
F = { "<CMD>Telescope live_grep<CR>", "Find Text" },
G = {
name = "Git & GitHub",
b = { "<CMD>BlamerToggle<CR>", "Blame Line" },
g = { "<CMD>GBInteractive<CR>", "Git Blame in GitHub" },
h = { "<CMD>GHInteractive<CR>", "Open in GitHub" },
},
L = {
name = "LSP",
c = { "<CMD>lua vim.lsp.buf.code_action()<CR>", "Code Action" },
f = { "<CMD>lua vim.lsp.buf.format()<CR>", "Formatting" },
l = { "<CMD>lua vim.diagnostic.setloclist<CR>", "Set Loclist" },
r = { "<CMD>lua vim.lsp.buf.rename()<CR>", "Rename" },
t = { "<CMD>lua vim.lsp.buf.type_definition()<CR>", "Type Definition" },
w = { "<CMD>function() print(vim.inspect(vim.lsp.buf.list_workspace_folders()))", "List Workspace Folder" },
a = { "<CMD>lua vim.lsp.buf.add_workspace_folder()<CR>", "Add Workspace" },
v = { "<CMD>lua vim.lsp.buf.remove_workspace_folder()<CR>", "Remove Workspace" },
},
P = {
name = "Packer",
@@ -135,8 +130,8 @@ local mappings = {
u = { "<CMD>PackerUpdate<CR>", "Update" },
},
Q = { "<CMD>q!<CR>", "Quit" },
R = { "<CMD>luafile %<CR>", "Reload File" },
S = { "<CMD>Telescope spell_suggest<CR>", "Spell Suggest" },
R = { "<CMD>lua vim.lsp.buf.rename()<CR>", "Rename" },
S = { "<CMD>lua require('spectre').open_visual({select_word=true})<CR>", "Spectre Current Word" },
T = {
name = "Terminal",
f = { "<CMD>ToggleTerm direction=float<CR>", "Float" },