Fixed session tests

This commit is contained in:
Alexandros Naskos 2020-11-06 10:24:37 +02:00
parent f7eff6632e
commit abcccb5d85
No known key found for this signature in database
GPG Key ID: 02BF2E72B0EA32D2
2 changed files with 2 additions and 2 deletions

View File

@ -291,6 +291,7 @@ pub const WorkspaceFolder = struct {
// Only includes options we set in our initialize result.
const InitializeResult = struct {
offsetEncoding: []const u8,
capabilities: struct {
signatureHelpProvider: struct {
triggerCharacters: []const []const u8,
@ -348,5 +349,4 @@ const InitializeResult = struct {
name: []const u8,
version: ?[]const u8 = null,
},
offsetEncoding: []const u8,
};

View File

@ -143,6 +143,6 @@ test "Requesting utf-8 offset encoding" {
try sendRequest(shutdown_message, process);
try consumeOutputAndWait(process, .{
\\{"jsonrpc":"2.0","id":0,"result": {"offsetEncoding":"utf-8","capabilities": {"signatureHelpProvider": {"triggerCharacters": ["(",","]},"textDocumentSync": 1,"renameProvider":true,"completionProvider": {"resolveProvider": false,"triggerCharacters": [".",":","@"]},"documentHighlightProvider": false,"hoverProvider": true,"codeActionProvider": false,"declarationProvider": true,"definitionProvider": true,"typeDefinitionProvider": true,"implementationProvider": false,"referencesProvider": true,"documentSymbolProvider": true,"colorProvider": false,"documentFormattingProvider": true,"documentRangeFormattingProvider": false,"foldingRangeProvider": false,"selectionRangeProvider": false,"workspaceSymbolProvider": false,"rangeProvider": false,"documentProvider": true,"workspace": {"workspaceFolders": {"supported": true,"changeNotifications": true}},"semanticTokensProvider": {"documentProvider": true,"legend": {"tokenTypes": ["namespace","type","struct","enum","union","opaque","parameter","variable","tagField","field","errorTag","function","keyword","comment","string","number","operator","builtin","label","keywordLiteral"],"tokenModifiers": ["definition","async","documentation", "generic"]}}}}}
\\{"jsonrpc":"2.0","id":0,"result":{"offsetEncoding":"utf-8","capabilities":{"signatureHelpProvider":{"triggerCharacters":["(",","]},"textDocumentSync":1,"renameProvider":true,"completionProvider":{"resolveProvider":false,"triggerCharacters":[".",":","@"]},"documentHighlightProvider":false,"hoverProvider":true,"codeActionProvider":false,"declarationProvider":true,"definitionProvider":true,"typeDefinitionProvider":true,"implementationProvider":false,"referencesProvider":true,"documentSymbolProvider":true,"colorProvider":false,"documentFormattingProvider":true,"documentRangeFormattingProvider":false,"foldingRangeProvider":false,"selectionRangeProvider":false,"workspaceSymbolProvider":false,"rangeProvider":false,"documentProvider":true,"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":true}},"semanticTokensProvider":{"documentProvider":true,"legend":{"tokenTypes":["namespace","type","struct","enum","union","opaque","parameter","variable","tagField","field","errorTag","function","keyword","comment","string","number","operator","builtin","label","keywordLiteral"],"tokenModifiers":["definition","async","documentation","generic"]}}},"serverInfo":{"name":"zls","version":"0.1.0"}}}
});
}