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: Tassilo Horn
Subject: Re: Too long completion delay time in LISP interaction mode.
Date: Thu, 21 Oct 2021 10:50:53 +0200
User-agent: mu4e 1.7.3; emacs 29.0.50

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 via email to

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