all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: JD Smith <jdtsmith@gmail.com>
To: "João Távora" <joaotavora@gmail.com>
Cc: Spencer Baugh <sbaugh@janestreet.com>,
	sbaugh@catern.com, emacs-devel <emacs-devel@gnu.org>,
	monnier@iro.umontreal.ca
Subject: Re: Eglot cannot work with default completion-in-region?
Date: Mon, 29 Jan 2024 17:51:12 -0500	[thread overview]
Message-ID: <C5306439-DD37-45BF-87E6-C602B96DD3F1@gmail.com> (raw)
In-Reply-To: <874jevzsqa.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1538 bytes --]

> That's because it's a fundamentally different problem.

I agree with this.  Fancy completion styles work by sending all possible completions, and the completion-at-point systems suggests you do absolutely no filtering based on what the user has typed, leaving the style functions to do that.  This only works when all that data is in memory or close at hand.  A completion style simply has no relevance to the LSP server; it only knows what's in the buffer at point when completion was requested. 

> On Jan 29, 2024, at 5:21 PM, João Távora <joaotavora@gmail.com> wrote:
> 
> It may look like there is, but it's an illusion.
> Some people are using "orderless" with LSP (via Eglot or others), but
> they're guaranteed to be missing completions here and there except in
> perhaps in the most trivial cases.

Unless such people configure orderless to pass every single LSP completion result from the initial orderless term, then turn on all the bells and whistles for winnowing that set down for subsequent terms, which is how I use orderless with LSP.  Definitely not an illusion, but does require a "context" switch as you go.  This switch is aided by the corfu in-buffer completion system's mnemonic of M-SPACE to insert a space (the default orderless separator) and keep completion active.  Before the space?  LSP rules.  After the space?  Orderless takes over.  

But yes, it's a tricky impedance mismatch to manage (and there are many others in the completion-of-data-which-lives-outside-the-emacs-process space). 

[-- Attachment #2: Type: text/html, Size: 4508 bytes --]

  reply	other threads:[~2024-01-29 22:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-26 20:38 Eglot cannot work with default completion-in-region? Spencer Baugh
2024-01-27 14:45 ` João Távora
2024-01-27 15:37   ` sbaugh
2024-01-28 10:23     ` Daniel Mendler via Emacs development discussions.
2024-01-28 14:09     ` João Távora
2024-01-29 21:14       ` Spencer Baugh
2024-01-29 22:21         ` João Távora
2024-01-29 22:51           ` JD Smith [this message]
2024-01-30  0:32             ` João Távora

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C5306439-DD37-45BF-87E6-C602B96DD3F1@gmail.com \
    --to=jdtsmith@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=joaotavora@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    --cc=sbaugh@catern.com \
    --cc=sbaugh@janestreet.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.