Serpen / VBS-VSCode

VSCode VBScript language extension
https://marketplace.visualstudio.com/items?itemName=Serpen.vbsvscode
MIT License
24 stars 11 forks source link

.wsf Files Not Supported #50

Open franklesniak opened 3 years ago

franklesniak commented 3 years ago

Describe the bug It would be awesome if this extension supported .wsf files - specifically .wsf files with embedded and linked VBScript.

Code N/A

To Reproduce Open a .wsf file -> observe lack of syntax highlighting in VSCode

Expected behavior VSCode operates similarly to the way it does with .vbs files

Screenshots Omitted

Desktop (please complete the following information):

Serpen commented 3 years ago

To implement vbs as an embedded language the following guide provides samples: https://code.visualstudio.com/api/language-extensions/embedded-languages. To cite that guide

Generally, language features that work across language region boundaries are harder to implement.

and I couldn't agree more. It would require to set a wsf file as xml and hook/hack into the xml language server. I have no time to spend so much effort in such a complex task. To be consistent, same thing must be done with html. If someone can, feel free to do a pull request.

Some syntax highlighting and autocompletion will even work if you set the language to vbs and the Run command will work also. But I would expect some strange side effects.

If you really need it, you maybe could create a simple include function (first and unchecked google result https://blog.ctglobalservices.com/scripting-development/jgs/include-other-files-in-vbscript/) for a skeleton wsf file and outsource your code in a normal vbs file.