From 0111b31cb0008f4fcc55ddc373e63f124652b156 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Wed, 7 Jul 2021 01:05:06 +0200 Subject: Updated config based on Chris LunarVim release --- .config/nvim/init.lua | 84 ++++++++++++++++++--------------------------------- 1 file changed, 29 insertions(+), 55 deletions(-) (limited to '.config/nvim/init.lua') 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 -- cgit v1.2.3-70-g09d2