Is there any way to support templates through the completion item provider api. The idea is that when the user selects the item instead of just text to insert is a template.
That is exactly what LiveTemplateCompletionContributor does. You don't need a plugin to get that functionality (File->Settings->Live Templates or, on a Mac, IntelliJ Haxe->Preferences->Live Templates), but if you want to add a set of new default templates for your language, you have an example there.
Yes sure, what I want is to create a LookupElement that allows me to set a template as insert text so that when it is selected it will insert that template and move the caret through the template elements. Similar to when the user selects a template, but instead of being contributed from the live template api is being contributed through the completion provide api.
Sorry, I don't understand you, please provide more details, maybe an example.
That is exactly what LiveTemplateCompletionContributor does. You don't need a plugin to get that functionality (File->Settings->Live Templates or, on a Mac, IntelliJ Haxe->Preferences->Live Templates), but if you want to add a set of new default templates for your language, you have an example there.
Yes sure, what I want is to create a LookupElement that allows me to set a template as insert text so that when it is selected it will insert that template and move the caret through the template elements. Similar to when the user selects a template, but instead of being contributed from the live template api is being contributed through the completion provide api.
LiveTemplateLookupElementImpl might be what you need.
Thanks for the answer