From 213e3961fa637e4dbe4ef1ea5fceadcb372e020e Mon Sep 17 00:00:00 2001 From: chaeing Date: Sat, 31 Jul 2021 11:28:59 -0700 Subject: [Feature] Rename lv-config.lua to config.lua (#1193) * Rename example config files * Update user config path in installer * Update user config path with a variable * Update default user config file to config.lua * Add fallback to lv-config if config.lua not found * Add global variable USER_CONFIG_PATH --- lua/core/autocmds.lua | 2 +- lua/core/dashboard.lua | 3 +-- lua/core/terminal.lua | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) (limited to 'lua/core') diff --git a/lua/core/autocmds.lua b/lua/core/autocmds.lua index 89590454..1bc49d37 100644 --- a/lua/core/autocmds.lua +++ b/lua/core/autocmds.lua @@ -27,7 +27,7 @@ lvim.autocommands = { "*", "setlocal formatoptions-=c formatoptions-=r formatoptions-=o", }, - { "BufWritePost", "lv-config.lua", "lua require('utils').reload_lv_config()" }, + { "BufWritePost", USER_CONFIG_PATH, "lua require('utils').reload_lv_config()" }, { "FileType", "qf", diff --git a/lua/core/dashboard.lua b/lua/core/dashboard.lua index 8d196458..2f14b9f1 100644 --- a/lua/core/dashboard.lua +++ b/lua/core/dashboard.lua @@ -43,8 +43,7 @@ M.config = function() }, d = { description = { " Settings " }, - -- command = ":e " .. CONFIG_PATH .. "/lv-config.lua", - command = ":e ~/.config/lvim/lv-config.lua", + command = ":e " .. USER_CONFIG_PATH, }, }, diff --git a/lua/core/terminal.lua b/lua/core/terminal.lua index 015341df..bd7815aa 100644 --- a/lua/core/terminal.lua +++ b/lua/core/terminal.lua @@ -32,7 +32,7 @@ M.config = function() background = "Normal", }, }, - -- Add executables on the lv-config file + -- Add executables on the config.lua -- { exec, keymap, name} -- lvim.builtin.terminal.execs = {{}} to overwrite -- lvim.builtin.terminal.execs[#lvim.builtin.terminal.execs+1] = {"gdb", "tg", "GNU Debugger"} -- cgit v1.2.3