-
Notifications
You must be signed in to change notification settings - Fork 5
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
Groups with similar starting regex doesn't group correctly #38
Comments
Hi @Nxt3, thanks for the feedback! Apparently, Speaking of your suggestion, it's hard to decide which group a statement should go when matched by multiple ones. So first one winning seems a simple and reasonable solution. However, I'm happy to hear your opinions. |
The issue with
I'd need to combine several patterns for the first group. I would expect the sorting to happen like:
Ideally it would be great to implement grouping based on the location of the import, similar to how vsc-organize-imports does it: https://github.com/alfnielsen/vsc-base/tree/master/vsc-organize-imports#group-options so that grouping rules aren't handled via pattern matching. |
Let me understand it.
If yes, maybe you can use this: |
Technically not just anything with |
Yes. So the question boils down to what your grouping criteria are? |
I linked above but maybe options for grouping based on locality? Essentially:
https://github.com/alfnielsen/vsc-base/tree/master/vsc-organize-imports#group-options |
I checked the code and now understand the notions of I agree it's a nice feature to distinguish local and external modules. But given that it needs to probe every import path and consider |
Need this too. Match order and sort order should be separated. Current logic:with rule:
Separate logic:with rule:
There should be a default order value, maybe |
1 similar comment
Need this too. Match order and sort order should be separated. Current logic:with rule:
Separate logic:with rule:
There should be a default order value, maybe |
If you have custom group rules and both rules have the same start, it will default to the first group in the rules.
Expected behavior
A clear and concise description of what you expected to happen.
Actual behavior
Given:
will group to:
but I would expect:
OS (please complete the following information):
VS Code (please complete the following information):
VS Code settings:
The text was updated successfully, but these errors were encountered: