Skip to content

Fuzzy matching #121

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

Merged
merged 8 commits into from
Feb 22, 2021
Merged

Fuzzy matching #121

merged 8 commits into from
Feb 22, 2021

Conversation

princemaple
Copy link
Contributor

related: elixir-lsp/elixir-ls#466
image

Only applied fuzzy matching on module functions so far.

All these files could use this polish to enhance UX. How far do we want to go in 1 PR?

  • lib/elixir_sense/plugins/option.ex
  • lib/elixir_sense/providers/suggestion/reducers/type_specs.ex
  • lib/elixir_sense/providers/suggestion/reducers/callbacks.ex
  • lib/elixir_sense/providers/suggestion/reducers/struct.ex
  • lib/elixir_sense/providers/suggestion/reducers/params.ex
  • lib/elixir_sense/providers/suggestion/reducers/overridable.ex
  • lib/elixir_sense/providers/suggestion/reducers/protocol.ex
  • lib/elixir_sense/providers/suggestion/reducers/docs_snippets.ex
  • lib/elixir_sense/providers/suggestion/complete.ex
  • lib/elixir_sense/plugins/ecto/schema.ex

@princemaple
Copy link
Contributor Author

princemaple commented Feb 6, 2021

The suggestion tests are kinda annoying now - they now return a lot more results because of fuzzy matching.

EDIT: not only breaking ElixirSense tests but also ElixirLS https://github.com/princemaple/elixir-ls/commits/master
😢

@princemaple princemaple force-pushed the fuzzy-matching branch 3 times, most recently from aff6ec6 to 81609e9 Compare February 7, 2021 00:21
@princemaple
Copy link
Contributor Author

@lukaszsamson @axelson @msaraiva

I'd be most appreciative if some of you could review this before I go and fix the tests in ElixirLS, in case you have a different opinion about how the tests should be fixed.

@lukaszsamson
Copy link
Collaborator

Nice work @princemaple. I'm going to test it a bit tomorrow.

@princemaple
Copy link
Contributor Author

Thanks. I'm quite enjoying it while coding today, so much that I'm willing to fix more tests so I can apply it in more scenarios.

@princemaple
Copy link
Contributor Author

FYI the past week of using this patch has been very pleasant.

@lukaszsamson
Copy link
Collaborator

I did some testing and so far I like how it's working.

All these files could use this polish to enhance UX. How far do we want to go in 1 PR?
lib/elixir_sense/plugins/option.ex
lib/elixir_sense/providers/suggestion/reducers/type_specs.ex
lib/elixir_sense/providers/suggestion/reducers/callbacks.ex
lib/elixir_sense/providers/suggestion/reducers/struct.ex
lib/elixir_sense/providers/suggestion/reducers/params.ex
lib/elixir_sense/providers/suggestion/reducers/overridable.ex
lib/elixir_sense/providers/suggestion/reducers/protocol.ex
lib/elixir_sense/providers/suggestion/reducers/docs_snippets.ex
lib/elixir_sense/providers/suggestion/complete.ex
lib/elixir_sense/plugins/ecto/schema.ex

Let's do them in follow up PRs. This one is already big. I'm not sure if callbacks, overridable and protocols are good candidates. Apart from those I'd include more suggestions from complete module: elixir/erlang modules, variables, attributes, map/struct keys. Elixir modules would probably work better with some letter downcasing.

This was referenced Feb 16, 2021
@lukaszsamson lukaszsamson merged commit 6c70be7 into elixir-lsp:master Feb 22, 2021
@princemaple princemaple deleted the fuzzy-matching branch February 22, 2021 20:30
maciej-szlosarczyk added a commit to maciej-szlosarczyk/elixir_sense that referenced this pull request Apr 14, 2021
lukaszsamson pushed a commit that referenced this pull request Apr 14, 2021
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.

2 participants