Serhioromano / vscode-st

Extension for VS Code to support Structured Text language.

Home Page:https://marketplace.visualstudio.com/items?itemName=Serhioromano.vscode-st#overview

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for lowercase keywords

AndersHogqvist opened this issue · comments

Even though we are supposed to use capital letters in keywords such as IF, ELSIF etc we have a lot of files where these are written in lower case (if, elseif...). However the syntax highlighting only check for these words in capital letters.

Welcome!

Thank you for finding time to write an issue and make this extension better. I`ll appreciate if you find some time to rate this extension here.

I`ll get back to your ASAP.

The only thing that needs to be done is to add (?i) at the beginning of all regex patterns in st.tmLanguage.json. Example:
"match": "(?i)\\b(?:END_)?(?:IF|CASE|OF|ELSE|ELSIF|THEN|__TRY|__CATCH|__FINALLY|__ENDTRY)\\b"

Or you can click Shift+Alt+F and this extension will capitalize all needed keywords. This way is much better because although ST is not case sensitive, it would be nicer to have those keywords capitalized for code convention.

Or you can click Shift+Alt+F and this extension will capitalize all needed keywords. This way is much better because although ST is not case sensitive, it would be nicer to have those keywords capitalized for code convention.

Oh, didn't know about that. Thanks!