]> git.eshelyaron.com Git - emacs.git/commit
Eglot: try even harder to avoid other completion styles (bug#68699)
authorJoão Távora <joaotavora@gmail.com>
Thu, 25 Jan 2024 01:37:57 +0000 (01:37 +0000)
committerEshel Yaron <me@eshelyaron.com>
Thu, 25 Jan 2024 18:04:41 +0000 (19:04 +0100)
commitab204066733c173b0e609eb4480a48007607bf33
tree405d30b15aa62889cadb4935e365d8dd7c557105
parentd25950f71fcfa290343b4cc48f860a8ff865c88e
Eglot: try even harder to avoid other completion styles (bug#68699)

Any completion style except for eglot--dumb-flex spells trouble for
Eglot, for the well known reason that LSP is geared towards completion
tooltips and none of Emacs' partial-completion shenanigans.

This commit puts a "try-completion" function that doesn't return nil
in the eglot--dumb-flex completion style so that other styles aren't
tried (partial-completion, in particular, errors out).

The function often doesn't do anything very useful, but at least it
doesn't stop the more usual *Completions* buffer from appearing.

* lisp/progmodes/eglot.el (eglot--dumb-tryc): New helper.
(completion-styles-alist): Add it to the dumb-flex style.

(cherry picked from commit 65ea742ed5ec505837706d64690e3cc2073825c7)
lisp/progmodes/eglot.el