diff options
Diffstat (limited to 'lua/utils')
| -rw-r--r-- | lua/utils/init.lua | 8 | 
1 files changed, 7 insertions, 1 deletions
| diff --git a/lua/utils/init.lua b/lua/utils/init.lua index 8ea842ca..095390b1 100644 --- a/lua/utils/init.lua +++ b/lua/utils/init.lua @@ -90,7 +90,7 @@ function utils.reload_lv_config()    config:load()    require("keymappings").setup() -- this should be done before loading the plugins -  vim.cmd "source ~/.local/share/lunarvim/lvim/lua/plugins.lua" +  vim.cmd("source " .. utils.join_paths(get_runtime_dir(), "lvim", "lua", "plugins.lua"))    local plugins = require "plugins"    local plugin_loader = require("plugin-loader").init()    utils.toggle_autoformat() @@ -127,6 +127,12 @@ function utils.is_file(filename)    return stat and stat.type == "file" or false  end +function utils.join_paths(...) +  local path_sep = vim.loop.os_uname().version:match "Windows" and "\\" or "/" +  local result = table.concat(vim.tbl_flatten { ... }, path_sep):gsub(path_sep .. "+", path_sep) +  return result +end +  return utils  -- TODO: find a new home for these autocommands | 
