Skip to content

omnicompletion appends in stead of replacing #2384

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
g00nix opened this issue Jul 4, 2019 · 4 comments
Closed

omnicompletion appends in stead of replacing #2384

g00nix opened this issue Jul 4, 2019 · 4 comments

Comments

@g00nix
Copy link

g00nix commented Jul 4, 2019

What did you do? (required: The issue will be closed when not provided)

I hit Ctrl+X Ctrl+O

What did you expect to happen?

I expected the autocompletion to complete the word.

What happened instead?

It appended the selection from OmniComplete after the existing text, instead of replacing the text. If you have a variable called pleaseCompleteMe, and write pleaseC and hit C+X C+O, you will successfully autocomplete to pleaseCpleaseCompleteMe

Configuration (MUST fill this out):

vim-go version:

vim-go 1.20-1

vimrc you used to reproduce (use a minimal vimrc with other plugins disabled; do not link to a 2,000 line vimrc):

vimrc
source $VIMRUNTIME/defaults.vim
set mouse=""
set nu
set laststatus=2
set t_Co=256
set wildmode=longest,list
let g:powerline_pycmd = 'py3'
nnoremap  
nnoremap  
nnoremap  
nnoremap  
nnoremap  :terminal % 

set splitbelow
set splitright
set shiftwidth=2
set expandtab
set softtabstop=2
let g:indentLine_color_term = 239
let g:ansible_unindent_after_newline = 1
let g:go_auto_sameids = 1

let g:go_highlight_array_whitespace_error = 1
let g:go_highlight_chan_whitespace_error = 1
let g:go_highlight_extra_types = 1
let g:go_highlight_space_tab_error = 1
let g:go_highlight_trailing_whitespace_error = 0
let g:go_highlight_operators = 1
let g:go_highlight_functions = 1
let g:go_highlight_function_parameters = 1
let g:go_highlight_function_calls = 1
let g:go_highlight_types = 1
let g:go_highlight_fields = 1
let g:go_highlight_build_constraints = 1
let g:go_highlight_generate_tags = 1
let g:go_highlight_string_spellcheck = 1
let g:go_highlight_format_strings = 1
let g:go_highlight_variable_declarations = 1
let g:go_highlight_variable_assignments = 1

colorscheme pablo


I also think most of the highlights should be enabled by default. I used vim-go for months before figuring out it can do more cool highlighting.

Vim version (first three lines from :version):

vim 8.1.1616-1

Go version (go version):

go version go1.12.6 linux/amd64

Go environment

go env Output:
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/gunix/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/gunix/.go"
GOPROXY=""
GORACE=""
GOROOT="/usr/lib/go"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build945620904=/tmp/go-build -gno-record-gcc-switches"

@bhcleek
Copy link
Collaborator

bhcleek commented Jul 4, 2019

gopls changed recently in a way that exposed a deficiency in vim-go's handling of its completion candidates. vim-go's master already includes a fix, #2291.

@bhcleek bhcleek closed this as completed Jul 4, 2019
@g00nix
Copy link
Author

g00nix commented Jul 4, 2019

gopls changed recently in a way that exposed a deficiency in vim-go's handling of its completion candidates. vim-go's master already includes a fix, #2291.

Nice to see. Sorry for creating a duplicate ticket.

I guess this will be part of v1.21. When is it scheduled for release?

@bhcleek
Copy link
Collaborator

bhcleek commented Jul 4, 2019

No official schedule, but I anticipate shortly after the Go 1.13 release in August.

Master is pretty stable now and should be fine to use.

@g00nix
Copy link
Author

g00nix commented Jul 4, 2019

Yea, running yay -S vim-go-git solved the issue.

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

No branches or pull requests

2 participants