mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Move config to Ctx
This commit is contained in:
parent
e4b588868f
commit
433000be34
3 changed files with 5 additions and 7 deletions
|
@ -4,6 +4,7 @@ import { Server } from './server';
|
|||
import { Config } from './config';
|
||||
|
||||
export class Ctx {
|
||||
readonly config = new Config();
|
||||
private extCtx: vscode.ExtensionContext;
|
||||
|
||||
constructor(extCtx: vscode.ExtensionContext) {
|
||||
|
@ -14,10 +15,6 @@ 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