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/dashboard.lua | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'lua/core/dashboard.lua') diff --git a/lua/core/dashboard.lua b/lua/core/dashboard.lua index d5e5bfe9..649be14c 100644 --- a/lua/core/dashboard.lua +++ b/lua/core/dashboard.lua @@ -3,6 +3,8 @@ M.config = function() lvim.builtin.dashboard = { active = false, search_handler = "telescope", + disable_at_vim_enter = 0, + session_directory = os.getenv "HOME" .. "/.cache/lvim/sessions", custom_header = { "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣀⣀⣀⣀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣤⣶⣾⠿⠿⠟⠛⠛⠛⠛⠿⠿⣿⣷⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", @@ -52,7 +54,7 @@ M.config = function() end M.setup = function() - vim.g.dashboard_disable_at_vimenter = 0 + vim.g.dashboard_disable_at_vimenter = lvim.builtin.dashboard.disable_at_vim_enter vim.g.dashboard_custom_header = lvim.builtin.dashboard.custom_header @@ -62,12 +64,8 @@ M.setup = function() lvim.builtin.which_key.mappings[";"] = { "Dashboard", "Dashboard" } - -- f = { - -- description = { " Neovim Config Files" }, - -- command = "Telescope find_files cwd=" .. CONFIG_PATH, - -- }, - -- e = {description = {' Marks '}, command = 'Telescope marks'} - vim.cmd 'let g:dashboard_session_directory = "~/.config/lvim/.sessions"' + vim.g.dashboard_session_directory = lvim.builtin.dashboard.session_directory + vim.cmd "let packages = len(globpath('~/.local/share/lunarvim/site/pack/packer/start', '*', 0, 1))" vim.api.nvim_exec( @@ -77,11 +75,6 @@ M.setup = function() false ) - -- file_browser = {description = {' File Browser'}, command = 'Telescope find_files'}, - - -- vim.g.dashboard_session_directory = CACHE_PATH..'/session' - -- vim.g.dashboard_custom_footer = lvim.dashboard.footer - require("core.autocmds").define_augroups { _dashboard = { -- seems to be nobuflisted that makes my stuff disappear will do more testing -- cgit v1.2.3 From b9b9c69615b469146e3cc75adcf9bd61047404eb Mon Sep 17 00:00:00 2001 From: Ahmed Khalf Date: Wed, 18 Aug 2021 09:34:26 +0400 Subject: [Refactor]: Remove vim-rooter and smart-cwd; then use project.nvim (#1315) * Replace vim-rooter with project.nvim * Implement stylua format * Remove smart_cwd * Implicitly update nvim-tree dir when project active * Link datapath to cache * Fix stylua * Fix lint * Fix telescope bug * Fix telescope dependency * Fix telescope once and for all * Fix telescope once again --- lua/core/dashboard.lua | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'lua/core/dashboard.lua') diff --git a/lua/core/dashboard.lua b/lua/core/dashboard.lua index 649be14c..423cddd8 100644 --- a/lua/core/dashboard.lua +++ b/lua/core/dashboard.lua @@ -31,19 +31,16 @@ M.config = function() description = { " Find File " }, command = "Telescope find_files", }, - b = { + -- b is reserved for the core.project module + c = { description = { " Recently Used Files" }, command = "Telescope oldfiles", }, - -- c = { - -- description = { " Load Last Session " }, - -- command = "SessionLoad", - -- }, - c = { + d = { description = { " Find Word " }, command = "Telescope live_grep", }, - d = { + e = { description = { " Settings " }, command = ":e " .. USER_CONFIG_PATH, }, -- cgit v1.2.3 From 0bf6fd68c625396d83eb8fca8d7248c5543ae6f1 Mon Sep 17 00:00:00 2001 From: Binx <68950943+Binx-Codes@users.noreply.github.com> Date: Thu, 19 Aug 2021 15:44:21 +0400 Subject: rename settings to configuration in dashboard (#1350) --- lua/core/dashboard.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua/core/dashboard.lua') diff --git a/lua/core/dashboard.lua b/lua/core/dashboard.lua index 423cddd8..f98721cc 100644 --- a/lua/core/dashboard.lua +++ b/lua/core/dashboard.lua @@ -41,7 +41,7 @@ M.config = function() command = "Telescope live_grep", }, e = { - description = { " Settings " }, + description = { " Configuration " }, command = ":e " .. USER_CONFIG_PATH, }, }, -- cgit v1.2.3 From c5c9ae0fb68567c2a207c8c486b03bbafc650f98 Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Sun, 22 Aug 2021 08:35:50 +0200 Subject: [fix]: don't overwrite user's dashboard config (#1366) --- lua/core/dashboard.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lua/core/dashboard.lua') diff --git a/lua/core/dashboard.lua b/lua/core/dashboard.lua index f98721cc..63ae7294 100644 --- a/lua/core/dashboard.lua +++ b/lua/core/dashboard.lua @@ -31,7 +31,10 @@ M.config = function() description = { " Find File " }, command = "Telescope find_files", }, - -- b is reserved for the core.project module + b = { + description = { " Recent Projects " }, + command = "Telescope projects", + }, c = { description = { " Recently Used Files" }, command = "Telescope oldfiles", -- 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/dashboard.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lua/core/dashboard.lua') diff --git a/lua/core/dashboard.lua b/lua/core/dashboard.lua index 63ae7294..c76d55c9 100644 --- a/lua/core/dashboard.lua +++ b/lua/core/dashboard.lua @@ -1,7 +1,9 @@ local M = {} + M.config = function() lvim.builtin.dashboard = { active = false, + on_config_done = nil, search_handler = "telescope", disable_at_vim_enter = 0, session_directory = os.getenv "HOME" .. "/.cache/lvim/sessions", @@ -91,6 +93,10 @@ M.setup = function() { "FileType", "dashboard", "nnoremap q :q" }, }, } + + if lvim.builtin.dashboard.on_config_done then + lvim.builtin.dashboard.on_config_done() + end end return M -- cgit v1.2.3 From 00b895d9e9577f084cf577a07f9d6d6e1f7a4cac Mon Sep 17 00:00:00 2001 From: Luc Sinet Date: Wed, 25 Aug 2021 07:47:48 +0200 Subject: [Feature] Encapsulate config logic (#1338) * Define core/builtins, streamline status_color interface * Encapsulate configuration in its own module * Add fallback to lv-config.lua * Rectify settings loading order to allow overriding vim options * Move default-config into config/ module * replace uv.fs_stat with utils.is_file --- lua/core/dashboard.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lua/core/dashboard.lua') diff --git a/lua/core/dashboard.lua b/lua/core/dashboard.lua index c76d55c9..ac6ee013 100644 --- a/lua/core/dashboard.lua +++ b/lua/core/dashboard.lua @@ -1,6 +1,6 @@ local M = {} -M.config = function() +M.config = function(config) lvim.builtin.dashboard = { active = false, on_config_done = nil, @@ -47,7 +47,7 @@ M.config = function() }, e = { description = { " Configuration " }, - command = ":e " .. USER_CONFIG_PATH, + command = ":e " .. config.path, }, }, -- cgit v1.2.3 From 23952f14437be39056b1e89436e8aea76dfbb61d Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Fri, 27 Aug 2021 18:47:31 +0200 Subject: Fix missing "HOME" variable errors (#1415) Co-authored-by: MarcSchaetz --- lua/core/dashboard.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lua/core/dashboard.lua') diff --git a/lua/core/dashboard.lua b/lua/core/dashboard.lua index ac6ee013..a613921f 100644 --- a/lua/core/dashboard.lua +++ b/lua/core/dashboard.lua @@ -1,4 +1,5 @@ local M = {} +local home_dir = vim.loop.os_homedir() M.config = function(config) lvim.builtin.dashboard = { @@ -6,7 +7,7 @@ M.config = function(config) on_config_done = nil, search_handler = "telescope", disable_at_vim_enter = 0, - session_directory = os.getenv "HOME" .. "/.cache/lvim/sessions", + session_directory = home_dir .. "/.cache/lvim/sessions", custom_header = { "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣀⣀⣀⣀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣤⣶⣾⠿⠿⠟⠛⠛⠛⠛⠿⠿⣿⣷⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", -- cgit v1.2.3