4 comments
Comment actions Permalink

Hi Rahul,

I don't know any list like this. All the languages are provided by plugins, and the list is dynamic depending on what plugins are installed in a given IDE instance.

As a workaround, If you want to check languages, you can set up an IntelliJ Platform Plugin project (https://plugins.jetbrains.com/docs/intellij/creating-plugin-project.html), and add in plugin.xml language extension point, e.g.:

<localInspectionTool language="<caret>" ...

and invoke completion. IDE will show the completion popup with the list of languages available in the configured development IDE instance.

0
Comment actions Permalink

Would the code completion in this case list all the references to `com.intellij.lang.Language` instances available in a given IDE at runtime?

If that is so, from what one can see at https://plugins.jetbrains.com/docs/intellij/language-and-filetype.html#define-a-filetype, for an approximation of the list of supported languages e.g. for community edition, one can grep the codebase from Github with something like 

rg 'class \w+ (extends|:) Language ' .   | grep -vE "/test(Src)?(s)?/"

 

0
Comment actions Permalink

Hi Alexander,

No, it will complete languages that are registered in plugin dependencies. E.g., if you add a dependency on org.intellij.plugins.markdown plugin, it will appear in the completion.

Regarding searching for it in the repository, I don't think it is that easy. There can be intermediate parent classes, etc.

Why would you even need such a list? What is the use case?

1
Comment actions Permalink

it will complete languages that are registered in plugin dependencies

 

Right, thank you Karol for pointing that out!

Then most probably this at runtime would be an improvement over (under-approximation by) the grep above

Language.getRegisteredLanguages()

 

But that would include things like RegExp language (and it's variations for JS/Go/Xsd as well as, say, Cgo in GoLand)

 

Why would you even need such a list?

I suspect there may be many different reasons, for example, in case when a plugin wants to enable/disable its features only for a sub-set of languages supported by the IDE.

0

Please sign in to leave a comment.