thqby / vscode-autohotkey2-lsp

Autohotkey v2 Language Support using vscode-lsp.
https://marketplace.visualstudio.com/items?itemName=thqby.vscode-autohotkey2-lsp
GNU Lesser General Public License v3.0
219 stars 21 forks source link

Anything starting with "default" inside a switch is syntax highlighted as a case #409

Closed GroggyOtter closed 1 year ago

GroggyOtter commented 1 year ago

If any variable that starts with default is used inside a switch, it's highlighted using keyword.control.default.ahk2 instead of variable.other.ahk2.
It doesn't have to be the first word, either. If you assign a value that starts with default, such as default_value, it highlights the default part as keyword.control.default.ahk2 and the rest of the word gets the meta.body.switch.ahk2 style.

Example: All the default words in this picture should be yellow.

Thank you for keeping this addon up-to-date and maintained.

thqby commented 1 year ago

It does not appear that semantic highlighting is enabled.

lstrfwp commented 1 year ago

When semantic highlighting is enabled, only the variable name default itself will be highlighted as keyword.control.default.ahk2. Hovering over = shows the error: Missing operand.

image