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
|
||||
" TODO: Define needed capabilities.
|
||||
" NOTE: rootPath is deprecated in favour of rootUri
|
||||
return [0, 'initialize', {
|
||||
\ 'processId': getpid(),
|
||||
\ 'rootPath': a:root_path,
|
||||
\ 'capabilities': {},
|
||||
\ 'initializationOptions': a:initialization_options,
|
||||
\ 'rootUri': ale#path#ToURI(a:root_path),
|
||||
\}]
|
||||
endfunction
|
||||
|
||||
|
@ -17,6 +17,7 @@ Execute(ale#lsp#message#Initialize() should return correct messages):
|
||||
\ 'rootPath': '/foo/bar',
|
||||
\ 'capabilities': {},
|
||||
\ 'initializationOptions': {'foo': 'bar'},
|
||||
\ 'rootUri': 'file:///foo/bar',
|
||||
\ }
|
||||
\ ],
|
||||
\ ale#lsp#message#Initialize('/foo/bar', {'foo': 'bar'})
|
||||
|
Loading…
Reference in New Issue
Block a user