Enable completions in Liquid

Hi all,

I’ve had a request to add support for Liquid support to the Nova Tailwind Extension. When registering the CompletionAssistant, I have tried ‘html+liquid’, ‘liquid’ and neither seem to make the completions available. There are no issues with ERB files, which use ‘html+erb’

Does anyone have any suggestions?

Thanks, Jason

Piggy backing here to say I was having this same issue with a Nunjucks snippets extension I’ve idly been working on.

My assumption is that this doesn’t work because Nova doesn’t natively support Liquid or Nunjucks—support is added by other extensions. I managed to resolve this for me by finding the Nunjucks syntax extension and locating the internal name for the syntax (in my case, “nunjucks-html”). Using that with registerCompletionAssistant allowed completions to work.

If there are multiple syntax extensions with different internal names, it seems like you can use registerCompletionAssistant multiple times without complaint.

It’s a little worrisome that there doesn’t seem to be too much consistency with the internal names, as extension makers can seemingly name these whatever they want and change them whenever they want, but that seems to be the stakes until if/whenever Nova supports those syntaxes natively.

1 Like