serkonda7 / vscode-vba

VBA language extension to use with VS Code. Also used for syntax highlighting on GitHub.
https://marketplace.visualstudio.com/items?itemName=serkonda7.vscode-vba
Mozilla Public License 2.0
36 stars 12 forks source link

Excel / VBA type library exports #69

Open sancarn opened 1 year ago

sancarn commented 1 year ago

I've built an exporter for VBA type information.

As a result you can find all types in VBE7.dll and Excel which are both common exports for VBA usage.

It would be great if VSCode vba could use this as an upstream resource. I.E. Currently only CoClass Collection, as well as base types Integer, Long etc. are highlighted. Theoretically ErrObject should also be highlighted. Similarly with Global,Constants,Strings, ... and other Modules.

It may be worth while to have a config for including syntax highlighting of type libraries, having VBE7 by default but optionally using Excel, Access, Word, ... by user preference? These should be generatable I believe. Something like:

new Regex((await (await fetch(url)).json()).filter(e=>["Module","CoClass","Class"].indexOf(e.type)>0 && e.name.charAt(0)!="_").join("|"), "i")
serkonda7 commented 1 year ago

Nice suggestion. It would definitely be beneficial!

A possible implementation might use semantic highlighting.