diff options
Diffstat (limited to 'editors/code/src/events')
-rw-r--r-- | editors/code/src/events/change_active_text_editor.ts | 25 | ||||
-rw-r--r-- | editors/code/src/events/index.ts | 3 |
2 files changed, 0 insertions, 28 deletions
diff --git a/editors/code/src/events/change_active_text_editor.ts b/editors/code/src/events/change_active_text_editor.ts deleted file mode 100644 index 4384ee567..000000000 --- a/editors/code/src/events/change_active_text_editor.ts +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | import { TextEditor } from 'vscode'; | ||
2 | import { TextDocumentIdentifier } from 'vscode-languageclient'; | ||
3 | import { Decoration } from '../highlighting'; | ||
4 | import { Server } from '../server'; | ||
5 | |||
6 | export function makeHandler() { | ||
7 | return async function handle(editor: TextEditor | undefined) { | ||
8 | if (!editor || editor.document.languageId !== 'rust') { | ||
9 | return; | ||
10 | } | ||
11 | |||
12 | if (!Server.config.highlightingOn) { | ||
13 | return; | ||
14 | } | ||
15 | |||
16 | const params: TextDocumentIdentifier = { | ||
17 | uri: editor.document.uri.toString(), | ||
18 | }; | ||
19 | const decorations = await Server.client.sendRequest<Decoration[]>( | ||
20 | 'rust-analyzer/decorationsRequest', | ||
21 | params, | ||
22 | ); | ||
23 | Server.highlighter.setHighlights(editor, decorations); | ||
24 | }; | ||
25 | } | ||
diff --git a/editors/code/src/events/index.ts b/editors/code/src/events/index.ts deleted file mode 100644 index be135474d..000000000 --- a/editors/code/src/events/index.ts +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | import * as changeActiveTextEditor from './change_active_text_editor'; | ||
2 | |||
3 | export { changeActiveTextEditor }; | ||