Closed crbelaus closed 5 months ago
Just want to add that, if I call any function above the first error it disappears and shows in the new function call instead. For example:
In case anyone has the same problem. This has been discussed on #495 where it is explained that the autoformatting is causing this problem.
When you save the file it triggers a project recompilation. Then, the autoformat triggers a file recompilation which doesn't have enough information to figure out what functions have been imported in the HEEx template, causing the problems described above.
The immediate remedy to avoid this problems is to disable autoformat in your code editor.
Fixed by #662
I am noticing a weird behaviour on Heex files. When I open any file and save I get a error on the first function call saying:
I can consistently replicate this behaviour on a brand new Phoenix project. I ran the following command to create the project:
Then, navigated to the project root, ran
mix do deps.get, compile
and confirmed that it compiles cleanly.When I open
lib/example_web/controllers/page_html/home.html.heex
in my editor (VSCode) and just save it I get the error mentioned above. It is interesting that the LSP works fine regardless including formatter, autocompletion and whatnot.Not sure if this is a problem in Lexical or in the VSCode extension, so feel free to move the issue where it is more appropriate.