Fuzzy auto-complete does not work #188
Comments
gocode is providing the suggestions. It doesn't do fuzzy matching; it only matches on exact matches for the prefix. |
According to nsf/gocode#51, @nsf is explicitly not providing fuzzy matching, leaving it up to whomever is using gocode. It would seem this is something go-plus needs to do. As he says:
What would need to happen for this to become a feature of go-plus? I am trying to move to Atom from ST3, and I've come to realize just how much I rely on fuzzy matching, as well as how jarring it is to no longer have it. |
As for me, I'm using Atom now as well. I can see go-plus doing autocompletion request for every character you type when autocompletion is active. Maybe it's not the best idea ever. I've implemented autocompletion in my own editor, the logic was something like that: When user requests autocompletion, query gocode, then keep that list around and remove it only when user's cursor is behind or ahead of the request point or if the user typed characters that do not match any of the autocompletion candidates. Which means I do filtering on my own. I think all editors should do that. :) Plus atom has a built-in fuzzy matching lib called fuzzaldrin: https://github.com/atom/fuzzaldrin |
Fuzzy matching is built into the default autocomplete provider (SymbolProvider) and so will always be available as a fallback. When I rewrote autocomplete-plus, we built in a debounce so that keystroke performance is not impacted by ac+ dispatching requests to ac+ providers - provided those providers are asynchronous (go-plus is). I could fuzzy match against the suggestions gocode provides me but that seems redundant - gocode knows better than any fuzzy matching, after it has been run. I've not had anyone give me evidence (I.e. With a chrome profile image) that go-plus is impacting performance because of its gocode integration. Is there a specific functional gap here? What, functionally, is missing? ac+ will fuzzy match if gocode does not provide any suggestions. Gocode knows better than a fuzzy matching algorithm if it does run. |
For me, it's a matter of speed and convenience. Coming from ST3, it is rather well ingrained in me to type only specific parts of a function call I am trying to insert. For example gocode is certainly more accurate and exact, but fuzzy matching within the gocode results lets me move more quickly. |
And I don't use fuzzy matching for autocompletions. But I guess it would be nice to have it as an option. |
@joefitzgerald I don't think these are mutually exclusive. You still could have fuzzy matching on top of |
I'm open to pull requests @a13xb |
When I type
rents
in Ruby code, auto-complete can provide suggestion asrender_to_string
.However, if I type
RegHa
in Go code. it does not provide suggestionRegisterHandler
.Typing
Reg
does show suggestion as "RegisterHandler", so I guess it's related to fuzzy string matching?The text was updated successfully, but these errors were encountered: