Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export function install() {
decreaseIndentPattern: /^((?!.*?\/\*).*\*\/)?\s*[\}\]].*$/,
increaseIndentPattern: /^((?!\/\/).)*(\{[^}"'`]*|\([^)"'`]*|\[[^\]"'`]*)$/,
};
delete langConfig.autoClosingPairs;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be unfortunate if we have to lose this functionality in regular vscode as well.

According to copilot, this snippet should let us determine what kind of vscode we are running in. Maybe we can use this to conditionally delete the autoClosingPairs.

import * as vscode from 'vscode';

if (vscode.env.appName === 'Visual Studio Code') {
  console.log('Extension is running in Visual Studio Code');
} else if (vscode.env.appName === 'Visual Studio Code - Insiders') {
  console.log('Extension is running in Visual Studio Code Insiders');
} else {
  console.log('Extension is running in an unknown application');
}

Though at some point, this needs to be reimplemented using the new API.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh...I missed the fact that we're still getting the auto-close behaviour. Since this file is only used for the onEnterRules.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah the functionality still works, (at least it does when I test it), because autoClosingPairs is still in the json file.

Maybe we're skirting the rules by keeping autoClosingPairs in the json file, since it means we're using a proposed API feature but in a way where they don't catch it and stop us. Or maybe the json file API is genuinely a different API and that one isn't changing, so it's all fine. That would make sense since it would mean that this proposed API change is bringing the two APIs closer together in terms of features. I haven't interacted with this area before and I don't know enough to say either way.


languages.setLanguageConfiguration("ql", langConfig);
languages.setLanguageConfiguration("qll", langConfig);
Expand Down