summaryrefslogtreecommitdiff
path: root/test/lsp
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2019-05-20 09:40:06 +0100
committerw0rp <devw0rp@gmail.com>2019-05-20 09:40:06 +0100
commit4ee28d312976e463a3373f6170cd5a0cdd1bcf3c (patch)
tree5881c20a193d2f9fa18fe70f2d7ee406562eface /test/lsp
parent9d908ecc66b24234fc46d4a2a637f42e17fe6358 (diff)
downloadale-4ee28d312976e463a3373f6170cd5a0cdd1bcf3c.zip
Fix #2515 - Send client capabilities to LSP servers
Diffstat (limited to 'test/lsp')
-rw-r--r--test/lsp/test_lsp_client_messages.vader2
-rw-r--r--test/lsp/test_lsp_startup.vader60
2 files changed, 60 insertions, 2 deletions
diff --git a/test/lsp/test_lsp_client_messages.vader b/test/lsp/test_lsp_client_messages.vader
index 2abdf6ca..90a20832 100644
--- a/test/lsp/test_lsp_client_messages.vader
+++ b/test/lsp/test_lsp_client_messages.vader
@@ -20,7 +20,7 @@ Execute(ale#lsp#message#Initialize() should return correct messages):
\ 'rootUri': 'file:///foo/bar',
\ }
\ ],
- \ ale#lsp#message#Initialize('/foo/bar', {'foo': 'bar'})
+ \ ale#lsp#message#Initialize('/foo/bar', {'foo': 'bar'}, {})
Execute(ale#lsp#message#Initialized() should return correct messages):
AssertEqual [1, 'initialized', {}], ale#lsp#message#Initialized()
diff --git a/test/lsp/test_lsp_startup.vader b/test/lsp/test_lsp_startup.vader
index 028ec9b1..c29690bf 100644
--- a/test/lsp/test_lsp_startup.vader
+++ b/test/lsp/test_lsp_startup.vader
@@ -138,9 +138,67 @@ Before:
\ 'params': {
\ 'initializationOptions': {},
\ 'rootUri': ale#path#ToURI(a:root),
- \ 'capabilities': {},
\ 'rootPath': a:root,
\ 'processId': getpid(),
+ \ 'capabilities': {
+ \ 'workspace': {
+ \ 'applyEdit': v:false,
+ \ 'didChangeConfiguration': {
+ \ 'dynamicRegistration': v:false,
+ \ },
+ \ 'symbol': {
+ \ 'dynamicRegistration': v:false,
+ \ },
+ \ 'workspaceFolders': v:false,
+ \ 'configuration': v:false,
+ \ },
+ \ 'textDocument': {
+ \ 'synchronization': {
+ \ 'dynamicRegistration': v:false,
+ \ 'willSave': v:false,
+ \ 'willSaveWaitUntil': v:false,
+ \ 'didSave': v:true,
+ \ },
+ \ 'completion': {
+ \ 'dynamicRegistration': v:false,
+ \ 'completionItem': {
+ \ 'snippetSupport': v:false,
+ \ 'commitCharactersSupport': v:false,
+ \ 'documentationFormat': ['plaintext'],
+ \ 'deprecatedSupport': v:false,
+ \ 'preselectSupport': v:false,
+ \ },
+ \ 'contextSupport': v:false,
+ \ },
+ \ 'hover': {
+ \ 'dynamicRegistration': v:false,
+ \ 'contentFormat': ['plaintext'],
+ \ },
+ \ 'references': {
+ \ 'dynamicRegistration': v:false,
+ \ },
+ \ 'documentSymbol': {
+ \ 'dynamicRegistration': v:false,
+ \ 'hierarchicalDocumentSymbolSupport': v:false,
+ \ },
+ \ 'definition': {
+ \ 'dynamicRegistration': v:false,
+ \ 'linkSupport': v:false,
+ \ },
+ \ 'typeDefinition': {
+ \ 'dynamicRegistration': v:false,
+ \ },
+ \ 'publishDiagnostics': {
+ \ 'relatedInformation': v:true,
+ \ },
+ \ 'codeAction': {
+ \ 'dynamicRegistration': v:false,
+ \ },
+ \ 'rename': {
+ \ 'dynamicRegistration': v:false,
+ \ },
+ \ },
+ \ },
\ },
\ },
\ ],