API for extensions to know the scope as per grammar of the cursor position #18485
Labels
*duplicate
Issue identified as a duplicate of another issue(s)
feature-request
Request for new features or functionality
It would be helpful for extension authors to know if the cursor is inside a string or a comment or any of the other scopes as defined by the grammar.
When an extension is not using LSP, this can help the extension in being smarter say in case of completion item provider.
Currently to do so, the extension needs to parse the file itself.
But, the scope (as per grammar) is already available to core VS Code.
If that can be exposed, I can fix a bunch of issues in the Go extension :)
The text was updated successfully, but these errors were encountered: