diff options
Diffstat (limited to 'editors/code/src/events/change_active_text_editor.ts')
-rw-r--r-- | editors/code/src/events/change_active_text_editor.ts | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/editors/code/src/events/change_active_text_editor.ts b/editors/code/src/events/change_active_text_editor.ts index bbdd53098..96d61126c 100644 --- a/editors/code/src/events/change_active_text_editor.ts +++ b/editors/code/src/events/change_active_text_editor.ts | |||
@@ -1,14 +1,14 @@ | |||
1 | import { TextEditor } from "vscode"; | 1 | import { TextEditor } from 'vscode'; |
2 | import { TextDocumentIdentifier } from "vscode-languageclient"; | 2 | import { TextDocumentIdentifier } from 'vscode-languageclient'; |
3 | 3 | ||
4 | import { Server } from "../server"; | 4 | import { Decoration } from '../highlighting'; |
5 | import { Decoration } from "../highlighting"; | 5 | import { Server } from '../server'; |
6 | 6 | ||
7 | export async function handle(editor: TextEditor | undefined) { | 7 | export async function handle(editor: TextEditor | undefined) { |
8 | if (!Server.config.highlightingOn || !editor || editor.document.languageId != 'rust') return | 8 | if (!Server.config.highlightingOn || !editor || editor.document.languageId != 'rust') { return; } |
9 | let params: TextDocumentIdentifier = { | 9 | const params: TextDocumentIdentifier = { |
10 | uri: editor.document.uri.toString() | 10 | uri: editor.document.uri.toString(), |
11 | } | 11 | }; |
12 | let decorations = await Server.client.sendRequest<Decoration[]>("m/decorationsRequest", params) | 12 | const decorations = await Server.client.sendRequest<Decoration[]>('m/decorationsRequest', params); |
13 | Server.highlighter.setHighlights(editor, decorations) | 13 | Server.highlighter.setHighlights(editor, decorations); |
14 | } \ No newline at end of file | 14 | } |