diff options
Diffstat (limited to 'lua/lv-utils')
| -rw-r--r-- | lua/lv-utils/init.lua | 19 | 
1 files changed, 16 insertions, 3 deletions
diff --git a/lua/lv-utils/init.lua b/lua/lv-utils/init.lua index 6a7d3c88..d2d23cfb 100644 --- a/lua/lv-utils/init.lua +++ b/lua/lv-utils/init.lua @@ -3,9 +3,11 @@ local lv_utils = {}  function lv_utils.reload_lv_config()    vim.cmd "source ~/.config/nvim/lv-config.lua"    vim.cmd "source ~/.config/nvim/lua/plugins.lua" -  vim.cmd "source ~/.config/nvim/lua/lv-neoformat/init.lua" +  vim.cmd "source ~/.config/nvim/lua/settings.lua" +  vim.cmd "source ~/.config/nvim/lua/core/formatter.lua"    vim.cmd ":PackerCompile"    vim.cmd ":PackerInstall" +  -- vim.cmd ":PackerClean"  end  function lv_utils.check_lsp_client_active(name) @@ -40,9 +42,13 @@ function lv_utils.define_augroups(definitions) -- {{{1    end  end +function lv_utils.unrequire(m) +  package.loaded[m] = nil +  _G[m] = nil +end +  lv_utils.define_augroups { -  _user_autocommands = O.user_autocommands,    _general_settings = {      {        "TextYankPost", @@ -55,6 +61,11 @@ lv_utils.define_augroups {        "setlocal formatoptions-=c formatoptions-=r formatoptions-=o",      },      { +      "BufWinEnter", +      "dashboard", +      "setlocal cursorline signcolumn=yes cursorcolumn number", +    }, +    {        "BufRead",        "*",        "setlocal formatoptions-=c formatoptions-=r formatoptions-=o", @@ -95,6 +106,7 @@ lv_utils.define_augroups {      -- will cause split windows to be resized evenly if main window is resized      { "BufWritePost", "plugins.lua", "PackerCompile" },    }, +    -- _fterm_lazygit = {    --   -- will cause esc key to exit lazy git    --   {"TermEnter", "*", "call LazyGitNativation()"} @@ -106,6 +118,7 @@ lv_utils.define_augroups {    --   {'InsertEnter', '*', 'if &cursorline | let g:ms_cursorlineoff = 1 | setlocal nocursorline | endif'},    --   {'InsertLeave', '*', 'if exists("g:ms_cursorlineoff") | setlocal cursorline | endif'},    -- }, +  _user_autocommands = O.user_autocommands,  }  vim.cmd [[ @@ -120,4 +133,4 @@ endfunction  return lv_utils --- TODO find a new home for these autocommands +-- TODO: find a new home for these autocommands  | 
