Comments (13)
Sure guys, I can take a look on it 👍
It looks like the elixir-ls module does not usemix format
as in this discussion elixir-lsp/vscode-elixir-ls#224
A fresh issue has been created here elixir-lsp/elixir-ls#660
from heex_formatter.
You need to run mix compile
also before running mix format
.
<%= live_patch to: @return_to,
class: "absolute top-6 right-6 text-gray-400 flex space-x-1 items-center",
aria_label: "close modal",
id: "close-modal-button" do %>
<span class="text-sm">(esc)</span>
<.remix_icon icon="close-line" class="text-2xl" />
<% end %>
the above piece of code is giving the error. The error message is expected attribute name
from heex_formatter.
Hi @krushi123 👋🏻
Yes. You need to run mix compile
after adding it as a dependency. Also, this project is not yet able to process eex
clauses. We are on it right now 🙌🏻
from heex_formatter.
@krushi123 Eex tags are supposed to be formatted now. There are still some cases to be covered but feel free to give it a try and report any other issue you have 🙌🏻
from heex_formatter.
Thanks @feliperenan and @paulo-silva for all the effort. It is working well for the eex tags.
One case that I have observed is - if there is a html attribute with no value, the formatter is failing. For example autofocus
attribute is not a key-value pair. That scenario is breaking the formatter.
from heex_formatter.
@cvkmohan thanks for reporting this. Feel free to open issues for such cases so we will fix them as we go.
It is supposed to work on save as it does for mix format
. I'm not VScode user myself, so I can't provide much help here. Maybe @paulo-silva has some idea? 🙌🏻
from heex_formatter.
Sure guys, I can take a look on it 👍
from heex_formatter.
@cvkmohan BTW, this commit 098f3a8 fixes the issue with attributes without values.
from heex_formatter.
I confirm that it is working. I will continue using it, and open issues if I find any. Thanks for the prompt responses.
from heex_formatter.
It was there but we removed by accident I guess. Let's add it back.
from heex_formatter.
A small addon question. If I am using vscode as the editor and elixirLS extension - formatOnSave is working for a regular elixir code. It is not working the same for heex formatting. How to enable that?
from heex_formatter.
yeah, I was about to link it here 😅, thanks @cvkmohan for all your help opening issues so far, so probably soon we will be able to auto-format in vscode 😄
from heex_formatter.
Hi @krushi123 👋🏻
Yes. You need to run
mix compile
after adding it as a dependency. Also, this project is not yet able to processeex
clauses. We are on it right now 🙌🏻
Great job! this formatter is really great! 🚀
Have been trying to solve Skipping formatter plugin HeexFormatter because module cannot be found
error, and mix compile
fixed the issue. Perhaps this step could be added to README.md
?
from heex_formatter.
Related Issues (20)
- HTML comments produce unexpected nesting HOT 3
- Sponsorship of project HOT 1
- Formatter removes EEx comment tags HOT 7
- Syntax error for <div> HOT 2
- Single-line `~H` receives an unwanted newline HOT 4
- ArgumentError while formatting Unicode text HOT 2
- Unable to run mix deps.get HOT 1
- Stripping parentheses from anonymous function HOT 4
- Extra line breaks on <button> with no text content HOT 1
- Lining up of closing brackets in self-closing/void element HOT 5
- case's `end` block terminator shifts when last clause is empty
- mix formats removes intentional single blanks HOT 2
- additional new lines above and below HTML comment tags every time formatter is run HOT 2
- Whitespace lost when removing newlines HOT 1
- Failing to format consecutive embedded Elixir tags in a style tag HOT 1
- Formatting remove spaces between `Text <tag>` to `Text<tag>` HOT 4
- Formatter adds space around nested dynamic content, breaking :empty css pseudoclass HOT 2
- Space was add to content in script tag HOT 1
- Negative indentation error after assigning a var inside an HTML tag HOT 2
- Elixir code inside elixir expression tag with do block is not formatted HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from heex_formatter.