diff options
| author | christianchiarulli <[email protected]> | 2021-07-07 19:27:27 -0400 | 
|---|---|---|
| committer | christianchiarulli <[email protected]> | 2021-07-07 19:27:27 -0400 | 
| commit | a247d69c82109230656c6eb10a7824794ee5e911 (patch) | |
| tree | 56524641892db02812cfcc0e7f2eba8fd6670db5 /lua/lv-neoformat | |
| parent | e02c7c5abb4fec1cc51588c96b6b4fdff938d1c2 (diff) | |
refactoring whichkey
Diffstat (limited to 'lua/lv-neoformat')
| -rw-r--r-- | lua/lv-neoformat/init.lua | 27 | 
1 files changed, 16 insertions, 11 deletions
| diff --git a/lua/lv-neoformat/init.lua b/lua/lv-neoformat/init.lua index ea3ff43c..4dbaad23 100644 --- a/lua/lv-neoformat/init.lua +++ b/lua/lv-neoformat/init.lua @@ -1,18 +1,23 @@  -- autoformat  if O.format_on_save then -	require("lv-utils").define_augroups({ -		autoformat = { -			{ -				"BufWritePre", -				"*", -				[[try | undojoin | Neoformat | catch /^Vim\%((\a\+)\)\=:E790/ | finally | silent Neoformat | endtry]], -			}, -		}, -	}) +  require("lv-utils").define_augroups { +    autoformat = { +      { +        "BufWritePre", +        "*", +        [[try | undojoin | Neoformat | catch /^Vim\%((\a\+)\)\=:E790/ | finally | silent Neoformat | endtry]], +      }, +    }, +  }  end +vim.g.neoformat_run_all_formatters = 0 + +vim.g.neoformat_enabled_python = { "autopep8", "yapf", "docformatter" } +vim.g.neoformat_enabled_javascript = { "prettier" } +  if not O.format_on_save then -	vim.cmd([[if exists('#autoformat#BufWritePre') +  vim.cmd [[if exists('#autoformat#BufWritePre')  	:autocmd! autoformat -	endif]]) +	endif]]  end | 
