mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 02:28:34 +01:00
Change tree sitter setting to be per langauge (#240622)
* Change tree sitter setting to be per langauge Part of #210475 * Fix accidentally unregistering languages
This commit is contained in:
@@ -65,14 +65,19 @@ suite('colorization', () => {
|
||||
const fixturesPath = join(testPath, 'colorize-fixtures');
|
||||
const resultsPath = join(testPath, 'colorize-results');
|
||||
const treeSitterResultsPath = join(testPath, 'colorize-tree-sitter-results');
|
||||
let originalSettingValue: any;
|
||||
let originalSettingValues: any[];
|
||||
|
||||
suiteSetup(async function () {
|
||||
originalSettingValue = workspace.getConfiguration('editor').get('experimental.preferTreeSitter');
|
||||
await workspace.getConfiguration('editor').update('experimental.preferTreeSitter', ["typescript", "ini"], ConfigurationTarget.Global);
|
||||
originalSettingValues = [
|
||||
workspace.getConfiguration('editor.experimental').get('preferTreeSitter.typescript'),
|
||||
workspace.getConfiguration('editor.experimental').get('preferTreeSitter.ini')
|
||||
];
|
||||
await workspace.getConfiguration('editor.experimental').update('preferTreeSitter.typescript', true, ConfigurationTarget.Global);
|
||||
await workspace.getConfiguration('editor.experimental').update('preferTreeSitter.ini', true, ConfigurationTarget.Global);
|
||||
});
|
||||
suiteTeardown(async function () {
|
||||
await workspace.getConfiguration('editor').update('experimental.preferTreeSitter', originalSettingValue, ConfigurationTarget.Global);
|
||||
await workspace.getConfiguration('editor.experimental').update('preferTreeSitter.typescript', originalSettingValues[0], ConfigurationTarget.Global);
|
||||
await workspace.getConfiguration('editor.experimental').update('preferTreeSitter.ini', originalSettingValues[1], ConfigurationTarget.Global);
|
||||
});
|
||||
|
||||
for (const fixture of fs.readdirSync(fixturesPath)) {
|
||||
|
||||
Reference in New Issue
Block a user