Pass rootUri to LSPs in addition to rootPath
This commit is contained in:
parent
1a4b08539b
commit
641c0c797b
@ -26,11 +26,13 @@ endfunction
|
|||||||
|
|
||||||
function! ale#lsp#message#Initialize(root_path, initialization_options) abort
|
function! ale#lsp#message#Initialize(root_path, initialization_options) abort
|
||||||
" TODO: Define needed capabilities.
|
" TODO: Define needed capabilities.
|
||||||
|
" NOTE: rootPath is deprecated in favour of rootUri
|
||||||
return [0, 'initialize', {
|
return [0, 'initialize', {
|
||||||
\ 'processId': getpid(),
|
\ 'processId': getpid(),
|
||||||
\ 'rootPath': a:root_path,
|
\ 'rootPath': a:root_path,
|
||||||
\ 'capabilities': {},
|
\ 'capabilities': {},
|
||||||
\ 'initializationOptions': a:initialization_options,
|
\ 'initializationOptions': a:initialization_options,
|
||||||
|
\ 'rootUri': ale#path#ToURI(a:root_path),
|
||||||
\}]
|
\}]
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@ Execute(ale#lsp#message#Initialize() should return correct messages):
|
|||||||
\ 'rootPath': '/foo/bar',
|
\ 'rootPath': '/foo/bar',
|
||||||
\ 'capabilities': {},
|
\ 'capabilities': {},
|
||||||
\ 'initializationOptions': {'foo': 'bar'},
|
\ 'initializationOptions': {'foo': 'bar'},
|
||||||
|
\ 'rootUri': 'file:///foo/bar',
|
||||||
\ }
|
\ }
|
||||||
\ ],
|
\ ],
|
||||||
\ ale#lsp#message#Initialize('/foo/bar', {'foo': 'bar'})
|
\ ale#lsp#message#Initialize('/foo/bar', {'foo': 'bar'})
|
||||||
|
Loading…
Reference in New Issue
Block a user