aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/events
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code/src/events')
-rw-r--r--editors/code/src/events/change_active_text_editor.ts25
-rw-r--r--editors/code/src/events/index.ts3
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 @@
1import { TextEditor } from 'vscode';
2import { TextDocumentIdentifier } from 'vscode-languageclient';
3import { Decoration } from '../highlighting';
4import { Server } from '../server';
5
6export 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 @@
1import * as changeActiveTextEditor from './change_active_text_editor';
2
3export { changeActiveTextEditor };