summaryrefslogtreecommitdiff
path: root/test/lsp/test_did_save_event.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2019-02-13 00:31:33 +0000
committerw0rp <devw0rp@gmail.com>2019-02-13 17:26:37 +0000
commit1ee56713b8f9cfd0faa99dd7930437fa7ed986b0 (patch)
tree47e49ac8038f82892316e2d42a973e168c3b8d9a /test/lsp/test_did_save_event.vader
parente88243687a2da8cd02962bc78874ec0e60aecaf2 (diff)
downloadale-1ee56713b8f9cfd0faa99dd7930437fa7ed986b0.zip
#2132 Use an on-init callback for all LSP logic
Diffstat (limited to 'test/lsp/test_did_save_event.vader')
-rw-r--r--test/lsp/test_did_save_event.vader10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/lsp/test_did_save_event.vader b/test/lsp/test_did_save_event.vader
index f8ff8f70..1d6065ec 100644
--- a/test/lsp/test_did_save_event.vader
+++ b/test/lsp/test_did_save_event.vader
@@ -34,16 +34,19 @@ Before:
\ })
let g:ale_linters = {'foobar': ['dummy_linter']}
- function! ale#lsp_linter#StartLSP(buffer, linter) abort
+ function! ale#lsp_linter#StartLSP(buffer, linter, Callback) abort
let g:conn_id = ale#lsp#Register('executable', '/foo/bar', {})
call ale#lsp#MarkDocumentAsOpen(g:conn_id, a:buffer)
-
- return {
+ let l:details = {
\ 'buffer': a:buffer,
\ 'connection_id': g:conn_id,
\ 'project_root': '/foo/bar',
\ 'language_id': 'foobar',
\}
+
+ call a:Callback(a:linter, l:details)
+
+ return 1
endfunction
" Replace the Send function for LSP, so we can monitor calls to it.
@@ -61,6 +64,7 @@ After:
unlet! b:ale_enabled
unlet! b:ale_linters
unlet! g:message_list
+ unlet! b:ale_save_event_fired
delfunction LanguageCallback
delfunction ProjectRootCallback