question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Slight improvement to `.html.eex` autocompletion

See original GitHub issue

Phew,

"emmet.includeLanguages": {
  "html-eex": "html"
}

was exactly what I needed to get HTML completion working… but I have one more small, niggling problem with it still.

When the language is set to html instead of html-eex, creating a new node in the DOM and hitting return automatically adds a level of indentation, and moves the closing tag behind an extra newline, as well.

But when the language is set to html-eex, this behavior is disabled, so using a completion for e.g. <ul> will add the closing tag, but a return will add a newline and leave the cursor in front of the closing tag on the next line… no extra newline or indentation fanciness.

What would it take to make the behavior match the html autocompletion behavior in this final respect?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
axelsoncommented, Jan 8, 2021

@type1fool hi 👋! Hope you enjoyed the podcast 😃

You can test locally by following the installation instructions: https://github.com/elixir-lsp/vscode-elixir-ls#installation

Those rules would definitely change the indentation support but I think you’d probably want more than just those.

1reaction
type1foolcommented, Jan 1, 2021

Hey gang. I’m here thanks to the Thinking Elixir interview with @axelson. Aloha!

I’ve been annoyed by this issue, too. I started poking around the docs to see if I could help. After a little bit of digging, it seems eex-language-configuration.json might need indentation rules:

...
  "indentationRules": {
    "increaseIndentPattern": "^((?!\\/\\/).)*(\\{[^}\"'`]*|\\([^)\"'`]*|\\[[^\\]\"'`]*)$",
    "decreaseIndentPattern": "^((?!.*?\\/\\*).*\\*/)?\\s*[\\}\\]].*$"
  }
...

I don’t know how to test this locally. Is it possible those additional rules would fix this issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTML autocomplete/snippets stopped working when I ...
HTML autocomplete/snippets stopped working when I changed the file language type to `HTML (EEx)` for a .html.eex file.
Read more >
10 Helpful VS Code Extensions for HTML & CSS - YouTube
Visual Studio Code has quickly become the code editor of choice among many developers. The vast extension library is one of its main...
Read more >
Typeahead with LiveView and Tailwind - Fullstack Phoenix
In this tutorial I want to show how easy it is to do an autocomplete or typeahead without any additional javascript!
Read more >
HTML form autocomplete Attribute - W3Schools
Tip: It is possible to have autocomplete "on" for the form, and "off" for specific input fields, or vice versa. Browser Support. The...
Read more >
Autocomplete Questions & Supplemental Data - Qualtrics
Qtip: If you have a small list of answers and are looking for a simple setup, choose Static List as your Data Source....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found