JakeBecker / vscode-elixir-ls

Elixir language support and debugger for VS Code, powered by ElixirLS.
391 stars 42 forks source link

Adds syntax rules for LiveView and Eex sigil heredocs #129

Closed rrichardsonv closed 5 years ago

rrichardsonv commented 5 years ago
hide ![image](https://user-images.githubusercontent.com/22575742/55028383-8b95f600-4fd5-11e9-94e3-b1ac3e0f0c18.png)

Description

Got frustrated after scanning LiveView code without highlighting and started messing around in the config. Been using it for the past couple weeks and figured I'd make a PR like a responsible person.

Notes:

show screenshot ![image](https://user-images.githubusercontent.com/22575742/55028969-fc89dd80-4fd6-11e9-963b-a4b0a1247532.png)
heymackey commented 5 years ago

@rrichardsonv Did adding .leex here work at adding syntax highlighting for .leex files?

rrichardsonv commented 5 years ago

I just added this in my vscode settings , the other way didn't seem to apply it maybe I messed up the identifier 🤷‍♂️.

  "files.associations": {
    "*.leex": "eex",
    "*.html.leex": "HTML (Eex)"
  },
chrismccord commented 5 years ago

Awesome! Note that liveview uses the ~L sigil, while Phoenix.HTML uses the ~E sigil, so it would be great if both were supported for EEx highlighting.

rrichardsonv commented 5 years ago

They are! This targets sigil_{E,e,L,l}/2 when triple quotes are used as the delimiter. Sorry the screenshot isn’t clearer

leandrocp commented 5 years ago

@rrichardsonv Did adding .leex here work at adding syntax highlighting for .leex files?

@heymackey take a look at this PR https://github.com/JakeBecker/vscode-elixir-ls/pull/128

JakeBecker commented 5 years ago

Looks great, sorry for the long wait. Thank you!