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

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
kpanic
Hi everyone, I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding. I sta...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
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
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews