From fe55935c056a6b5f3dafa606b253324b1edc7ab5 Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Sat, 14 Aug 2021 14:16:38 +0200 Subject: feat: use telescope to quickly open lunarvim files (#1310) --- lua/core/which-key.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lua/core/which-key.lua') diff --git a/lua/core/which-key.lua b/lua/core/which-key.lua index 96f3a8f7..66e3ffbb 100644 --- a/lua/core/which-key.lua +++ b/lua/core/which-key.lua @@ -169,6 +169,18 @@ M.config = function() }, L = { name = "+LunarVim", + c = { + "edit ~/.config/lvim/config.lua", + "Edit config.lua", + }, + f = { + "lua require('core.telescope').find_lunarvim_files()", + "Find LunarVim files", + }, + g = { + "lua require('core.telescope').grep_lunarvim_files()", + "Grep LunarVim files", + }, k = { "lua require('keymappings').print()", "View LunarVim's default keymappings" }, i = { "lua require('core.info').toggle_popup(vim.bo.filetype)", -- cgit v1.2.3 From 6eb75c5678ddb4d040f644e331e222078b99b3a1 Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Sun, 15 Aug 2021 17:38:47 +0200 Subject: [Refactor] Clean-up redundant module-load checks (#1011) --- lua/core/which-key.lua | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'lua/core/which-key.lua') diff --git a/lua/core/which-key.lua b/lua/core/which-key.lua index 66e3ffbb..04f892d8 100644 --- a/lua/core/which-key.lua +++ b/lua/core/which-key.lua @@ -1,5 +1,4 @@ local M = {} -local Log = require "core.log" M.config = function() lvim.builtin.which_key = { active = false, @@ -230,14 +229,7 @@ M.config = function() end M.setup = function() - -- if not package.loaded['which-key'] then - -- return - -- end - local status_ok, which_key = pcall(require, "which-key") - if not status_ok then - Log:get_default "Failed to load whichkey" - return - end + local which_key = require "which-key" which_key.setup(lvim.builtin.which_key.setup) @@ -247,10 +239,8 @@ M.setup = function() local mappings = lvim.builtin.which_key.mappings local vmappings = lvim.builtin.which_key.vmappings - local wk = require "which-key" - - wk.register(mappings, opts) - wk.register(vmappings, vopts) + which_key.register(mappings, opts) + which_key.register(vmappings, vopts) end return M -- cgit v1.2.3 From 335e707b2aae38c0cd5d0d962b27038ab1117aa6 Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Tue, 17 Aug 2021 17:20:18 +0200 Subject: [Feature] Make the rest of the builtins configurable (#1318) --- 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 04f892d8..ff53142c 100644 --- a/lua/core/which-key.lua +++ b/lua/core/which-key.lua @@ -1,7 +1,8 @@ local M = {} M.config = function() lvim.builtin.which_key = { - active = false, + ---@usage disable which-key completely [not recommeded] + active = true, setup = { plugins = { marks = true, -- shows a list of your marks on ' and ` -- cgit v1.2.3 From 59598723077ac6728fc585c3c88e0ec84ba430c3 Mon Sep 17 00:00:00 2001 From: Ahmed Khalf Date: Fri, 20 Aug 2021 11:31:18 +0400 Subject: [Refactor]: consistent update of bufferline offset with nvim-tree (#1351) * Refactor nvim-tree * Fix stylua comments * Delete useless functions * Remove autocmd and fix tasty's bug * Fix luacheck * Fix icon issue * Fix formatting * Fix formatting again * Resolve Tasty's request * Replace double dashes with blank line --- lua/core/which-key.lua | 1 - 1 file changed, 1 deletion(-) (limited to 'lua/core/which-key.lua') diff --git a/lua/core/which-key.lua b/lua/core/which-key.lua index ff53142c..5b249430 100644 --- a/lua/core/which-key.lua +++ b/lua/core/which-key.lua @@ -66,7 +66,6 @@ M.config = function() ["q"] = { "q!", "Quit" }, ["/"] = { "CommentToggle", "Comment" }, ["c"] = { "BufferClose!", "Close Buffer" }, - ["e"] = { "lua require'core.nvimtree'.toggle_tree()", "Explorer" }, ["f"] = { "Telescope find_files", "Find File" }, ["h"] = { "nohlsearch", "No Highlight" }, b = { -- cgit v1.2.3 From d85584d09f9028fa4202cea473f7f0ae3c531aef Mon Sep 17 00:00:00 2001 From: devtoi <508254+devtoi@users.noreply.github.com> Date: Sun, 22 Aug 2021 20:03:19 +0200 Subject: [Refactor/Bugfix] move on_config_done callbacks to relevant setup() (#1175) * Make autopairs config consistent with others * Fix two typos for autopairs * Remove extranous autopairs code. Return on setup * Remove extranous else for autopairs completion confirmation * Move on_config_done callbacks to setup functions. * Add on_config_done completion for builtins lacking a config function * enables galaxyline callbacks to work properly * Add modules for more builtins * Finish streamline of config function in plugin setup * Fix double use of which_key/wk * Fix erroneous remove of functionality in autopairs completion * consistency fixes * Work around telescope not found at config time * Match plugin definition of project and lualine with others * fix: restore config callback syntax Co-authored-by: Johan Melin Co-authored-by: rebuilt Co-authored-by: Luc Sinet Co-authored-by: kylo252 <59826753+kylo252@users.noreply.github.com> --- lua/core/which-key.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lua/core/which-key.lua') diff --git a/lua/core/which-key.lua b/lua/core/which-key.lua index 5b249430..71c0b695 100644 --- a/lua/core/which-key.lua +++ b/lua/core/which-key.lua @@ -1,8 +1,10 @@ local M = {} + M.config = function() lvim.builtin.which_key = { ---@usage disable which-key completely [not recommeded] active = true, + on_config_done = nil, setup = { plugins = { marks = true, -- shows a list of your marks on ' and ` @@ -241,6 +243,10 @@ M.setup = function() which_key.register(mappings, opts) which_key.register(vmappings, vopts) + + if lvim.builtin.which_key.on_config_done then + lvim.builtin.which_key.on_config_done(which_key) + end end return M -- cgit v1.2.3