mirror of
https://github.com/LunarVim/LunarVim.git
synced 2024-09-20 18:45:08 +02:00
fix(config): copy the correct example config (#3722)
* fix(config): copy the correct example config * refactor: don't check if dir exists
This commit is contained in:
parent
8cc1cc6206
commit
f590770a17
1 changed files with 3 additions and 1 deletions
|
@ -56,7 +56,9 @@ function M:load(config_path)
|
|||
vim.notify_once(
|
||||
string.format("User-configuration not found. Creating an example configuration in %s", config_path)
|
||||
)
|
||||
local example_config = join_paths(get_lvim_base_dir(), "utils", "installer", "config.example.lua")
|
||||
local config_name = vim.loop.os_uname().version:match "Windows" and "config_win" or "config"
|
||||
local example_config = join_paths(get_lvim_base_dir(), "utils", "installer", config_name .. ".example.lua")
|
||||
vim.fn.mkdir(user_config_dir, "p")
|
||||
vim.loop.fs_copyfile(example_config, config_path)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue