Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smarter sort_by_kind: make functions prior after :: #2

Open
zjp-CN opened this issue Apr 3, 2024 · 0 comments
Open

Smarter sort_by_kind: make functions prior after :: #2

zjp-CN opened this issue Apr 3, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@zjp-CN
Copy link
Owner

zjp-CN commented Apr 3, 2024

Currently, sort_by_kind is sorting from a fixed list.

Given the default kind ordering in this plugin, Method is always prior to Function, then it works fine after typing ., but not fine after typing :: which will likely call a function.

The problem can be mitigated by dynamically setting :lua rs.kind.set({"Function", "Method"}), but lacks inherent vs trait sorting on Functions.

Anyway, this is a hole that indicates we need more refined sorting based on trigger text. For this problem, the smarter sorting needs to

  • know trigger text
  • control kind list
  • handle inherent vs trait
@zjp-CN zjp-CN added the enhancement New feature or request label Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant