maralla / completor.vim

Async completion framework made ease.
MIT License
1.27k stars 63 forks source link

Trigger completion when filling out go structs #232

Closed blockloop closed 1 year ago

blockloop commented 5 years ago

There is no completion when defining Go structs.

Expected behavior: when filling a struct with fields I expect to see a list of fields suggested for autocompletion

Actual behavior: no completion is given

I tried the autocompletion snippet from the README

inoremap <expr> <Tab> pumvisible() ? "<C-N>" : "<C-R>=completor#do('complete')<CR>"

When pressing in the cursor position listed below gocode -debug doesn't print any requests so it appears that completor is not sending anything. When I type Na I see the gocode request sent because of the g:completor_min_chars option as expected.

package main

type Person struct {
    Name string
    Age  uint8
}

func main() {
    p := &Person{
        // << cursor here
    }
}

My question is this:

Is there a way to trigger completion when entering a struct like above? I'd like to be able to see which fields I can set.

blockloop commented 1 year ago

Cleaning up old PRs. Closing this because this project appears abandoned.