diff options
author | w0rp <devw0rp@gmail.com> | 2023-09-06 00:17:27 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2023-09-06 00:17:27 +0100 |
commit | 551fbcfb0905629dcc2afc0db53dcca21994cca3 (patch) | |
tree | 6e29d601783f19aba69a153c75e6c9d1f1a3236e /autoload | |
parent | 8ba7ae818c33c3b9ed9627ae9661f0420d256d7c (diff) | |
download | ale-551fbcfb0905629dcc2afc0db53dcca21994cca3.zip |
Add an option to save hidden buffers
When commands are run, it can be useful to just save the hidden buffers
so language servers immediately get updated with changes to files
without you having to manually save each file. You can now enable this
by setting `g:ale_save_hidden` to `1`.
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/organize_imports.vim | 2 | ||||
-rw-r--r-- | autoload/ale/rename.vim | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/autoload/ale/organize_imports.vim b/autoload/ale/organize_imports.vim index a6e77863..395e6fbd 100644 --- a/autoload/ale/organize_imports.vim +++ b/autoload/ale/organize_imports.vim @@ -19,7 +19,7 @@ function! ale#organize_imports#HandleTSServerResponse(conn_id, response) abort \ }, \ { \ 'conn_id': a:conn_id, - \ 'should_save': !&hidden, + \ 'should_save': g:ale_save_hidden || !&hidden, \ }, \) endfunction diff --git a/autoload/ale/rename.vim b/autoload/ale/rename.vim index a722cc94..53c9fb5c 100644 --- a/autoload/ale/rename.vim +++ b/autoload/ale/rename.vim @@ -85,7 +85,7 @@ function! ale#rename#HandleTSServerResponse(conn_id, response) abort \ }, \ { \ 'conn_id': a:conn_id, - \ 'should_save': !&hidden, + \ 'should_save': g:ale_save_hidden || !&hidden, \ }, \) endfunction @@ -118,7 +118,7 @@ function! ale#rename#HandleLSPResponse(conn_id, response) abort \ }, \ { \ 'conn_id': a:conn_id, - \ 'should_save': !&hidden, + \ 'should_save': g:ale_save_hidden || !&hidden, \ }, \) endif |