From 758ea6d07b2060a2802efc25da4b6937150edf61 Mon Sep 17 00:00:00 2001 From: Abouzar Parvan Date: Mon, 30 Aug 2021 17:20:02 +0430 Subject: use `gd` to see git diff with previous head (#1426) --- lua/core/which-key.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lua/core/which-key.lua') diff --git a/lua/core/which-key.lua b/lua/core/which-key.lua index 71c0b695..8f2f2a5a 100644 --- a/lua/core/which-key.lua +++ b/lua/core/which-key.lua @@ -130,6 +130,10 @@ M.config = function() "Telescope git_bcommits", "Checkout commit(for current file)", }, + d = { + "Gitsigns diffthis HEAD", + "Git Diff", + }, }, l = { -- cgit v1.2.3 From d5d47d4d7a0b7c396f1bddffe8c5eddc355ce60a Mon Sep 17 00:00:00 2001 From: #!/bin/genesis Date: Fri, 3 Sep 2021 19:44:03 +0300 Subject: [Feature]: Add new which-key command for switching to the last buffer (#1440) * Add new which-key command for switching to last buffer * chore(whichkey) Rework buffer descriptions Co-authored-by: Luc Sinet --- lua/core/which-key.lua | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'lua/core/which-key.lua') diff --git a/lua/core/which-key.lua b/lua/core/which-key.lua index 8f2f2a5a..5ceffb57 100644 --- a/lua/core/which-key.lua +++ b/lua/core/which-key.lua @@ -72,25 +72,26 @@ M.config = function() ["h"] = { "nohlsearch", "No Highlight" }, b = { name = "Buffers", - j = { "BufferPick", "jump to buffer" }, - f = { "Telescope buffers", "Find buffer" }, - w = { "BufferWipeout", "wipeout buffer" }, + j = { "BufferPick", "Jump" }, + f = { "Telescope buffers", "Find" }, + b = { "b#", "Previous" }, + w = { "BufferWipeout", "Wipeout" }, e = { "BufferCloseAllButCurrent", - "close all but current buffer", + "Close all but current", }, - h = { "BufferCloseBuffersLeft", "close all buffers to the left" }, - l = { + l = { "BufferCloseBuffersLeft", "Close all - left" }, + r = { "BufferCloseBuffersRight", - "close all BufferLines to the right", + "Close all - right", }, D = { "BufferOrderByDirectory", - "sort BufferLines automatically by directory", + "Sort by directory", }, L = { "BufferOrderByLanguage", - "sort BufferLines automatically by language", + "Sort by language", }, }, p = { -- cgit v1.2.3 From 8a168ed8773d8e46b9912a57fdd7ef10303872f1 Mon Sep 17 00:00:00 2001 From: Luc Sinet Date: Fri, 3 Sep 2021 22:10:48 +0200 Subject: Revert back buffer bindings (#1458) --- lua/core/which-key.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lua/core/which-key.lua') diff --git a/lua/core/which-key.lua b/lua/core/which-key.lua index 5ceffb57..458e1634 100644 --- a/lua/core/which-key.lua +++ b/lua/core/which-key.lua @@ -80,10 +80,10 @@ M.config = function() "BufferCloseAllButCurrent", "Close all but current", }, - l = { "BufferCloseBuffersLeft", "Close all - left" }, - r = { + h = { "BufferCloseBuffersLeft", "Close all to the left" }, + l = { "BufferCloseBuffersRight", - "Close all - right", + "Close all to the right", }, D = { "BufferOrderByDirectory", -- cgit v1.2.3 From 8eed75d67f9cbcefb91c4cb5aac0ffd013be25cc Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Mon, 13 Sep 2021 11:28:15 +0200 Subject: refactor: use more flexible paths (#1381) --- lua/core/which-key.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua/core/which-key.lua') diff --git a/lua/core/which-key.lua b/lua/core/which-key.lua index 458e1634..ef74ee51 100644 --- a/lua/core/which-key.lua +++ b/lua/core/which-key.lua @@ -176,7 +176,7 @@ M.config = function() L = { name = "+LunarVim", c = { - "edit ~/.config/lvim/config.lua", + "edit" .. get_config_dir() .. "/config.lua", "Edit config.lua", }, f = { -- cgit v1.2.3 From e22f9a21c179901e6dfcbdb68d035e70eae4d9e8 Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Thu, 16 Sep 2021 09:58:32 +0200 Subject: fix: more robust reloading (#1556) --- lua/core/which-key.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'lua/core/which-key.lua') diff --git a/lua/core/which-key.lua b/lua/core/which-key.lua index ef74ee51..3379100d 100644 --- a/lua/core/which-key.lua +++ b/lua/core/which-key.lua @@ -209,6 +209,7 @@ M.config = function() }, P = { "edit ~/.cache/nvim/packer.nvim.log", "Open the Packer logfile" }, }, + r = { "lua require('utils').reload_lv_config()", "Reload configurations" }, }, s = { name = "Search", -- cgit v1.2.3 From 9257e68c05eff293ea15a484d994b83fd7c610d8 Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Fri, 17 Sep 2021 08:29:35 +0200 Subject: fix: use the correct API for the log-viewer (#1564) --- lua/core/which-key.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lua/core/which-key.lua') diff --git a/lua/core/which-key.lua b/lua/core/which-key.lua index 3379100d..36949467 100644 --- a/lua/core/which-key.lua +++ b/lua/core/which-key.lua @@ -198,16 +198,16 @@ M.config = function() "lua require('core.terminal').toggle_log_view('lunarvim')", "view default log", }, - D = { "edit ~/.cache/nvim/lunarvim.log", "Open the default logfile" }, + D = { "exe 'edit '.stdpath('cache').'/lunarvim.log'", "Open the default logfile" }, n = { "lua require('core.terminal').toggle_log_view('lsp')", "view lsp log" }, - N = { "edit ~/.cache/nvim/log", "Open the Neovim logfile" }, + N = { "edit $NVIM_LOG_FILE", "Open the Neovim logfile" }, l = { "lua require('core.terminal').toggle_log_view('nvim')", "view neovim log" }, - L = { "edit ~/.cache/nvim/lsp.log", "Open the LSP logfile" }, + L = { "exe 'edit '.stdpath('cache').'/lsp.log'", "Open the LSP logfile" }, p = { "lua require('core.terminal').toggle_log_view('packer.nvim')", "view packer log", }, - P = { "edit ~/.cache/nvim/packer.nvim.log", "Open the Packer logfile" }, + P = { "exe 'edit '.stdpath('cache').'/packer.nvim.log'", "Open the Packer logfile" }, }, r = { "lua require('utils').reload_lv_config()", "Reload configurations" }, }, -- cgit v1.2.3 From a273c46eee751de4a61360ae0076ed4dac433e5d Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Fri, 1 Oct 2021 13:27:06 +0200 Subject: feat: add LvimUpdate command (#1634) * feat: add prelimenary LvimUpdate command * feat: use native process management * feat: add a telescope change-log utility * fix: update readme to include the new command --- lua/core/which-key.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lua/core/which-key.lua') diff --git a/lua/core/which-key.lua b/lua/core/which-key.lua index 36949467..2e528048 100644 --- a/lua/core/which-key.lua +++ b/lua/core/which-key.lua @@ -192,6 +192,10 @@ M.config = function() "lua require('core.info').toggle_popup(vim.bo.filetype)", "Toggle LunarVim Info", }, + I = { + "lua require('core.telescope').view_lunarvim_changelog()", + "View LunarVim's changelog", + }, l = { name = "+logs", d = { @@ -210,6 +214,7 @@ M.config = function() P = { "exe 'edit '.stdpath('cache').'/packer.nvim.log'", "Open the Packer logfile" }, }, r = { "lua require('utils').reload_lv_config()", "Reload configurations" }, + u = { "LvimUpdate", "Update LunarVim" }, }, s = { name = "Search", -- cgit v1.2.3 From 3e1cd1ec235404ae96ed2d0756729cf44ae48f3e Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Sun, 3 Oct 2021 14:32:09 +0200 Subject: fix: add missing lsp.log entry in log_viewer (#1666) --- lua/core/which-key.lua | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'lua/core/which-key.lua') diff --git a/lua/core/which-key.lua b/lua/core/which-key.lua index 2e528048..27cec37c 100644 --- a/lua/core/which-key.lua +++ b/lua/core/which-key.lua @@ -199,14 +199,17 @@ M.config = function() l = { name = "+logs", d = { - "lua require('core.terminal').toggle_log_view('lunarvim')", + "lua require('core.terminal').toggle_log_view(require('core.log').get_path())", "view default log", }, - D = { "exe 'edit '.stdpath('cache').'/lunarvim.log'", "Open the default logfile" }, - n = { "lua require('core.terminal').toggle_log_view('lsp')", "view lsp log" }, + D = { "lua vim.fn.execute('edit ' .. require('core.log').get_path())", "Open the default logfile" }, + l = { "lua require('core.terminal').toggle_log_view(vim.lsp.get_log_path())", "view lsp log" }, + L = { "lua vim.fn.execute('edit ' .. vim.lsp.get_log_path())", "Open the LSP logfile" }, + n = { + "lua require('core.terminal').toggle_log_view(os.getenv('NVIM_LOG_FILE'))", + "view neovim log", + }, N = { "edit $NVIM_LOG_FILE", "Open the Neovim logfile" }, - l = { "lua require('core.terminal').toggle_log_view('nvim')", "view neovim log" }, - L = { "exe 'edit '.stdpath('cache').'/lsp.log'", "Open the LSP logfile" }, p = { "lua require('core.terminal').toggle_log_view('packer.nvim')", "view packer log", -- cgit v1.2.3 From d01ba08eaec1640ac2d038893525b3ba0af25813 Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Sun, 3 Oct 2021 16:13:46 +0200 Subject: refactor: auto-generate language configuration (#1584) Refactor the monolithic `lvim.lang` design into a more modular approach. IMPORTANT: run `:LvimUpdate` in order to generate the new ftplugin template files. --- lua/core/which-key.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua/core/which-key.lua') diff --git a/lua/core/which-key.lua b/lua/core/which-key.lua index 27cec37c..a115bcc5 100644 --- a/lua/core/which-key.lua +++ b/lua/core/which-key.lua @@ -148,9 +148,9 @@ M.config = function() "Telescope lsp_workspace_diagnostics", "Workspace Diagnostics", }, - -- f = { "silent FormatWrite", "Format" }, f = { "lua vim.lsp.buf.formatting()", "Format" }, i = { "LspInfo", "Info" }, + I = { "LspInstallInfo", "Installer Info" }, j = { "lua vim.lsp.diagnostic.goto_next({popup_opts = {border = lvim.lsp.popup_border}})", "Next Diagnostic", -- cgit v1.2.3 From 0ad60e90a9b0dd557df10f73bec344e88549a9d7 Mon Sep 17 00:00:00 2001 From: Abouzar Parvan Date: Wed, 6 Oct 2021 02:07:23 +0330 Subject: [Feature] better code action prompt and auto show codelens actions (#1698) --- lua/core/which-key.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lua/core/which-key.lua') diff --git a/lua/core/which-key.lua b/lua/core/which-key.lua index a115bcc5..c9e9b2f4 100644 --- a/lua/core/which-key.lua +++ b/lua/core/which-key.lua @@ -139,7 +139,7 @@ M.config = function() l = { name = "LSP", - a = { "lua vim.lsp.buf.code_action()", "Code Action" }, + a = { "lua require('core.telescope').code_actions()", "Code Action" }, d = { "Telescope lsp_document_diagnostics", "Document Diagnostics", @@ -159,6 +159,7 @@ M.config = function() "lua vim.lsp.diagnostic.goto_prev({popup_opts = {border = lvim.lsp.popup_border}})", "Prev Diagnostic", }, + l = { "lua vim.lsp.codelens.run()", "CodeLens Action" }, p = { name = "Peek", d = { "lua require('lsp.peek').Peek('definition')", "Definition" }, -- cgit v1.2.3