Skip to content
This repository has been archived by the owner on Apr 3, 2018. It is now read-only.

Using type-specific code-completion autocompletes improperly #4

Closed
sesteel opened this issue Jan 21, 2014 · 1 comment
Closed

Using type-specific code-completion autocompletes improperly #4

sesteel opened this issue Jan 21, 2014 · 1 comment

Comments

@sesteel
Copy link
Member

sesteel commented Jan 21, 2014

What steps will reproduce the problem?

  1. start with eg:
    package main
    import "os"
  2. add: var foo = os.const<alt+space> and select O_APPEND:

What is the expected output? What do you see instead?

expected output: var foo = os.O_APPEND
actual output: var foo = os.constEND

What version of the product are you using? On what operating system?
goclipse 0.0.18
Autocomplete with gocode 0.0.17
Windows XP X64

Please provide any additional information below.

may be a gocode issue? nsf said something about csv output not having the same information as other output types..

Apr 7, 2012 no.smile.face
Oh, hai, I'm the gocode author and just was looking though this bug tracker. Will just leave a note regarding this one:

The problem here is that you can make two kinds of assumptions about autocompleter:

  1. It cannot change everything before the cursor.
  2. It can.

Gocode can do that. If you take a look at gocode's code (formatters.go), the main method of the interface has this "num" thing. It's the number of characters to replace before the cursor. Frankly, it's used in vim and isn't used anywhere else.

Gocode has a special way to propose things of certain classes (const, var, func, type). So.. when you type x.const<|> it will propose all consts, but you have to remove the "const" word.

So.. it's an integration bug, maybe I should add a config option to disable this special autocompletion proposals.

@sesteel sesteel mentioned this issue Jan 21, 2014
@bruno-medeiros
Copy link
Contributor

I tried this ans it seems to be working fine

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants