File tree Expand file tree Collapse file tree 4 files changed +27
-8
lines changed
PowerShellEditorServices.Host
PowerShellEditorServices.Protocol/LanguageServer Expand file tree Collapse file tree 4 files changed +27
-8
lines changed Original file line number Diff line number Diff line change @@ -177,16 +177,16 @@ protected Task HandleDidCloseTextDocumentNotification(
177177 }
178178
179179 protected Task HandleDidChangeTextDocumentNotification (
180- DidChangeTextDocumentNotification [ ] textChangeParams ,
180+ DidChangeTextDocumentParams textChangeParams ,
181181 EditorSession editorSession ,
182182 EventContext eventContext )
183183 {
184184 List < ScriptFile > changedFiles = new List < ScriptFile > ( ) ;
185185
186186 // A text change notification can batch multiple change requests
187- foreach ( var textChange in textChangeParams )
187+ foreach ( var textChange in textChangeParams . ContentChanges )
188188 {
189- ScriptFile changedFile = editorSession . Workspace . GetFile ( textChange . Uri ) ;
189+ ScriptFile changedFile = editorSession . Workspace . GetFile ( textChangeParams . Uri ) ;
190190
191191 changedFile . ApplyChange (
192192 GetFileChangeDetails (
Original file line number Diff line number Diff line change @@ -75,6 +75,14 @@ public class CompletionItem
7575 public string InsertText { get ; set ; }
7676
7777 public TextEdit TextEdit { get ; set ; }
78+
79+ /// <summary>
80+ /// Gets or sets a custom data field that allows the server to mark
81+ /// each completion item with an identifier that will help correlate
82+ /// the item to the previous completion request during a completion
83+ /// resolve request.
84+ /// </summary>
85+ public object Data { get ; set ; }
7886 }
7987}
8088
Original file line number Diff line number Diff line change @@ -16,10 +16,10 @@ public static readonly
1616
1717 public class ReferencesParams : TextDocumentPosition
1818 {
19- public ReferencesOptions Options { get ; set ; }
19+ public ReferencesContext Context { get ; set ; }
2020 }
2121
22- public class ReferencesOptions
22+ public class ReferencesContext
2323 {
2424 public bool IncludeDeclaration { get ; set ; }
2525 }
Original file line number Diff line number Diff line change @@ -49,12 +49,23 @@ public static readonly
4949 EventType < TextDocumentIdentifier > . Create ( "textDocument/didClose" ) ;
5050 }
5151
52- public class DidChangeTextDocumentNotification : TextDocumentIdentifier
52+ public class DidChangeTextDocumentNotification
5353 {
5454 public static readonly
55- EventType < DidChangeTextDocumentNotification [ ] > Type =
56- EventType < DidChangeTextDocumentNotification [ ] > . Create ( "textDocument/didChange" ) ;
55+ EventType < DidChangeTextDocumentParams > Type =
56+ EventType < DidChangeTextDocumentParams > . Create ( "textDocument/didChange" ) ;
57+ }
5758
59+ public class DidChangeTextDocumentParams : TextDocumentIdentifier
60+ {
61+ /// <summary>
62+ /// Gets or sets the list of changes to the document content.
63+ /// </summary>
64+ public TextDocumentChangeEvent [ ] ContentChanges { get ; set ; }
65+ }
66+
67+ public class TextDocumentChangeEvent
68+ {
5869 /// <summary>
5970 /// Gets or sets the Range where the document was changed. Will
6071 /// be null if the server's TextDocumentSyncKind is Full.
You can’t perform that action at this time.
0 commit comments