FalsePattern / ZigBrains

The zig language plugin for intellij
https://falsepattern.com/zigbrains
Other
122 stars 9 forks source link

Zmpl integration #45

Open bobf opened 6 months ago

bobf commented 6 months ago

Hi, at the request of this reddit comment I am checking to see how feasible it would be to add Zmpl (templating language for Jetzig) to ZigBrains.

I have a feeling ZLS integration would be needed first so please feel free to close this issue if that's the only required step.

Thanks in advance !

FalsePattern commented 6 months ago

For the time being, you can import the vscode zmpl syntax highlighting into intellij pretty easily, you just need to:

  1. make sure you have the TextMate Bundles plugin enabled in intellij
  2. download the https://github.com/z1fire/zmpl-syntax-highlighting-vscode repo, and extract it into a directory
  3. go to Editor -> TextMate Bundles, click on the plus symbol, and select the directory that contains the zmpl syntax highlighting's package.json file
  4. once you click OK, zmpl should appear in the TextMate Bundles list, and you should have basic syntax highlighting in zmpl files

I won't be able to add any of the deeply integrated features (go to definition, etc.) without native ZLS support unfortunately, so anything i implemented in ZigBrains would be almost functionally equivalent to doing it with TextMate bundles.

Keep this issue open for now and bump it when the ZLS team starts working on adding zmpl support.

I'm also open to pull requests if someone else is willing to work on it, as I don't really do web development, so I don't have a lot of motivation to spend a lot of time integrating and debugging this.

bobf commented 6 months ago

@FalsePattern Thanks a lot for the quick and informative response - I'll pick up with the ZLS author, it's been on my TODO list for a while. Enjoy the rest of your weekend !