Hi guys, sometimes I try something new to compare with already used packages, this weekend I wanted to try Eglot, however, I ran into a number of problems. One of them is autocomplete.

For example, when I write in vue, I want to autocomplete a watch function. This function is available in the following packages

import { watch } from 'vue';
import { watch } from 'fs';
import { watch } from 'fs/promises'
... etc

But when I use autocomplete in eglot I only see the first candidate - importing from the fs package. Is there any possibility or workaround to display all possible candidates?

Example of autocomplete with eglot

https://preview.redd.it/tlgtg5imw43c1.jpg?width=2930&format=pjpg&auto=webp&s=7f0cd2ff1b6733ec26021b77b6e5e392f26921df

Example of autocomplete with lsp-mode

https://preview.redd.it/rcntp2vow43c1.jpg?width=1224&format=pjpg&auto=webp&s=a246d790c47b4d48a3fba5e5f1cb361841eccc02

I also know that lsp-mode in conjunction with corfu has a similar problem, but it is impossible to solve it there as the authors of both packages think that the problem is not on their side 😅 Is the situation with eglot the same?

You are viewing a single thread.
View all comments View context
1 point

Actually, I forgot how this works in most cases X-D.

And it happens through text properties, which backends add to their completion strings. Then the annotation and kind operations look them up.

permalink
report
parent
reply
1 point

Makes sense. I thought in the past the default completion system stripped out text properties? But I dimly recall that situation changed recently (v29?).

permalink
report
parent
reply

Emacs

!emacs@communick.news

Create post

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

Get Emacs

  • Windows
  • Mac OS X
  • GNU/Linux and BSD (Just get it from your distribution’s package manager)

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

Community stats

  • 18

    Monthly active users

  • 562

    Posts

  • 2.4K

    Comments