ROCKTAKEY / lsp-latex

Emacs lsp-mode client for LaTeX, on texlab.
GNU General Public License v3.0
69 stars 4 forks source link

Disable lsp-mode's sorting of completion candidates #38

Closed real-or-random closed 1 year ago

real-or-random commented 1 year ago

lsp-mode sorts the results for autocompletion by default, so it ignores the order returned by the server. This is annoying for servers like texlab that are clever and return the results in perfect order already, based on scoring and fuzzy matching.

Sorting can be disabled in lsp-mode by setting lsp-completion-sort-initial-results to nil. Can we setq-local this here? One way to do this is in lsp-register-client with :after-open-fn, see https://github.com/emacs-lsp/lsp-mode/pull/2198/commits/d86883c360dee8f17db39856d4e69a6ee59902f4 for a similar commit.

ROCKTAKEY commented 1 year ago

Thanks, I added lsp-latex-completion-sort-in-emacs variable.

real-or-random commented 1 year ago

Awesome, thanks!