|
1 | 1 | import { BehaviorSubject } from 'rxjs'
|
2 |
| -import { DidCloseTextDocumentNotification, DidOpenTextDocumentNotification, ShowInputRequest } from '../../protocol' |
| 2 | +import { TextDocumentIdentifier } from 'vscode-languageserver-types' |
| 3 | +import { |
| 4 | + DidCloseTextDocumentNotification, |
| 5 | + DidOpenTextDocumentNotification, |
| 6 | + ShowInputRequest, |
| 7 | + TextDocumentDecoration, |
| 8 | + TextDocumentPublishDecorationsNotification, |
| 9 | + TextDocumentPublishDecorationsParams, |
| 10 | +} from '../../protocol' |
3 | 11 | import { CXP, Observable, Window, Windows } from '../api'
|
4 | 12 |
|
5 | 13 | class ExtWindows extends BehaviorSubject<Window[]> implements Windows, Observable<Window[]> {
|
@@ -39,6 +47,13 @@ class ExtWindows extends BehaviorSubject<Window[]> implements Windows, Observabl
|
39 | 47 | return this.ext.rawConnection.sendRequest(ShowInputRequest.type, { message, defaultValue })
|
40 | 48 | }
|
41 | 49 |
|
| 50 | + public setDecorations(resource: TextDocumentIdentifier, decorations: TextDocumentDecoration[]): void { |
| 51 | + return this.ext.rawConnection.sendNotification(TextDocumentPublishDecorationsNotification.type, { |
| 52 | + textDocument: resource, |
| 53 | + decorations, |
| 54 | + } as TextDocumentPublishDecorationsParams) |
| 55 | + } |
| 56 | + |
42 | 57 | public readonly [Symbol.observable] = () => this
|
43 | 58 | }
|
44 | 59 |
|
|
0 commit comments