This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
ale/test/lsp/test_update_config.vader
Jon Parise 2ac9e2a29e Only send LSP config updates when the dict changes
Each LSP connection now stores its configuration dictionary. It is
initially empty (`{}`) and is updated each time the LSP connection is
started. When a change is detected, the workspace/didChangeConfiguration
message is sent to the LSP servers with the updated configuration.
2018-10-31 08:42:42 -07:00

17 lines
514 B
Text

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(''), {})