diff options
author | cos <cos> | 2024-09-09 17:59:30 +0200 |
---|---|---|
committer | cos <cos> | 2024-09-09 18:21:46 +0200 |
commit | 6e7d86fcff907d907b6dd2da76b840a11fdb650b (patch) | |
tree | 73dfa196f5e2184bf58a9cf19ac78177c92ec5b2 | |
parent | e4861d9c50893eb9db122f7e92def9fb8b17b223 (diff) | |
download | lua-language-server-6e7d86fcff907d907b6dd2da76b840a11fdb650b.zip |
fixup! Only call workspace/configuration when available
-rw-r--r-- | script/lclient.lua | 3 | ||||
-rw-r--r-- | test/tclient/tests/files-associations.lua | 5 | ||||
-rw-r--r-- | test/tclient/tests/library-ignore-limit.lua | 8 | ||||
-rw-r--r-- | test/tclient/tests/load-library.lua | 8 | ||||
-rw-r--r-- | test/tclient/tests/load-relative-library.lua | 13 | ||||
-rw-r--r-- | test/tclient/tests/modify-luarc.lua | 8 | ||||
-rw-r--r-- | test/tclient/tests/multi-workspace.lua | 5 |
7 files changed, 7 insertions, 43 deletions
diff --git a/script/lclient.lua b/script/lclient.lua index 0960729d..3bcde50a 100644 --- a/script/lclient.lua +++ b/script/lclient.lua @@ -83,6 +83,9 @@ local defaultClientOptions = { }, }, }, + workspace = { + configuration = true, + }, }, } diff --git a/test/tclient/tests/files-associations.lua b/test/tclient/tests/files-associations.lua index 0000bb12..12c04926 100644 --- a/test/tclient/tests/files-associations.lua +++ b/test/tclient/tests/files-associations.lua @@ -35,11 +35,6 @@ lclient():start(function (client) name = 'ws', uri = rootUri, }, - }, - capabilities = { - workspace = { - configuration = true, - } } } diff --git a/test/tclient/tests/library-ignore-limit.lua b/test/tclient/tests/library-ignore-limit.lua index d34eead1..3f30a4e9 100644 --- a/test/tclient/tests/library-ignore-limit.lua +++ b/test/tclient/tests/library-ignore-limit.lua @@ -25,13 +25,7 @@ lclient():start(function (client) util.saveFile(largeFilePath, string.rep('--this is a large file\n', 100000)) end - client:initialize { - capabilities = { - workspace = { - configuration = true, - } - } - } + client:initialize() ws.awaitReady() diff --git a/test/tclient/tests/load-library.lua b/test/tclient/tests/load-library.lua index a2d7d2bc..cbd1492a 100644 --- a/test/tclient/tests/load-library.lua +++ b/test/tclient/tests/load-library.lua @@ -25,13 +25,7 @@ lclient():start(function (client) util.saveFile(libraryFilePath, 'LIBRARY_FILE = true') end - client:initialize { - capabilities = { - workspace = { - configuration = true, - } - } - } + client:initialize() client:notify('textDocument/didOpen', { textDocument = { diff --git a/test/tclient/tests/load-relative-library.lua b/test/tclient/tests/load-relative-library.lua index 2a2484d6..ad3ebb4a 100644 --- a/test/tclient/tests/load-relative-library.lua +++ b/test/tclient/tests/load-relative-library.lua @@ -15,11 +15,6 @@ lclient():start(function (client) client:initialize { rootUri = furi.encode(workspacePath), - capabilities = { - workspace = { - configuration = true, - } - } } client:register('workspace/configuration', function () @@ -35,13 +30,7 @@ lclient():start(function (client) util.saveFile(libraryFilePath, 'LIBRARY_FILE = true') end - client:initialize { - capabilities = { - workspace = { - configuration = true, - } - } - } + client:initialize() client:notify('textDocument/didOpen', { textDocument = { diff --git a/test/tclient/tests/modify-luarc.lua b/test/tclient/tests/modify-luarc.lua index 60927276..62d97a41 100644 --- a/test/tclient/tests/modify-luarc.lua +++ b/test/tclient/tests/modify-luarc.lua @@ -16,13 +16,7 @@ lclient():start(function (languageClient) CONFIGPATH = configPath - languageClient:initialize { - capabilities = { - workspace = { - configuration = true, - } - } - } + languageClient:initialize() ws.awaitReady() diff --git a/test/tclient/tests/multi-workspace.lua b/test/tclient/tests/multi-workspace.lua index 7660f03d..c4636c53 100644 --- a/test/tclient/tests/multi-workspace.lua +++ b/test/tclient/tests/multi-workspace.lua @@ -55,11 +55,6 @@ lclient():start(function (client) name = 'ws2', uri = rootUri .. '/ws2', }, - }, - capabilities = { - workspace = { - configuration = true, - } } } |