diff options
| author | kylo252 <[email protected]> | 2022-06-10 14:37:32 +0200 | 
|---|---|---|
| committer | kylo252 <[email protected]> | 2022-06-10 14:37:32 +0200 | 
| commit | 2c520cf555a8c67493ce70859586f611b93d0f1d (patch) | |
| tree | 848b9fbf0255e79bd30b99256bb12782328e11c8 /lua/lvim/core/autocmds.lua | |
| parent | 3475f7675d8928b49c85878dfc2912407de57342 (diff) | |
| parent | 59361ebe7b677dea0ca490b989af89c8918e1618 (diff) | |
Merge branch 'rolling'
Diffstat (limited to 'lua/lvim/core/autocmds.lua')
| -rw-r--r-- | lua/lvim/core/autocmds.lua | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/lua/lvim/core/autocmds.lua b/lua/lvim/core/autocmds.lua index 0ca21439..20716e83 100644 --- a/lua/lvim/core/autocmds.lua +++ b/lua/lvim/core/autocmds.lua @@ -118,11 +118,11 @@ function M.configure_format_on_save()  end  function M.toggle_format_on_save() -  local exists, _ = pcall(vim.api.nvim_get_autocmds, { +  local exists, autocmds = pcall(vim.api.nvim_get_autocmds, {      group = "lsp_format_on_save",      event = "BufWritePre",    }) -  if not exists then +  if not exists or #autocmds == 0 then      M.enable_format_on_save()    else      M.disable_format_on_save() | 
