River Riddle 473a21c0e9 [vscode-mlir] Add support for restarting the server on setting/server changes
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
2021-06-29 00:08:44 +00:00

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);
}