Closed brettfo closed 1 year ago
If it helps with debugging, I'm a MSFT employee on the .NET Interactive team (github.com/dotnet/interactive) and I'm free to do a screen share. My internal alias is brettfo
.
"wordPattern": "abc"
That looks like an invalid data. The spec'd type for wordPattern
is RegExp
, not string. See https://insiders.vscode.dev/github/microsoft/vscode/blob/d06d615e33c04a956bf6b7da38908b783197b63e/src/vscode-dts/vscode.d.ts#L5748
closing this as question/invalid
Is there a constructor or factory method to deserialize a language configuration? Ultimately I'm reading language-configuration.json
files from disk any dyanmically applying them with setLanguageConfiguration
. Looking through this repo, there appear to be different ways to specify the word pattern:
pattern
sub-propertywordPattern
directly as a stringMoreover, the documentation states that a string can be directly used, but presumably this is going through an internal parse function?
Yes, the language configuration files aren't being read via the API but directly in the renderer. There is no automatic deserialise
Does this issue occur when all extensions are disabled?: Yes
Steps to Reproduce:
vscode.languages.setLanguageConfiguration(...)
where the language configuration object contains just thewordPattern
property.E.g., the language configuration object could look like this:
Result:
An exception is thrown with the text "$.exec is not a function" and the language configuration is not applied.
N.b., when this bug was initially encountered, the only language configurations that resulted in this error contained a literal
$
character (e.g.,"wordPattern": "\\$"
), but when digging deeper, I found that this scenario also broken. It's likely the same underlying issue.