summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua33
1 files changed, 24 insertions, 9 deletions
diff --git a/init.lua b/init.lua
index 2e3a5d32..73f0a325 100644
--- a/init.lua
+++ b/init.lua
@@ -7,10 +7,12 @@ vim.cmd [[
set runtimepath-=~/.config/nvim
set runtimepath-=~/.config/nvim/after
- set runtimepath^=~/.config/lvim
+ set runtimepath+=~/.config/lvim
+ set runtimepath^=~/.local/share/lunarvim/lvim/after
]]
-- vim.opt.rtp:append() instead of vim.cmd ?
require "default-config"
+require "settings"
local status_ok, error = pcall(vim.cmd, "luafile ~/.config/lvim/lv-config.lua")
if not status_ok then
print "something is wrong with your lv-config"
@@ -21,17 +23,30 @@ require "keymappings"
local plugins = require "plugins"
local plugin_loader = require("plugin-loader").init()
-plugin_loader:load { plugins, O.user_plugins }
-vim.g.colors_name = O.colorscheme -- Colorscheme must get called after plugins are loaded or it will break new installs.
-vim.cmd("colorscheme " .. O.colorscheme)
+plugin_loader:load { plugins, lvim.plugins }
+vim.g.colors_name = lvim.colorscheme -- Colorscheme must get called after plugins are loaded or it will break new installs.
+vim.cmd("colorscheme " .. lvim.colorscheme)
-require "settings"
-require "lv-utils"
+local utils = require "lv-utils"
+utils.toggle_autoformat()
+require("lsp").setup_handlers()
+
+local null_status_ok, null_ls = pcall(require, "null-ls")
+if null_status_ok then
+ null_ls.config {}
+ require("lspconfig")["null-ls"].setup {}
+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",
+ }
+end
-- TODO: these guys need to be in language files
--- require "lsp"
--- if O.lang.emmet.active then
+-- if lvim.lang.emmet.active then
-- require "lsp.emmet-ls"
-- end
--- if O.lang.tailwindcss.active then
+-- if lvim.lang.tailwindcss.active then
-- require "lsp.tailwind