summaryrefslogtreecommitdiff
path: root/.config/nvim/init.lua
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2021-07-07 01:05:06 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2021-07-07 01:05:06 +0200
commit0111b31cb0008f4fcc55ddc373e63f124652b156 (patch)
tree075490fb19c4838fc58129da9f902a3370f6029e /.config/nvim/init.lua
parent6fcc69113bd7cc7295ef9dc068da80d043cbb8bb (diff)
Updated config based on Chris LunarVim release
Diffstat (limited to '.config/nvim/init.lua')
-rw-r--r--.config/nvim/init.lua84
1 files changed, 29 insertions, 55 deletions
diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua
index a18b64a..e1acacd 100644
--- a/.config/nvim/init.lua
+++ b/.config/nvim/init.lua
@@ -1,55 +1,29 @@
-require('globals')
-require('plugins')
-vim.cmd('luafile '..CONFIG_PATH..'/language-settings.lua')
-require('settings')
-require('_utils')
-require('mappings')
-
-require('_autopairs')
-require('_autocommands')
-
-require('_gitblame')
-require('_gitsigns')
-
-require('_nvimtree')
-require('colorscheme')
-
-require('_galaxyline')
-
-require('_hop')
-
-require('_comment')
-require('_colorizer')
-require('_compe')
-
-require('_barbar')
-
-require('_dashboard')
-
-require('_telescope')
-require('_treesitter')
-
-require('_rnvimr')
-require('_quickscope')
-require('_which-key')
-require('_vim-rooter')
-
-require('_lsp-rooter')
-require('_true-zen')
-
-vim.cmd('source ~/.config/nvim/vim-script/functions.vim')
-
--- LSP
-require('lsp')
-require('lsp.clangd')
-require('lsp.lua-ls')
-require('lsp.bash-ls')
-require('lsp.go-ls')
-require('lsp.python-ls')
-require('lsp.rust-ls')
-require('lsp.json-ls')
-require('lsp.yaml-ls')
-require('lsp.vim-ls')
-require('lsp.docker-ls')
-require('lsp.emmet-ls')
-require('lsp.efm-general-ls')
+require "default-config"
+require "keymappings"
+vim.cmd("luafile " .. CONFIG_PATH .. "/config.lua")
+require "settings"
+require "plugins"
+require "cfg.utils"
+require "cfg.galaxyline"
+require "cfg.treesitter"
+require "cfg.which-key"
+require "cfg.lsp"
+if O.lang.emmet.active then
+ require "cfg.lsp.emmet-ls"
+end
+if O.lang.tailwindcss.active then
+ require "cfg.lsp.tailwindcss-ls"
+end
+
+-- autoformat
+if O.format_on_save then
+ require("cfg.utils").define_augroups {
+ autoformat = {
+ {
+ "BufWritePre",
+ "*",
+ [[try | undojoin | Neoformat | catch /^Vim\%((\a\+)\)\=:E790/ | finally | silent Neoformat | endtry]],
+ },
+ },
+ }
+end