2018-10-30 22:47:19 +00:00
|
|
|
Before:
|
|
|
|
runtime autoload/ale/lsp.vim
|
|
|
|
|
|
|
|
let g:conn_id = ale#lsp#Register('executable', '/foo/bar', {})
|
|
|
|
|
2019-02-15 08:54:53 +00:00
|
|
|
" Stub out this function, so we test updating configs.
|
|
|
|
function! ale#lsp#Send(conn_id, message) abort
|
|
|
|
endfunction
|
|
|
|
|
2018-10-30 22:47:19 +00:00
|
|
|
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(''), {})
|