This revision adds detection for changes to either the mlir-lsp-server binary or the setting, and prompts the user to restart the server. Whether the user gets prompted or not is a configurable setting in the extension, and this setting may updated based on the user response to the prompt. Differential Revision: https://reviews.llvm.org/D104501
17 lines
434 B
TypeScript
17 lines
434 B
TypeScript
import * as vscode from 'vscode';
|
|
|
|
/**
|
|
* Gets the config value `mlir.<key>`.
|
|
*/
|
|
export function get<T>(key: string): T {
|
|
return vscode.workspace.getConfiguration('mlir').get<T>(key);
|
|
}
|
|
|
|
/**
|
|
* Sets the config value `mlir.<key>`.
|
|
*/
|
|
export function update<T>(key: string, value: T,
|
|
target?: vscode.ConfigurationTarget) {
|
|
return vscode.workspace.getConfiguration('mlir').update(key, value, target);
|
|
}
|