this post was submitted on 15 Nov 2023
1 points (100.0% liked)

Emacs

313 readers
3 users here now

A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!

Get Emacs

Rules

  1. Posts should be emacs related
  2. Be kind please
  3. Yes, we already know: Google results for "emacs" and "vi" link to each other. We good.

Emacs Resources

Emacs Tutorials

Useful Emacs configuration files and distributions

Quick pain-saver tip

founded 1 year ago
MODERATORS
 

Hello, emacs fellas.
I'm trying to set up emacs for webdev and I cannot get good completions for html and css. I have installed lsp-mode and html-ls along with css-ls, but completions are still rather poor compared to VSCode.

Is there a way to get better autocomplete?

top 5 comments
sorted by: hot top controversial new old
[–] Ybenel@alien.top 1 points 1 year ago (1 children)

if you have configured lsp for js html and css it should handle running 3 language servers simultaneously for auto completion. like if you open an html file that includes css and J's it would run js and css LS

[–] Freemason_1@alien.top 1 points 1 year ago

I did that, but `html-ls` is simply inferior to vscode's completion

[–] tungd@alien.top 1 points 1 year ago

I mean, once you have Copilot installed you wouldn’t need auto-complete anyway. It’s that good. I only have LSP for live error checking and navigation (xref) now.

[–] ChristopherGray168@alien.top 1 points 1 year ago (1 children)

What are you missing? VSCode may include Emmet by default, for example, but in Emacs you would have to install and configure either a minor mode or a language server.

But I'm not using any language servers for webdev. I found the built-in completion-at-point perfectly adequate in CSS-mode. For HTML, I use nxml-mode with html5-schema-0.1. Just typing

[–] Freemason_1@alien.top 1 points 1 year ago

I discovered that yes, VSCode has Emmet by default, lsp-mode in emacs has support for emmet-ls but it does not seem to work that much at all.