diff options
author | Rafael Lerm <rafaellerm@gmail.com> | 2018-01-19 14:40:55 -0200 |
---|---|---|
committer | w0rp <w0rp@users.noreply.github.com> | 2018-01-19 16:40:55 +0000 |
commit | 042dec059a3da01477cbc76e9893973dd374872d (patch) | |
tree | 37cccd72aeda8360259be8f29d33171378e4edde /autoload | |
parent | eddda2f8b599a52e92c99795f42c0c4ba8e15f7c (diff) | |
download | ale-042dec059a3da01477cbc76e9893973dd374872d.zip |
Send didSave message to LSP-based linters (#1295)
* Also send didSave to LSP linters.
* Add tests for messages sent to LSP linters.
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/engine.vim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/autoload/ale/engine.vim b/autoload/ale/engine.vim index 70b5a3ba..c415e7cb 100644 --- a/autoload/ale/engine.vim +++ b/autoload/ale/engine.vim @@ -703,6 +703,13 @@ function! s:CheckWithLSP(buffer, linter) abort \ : ale#lsp#message#DidChange(a:buffer) let l:request_id = ale#lsp#Send(l:id, l:change_message, l:root) + " If this was a file save event, also notify the server of that. + let l:is_save = getbufvar(a:buffer, 'ale_save_event_fired', 0) + if l:is_save != 0 + let l:save_message = ale#lsp#message#DidSave(a:buffer) + let l:request_id = ale#lsp#Send(l:id, l:save_message, l:root) + endif + if l:request_id != 0 if index(l:info.active_linter_list, a:linter.name) < 0 call add(l:info.active_linter_list, a:linter.name) |