mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Add config to Ctx
This commit is contained in:
parent
7646dc046e
commit
efbbc903e6
4 changed files with 10 additions and 9 deletions
|
@ -1,6 +1,7 @@
|
|||
import * as vscode from 'vscode';
|
||||
import * as lc from 'vscode-languageclient';
|
||||
import { Server } from './server';
|
||||
import { Config } from './config';
|
||||
|
||||
export class Ctx {
|
||||
private extCtx: vscode.ExtensionContext;
|
||||
|
@ -13,6 +14,10 @@ export class Ctx {
|
|||
return Server.client;
|
||||
}
|
||||
|
||||
get config(): Config {
|
||||
return Server.config;
|
||||
}
|
||||
|
||||
get activeRustEditor(): vscode.TextEditor | undefined {
|
||||
const editor = vscode.window.activeTextEditor;
|
||||
return editor && editor.document.languageId === 'rust'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue