ncm2 / ncm2-vim-lsp

MIT License
13 stars 2 forks source link

Do not sort completion results #7

Closed clason closed 5 years ago

clason commented 5 years ago

The vim-lsp source defined here uses the default abbrvfuzzy sorter, which interferes with sources that use the preselected functionality. I think it would make sense to set 'sorter':'none' and trust the language server by default -- or am I missing something?

roxma commented 5 years ago

Lsp results has sortText designed for sorting: https://github.com/Microsoft/language-server-protocol/blob/gh-pages/specification.md

We could add a sorter in ncm2 for lsp items, and use it as default sorter for lsp completion results.

(I'm very busy recently, there's no ETA)

clason commented 5 years ago

@roxma That would indeed be the best option (and I understand that it takes time that you don't have, no hurry), but in the meantime I believe disabling sorting (instead of using the default abbrvfuzzy sorting) would be a reasonable fix -- or am I missing something? If not, I can make a (trivial) PR for it.