gocode icon indicating copy to clipboard operation
gocode copied to clipboard

Autocomplete Import decrations doesn't work when enable syntax highlight.

Open iporsut opened this issue 9 years ago • 1 comments

I'm use OSX 10.11.6 with GNU Emacs 24.5.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21) of 2015-04-11 on builder10-9.porkrind.org.

When I enable syntax highlight by (global-font-lock-mode 1), autocomplete Import decrations doesn't work, but when disable (global-font-lock-mode 0), it's work.

screen shot 2559-09-17 at 11 39 42 pm screen shot 2559-09-17 at 11 40 02 pm

iporsut avatar Sep 17 '16 16:09 iporsut

You're lucky that they work in some cases, nobody explicitly added support for these in any of the gocode's bundled editor plugins. :D

Somebody needs to add that feature there and make sure it works well.

There are usually two typical problems:

  1. When to trigger autocompletion. Some editors prevent triggering autocompletions when you're in a string literal or comment block. This is probably the case with emacs.
  2. What to replace using autocompletion result. E.g. if you trigger autocompletion on: github.com/nsf/#, text editor may refuse to replace anything beyond closest / symbol as in most cases autocompletion is used to replace the last word.

The feature should work in vim and godit and it is questionable about other plugins.

nsf avatar Sep 17 '16 16:09 nsf