Ember + WebStorm
I don't use WebStorm, but common feedback I get from people who use WebStorm is that they don't have all the features and niceties that you'd get with neovim or VSCode even.
The main features missing from WebStorm (by default) are:
- Ember Language Server support. This provides a bunch of hints, go-to-definition from templates, and a bunch of nice features.
- Integration with ember-template-lint. This is normally provided by the language server… but without the language server, there are no lint hints.
- Correct template parsing. WebStorm uses
handlebarsparsing, which isn't correct for ember and glimmer projects as the language of templates used is only handlebars-esque and is actually much richer than handlebars while also eliminating many features of handlebars that people don't like (like implicit context scoping). It also seems that components and named blocks are incorrectly identified as custom html tags, giving you a yellow squiggly under them.
hbs template string higlighting
So far, I've been able to solve the
In WebStorm 2021.2.2,
Open the File Menu > Settings
Search for "Injection"
Click on "Language Injections"
Click on "HTML in JS strings"
Click the "Duplicate" button
Double Click on your duplicated "HTML in JS strings"
Change the settings to look like this
HBS in JS strings
- Places Patterns:
End Result gets you
hbstagged template literal highlighting in both tests and non-test code:
Other editor experiences
There are two plugins at the moment for working with Ember in IntelliJ editors:
According to the author, this adds (in addition to the previous plugin):
- Handlebars references for tags/mustache paths and tag attributes
- Handlebars autocompletion for tags and mustache paths
- Handlebars parameter hints for helpers/modifiers and components
- Handlebars renaming for mustache ids and html tags
For all the other problems, I'll be periodically checking in with the folks who work on the Ember plugins for the IntelliJ family of editors, and see if it's feasible to get things moving sooner or later (scale of timeline unknown, obvs).
Note that at the time of writing, I only have these plugins installed