refactor: use more flexible paths (#1381)

This commit is contained in:
kylo252 2021-09-13 11:28:15 +02:00 committed by GitHub
parent 38b0c3d860
commit 8eed75d67f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 216 additions and 153 deletions

View file

@ -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