SZJX

SZJX

The ElixirLS plugin for VSCode has been pretty good, however it just doesn’t seem to provide much support for .html.eex files. I get no autocompletion or automatic formatting.

The most annoying for me, however, is the inability to quickly comment out lines. For embedded Elixir it’s easier as all you need to do is to type a #. However for lines of actual HTML, manually typing out the commenting syntax gets much more annoying.

Is there anybody who got their VSCode to easily comment .html.eex files? Maybe I just didn’t set something up correctly? I noticed that there’s another plugin vscode-elixir, however since there seem to be functionality overlaps/conflicts, I only installed ElixirLS.

Showing Posts 1 to 6

praveenperera

praveenperera

Have you enabled emmet in eex files?

"emmet.includeLanguages": {"HTML (Eex)": "html"}

dimitarvp

dimitarvp

@praveenperera is correct. In addition, when I press Ctrl-/ (or Cmd-/ on macOS) in my VSCode I get Elixir commenting and not HTML commenting:

<h1>Hello</h1>

becomes

<%# <h1>Hello</h1> %>

Most of the time that works well enough for me. Although if anybody knows how can you trigger HTML comments and not Elixir comments that might be useful in a few cases as well.

SZJX

SZJX OP

Apparently I do have this line in my settings.json and Emmet has always been working, just not the commenting. @dimitarvp did you also install the vscode-elixir plugin or do you only have the ElixirLS plugin.

dimitarvp

dimitarvp

Yes, I have both vscode-elixir and ElixirLS.

OvermindDL1

OvermindDL1

Just as a note, it works in atom, hitting the commenting key will <!-- ... --> html in html area and will prepend # on elixir code in the escaped areas. Atom has the concept of multiple editors types in different sections of a single file though, does vscode not have that concept?

SZJX

SZJX OP

@dimitarvp Installing vscode-elixir indeed enabled the syntax highlighting for .html.eex files. It seems that there are functionality overlaps with both plugins but if things work fine I’ll just go with such a configuration for now.

@OvermindDL1 Yeah I think Emacs and IntelliJ also support both types of commenting. But I currently prefer to use VSCode for my coding in general due to its good support for other languages. I think it’s more of a case of the authors not having time to add such support. I opened issues in the repos but there was no reply.

— All posts loaded —

Where Next? Top

Trending in Questions Top

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
jonnycharles
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
Blokh
Hey guys, I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly Do you guys have any suggestions what is the best prac...
New
roeland
Kia ora, We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
New
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
subsaharancoder
I’ve followed the Phoenix LiveView file upload code here Uploads — Phoenix LiveView v1.0.0-rc.7 and so far everything works just fine wit...
New
Onor.io
I have what I’ve heard referred to as a “lookup table” in my database. This is a way of assigning codes to common values. One common lo...
New

Other Trending Topics Top

garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge &amp; Solve. They are GUI (Emerge) and State management (S...
New
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews