VSCode + ElixirLS: no intellisense in Phoenix eex / heex

Latest VSCode + ElixirLS in Linux.

I am not getting intellisense in Phoenix 1.6.2 heex templates (no assigns, functions defined in views, helpers (link, Routes etc.)). Emmet is working.

Has anyone this working in VSCode? How about in another IDE with elixir-lsp?

I tried this, but it didn’t help:

1 Like

there exists also a phoenix plugin, which handles the new heex format

1 Like

I should have mentioned that I have also this plugin installed. Sorry. Thank you for trying to help, though.

I didn’t have syntax highlighting and I found that the .heex extension wasn’t associated with “Html (Embedded Elixir)” despite ElixirLS lists support for such files in its capabilities.

I corrected the configuration by clicking on the file-type at the bottom right of the editor, then clicked “Configure File Association for ‘.heex’…” and selected Html (Embedded Elixir). See screenshot and note it’s been taken after the correction, I had Plain Text as file type before.

I get the syntax highlighting and some auto-completion now but my auto-completion is not perfect. For example, it doesn’t complete the get_flash function which is one I found in an autogenerated Phoenix template so I’m assuming it exists but it’s not being found. Thanks in advance to anyone confirming if get_flash should get auto-completed in this or other IDEs.
However I get hints at least for Kernel functions.

I’m not sure if it can be any better: this is my first Phoenix application and I’m guessing the dynamic nature of this code may make some auto-completion impossible/very-hard.