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(
177
177
}
178
178
179
179
protected Task HandleDidChangeTextDocumentNotification (
180
- DidChangeTextDocumentNotification [ ] textChangeParams ,
180
+ DidChangeTextDocumentParams textChangeParams ,
181
181
EditorSession editorSession ,
182
182
EventContext eventContext )
183
183
{
184
184
List < ScriptFile > changedFiles = new List < ScriptFile > ( ) ;
185
185
186
186
// A text change notification can batch multiple change requests
187
- foreach ( var textChange in textChangeParams )
187
+ foreach ( var textChange in textChangeParams . ContentChanges )
188
188
{
189
- ScriptFile changedFile = editorSession . Workspace . GetFile ( textChange . Uri ) ;
189
+ ScriptFile changedFile = editorSession . Workspace . GetFile ( textChangeParams . Uri ) ;
190
190
191
191
changedFile . ApplyChange (
192
192
GetFileChangeDetails (
Original file line number Diff line number Diff line change @@ -75,6 +75,14 @@ public class CompletionItem
75
75
public string InsertText { get ; set ; }
76
76
77
77
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 ; }
78
86
}
79
87
}
80
88
Original file line number Diff line number Diff line change @@ -16,10 +16,10 @@ public static readonly
16
16
17
17
public class ReferencesParams : TextDocumentPosition
18
18
{
19
- public ReferencesOptions Options { get ; set ; }
19
+ public ReferencesContext Context { get ; set ; }
20
20
}
21
21
22
- public class ReferencesOptions
22
+ public class ReferencesContext
23
23
{
24
24
public bool IncludeDeclaration { get ; set ; }
25
25
}
Original file line number Diff line number Diff line change @@ -49,12 +49,23 @@ public static readonly
49
49
EventType < TextDocumentIdentifier > . Create ( "textDocument/didClose" ) ;
50
50
}
51
51
52
- public class DidChangeTextDocumentNotification : TextDocumentIdentifier
52
+ public class DidChangeTextDocumentNotification
53
53
{
54
54
public static readonly
55
- EventType < DidChangeTextDocumentNotification [ ] > Type =
56
- EventType < DidChangeTextDocumentNotification [ ] > . Create ( "textDocument/didChange" ) ;
55
+ EventType < DidChangeTextDocumentParams > Type =
56
+ EventType < DidChangeTextDocumentParams > . Create ( "textDocument/didChange" ) ;
57
+ }
57
58
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
+ {
58
69
/// <summary>
59
70
/// Gets or sets the Range where the document was changed. Will
60
71
/// be null if the server's TextDocumentSyncKind is Full.
You can’t perform that action at this time.
0 commit comments