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

Add completion types for completions obtained with matchers #13734

Closed
wants to merge 2 commits into from

Conversation

krassowski
Copy link
Member

@krassowski krassowski commented Aug 22, 2022

Fixes #12820 by adding a property-setting decorator to matcher functions which allows to pass additional metadata about matches returned by the matcher functions. I kept the changes to minimum to maintain full backward-compatibility, and I refrained from refactoring to NamedTuples being wary of potential performance penalty.

Regarding implementation as in this PR

General questions:

  • should the matcher decorators be exposed as public API? The matchers are already exposed publicly via IPCompleter.custom_matchers, so it might be useful to someone, but since custom_matchers is not documented anywhere I don't think this is a must
  • what should the type for dictionary key be named?
  • should there be a separate type for %config and %colors completions, or should both be mapped to param?

For context:

  • jedi types: module, class, instance, function, param, path, keyword, property and statement
  • LSP completion kinds: Text, Method, Function, Constructor, Field, Variable, Class, Interface, Module, Property, Unit, Value, Enum, Keyword, Snippet, Color, File, Reference, Folder, EnumMember, Constant, Struct, Event, Operator, TypeParameter

Notes:

@krassowski
Copy link
Member Author

Superseded by work in #13745.

@krassowski krassowski closed this Sep 5, 2022
@Carreau Carreau added this to the no action milestone Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add completion type (_jupyter_types_experimental) for dictionary keys, file paths, etc
2 participants