aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/ctx.ts
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-12-30 19:46:14 +0000
committerAleksey Kladov <[email protected]>2019-12-30 20:32:04 +0000
commitefbbc903e68aaf32ee1fba5537769070cd2d01e8 (patch)
tree7895d32c183bb8bf23ccf5a47011e4561c0db413 /editors/code/src/ctx.ts
parent7646dc046eb562276231de8ec6a4df1bc691cafc (diff)
Add config to Ctx
Diffstat (limited to 'editors/code/src/ctx.ts')
-rw-r--r--editors/code/src/ctx.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/editors/code/src/ctx.ts b/editors/code/src/ctx.ts
index c3a3583b5..ca4319064 100644
--- a/editors/code/src/ctx.ts
+++ b/editors/code/src/ctx.ts
@@ -1,6 +1,7 @@
1import * as vscode from 'vscode'; 1import * as vscode from 'vscode';
2import * as lc from 'vscode-languageclient'; 2import * as lc from 'vscode-languageclient';
3import { Server } from './server'; 3import { Server } from './server';
4import { Config } from './config';
4 5
5export class Ctx { 6export class Ctx {
6 private extCtx: vscode.ExtensionContext; 7 private extCtx: vscode.ExtensionContext;
@@ -13,6 +14,10 @@ export class Ctx {
13 return Server.client; 14 return Server.client;
14 } 15 }
15 16
17 get config(): Config {
18 return Server.config;
19 }
20
16 get activeRustEditor(): vscode.TextEditor | undefined { 21 get activeRustEditor(): vscode.TextEditor | undefined {
17 const editor = vscode.window.activeTextEditor; 22 const editor = vscode.window.activeTextEditor;
18 return editor && editor.document.languageId === 'rust' 23 return editor && editor.document.languageId === 'rust'