unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Tassilo Horn <tsdh@gnu.org>
To: Hongyi Zhao <hongyi.zhao@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Too long completion delay time in LISP interaction mode.
Date: Thu, 21 Oct 2021 10:50:53 +0200	[thread overview]
Message-ID: <871r4epxmg.fsf@gnu.org> (raw)
In-Reply-To: <CAGP6PO+=eeR_ioa68PtOZ8U8RoVPbgz88aJLdiaOz6fTVXPaUQ@mail.gmail.com>

Hongyi Zhao <hongyi.zhao@gmail.com> writes:

>> assuming that lsp-mode defines its own completion category which I don't know
>> (since I use eglot for my LSP interaction).
>
> They are defined as follows:
>
> https://github.com/emacs-lsp/lsp-mode/blob/1ece3b81ad10d1b10a2c73c6617b4426e673cbc7/lsp-completion.el#L745
>
> (make-local-variable 'completion-category-defaults)
> (setf (alist-get 'lsp-capf completion-category-defaults) '((styles .
> (lsp-passthrough))))

That might suggest that lsp-mode wants its own `lsp-passthrough' style
and nothing else, not sure.

> So, I adjusted to the following configuration based on orderless package:
>
> (use-package orderless
>   :config
>   ;; https://github.com/oantolin/orderless#ivy
>   (setq ivy-re-builders-alist '((t . orderless-ivy-re-builder))
>     completion-styles '(partial-completion substring flex orderless)
>     completion-category-overrides
>     '((project-file
>        (styles partial-completion substring initials))
>       (file
>        (styles partial-completion substring initials))
>       (eglot
>        (styles partial-completion substring))
>       (lsp
>        (styles partial-completion substring))

The definition you've cited says `lsp-capf', not just `lsp'.

Bye,
Tassilo



  reply	other threads:[~2021-10-21  8:50 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-20  3:11 Too long completion delay time in LISP interaction mode Hongyi Zhao
2021-10-20  4:11 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-20  4:27   ` Hongyi Zhao
2021-10-20  5:01 ` Tassilo Horn
2021-10-20  5:29   ` Hongyi Zhao
2021-10-20  5:49     ` Tassilo Horn
2021-10-20  6:11       ` Hongyi Zhao
2021-10-20  6:19         ` Tassilo Horn
2021-10-20  6:42           ` Hongyi Zhao
2021-10-20  7:20             ` Tassilo Horn
2021-10-20  7:35               ` Hongyi Zhao
2021-10-21  5:32               ` Hongyi Zhao
2021-10-21  5:45                 ` Tassilo Horn
2021-10-21  6:14                   ` Hongyi Zhao
2021-10-21  8:50                     ` Tassilo Horn [this message]
2021-10-21 10:38                       ` Hongyi Zhao
2021-10-20  7:24             ` Hongyi Zhao
2021-10-20  7:37               ` Tassilo Horn
2021-10-20  9:17                 ` Hongyi Zhao
2021-10-20  6:24         ` Hongyi Zhao
2021-10-20  5:58     ` Hongyi Zhao
2021-10-20 15:30       ` [External] : " Drew Adams

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=871r4epxmg.fsf@gnu.org \
    --to=tsdh@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    --cc=hongyi.zhao@gmail.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).