diff options
author | Aleksey Kladov <[email protected]> | 2019-12-30 19:46:14 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-12-30 20:32:04 +0000 |
commit | efbbc903e68aaf32ee1fba5537769070cd2d01e8 (patch) | |
tree | 7895d32c183bb8bf23ccf5a47011e4561c0db413 /editors/code/src/ctx.ts | |
parent | 7646dc046eb562276231de8ec6a4df1bc691cafc (diff) |
Add config to Ctx
Diffstat (limited to 'editors/code/src/ctx.ts')
-rw-r--r-- | editors/code/src/ctx.ts | 5 |
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 @@ | |||
1 | import * as vscode from 'vscode'; | 1 | import * as vscode from 'vscode'; |
2 | import * as lc from 'vscode-languageclient'; | 2 | import * as lc from 'vscode-languageclient'; |
3 | import { Server } from './server'; | 3 | import { Server } from './server'; |
4 | import { Config } from './config'; | ||
4 | 5 | ||
5 | export class Ctx { | 6 | export 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' |