Skip to content

Commit 413ee4b

Browse files
fixed tests
1 parent 5c52958 commit 413ee4b

15 files changed

+46
-20
lines changed

src/Protocol/Client/Capabilities/RenameCapability.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
namespace OmniSharp.Extensions.LanguageServer.Protocol.Client.Capabilities
55
{
6-
public class RenameCapability : DynamicCapability, ConnectedCapability<IRenameHandler>, ConnectedCapability<IPrepareRenameHandler>
6+
public class RenameCapability : DynamicCapability, ConnectedCapability<IRenameHandler>
77
{
88
/// <summary>
99
/// Client supports testing for validity of rename operations

src/Protocol/Models/CodeActionContext.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using Newtonsoft.Json;
22
using Newtonsoft.Json.Serialization;
3+
using OmniSharp.Extensions.LanguageServer.Protocol.Serialization;
34

45
namespace OmniSharp.Extensions.LanguageServer.Protocol.Models
56
{
@@ -20,6 +21,7 @@ public class CodeActionContext
2021
/// Actions not of this kind are filtered out by the client before being shown. So servers
2122
/// can omit computing them.
2223
/// </summary>
24+
[Optional]
2325
public Container<CodeActionKind> Only { get; set; }
2426
}
2527
}

test/Lsp.Tests/Capabilities/Client/ClientCapabilitiesTests_$SimpleTest.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@
2727
"completion": {
2828
"completionItem": {
2929
"snippetSupport": true,
30-
"commitCharactersSupport": false
30+
"commitCharactersSupport": false,
31+
"deprecatedSupport": false,
32+
"preselectSupport": false
3133
},
3234
"contextSupport": false,
3335
"dynamicRegistration": true
@@ -69,6 +71,7 @@
6971
"dynamicRegistration": true
7072
},
7173
"rename": {
74+
"prepareSupport": false,
7275
"dynamicRegistration": true
7376
}
7477
},

test/Lsp.Tests/Capabilities/Client/CompletionCapabilityTests_$SimpleTest.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
{
22
"completionItem": {
33
"snippetSupport": false,
4-
"commitCharactersSupport": false
4+
"commitCharactersSupport": false,
5+
"deprecatedSupport": false,
6+
"preselectSupport": false
57
},
68
"contextSupport": false,
79
"dynamicRegistration": false
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
{
22
"snippetSupport": true,
3-
"commitCharactersSupport": false
3+
"commitCharactersSupport": false,
4+
"deprecatedSupport": false,
5+
"preselectSupport": false
46
}

test/Lsp.Tests/Capabilities/Client/TextDocumentClientCapabilitiesTests_$SimpleTest.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
"completion": {
99
"completionItem": {
1010
"snippetSupport": true,
11-
"commitCharactersSupport": false
11+
"commitCharactersSupport": false,
12+
"deprecatedSupport": false,
13+
"preselectSupport": false
1214
},
1315
"contextSupport": false,
1416
"dynamicRegistration": true
@@ -50,6 +52,7 @@
5052
"dynamicRegistration": true
5153
},
5254
"rename": {
55+
"prepareSupport": false,
5356
"dynamicRegistration": true
5457
}
5558
}

test/Lsp.Tests/Capabilities/Server/ServerCapabilitiesTests_$SimpleTest.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{
1+
{
22
"textDocumentSync": {
33
"openClose": true,
44
"change": 1,
@@ -55,5 +55,7 @@
5555
"abc": "123"
5656
},
5757
"typeDefinitionProvider": null,
58-
"implementationProvider": null
58+
"implementationProvider": null,
59+
"colorProvider": null,
60+
"foldingRangeProvider": null
5961
}

test/Lsp.Tests/Models/CodeActionParamsTests_$SimpleTest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{
1+
{
22
"textDocument": {
33
"uri": "file:///test/123/d.cs"
44
},
@@ -32,4 +32,4 @@
3232
}
3333
]
3434
}
35-
}
35+
}

test/Lsp.Tests/Models/CompletionItemTests_$SimpleTest.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{
22
"label": null,
33
"kind": 1,
4+
"deprecated": false,
5+
"preselect": false,
46
"insertTextFormat": 0,
57
"additionalTextEdits": [
68
{
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
{
1+
{
22
"isIncomplete": true,
33
"items": [
44
{
55
"label": null,
66
"kind": 7,
77
"detail": "details",
8+
"deprecated": false,
9+
"preselect": false,
810
"insertTextFormat": 0
911
}
1012
]
11-
}
13+
}

0 commit comments

Comments
 (0)