Change:
Type: <bBug</bPerl has a bunch of punctuation variables including and . You can find documentation on all of these variables in . Bracket pair colorization does not seem to handle these well, resulting in it turning brackets red when there is actually a matching close bracket. To reproduce: on bracket pair colorization new perl file (, for example) the following code: the code in perl - it runs with no syntax errors (though does nothing). reports the parentheses as not matching. Here is another, more complex, example - in this case, VSCode colors all the curly brackets red instead of the parentheses: VS Code version: Code 1.73.1 (, 2022-11-09T04:27:29.066Z) OS version: WindowsNT x64 10.0. Modes: Sandboxed: No Remote OS version: Linux x64 4.18.0-348.12.2.el85.x8664 Connection to 'ssh-remote+vm-mreisner' could not be established <details<summarySystem Info</summary Connection to 'ssh-remote+vm-mreisner' could not be established </details<details<summaryExtensions (36)</summaryExtensionVersion ------ RPMSpec0.1.0 better-cpp-syntax1.16.3 jupyter-keymap1.0.0 remote-containers0.262.3 remote-ssh0.92.0 remote-ssh-edit0.84.0 remote-wsl0.72.0 vscode-remote-extensionpack0.23.0 remote-explorer0.0.2 vim1.24.3 blamer-vs0.5.2 doxdocgen1.4.0 xml2.5.1 pls0.0.16 todo-tree0.0.220 haskell2.2.2 plantuml2.17.4 better-cpp-syntax1.16.3 svn-scm2.15.5 cmake-language-support-vscode0.0.7 language-julia1.38.2 language-haskell3.6.0 vscode-dotnet-runtime1.6.0 isort2022.8.0 python2022.18.2 vscode-pylance2022.11.40 jupyter2022.9. jupyter-keymap1.0.0 jupyter-renderers1.0.12 vscode-jupyter-cell-tags0.1.6 vscode-jupyter-slideshow0.1.5 cmake-tools1.12.27 cpptools1.12.4 cpptools-extension-pack1.3.0 hexeditor1.9.9 cmake0.0.17 (2 theme extensions excluded) </details<details<summaryA/B Experiments</summary</details<!-- generated by issue reporter --
This is due to perl having the variable . Perls grammar should be tweaked so that this token is skipped by bracket pair matching.
This all is due to $ symbol as Currently Vs Code does not recognize it .There is need to do minor changes to resolve this issue.
Hello is it possible to know which part of the codebase to look into fix this? will try to do it then
The grammars are pulled from textmate/perl.tmbundle repository, shouldn't this be handled by them?
Hi, will try to work on it in the coming days. Will update :)
Hi From what I can tell, it looks like this can be solved by using a negative lookbehind (for ) in the regex that looks for brackets. This is handled in , and I managed to fix the behavior using the following code (and also passing to from the static function): However, I'm not comfortable with this solution being hard coded, so maybe a better approach is to add new field to that will handle negative lookbehind. This will cause a bigger change to the codebase, so I prefer to get your opinion first. (Note: I know that the current solution also won't interpret in as a bracket. Once I'll know if I should create a general or specific solution, I will fix it.) Thanks!
This could also potentially be solved with adjusting the textmate grammar, so that gets a special scope that is marked as not containing brackets (which is also what I suggested earlier). I wouldn't allow brackets to have a negative lookbehind, especially if this can be fixed in the grammar.
Hi , thanks for your response. I tried defining a new scope in and use it in the property as seen here , but it didn't work. I don't really understand how to debug this behavior. Sometimes when I launch my debug VSCode no code is colored, sometimes just parts of it are colored (even though no changes to the code has been made between debugs). Can you please guide me on how to proceed? Thanks!
please assign me this issue
I'm willing to work on this
I think this should be on the May milestone?

Discussion:
{ "language": "perl", "scopeName": "source.perl", <del> "path": "./syntaxes/perl.tmLanguage.json" </del> <ins> "path": "./syntaxes/perl.tmLanguage.json", "unbalancedBracketScopes": [ "variable.other.predefined.perl" ] </ins> }, { "language": "perl6",