]> git.eshelyaron.com Git - emacs.git/commit
Eglot: respect completion sort order dictated by the server
authorJoão Távora <joaotavora@gmail.com>
Wed, 18 Oct 2023 10:48:49 +0000 (05:48 -0500)
committerJoão Távora <joaotavora@gmail.com>
Wed, 18 Oct 2023 12:37:57 +0000 (07:37 -0500)
commite93d99a4a0ce578249304dce350465c580a49892
tree044abf4883ddc2fd5301c6d2e954acd667924426
parent06fc5c24170b820939d3d51071b2957354edcb65
Eglot: respect completion sort order dictated by the server

Don't use flex style to do any completion sorting.

Previously, it was thought that the 'flex' completion style was only
kicking in to do (approximate) fontification of the completions
returned by the server, but it was found that it was also doing some
its own sorting in certain situation of non-empty matching patterns.

Replaced it with a new eglot--dumb-flex style which does only
fontification.

Github-reference: https://github.com/joaotavora/eglot/discussions/1306

* lisp/progmodes/eglot.el (eglot-completion-at-point): Rework.
(eglot--dumb-flex, eglot--dumb-allc): New helpers.
(completion-category-defaults): Rework Eglot-specific category.
(completion-styles-alist): Add Eglot-specific style.

* etc/EGLOT-NEWS: Mention change.
etc/EGLOT-NEWS
lisp/progmodes/eglot.el