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