antlr / antlr4-intellij-adaptor

A library to support the use of ANTLR grammars in jetbrains IDE plugins for building custom languages.
BSD 2-Clause "Simplified" License
212 stars 38 forks source link

Support for Stub elements and indexes? #17

Open Tomasu opened 4 years ago

Tomasu commented 4 years ago

Hi,

I think it'd be useful if this library supported intellij's Stub feature. I'd like to be able to add some StubIndex's to my language plugin.

bjansen commented 4 years ago

It seems to me that stub indexes are very specific to the language you are building:

The stub tree contains only a subset of the nodes. Typically it contains only the nodes that are needed to resolve the declarations contained in this file from external files.

I don't see how a generic library could decide what should be put in the index and what's not needed, but perhaps I'm missing something. Did you have something specific in mid?