diff options
author | Ben Falconer <ben@falconers.me.uk> | 2018-06-06 16:59:44 +0100 |
---|---|---|
committer | Ben Falconer <ben@falconers.me.uk> | 2018-06-06 17:53:36 +0100 |
commit | 641c0c797ba5dc4adac199fca4015d833a7e1f61 (patch) | |
tree | 6364fe6ebb068cfaa2eed12766191a345ad4a65c | |
parent | 1a4b08539bf44ef84516d26760093734e0257340 (diff) | |
download | ale-641c0c797ba5dc4adac199fca4015d833a7e1f61.zip |
Pass rootUri to LSPs in addition to rootPath
-rw-r--r-- | autoload/ale/lsp/message.vim | 2 | ||||
-rw-r--r-- | test/lsp/test_lsp_client_messages.vader | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/autoload/ale/lsp/message.vim b/autoload/ale/lsp/message.vim index 1c0499dc..9e05156d 100644 --- a/autoload/ale/lsp/message.vim +++ b/autoload/ale/lsp/message.vim @@ -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 diff --git a/test/lsp/test_lsp_client_messages.vader b/test/lsp/test_lsp_client_messages.vader index e7eda33a..dc28c2e9 100644 --- a/test/lsp/test_lsp_client_messages.vader +++ b/test/lsp/test_lsp_client_messages.vader @@ -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'}) |