|
1 | 1 | using System; |
2 | 2 | using System.IO; |
3 | 3 | using OmniSharp.Extensions.LanguageServer.Client.Utilities; |
| 4 | +using OmniSharp.Extensions.LanguageServer.Protocol; |
4 | 5 | using OmniSharp.Extensions.LanguageServer.Protocol.Models; |
5 | 6 |
|
6 | 7 | namespace OmniSharp.Extensions.LanguageServer.Client.Clients |
@@ -87,7 +88,7 @@ public void DidOpen(Uri documentUri, string languageId, string text, int version |
87 | 88 | if (documentUri == null) |
88 | 89 | throw new ArgumentNullException(nameof(documentUri)); |
89 | 90 |
|
90 | | - Client.SendNotification("textDocument/didOpen", new DidOpenTextDocumentParams |
| 91 | + Client.SendNotification(DocumentNames.DidOpen, new DidOpenTextDocumentParams |
91 | 92 | { |
92 | 93 | TextDocument = new TextDocumentItem |
93 | 94 | { |
@@ -184,7 +185,7 @@ public void DidChange(Uri documentUri, string languageId, string text, int versi |
184 | 185 | if (documentUri == null) |
185 | 186 | throw new ArgumentNullException(nameof(documentUri)); |
186 | 187 |
|
187 | | - Client.SendNotification("textDocument/didChange", new DidChangeTextDocumentParams |
| 188 | + Client.SendNotification(DocumentNames.DidChange, new DidChangeTextDocumentParams |
188 | 189 | { |
189 | 190 | TextDocument = new VersionedTextDocumentIdentifier |
190 | 191 | { |
@@ -228,7 +229,7 @@ public void DidClose(Uri documentUri) |
228 | 229 | if (documentUri == null) |
229 | 230 | throw new ArgumentNullException(nameof(documentUri)); |
230 | 231 |
|
231 | | - Client.SendNotification("textDocument/didClose", new DidCloseTextDocumentParams |
| 232 | + Client.SendNotification(DocumentNames.DidClose, new DidCloseTextDocumentParams |
232 | 233 | { |
233 | 234 | TextDocument = new TextDocumentItem |
234 | 235 | { |
@@ -264,7 +265,7 @@ public void DidSave(Uri documentUri) |
264 | 265 | if (documentUri == null) |
265 | 266 | throw new ArgumentNullException(nameof(documentUri)); |
266 | 267 |
|
267 | | - Client.SendNotification("textDocument/didSave", new DidSaveTextDocumentParams |
| 268 | + Client.SendNotification(DocumentNames.DidSave, new DidSaveTextDocumentParams |
268 | 269 | { |
269 | 270 | TextDocument = new TextDocumentItem |
270 | 271 | { |
|
0 commit comments