diff options
Diffstat (limited to '.config/nvim/lua/cfg/utils/init.lua')
-rw-r--r-- | .config/nvim/lua/cfg/utils/init.lua | 20 |
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 |