Aliases inside ~H and *.heex files are not working
Closed this issue · 5 comments
I see that snippets.json
have the scope phoenix-heex
. But there is no suggestion for the aliases related to HEEx templates. I have to copy the snippets config into my local snippets config phoenix-heex.json
.
How to reproduce the bug:
- Open a *.heex file or write inside ~H
- Type
<.link
- Snippet for
Phoenix.Component.link/1
is missing in the suggestions
Here is the list of the snippets with the issue:
- "Phoenix: Phoenix.Component.link/1"
- "Phoenix: Phoenix.Component.dynamic_tag/1"
- "Phoenix: Phoenix.Component.intersperse/1"
- "Phoenix: Phoenix.Component.form/1"
- "Phoenix: Phoenix.Component.live_title/1"
- "LiveView: Phoenix.LiveComponent call"
- "Phoenix: Phoenix.Component.inputs_for/1"
- "Phoenix: Phoenix.Component.live_img_preview/1"
- "Phoenix: Phoenix.Component.live_file_input/1"
- "LiveView: Render slot"
Thank you for your recent activity with PRs and reporting of issues @aifrak . I greatly appreciate your contributions. :)
Funny enough I've been using my snippets with NeoVim instead of VSCode.
I'm not able to reproduce in ~H
sigils, but I can in .heex
files in NeoVim. In all honesty I rarely use .heex
templates, but this is no excuse, mainly context for why I've missed the bug. I'll dive into VSCode as well to see if I have the same issues, I'm betting that it will repro given how thorough you've been so far.
I've been on a break from work for a bit so I haven't been using my snippets as much recently. I'll be ramping back up here in the next week or so, so hopefully I can get this sorted out in the meantime.
Please feel free to log more issues or submit more prs. Your feedback is valuable <3
@aifrak you might need to add the following to your settings.json for heex files
"files.associations": {
"*.heex": "phoenix-heex"
}
See https://pragmaticstudio.com/tutorials/formatting-heex-templates-in-vscode for a full set of recommended configurations.
@blakedietz I have already followed the tips from the link your provided but without success.
Thanks for the heads up. So with #8 merged does this issue go away now?
Yes, the issue is fixed. Thank you!