Fix falsy value for filterText and insertText

'filterText' and 'insertText' fields of 'CompletionItem' can only have
"" or undefined as falsy value.

https://github.com/microsoft/language-server-protocol/issues/1222
This commit is contained in:
rhysd
2021-03-15 20:16:16 +09:00
parent 521b795201
commit 6057d290b4
3 changed files with 4 additions and 4 deletions

View File

@@ -138,7 +138,7 @@ test "Requesting a completion with no trailing whitespace" {
try sendRequest(completion_req, process);
try sendRequest(shutdown_message, process);
try consumeOutputAndWait(process, .{
\\{"jsonrpc":"2.0","id":2,"result":{"isIncomplete":false,"items":[{"label":"std","kind":21,"textEdit":null,"filterText":null,"insertText":null,"insertTextFormat":1,"detail":"const std = @import(\"std\")","documentation":null}]}}
\\{"jsonrpc":"2.0","id":2,"result":{"isIncomplete":false,"items":[{"label":"std","kind":21,"textEdit":null,"filterText":"","insertText":"","insertTextFormat":1,"detail":"const std = @import(\"std\")","documentation":null}]}}
});
}