diff options
author | kylo252 <[email protected]> | 2021-08-27 18:47:31 +0200 |
---|---|---|
committer | kylo252 <[email protected]> | 2021-08-27 21:06:50 +0200 |
commit | 23952f14437be39056b1e89436e8aea76dfbb61d (patch) | |
tree | 06d0d3fe49242a4fc03019e88092adc3887b1520 | |
parent | df7c3cb8f0512042bd24c10e744718991ae6a9a2 (diff) |
Fix missing "HOME" variable errors (#1415)
Co-authored-by: MarcSchaetz <[email protected]>
-rw-r--r-- | init.lua | 2 | ||||
-rw-r--r-- | lua/config/defaults.lua | 5 | ||||
-rw-r--r-- | lua/config/init.lua | 3 | ||||
-rw-r--r-- | lua/core/dashboard.lua | 3 |
4 files changed, 8 insertions, 5 deletions
@@ -47,7 +47,7 @@ end local lsp_settings_status_ok, lsp_settings = pcall(require, "nlspsettings") if lsp_settings_status_ok then lsp_settings.setup { - config_home = os.getenv "HOME" .. "/.config/lvim/lsp-settings", + config_home = home_dir .. "/.config/lvim/lsp-settings", } end diff --git a/lua/config/defaults.lua b/lua/config/defaults.lua index 5dc98698..9bd1bdd8 100644 --- a/lua/config/defaults.lua +++ b/lua/config/defaults.lua @@ -1,4 +1,5 @@ -CONFIG_PATH = os.getenv "HOME" .. "/.local/share/lunarvim/lvim" +local home_dir = vim.loop.os_homedir() +CONFIG_PATH = home_dir .. "/.local/share/lunarvim/lvim" DATA_PATH = vim.fn.stdpath "data" CACHE_PATH = vim.fn.stdpath "cache" TERMINAL = vim.fn.expand "$TERMINAL" @@ -11,7 +12,7 @@ lvim = { line_wrap_cursor_movement = true, transparent_window = false, format_on_save = true, - vsnip_dir = os.getenv "HOME" .. "/.config/snippets", + vsnip_dir = home_dir .. "/.config/snippets", database = { save_location = "~/.config/lunarvim_db", auto_execute = 1 }, keys = {}, diff --git a/lua/config/init.lua b/lua/config/init.lua index 8c5387cd..332460d3 100644 --- a/lua/config/init.lua +++ b/lua/config/init.lua @@ -1,5 +1,6 @@ +local home_dir = vim.loop.os_homedir() local M = { - path = string.format("%s/.config/lvim/config.lua", os.getenv "HOME"), + path = string.format("%s/.config/lvim/config.lua", home_dir), } --- Initialize lvim default configuration 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 = { "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣀⣀⣀⣀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣤⣶⣾⠿⠿⠟⠛⠛⠛⠛⠿⠿⣿⣷⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", |