diff options
author | christianchiarulli <[email protected]> | 2021-08-11 16:33:41 -0400 |
---|---|---|
committer | christianchiarulli <[email protected]> | 2021-08-11 16:33:41 -0400 |
commit | 83013c0d4f1467f546c38719c61909decfcb8151 (patch) | |
tree | 143773ea73c64d953db699e6e621926e44653fc2 /init.lua | |
parent | f6407e0bdb9c2875bc8f186929ce183af391b2a9 (diff) | |
parent | 5a7630cac761e91335d2f25cb07a81271569c791 (diff) |
Merge branch 'rolling' of github.com:ChristianChiarulli/LunarVim
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 32 |
1 files changed, 26 insertions, 6 deletions
@@ -11,18 +11,36 @@ vim.cmd [[ set runtimepath^=~/.local/share/lunarvim/lvim/after ]] -- vim.opt.rtp:append() instead of vim.cmd ? + +local function file_exists(name) + local f = io.open(name, "r") + if f ~= nil then + io.close(f) + return true + else + return false + end +end + +local lvim_path = os.getenv "HOME" .. "/.config/lvim/" +USER_CONFIG_PATH = lvim_path .. "config.lua" +local config_exist = file_exists(USER_CONFIG_PATH) +if not config_exist then + USER_CONFIG_PATH = lvim_path .. "lv-config.lua" + print "Rename ~/.config/lvim/lv-config.lua to config.lua" +end + require "default-config" +local autocmds = require "core.autocmds" require("settings").load_options() -local status_ok, error = pcall(vim.cmd, "luafile ~/.config/lvim/lv-config.lua") + +local status_ok, error = pcall(vim.cmd, "luafile " .. USER_CONFIG_PATH) if not status_ok then - print "something is wrong with your lv-config" + print("something is wrong with your " .. USER_CONFIG_PATH) print(error) end require("settings").load_commands() -require("core.autocmds").define_augroups(lvim.autocommands) - -require "keymappings" --- require("lsp").setup_default_bindings() +autocmds.define_augroups(lvim.autocommands) local plugins = require "plugins" local plugin_loader = require("plugin-loader").init() @@ -50,6 +68,8 @@ if lsp_settings_status_ok then } end +require("keymappings").setup() + -- TODO: these guys need to be in language files -- if lvim.lang.emmet.active then -- require "lsp.emmet-ls" |