help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Too long completion delay time in LISP interaction mode.


From: Hongyi Zhao
Subject: Re: Too long completion delay time in LISP interaction mode.
Date: Thu, 21 Oct 2021 18:38:25 +0800

On Thu, Oct 21, 2021 at 4:53 PM Tassilo Horn <tsdh@gnu.org> wrote:
>
> 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'.

Thank you for pointing this out.

HZ



reply via email to

[Prev in Thread] Current Thread [Next in Thread]