From 15603354acdc5ab88a5eb0d70a7b3e17a1792efe Mon Sep 17 00:00:00 2001 From: christianchiarulli Date: Tue, 6 Jul 2021 11:30:01 -0400 Subject: remove plugin bloat --- lua/lv-which-key/init.lua | 43 +++++++------------------------------------ 1 file changed, 7 insertions(+), 36 deletions(-) (limited to 'lua/lv-which-key/init.lua') diff --git a/lua/lv-which-key/init.lua b/lua/lv-which-key/init.lua index acc342c4..5fb3c92d 100644 --- a/lua/lv-which-key/init.lua +++ b/lua/lv-which-key/init.lua @@ -72,12 +72,7 @@ vim.api.nvim_set_keymap( -- ":NvimTreeToggle", -- {noremap = true, silent = true}) --- telescope or snap -if O.plugin.snap.active then - vim.api.nvim_set_keymap("n", "f", ":Snap find_files", { noremap = true, silent = true }) -else - vim.api.nvim_set_keymap("n", "f", ":Telescope find_files", { noremap = true, silent = true }) -end +vim.api.nvim_set_keymap("n", "f", ":Telescope find_files", { noremap = true, silent = true }) -- dashboard vim.api.nvim_set_keymap("n", ";", ":Dashboard", { noremap = true, silent = true }) @@ -101,7 +96,7 @@ local mappings = { b = { name = "Buffers", j = { "BufferPick", "jump to buffer" }, - f = { O.plugin.snap.active and "Snap buffers" or "Telescope buffers", "Find buffer" }, + f = { "Telescope buffers", "Find buffer" }, w = { "BufferWipeout", "wipeout buffer" }, e = { "BufferCloseAllButCurrent", @@ -224,21 +219,12 @@ local mappings = { name = "Search", b = { "Telescope git_branches", "Checkout branch" }, c = { "Telescope colorscheme", "Colorscheme" }, - -- d = { - -- "Telescope lsp_document_diagnostics", - -- "Document Diagnostics" - -- }, - -- D = { - -- "Telescope lsp_workspace_diagnostics", - -- "Workspace Diagnostics" - -- }, - f = { O.plugin.snap.active and "Snap find_files" or "Telescope find_files", "Find File" }, + f = { "Telescope find_files", "Find File" }, h = { "Telescope help_tags", "Find Help" }, - -- m = {"Telescope marks", "Marks"}, M = { "Telescope man_pages", "Man Pages" }, - r = { O.plugin.snap.active and "Snap oldfiles" or "Telescope oldfiles", "Open Recent File" }, + r = { "Telescope oldfiles", "Open Recent File" }, R = { "Telescope registers", "Registers" }, - t = { O.plugin.snap.active and "Snap live_grep" or "Telescope live_grep", "Text" }, + t = { "Telescope live_grep", "Text" }, }, S = { name = "Session", @@ -251,17 +237,6 @@ local mappings = { }, } -if O.plugin.spectre.active then - mappings["r"] = { - name = "Replace", - f = { - "lua require('spectre').open_file_search()", - "Current File", - }, - p = { "lua require('spectre').open()", "Project" }, - } -end - -- if O.plugin.trouble.active then -- mappings["d"] = { -- name = "Diagnostics", @@ -275,12 +250,8 @@ end -- end if O.plugin.symbol_outline.active then - vim.api.nvim_set_keymap("n", "o", ":SymbolsOutline", { noremap = true, silent = true }) - mappings["o"] = "Symbols outline" -end - -if O.plugin.gitlinker.active then - mappings["gy"] = "Gitlink" + vim.api.nvim_set_keymap("n", "o", ":SymbolsOutline", { noremap = true, silent = true }) + mappings["o"] = "Symbols outline" end if O.plugin.ts_playground.active then -- cgit v1.2.3