From 621af91ebc158060af688d4f52e2f8f096062989 Mon Sep 17 00:00:00 2001 From: pr-313 <46706232+pr-313@users.noreply.github.com> Date: Thu, 19 Jan 2023 15:05:06 +0530 Subject: fix(lazy): suggested fixes for pref/lazyloading branch (#3754) fix(lazy): Suggested fixes from previous comments fix(lazy): applying suggestions from code review Co-authored-by: LostNeophyte Co-authored-by: Pratyush Bharati Co-authored-by: LostNeophyte --- lua/lvim/core/which-key.lua | 12 ++++++------ lua/lvim/lsp/config.lua | 12 ++++++------ lua/lvim/plugins.lua | 5 +++-- 3 files changed, 15 insertions(+), 14 deletions(-) (limited to 'lua') diff --git a/lua/lvim/core/which-key.lua b/lua/lvim/core/which-key.lua index 4f52c49b..ea79f03b 100644 --- a/lua/lvim/core/which-key.lua +++ b/lua/lvim/core/which-key.lua @@ -205,20 +205,20 @@ M.config = function() a = { "lua vim.lsp.buf.code_action()", "Code Action" }, d = { "Telescope diagnostics bufnr=0 theme=get_ivy", "Buffer Diagnostics" }, w = { "Telescope diagnostics", "Diagnostics" }, - f = { "lua require('lvim.lsp.utils').format()", "Format" }, + f = { "lua require('lvim.lsp.utils').format()", "Format" }, i = { "LspInfo", "Info" }, I = { "Mason", "Mason Info" }, j = { - "lua vim.diagnostic.goto_next()", + "lua vim.diagnostic.goto_next()", "Next Diagnostic", }, k = { - "lua vim.diagnostic.goto_prev()", + "lua vim.diagnostic.goto_prev()", "Prev Diagnostic", }, - l = { "lua vim.lsp.codelens.run()", "CodeLens Action" }, - q = { "lua vim.diagnostic.setloclist()", "Quickfix" }, - r = { "lua vim.lsp.buf.rename()", "Rename" }, + l = { "lua vim.lsp.codelens.run()", "CodeLens Action" }, + q = { "lua vim.diagnostic.setloclist()", "Quickfix" }, + r = { "lua vim.lsp.buf.rename()", "Rename" }, s = { "Telescope lsp_document_symbols", "Document Symbols" }, S = { "Telescope lsp_dynamic_workspace_symbols", diff --git a/lua/lvim/lsp/config.lua b/lua/lvim/lsp/config.lua index 8f33f626..f6abeeca 100644 --- a/lua/lvim/lsp/config.lua +++ b/lua/lvim/lsp/config.lua @@ -96,12 +96,12 @@ return { }, buffer_mappings = { normal_mode = { - ["K"] = { "lua vim.lsp.buf.hover()", "Show hover" }, - ["gd"] = { "lua vim.lsp.buf.definition()", "Goto Definition" }, - ["gD"] = { "lua vim.lsp.buf.declaration()", "Goto declaration" }, - ["gr"] = { "lua vim.lsp.buf.references()", "Goto references" }, - ["gI"] = { "lua vim.lsp.buf.implementation()", "Goto Implementation" }, - ["gs"] = { "lua vim.lsp.buf.signature_help()", "show signature help" }, + ["K"] = { "lua vim.lsp.buf.hover()", "Show hover" }, + ["gd"] = { "lua vim.lsp.buf.definition()", "Goto Definition" }, + ["gD"] = { "lua vim.lsp.buf.declaration()", "Goto declaration" }, + ["gr"] = { "lua vim.lsp.buf.references()", "Goto references" }, + ["gI"] = { "lua vim.lsp.buf.implementation()", "Goto Implementation" }, + ["gs"] = { "lua vim.lsp.buf.signature_help()", "show signature help" }, ["gl"] = { function() local config = lvim.lsp.diagnostics.float diff --git a/lua/lvim/plugins.lua b/lua/lvim/plugins.lua index 47d40971..904f42eb 100644 --- a/lua/lvim/plugins.lua +++ b/lua/lvim/plugins.lua @@ -131,7 +131,7 @@ local core_plugins = { require("lvim.core.nvimtree").setup() end, enabled = lvim.builtin.nvimtree.active, - cmd = { "NvimTreeToggle", "NvimTreeOpen", "NvimTreeFocus" }, + cmd = { "NvimTreeToggle", "NvimTreeOpen", "NvimTreeFocus", "NvimTreeFindFileToggle" }, event = "User DirOpened", }, -- Lir @@ -168,7 +168,8 @@ local core_plugins = { config = function() require("lvim.core.comment").setup() end, - keys = { { "gc", mode = { "n", "v" } }, { "gb", mode = { "n", "v" } } }, + keys = { { "gc", mode = { "n", "v" } }, { "gb", mode = { "n", "v" } }}, + event = "User FileOpened", enabled = lvim.builtin.comment.active, }, -- cgit v1.2.3