]> git.lizzy.rs Git - rust.git/blob - editors/code/src/persistent_state.ts
Drop extensionUri copy
[rust.git] / editors / code / src / persistent_state.ts
1 import * as vscode from 'vscode';
2 import { log } from './util';
3
4 export class PersistentState {
5     constructor(private readonly globalState: vscode.Memento) {
6         const { serverVersion } = this;
7         log.info("PersistentState:", { serverVersion });
8     }
9
10     /**
11      * Version of the extension that installed the server.
12      * Used to check if we need to run patchelf again on NixOS.
13      */
14     get serverVersion(): string | undefined {
15         return this.globalState.get("serverVersion");
16     }
17     async updateServerVersion(value: string | undefined) {
18         await this.globalState.update("serverVersion", value);
19     }
20 }