nvim-lua / completion-nvim

A async completion framework aims to provide completion to neovim's built in LSP written in Lua
Apache License 2.0
974 stars 78 forks source link

Option to sort certain completion items at the bottom (or at the top) of the list #329

Closed quantum-booty closed 3 years ago

quantum-booty commented 3 years ago

image Pyright language server provides dunder methods of a class, which hides the other more important items like functions and class attributes. Can we add an option to sort items so they are at the bottom? Maybe let us use regex to define things we want at the top or at the bottom.

lithammer commented 3 years ago

GH-234 should solve this. You can apply the diff locally and play around with it. But basically, it should sort completion items in the order that the language server (i.e. Pyright) wants them.

quantum-booty commented 3 years ago

@lithammer Thank you, this works very well :)

haorenW1025 commented 3 years ago

@lithammer Thanks a lot for the fixes. I mainly use your code snippets in the PR so it should be working fine now.