diff options
Diffstat (limited to 'lua/core')
-rw-r--r-- | lua/core/dashboard.lua | 13 | ||||
-rw-r--r-- | lua/core/project.lua | 2 | ||||
-rw-r--r-- | lua/core/telescope.lua | 6 | ||||
-rw-r--r-- | lua/core/terminal.lua | 2 | ||||
-rw-r--r-- | lua/core/which-key.lua | 2 |
5 files changed, 9 insertions, 16 deletions
diff --git a/lua/core/dashboard.lua b/lua/core/dashboard.lua index a613921f..aa2a7f35 100644 --- a/lua/core/dashboard.lua +++ b/lua/core/dashboard.lua @@ -1,5 +1,5 @@ local M = {} -local home_dir = vim.loop.os_homedir() +local utils = require "utils" M.config = function(config) lvim.builtin.dashboard = { @@ -7,7 +7,7 @@ M.config = function(config) on_config_done = nil, search_handler = "telescope", disable_at_vim_enter = 0, - session_directory = home_dir .. "/.cache/lvim/sessions", + session_directory = utils.join_paths(get_cache_dir(), "sessions"), custom_header = { "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣀⣀⣀⣀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣤⣶⣾⠿⠿⠟⠛⠛⠛⠛⠿⠿⣿⣷⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", @@ -69,15 +69,6 @@ M.setup = function() 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( - [[ - let g:dashboard_custom_footer = ['LunarVim loaded '..packages..' plugins  '] -]], - false - ) - require("core.autocmds").define_augroups { _dashboard = { -- seems to be nobuflisted that makes my stuff disappear will do more testing diff --git a/lua/core/project.lua b/lua/core/project.lua index 7fb04933..e7527440 100644 --- a/lua/core/project.lua +++ b/lua/core/project.lua @@ -35,7 +35,7 @@ function M.config() ---@type string ---@usage path to store the project history for use in telescope - datapath = CACHE_PATH, + datapath = get_cache_dir(), } end diff --git a/lua/core/telescope.lua b/lua/core/telescope.lua index 4ae56df0..34c1fb92 100644 --- a/lua/core/telescope.lua +++ b/lua/core/telescope.lua @@ -1,5 +1,7 @@ local M = {} +local utils = require "utils" + function M.config() -- Define this minimal config so that it's available if telescope is not yet available. lvim.builtin.telescope = { @@ -96,7 +98,7 @@ function M.find_lunarvim_files(opts) }, prompt = ">> ", prompt_title = "~ LunarVim files ~", - cwd = CONFIG_PATH, + cwd = utils.join_paths(get_runtime_dir(), "lvim"), find_command = { "git", "ls-files" }, } opts = vim.tbl_deep_extend("force", theme_opts, opts) @@ -111,7 +113,7 @@ function M.grep_lunarvim_files(opts) layout_strategy = "bottom_pane", prompt = ">> ", prompt_title = "~ search LunarVim ~", - cwd = CONFIG_PATH, + cwd = utils.join_paths(get_runtime_dir(), "lvim"), } opts = vim.tbl_deep_extend("force", theme_opts, opts) require("telescope.builtin").live_grep(opts) diff --git a/lua/core/terminal.lua b/lua/core/terminal.lua index f9be8734..87053412 100644 --- a/lua/core/terminal.lua +++ b/lua/core/terminal.lua @@ -95,7 +95,7 @@ local function get_log_path(name) local logger = require "core.log" local file if name == "nvim" then - file = CACHE_PATH .. "/log" + file = utils.join_paths(get_cache_dir(), "log") else file = logger:new({ plugin = name }):get_path() end 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 = { - "<cmd>edit ~/.config/lvim/config.lua<cr>", + "<cmd>edit" .. get_config_dir() .. "/config.lua<cr>", "Edit config.lua", }, f = { |