summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/cfg/utils/init.lua
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2021-07-08 15:28:34 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2021-07-08 15:28:34 +0200
commit56e16603121f94b6ea4b7125c596a09540569841 (patch)
tree252afa6c8680f58095771f437f6ad516fda4fe13 /.config/nvim/lua/cfg/utils/init.lua
parent235a49fe4ab108abbecf43066a7a37133bb49bc9 (diff)
Latest updates from LunarVim, new handrolled colorscheme
Diffstat (limited to '.config/nvim/lua/cfg/utils/init.lua')
-rw-r--r--.config/nvim/lua/cfg/utils/init.lua20
1 files changed, 17 insertions, 3 deletions
diff --git a/.config/nvim/lua/cfg/utils/init.lua b/.config/nvim/lua/cfg/utils/init.lua
index f8ed082..2fe3331 100644
--- a/.config/nvim/lua/cfg/utils/init.lua
+++ b/.config/nvim/lua/cfg/utils/init.lua
@@ -3,7 +3,7 @@ local utils = {}
function utils.reload_config()
vim.cmd "source ~/.config/nvim/config.lua"
vim.cmd "source ~/.config/nvim/lua/plugins.lua"
- vim.cmd "source ~/.config/nvim/lua/neoformat/init.lua"
+ vim.cmd "source ~/.config/nvim/lua/cfg/neoformat/init.lua"
vim.cmd ":PackerCompile"
vim.cmd ":PackerInstall"
end
@@ -54,7 +54,7 @@ utils.define_augroups {
"*",
"setlocal formatoptions-=c formatoptions-=r formatoptions-=o",
},
- { "BufWritePost", "config.lua", "lua require('utils').reload_config()" },
+ { "BufWritePost", "config.lua", "lua require('cfg.utils').reload_config()" },
{ "VimLeavePre", "*", "set title set titleold=" },
},
-- _solidity = {
@@ -74,7 +74,11 @@ utils.define_augroups {
},
_auto_resize = {
-- will cause split windows to be resized evenly if main window is resized
- { "VimResized ", "*", "wincmd =" },
+ { "VimResized", "*", "wincmd =" },
+ },
+ _packer_compile = {
+ -- will cause split windows to be resized evenly if main window is resized
+ { "BufWritePost", "plugins.lua", "PackerCompile" },
},
-- _mode_switching = {
-- -- will switch between absolute and relative line numbers depending on mode
@@ -85,4 +89,14 @@ utils.define_augroups {
-- },
}
+vim.cmd [[
+ function! QuickFixToggle()
+ if empty(filter(getwininfo(), 'v:val.quickfix'))
+ copen
+ else
+ cclose
+ endif
+endfunction
+]]
+
return utils