Closed Rizhiy closed 2 years ago
https://github.com/fannheyward/coc-pyright/pull/695 has improved this, please try v1.1.219.
Hi, yes it is much better now. Although sorting once part of the name is given is still partially broken, e.g.:
Here
_wrapped
should really be first one in the list.
Here
_set_register_base_class
should probably be ahead of dunder methods.
I think the logic should be roughly as follows:
Does JavaScript perhaps have a fuzzy matching package which has required functionality?
I will try make it work over the weekend, if no-one implements it by then.
_wrapped
case is due to #649. _set_register_base_class
is interesting since #695 sorts by the number of leading underscores. For pyright's default ordering just remove below lines. https://github.com/fannheyward/coc-pyright/blob/929c5f69eb234b6037bdcc5d844fd42275ba3ea5/src/index.ts#L131-L133
Try coc-pyright v1.1.220, the Pyright's sorting has improved a lot.
v1.1.220
seems to work as desired, thank you.
What's the output of
:CocCommand pyright.version
[coc.nvim] coc-pyright 1.1.215 with Pyright 1.1.218
What's the output of
:CocCommand workspace.showOutput Pyright
Suggestions produced by coc-pyright seem to be in a strange order, for example:![image](https://user-images.githubusercontent.com/5617397/152663730-6017a3e2-fb23-4473-8120-d2cea54e1d28.png)
As you can see
get_raw
which is a public method is after__init__
and__setitem__
which are dunder methods.I would like to have my attributes to be in the following order:
How can I accomplish this?
Extra info: I tried using AstroVim and I believe it also uses
pyright
on the backend. Suggestions given in its autocompletion are in correct order.