Serhioromano / vscode-st

Extension for VS Code to support Structured Text language.
https://marketplace.visualstudio.com/items?itemName=Serhioromano.vscode-st#overview
MIT License
143 stars 28 forks source link

Suggestion: auto insert * after typing (* #11

Closed msftrncs closed 5 years ago

msftrncs commented 5 years ago

I don't not know if this is possible in VS Code to fix:

After typing (, the ) is auto inserted past the cursor, so if the next key is * for a multi line comment, a matching * should be auto inserted after the cursor before the ) so the result becomes (*|*) (where the | is the cursor).

Maybe the same thing could be done for /*, but there you would need to do the */ after the * in /* is typed.

Serhioromano commented 5 years ago

the problem here is that VS Code have to insert matching * only inside barces ( ). In case of /* it works because there is no matching for / and when it is /* it inswerts match.

I think it is possible to do, but onl with LSP, which is a plan to be finaly implemented, when ST coding of a real projects in VS code will be somehow possible.