completion of constants includes value
joshuarubin opened this issue · comments
Joshua Rubin commented
I think this is a bingo bug, but feel free to close if it isn't.
Using neovim with:
- autozimu/LanguageClient-neovim (branch: next)
- ncm2/ncm2
- fatih/vim-go
When completing a constant e.g. typing pkg.Fo
where there exists const pkg.Foo = "bar"
will complete with pkg.Foo = "bar"
instead of just pkg.Foo
.
This seems related to #15
saibing commented
--> request #51: textDocument/completion: {"textDocument":{"uri":"file:///home/saibing/git/go/source/hello/math.go"},"position":{"line":15,"character":7},"context":{"triggerKind":2,"triggerCharacter":"."}}
<-- result #51: textDocument/completion: {"isIncomplete":false,"items":[{"label":"Foo = \"bar\"","kind":21,"detail":"string","sortText":"00000","insertText":"Foo","insertTextFormat":2,"textEdit":{"range":{"start":{"line":15,"character":7},"end":{"line":15,"character":7}},"newText":"Foo"}}]}
bingo's return is ok:
"label": "Foo = \"bar\""
"insertText" = "Foo"
"newText" = "Foo"
coc.nvim, vsocde works well.
Maybe you can try coc.nvim.
I think it better than autozimu/LanguageClient-neovim or ncm2/ncm2.