How to provide description to enum's items in Live Template?


Hello, this is my first question in intelliJ community!

I am developing a plugin which provides custom Live Template.
Is it possible for each item of a enum variable in Live Template to show a TailText or Quick Definition, like LookupElements of CompletionProvider offers?

If there is any functionality similar to the above picture in Live Template,
please let me know.

I hope the user can check the keyword's description or definition.

Thank you.



Please provide more information. How do you invoke your live templates? Do you want to use it in the commit message window? Is completion invoked for live template placeholders? If yes, did you try adding tail text to lookup items? Regarding quick definition, did you see


Thank you Karol
for letting me know what information was absent before!

1. I am invoking my live template from .xml, refering to

2. Yes, I want to provide my live template to the users of my plugin in the commit message window.

3. The completion in the first picture is just for reference. I want to make the user fill the placeholder with enum variable. And I hope for the user to get the information or hint while hovering or selecting items.

4. I have read the documentation you mentioned. Also I have implemented auto-completion and tailText for LookupElements. But I don't know these features are applicable to the items of “enum” in Live Template.


I want to offer these functionalities.

1. Editing commit message with my Live Template, the user should choose one among pre-defined items.

2. The user can get the information about each of items.

Regarding these two requirements, what approach will be available?



Thank you for clarifications.

It seems like you want to implement something similar to I suggest checking the project implementation. At first sight, you will need to implement a language for your commit format and implement completion and documentation provider for this language's elements.


Oh! I'll refer to the project you mentioned.

This is my last question.

Is there no way to provide any kind of hint or description to an user, while the user is selecting an item from the dropdown which contains multiple items of an enum variable in Live Template?


I missed the “enum” meaning before. I didn't know there is “enum” expression for live template variables.

Completion values for enum() are created by this extension: I don't see any possibility of changing the presentation.

You can write your own macro which will complete enum values with your custom presentation and use it instead of enum() in the template definition.


Please sign in to leave a comment.