From my extension, how can I access the abstract syntax tree that VS Code has for the active file? I have been looking through the API docs but haven't been able to find anything. I also came across this SO question but both the question and answer are pretty opaque to me.
Where can I find extension settings?# In general, VS Code extensions store their settings in your user or workspaces settings files and they are available through the Settings editor UI (Preferences: Open Settings (UI)) or via IntelliSense in your settings.json file (Preferences: Open Settings (JSON)).
Extensions are installed in a per user extensions folder. Depending on your platform, the location is in the following folder: Windows %USERPROFILE%\.vscode\extensions. macOS ~/.vscode/extensions.
There's no thing like a common AST for files loaded into an editor. In fact, many file aren't even parsed at all, unless an extension is installed which does that.
The linked answer describes a way to implement language support (via a language server), which is not the same as getting a fictional AST from vscode.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With