nsf/gocode — pull request #183 by bradleywright (2014-01-02 23:41:48+00:00)
Title: Use company-grab-word instead of a regex

The regular expression being used here doesn't always give desirable results.

Example:

```go
thing := OtherThing()
thi // won't autocomplete to `thing`

type Foo struct {
Bar string `bson:"foo"`
}

foo := Foo{}
foo.B // will autocomplete to `Bar`
```

Because it has a hard `.` anchor in the `prefix` case, it will only ever match methods or attributes and never local variables, even though `gocode` itself would complete both cases fine. Changing it to `company-grab-word` satisfies both cases because we get a matching prefix (as long as you satisfy `company-minimum-prefix-length`).