emacs-lsp / lsp-mode

Emacs client/library for the Language Server Protocol
https://emacs-lsp.github.io/lsp-mode
GNU General Public License v3.0
4.72k stars 861 forks source link

lsp-completion: support completion-lazy-hilit and quicker company-match #4394

Closed kiennq closed 3 months ago

kiennq commented 3 months ago

Currently lsp-mode doesn't highlight the candidates in the way corfu supports. This PR adds:

sebastiencs commented 3 months ago

Finally, in the work-around for https://github.com/emacs-lsp/lsp-mode/issues/4192, we can just use line-beginning-position as a guard for cached start point. That would be better than having a take whole long substring and then dissect it for the first line.

That seems good

support for completion-lazy-hilit

Cool, I didn't know that completion-lazy-hilit

kiennq commented 3 months ago

@yyoncho Do you think you can merge this change?

jcs090218 commented 3 months ago

I've tried this patch, but the completion is no longer working. 🤔

kiennq commented 3 months ago

I've tried this patch, but the completion is no longer working. 🤔

The completion via company-mode?

jcs090218 commented 3 months ago

The completion via company-mode?

Yes.

kiennq commented 3 months ago

I've tried with emacs -Q and it seems still working fine. The company configuration looks like this

(setenv "LSP_USE_PLISTS" "1")
(setq company-idle-delay 0.05
      company-minimum-prefix-length 2
      company-selection-wrap-around t
      company-require-match 'company-explicit-action-p
      company-backends `(company-capf))
jcs090218 commented 3 months ago

I've tried with emacs -Q and it seems still working fine. The company configuration looks like this

Hmm... It's working this time. I'm not sure why it didn't work the first time I tested it. Sorry for the noise.