zed icon indicating copy to clipboard operation
zed copied to clipboard

file_types setting not honored for eex files

Open jerodsanto opened this issue 1 year ago • 4 comments

Check for existing issues

  • [X] Completed

Describe the bug / provide steps to reproduce it

I'm trying to associate all .eex files with Elixir's HEEX type. I added this to my settings.json:

"file_types": {
    "HEEX": [
      "eex"
    ]
  }

After re-launching the editor and opening a file called podcast.xml.eex, its language is still set to Unknown. I've also tried a few variations to see if something else would match, including: ".eex" and "xml.eex". No dice.

Environment

Zed: v0.128.3 (Zed) OS: macOS 14.4.1 Memory: 64 GiB Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

No response

jerodsanto avatar Apr 02 '24 14:04 jerodsanto

I can't seem to be able to reproduce the described behaviour on Zed Stable (v0.128.3) 🤔

https://github.com/zed-industries/zed/assets/16290753/318ca78a-55d0-4e04-87f4-1a116737d7f2

Moshyfawn avatar Apr 02 '24 16:04 Moshyfawn

Super weird. I'm on same version as you and I can follow your exact same steps and I get the opposite result.

(Happy to post a video if you have to see it to believe it.)

Could there be some kind of cache or latent thing getting in my way?

jerodsanto avatar Apr 02 '24 16:04 jerodsanto

I run into the same issue with Kotlin files. Trying to associate .kts (e.g. build.gradle.kts) files with Kotlin does not work.

"file_types": {
    "Kotlin": ["kts"]
 }

edgarkanyes avatar Apr 04 '24 04:04 edgarkanyes

I am attempting to add HEEx template highlighting to .neex templates (from LiveView Native)

"file_types": {
   "HEEX": ["neex"]
}

no highlighting

But I also don't have highlighting for any heex templates either. I followed the install instructions for Elixir was there a missing step for syntax highlighting?

On another note, I'd recommend renaming the key from HEEX to HEEx as that is the proper casing of the format: Screenshot 2024-05-08 at 5 11 00 PM

bcardarella avatar May 08 '24 21:05 bcardarella

Yo! The 0.148.0 release added this nice feature:

Added a popup that is displayed when the settings are invalid.

Which revealed that my settings file was, indeed, invalid. This is why the file_types setting was not being honored (along with all my other settings, lol). Fixed a typo and now it's working as advertised.

Closing this, thanks!

jerodsanto avatar Aug 15 '24 14:08 jerodsanto