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

Symbols ordering requires improvements #108

Closed
DonJayamanne opened this issue Nov 13, 2017 · 7 comments
Closed

Symbols ordering requires improvements #108

DonJayamanne opened this issue Nov 13, 2017 · 7 comments
Labels
area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. feature-request Request for new features or functionality

Comments

@DonJayamanne
Copy link

From @1st on April 24, 2017 17:31

  • VSCode Version: Code 1.11.2 (6eaebe3b9c70406d67c97779468c324a7a95db0e, 2017-04-13T07:56:42.517Z)
  • OS Version: MacOS 10.12.4 (Darwin x64 16.5.0)
  • Extensions:
Extension Author Version
python donjayamanne 0.6.3

Steps to Reproduce:

I found that in the pretty big project it's hard to "Jump To Symbol" (Cmd+T), because a lot of trash information in the output.

I need to find the model definition by name User. I entered "User" and see AbstractUser, AnonymousUser, etc in the alphabetical ordering. And it's cropped on some line, and I can't find my User, because this line is not visible here. In this case Jump To Symbol is totally unusable in big projects in the current implementation.

What I like to use in the Sublime Text. They have few advantages, that you can implement here to make this plugin incredibly useful in large projects:

  1. When type "User" - show exact matching of the string. In other words - show me User first.

  2. Instead of showing me repeated User, User, User that we defined in many places - show me only one User. When I select this line - show me another dropdown with all exact User definitions and allow me to select the file with this definition. When I press Down arrow to highlight next result - the file opens to preview the content to understand that this is what exactly I need.

  3. When type "User(" - it should understand that I'm looking for the User in the end. In other words - it filters only functions and classes that ends on User.

  4. Case sensitive. If I type User from capital letter - it means that I need to find from the capital letter. If nothing found - the rest of results can be shown.

I see that it's a lot to do. But it can definitely make your work outstanding. Sadly, but I can't switch to VS Code right now only because some functions doesn't work with big projects with thousands of files. Please improve things that I mentioned above, and I will use VS Code with your plugin (I like it a lot).

Thanks.
Anton

Copied from original issue: DonJayamanne/pythonVSCode#911

@DonJayamanne
Copy link
Author

From @1st on May 5, 2017 13:31

I think that you can look inside SublimeText to see how do tgey implemented the ordering of symbols. Tgey even have support of search path by first letters of each word. For example, I can type "MVC" and it will find class with name "ModelViewController"

@DonJayamanne
Copy link
Author

Can't find the code that does this. Would appreciate it if you could point me in the right direction.

@DonJayamanne
Copy link
Author

From @1st on May 14, 2017 14:57

Hello @DonJayamanne. I found the usage in VS Code of what I was mention. Open "Code -> Preferences -> Settings" and try to find something, for example type "editors" in the top search bar. It will find not only exact "editors" option, but also will find this as well "editor.tabSize": 2 because s letter is in the text.

screen shot 2017-05-14 at 4 58 26 pm

It's a screenshot from the Sublime Text that can show how it searches the matched sentences.
prolog-package

I don't know what is the name of the search algorithm, but I see that VS Code also use it by default in the search. Maybe you can call the VS Code internal API to find the list of results based on the original list of strings and the search sentence.

Please keep me updated about your research. I am more that happy to help you in this topic, because I sure that it will improve my productivity as well as all other python developers who use VSCode.

Thanks,
Anton

@DonJayamanne
Copy link
Author

From @1st on June 13, 2017 10:34

Hey. They call it Fuzzy Search.

You can find it helpful:
microsoft/vscode#1964

Code lives here:
https:/Microsoft/vscode/blob/master/src/vs/base/common/scorer.ts

@DonJayamanne
Copy link
Author

From @1st on July 4, 2017 15:40

Hi @DonJayamanne, do you have any idea when can it be implemented?

@DonJayamanne
Copy link
Author

From @1st on July 4, 2017 15:43

BTW, when I need to find a function, but see a list of variables mixed with functions - it's not always easy to find what I want. Can you please find some time and play with SublimeText to see how it works with Jump To Symbol functionality. They implemented it somehow magically, and I used it and liked it a lot. I will be happy to have the same thing here in VS Code.

@brettcannon brettcannon added awaiting 2-PR area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. feature-request Request for new features or functionality labels Nov 14, 2017
@DonJayamanne
Copy link
Author

Closing this issue due to the age (stale) of this issue as well as the fact that we have a new LS that provides all of this functionality.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

2 participants