autocomplete-go icon indicating copy to clipboard operation
autocomplete-go copied to clipboard

fuzzy search

Open alvarolm opened this issue 9 years ago • 9 comments
trafficstars

doesnt seems to be working

alvarolm avatar Apr 13 '16 20:04 alvarolm

You're going to need to be more specific than that. Please post a reproduction, contrasting the actual outcome with the expected outcome.

joefitzgerald avatar Apr 13 '16 22:04 joefitzgerald

lets say I have this type type foo int with this methods

func (f *foo) MethodOne() {
...
} 

func (f *foo) MethodTwo() {
...
}

then I have the var var myVar foo, after this is written myVar. the autocomplete suggestions appear as expected showing the two inherited methods, lets say I type myVar.MtdOne it should narrow the suggestion to the MethodOne() but it doesn't, same happens with myVar.MOne even myVar.One, only works in cases where matches exactly the same (camelcase independent) which it doesnt help to be honest.

alvarolm avatar Apr 13 '16 23:04 alvarolm

Please file an issue at https://github.com/nsf/gocode.

joefitzgerald avatar Apr 13 '16 23:04 joefitzgerald

we all know where nsf stands about this matter, is there a way to create a wrapper over gocode to provide this functionality ?

alvarolm avatar Apr 15 '16 13:04 alvarolm

You're welcome to provide that wrapper. This isn't a priority for me. The built in autocomplete-plus provider is disabled by default by go-plus. Try I checking that option, as it does perform a fuzzy search against symbols.

joefitzgerald avatar Apr 15 '16 13:04 joefitzgerald

Can you give a little more detail about how to work around this issue? I've tried:

In autocomplete-go settings:

  • uncheck "Suppress The Provider Built-In To autocomplete-plus"

In autocomplete-plus settings:

  • uncheck "Use Strict Matching for Built-In Provider"
  • tried both "Word" and "Symbol" as Default Provider

The only way I've been able to get fuzzy completion working on go files is by disabling the autocomplete-go package entirely.

fordhurley avatar Apr 28 '16 14:04 fordhurley

You need to restart Atom after unchecking the "Suppress the provider built-in to autocomplete-plus". Then, you may need to scroll down the list to see the fuzzy matches.

joefitzgerald avatar Apr 28 '16 16:04 joefitzgerald

You're right. I could've sworn I had restarted after changing those settings and it wasn't working, but anyway, I do see the fuzzy matches now. Thanks!

fordhurley avatar May 03 '16 12:05 fordhurley

Even following the tips here (uncheck suppress built-in, uncheck strict matching, either symbol or fuzzy as default provider) I do not get any fuzzy matching in autocomplete-go, even after reload. Am I doing something wrong?

I was able to hack fuzzy matching into a personal fork using fuzzaldrin, but it's now quite out of date.

dabfleming avatar Nov 10 '16 23:11 dabfleming