Include comments when dispatching listener events #2054
Labels
addons
Tasks related to Ruby LSP addons
enhancement
New feature or request
pinned
This issue or pull request is pinned and won't be marked as stale
There are scenarios where addons might need to have access to comments that are close to nodes they are interested in.
For example, for RBS inline annotations, an addon could provide completion, go to definition, hover and semantic highlighting. But currently, the listeners cannot receive any comments content, because the comments are separate from the AST in Prism's parse result.
I believe the easiest way to provide this functionality to listeners might be to create a custom dispatcher that stores the comment information and passes that along to listeners in a way that allows them to easily access it.
Scenario: imagine proper highlighting and the ability to navigate through constants in these inline RBS annotations.
The text was updated successfully, but these errors were encountered: