diff options
author | cos <cos> | 2023-09-16 17:33:43 +0200 |
---|---|---|
committer | cos <cos> | 2023-09-18 21:54:09 +0200 |
commit | 593c6725cb558ec87c83b95274293bd6d3b97ee7 (patch) | |
tree | 6f688bede2d654f079c07a8e8f69cb6a2b299b79 /test/tclient/tests/load-relative-library.lua | |
parent | 8ce987c770c72883bfb355ceec15f728bfd59cf8 (diff) | |
download | lua-language-server-593c6725cb558ec87c83b95274293bd6d3b97ee7.zip |
Only call workspace/configuration when availablefix/honour_configuration_capability
Not all clients implement the client capability: `configuration`, which
was added in version 3.6.0 of the Language Server Protocol. The LSP
Specification also states:
> A missing property should be interpreted as an absence of the capability.
Hence this change modifies behaviour to only call the method on clients
explicitly announcing to support it.
Most affected test-cases are updated to work with this commit, however
one test gets disabled. That disabled test suite is in serious need of
added documentation explaining its design. The few comments which are
there seem highly unsufficient, and since they are written in simplified
chinese they practically are of no use.
This commit makes the lua-language-server work with vim-ale.
Diffstat (limited to 'test/tclient/tests/load-relative-library.lua')
-rw-r--r-- | test/tclient/tests/load-relative-library.lua | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/test/tclient/tests/load-relative-library.lua b/test/tclient/tests/load-relative-library.lua index ad3ebb4a..2a2484d6 100644 --- a/test/tclient/tests/load-relative-library.lua +++ b/test/tclient/tests/load-relative-library.lua @@ -15,6 +15,11 @@ lclient():start(function (client) client:initialize { rootUri = furi.encode(workspacePath), + capabilities = { + workspace = { + configuration = true, + } + } } client:register('workspace/configuration', function () @@ -30,7 +35,13 @@ lclient():start(function (client) util.saveFile(libraryFilePath, 'LIBRARY_FILE = true') end - client:initialize() + client:initialize { + capabilities = { + workspace = { + configuration = true, + } + } + } client:notify('textDocument/didOpen', { textDocument = { |