Skip to content

More fuzzy matching #122

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

Closed
10 tasks done
princemaple opened this issue Feb 16, 2021 · 3 comments
Closed
10 tasks done

More fuzzy matching #122

princemaple opened this issue Feb 16, 2021 · 3 comments

Comments

@princemaple
Copy link
Contributor

princemaple commented Feb 16, 2021

Potential candidates

  • 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

@lukaszsamson commented in #121 (comment):

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.

@maciej-szlosarczyk
Copy link
Contributor

lib/elixir_sense/plugins/option.ex is done in #128
lib/elixir_sense/providers/suggestion/reducers/struct.ex and lib/elixir_sense/providers/suggestion/reducers/type_specs.ex
in #129.

@princemaple
Copy link
Contributor Author

Some notes about working on fuzzy matching.

  • There might be test failing because of fuzzy matching in ElixirLS and need to be fixed. See this PR for reference: fuzzy matching elixir-ls#491
    • basically just need to bump elixir_sense in elixir-ls and fix tests
  • There are some inconsistent behavior around module name matching in ecto related code and non-ecto code. Might be something to keep in mind when working on module names.

@lukaszsamson
Copy link
Collaborator

I went ahead and added fuzzy matching in complete and ecto. There was also some gaps in type_specs not covered in #129. I needed some tweaking of the matching algorithm to play nicely with elixir aliases (see 9b5c8c4#diff-da7b9c8d53d3b60dfe4be57ab5edea9ebfcb6fcd2d8b1e263c923e9bd8ae8a65R448). Anyway this means that fuzzy matching is used in all relevant places.

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

No branches or pull requests

3 participants