#2295 Send an empty object for the initialized notification, per the spec
This commit is contained in:
parent
0d10653a7c
commit
1a69c9c88c
@ -41,7 +41,7 @@ function! ale#lsp#message#Initialize(root_path, initialization_options) abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! ale#lsp#message#Initialized() abort
|
function! ale#lsp#message#Initialized() abort
|
||||||
return [1, 'initialized']
|
return [1, 'initialized', {}]
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! ale#lsp#message#Shutdown() abort
|
function! ale#lsp#message#Shutdown() abort
|
||||||
|
@ -23,7 +23,7 @@ Execute(ale#lsp#message#Initialize() should return correct messages):
|
|||||||
\ 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):
|
Execute(ale#lsp#message#Initialized() should return correct messages):
|
||||||
AssertEqual [1, 'initialized'], ale#lsp#message#Initialized()
|
AssertEqual [1, 'initialized', {}], ale#lsp#message#Initialized()
|
||||||
|
|
||||||
Execute(ale#lsp#message#Shutdown() should return correct messages):
|
Execute(ale#lsp#message#Shutdown() should return correct messages):
|
||||||
AssertEqual [0, 'shutdown'], ale#lsp#message#Shutdown()
|
AssertEqual [0, 'shutdown'], ale#lsp#message#Shutdown()
|
||||||
|
@ -43,7 +43,7 @@ Execute(Messages with no method and capabilities should initialize projects):
|
|||||||
\})
|
\})
|
||||||
|
|
||||||
AssertEqual 1, b:conn.initialized
|
AssertEqual 1, b:conn.initialized
|
||||||
AssertEqual [[1, 'initialized']], g:message_list
|
AssertEqual [[1, 'initialized', {}]], g:message_list
|
||||||
|
|
||||||
Execute(Other messages should not initialize projects):
|
Execute(Other messages should not initialize projects):
|
||||||
call ale#lsp#HandleInitResponse(b:conn, {'method': 'lolwat'})
|
call ale#lsp#HandleInitResponse(b:conn, {'method': 'lolwat'})
|
||||||
@ -102,7 +102,7 @@ Execute(Capabilities should bet set up correctly):
|
|||||||
\ 'symbol_search': 1,
|
\ 'symbol_search': 1,
|
||||||
\ },
|
\ },
|
||||||
\ b:conn.capabilities
|
\ b:conn.capabilities
|
||||||
AssertEqual [[1, 'initialized']], g:message_list
|
AssertEqual [[1, 'initialized', {}]], g:message_list
|
||||||
|
|
||||||
Execute(Disabled capabilities should be recognised correctly):
|
Execute(Disabled capabilities should be recognised correctly):
|
||||||
call ale#lsp#HandleInitResponse(b:conn, {
|
call ale#lsp#HandleInitResponse(b:conn, {
|
||||||
@ -145,7 +145,7 @@ Execute(Disabled capabilities should be recognised correctly):
|
|||||||
\ 'symbol_search': 0,
|
\ 'symbol_search': 0,
|
||||||
\ },
|
\ },
|
||||||
\ b:conn.capabilities
|
\ b:conn.capabilities
|
||||||
AssertEqual [[1, 'initialized']], g:message_list
|
AssertEqual [[1, 'initialized', {}]], g:message_list
|
||||||
|
|
||||||
Execute(Results that are not dictionaries should be handled correctly):
|
Execute(Results that are not dictionaries should be handled correctly):
|
||||||
call ale#lsp#HandleInitResponse(b:conn, {
|
call ale#lsp#HandleInitResponse(b:conn, {
|
||||||
|
Loading…
Reference in New Issue
Block a user