Merge pull request #2035 from jparise/lsp_config_callback

Add a `lsp_config_callback` linter option
This commit is contained in:
w0rp
2018-10-31 16:24:11 +00:00
committed by GitHub
12 changed files with 122 additions and 10 deletions

View File

@@ -7,6 +7,7 @@ Before:
\ 'initialized': 0,
\ 'init_request_id': 0,
\ 'init_options': {},
\ 'config': {},
\ 'callback_list': [],
\ 'message_queue': [],
\ 'capabilities_queue': [],

View File

@@ -0,0 +1,17 @@
Before:
runtime autoload/ale/lsp.vim
let g:conn_id = ale#lsp#Register('executable', '/foo/bar', {})
After:
Restore
unlet! g:conn_id
runtime autoload/ale/lsp.vim
Execute(Only send updates when the configuration dictionary changes):
AssertEqual 0, ale#lsp#UpdateConfig(g:conn_id, bufnr(''), {})
AssertEqual 1, ale#lsp#UpdateConfig(g:conn_id, bufnr(''), {'a': 1})
AssertEqual 0, ale#lsp#UpdateConfig(g:conn_id, bufnr(''), {'a': 1})
AssertEqual 1, ale#lsp#UpdateConfig(g:conn_id, bufnr(''), {})