Skip to content
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

strange text in completions #906

Closed
jidibinlin opened this issue Oct 28, 2019 · 6 comments
Closed

strange text in completions #906

jidibinlin opened this issue Oct 28, 2019 · 6 comments

Comments

@jidibinlin
Copy link

  • Did you upgrade to latest plugin version?
    Yes
  • Did you upgrade to/compile latest binary? Run shell command
    Yes

Describe the bug

garbage text inserted when complete. such as when i type printf, I just want

printf()

but

printf(const char *--restrict__format, ....) -> int

has been inserted.

Environment

  • neovim/vim version (nvim --version or vim --version):
NVIM v0.4.2
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/bin/cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -O2 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/build/neovim/src/build/config -I/build/neovim/src/neovim-0.4.2/src -I/usr/include -I/build/neovim/src/build/src/nvim/auto -I/build/neovim/src/build/include
Compiled by builduser

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"
  • This plugin version (git rev-parse --short HEAD):

latest

  • This plugin's binary version (bin/languageclient --version):

latest

  • Minimal vimrc content (A minimal vimrc is the smallest vimrc that could
    reproduce the issue:
call plug#begin('~/.vim/plugged')
	Plug 'autozimu/LanguageClient-neovim', {
	    \ 'branch': 'next',
	    \ 'do': 'bash install.sh',
	    \ }
	Plug 'jackguo380/vim-lsp-cxx-highlight'
	if has('nvim')
		Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
	else
		Plug 'Shougo/deoplete.nvim'
		Plug 'roxma/nvim-yarp'
		Plug 'roxma/vim-hug-neovim-rpc'
	endif
call plug#end()

" ccls
let s:ccls_settings = {
         \ 'highlight': { 'lsRanges' : v:true },
         \ }

let s:ccls_command = ['nice' , 'ccls', '-init=' . json_encode(s:ccls_settings)]

let g:LanguageClient_serverCommands = {
      \ 'c': s:ccls_command,
      \ 'cpp': s:ccls_command,
      \ 'objc': s:ccls_command,
      \ }

let g:deoplete#enable_at_startup = 1
let g:LanguageClient_completionPreferTextEdit = 1
  • Language server link and version:
    ccls version 0.20190314.2-4-g3e049970

To Reproduce

Steps to reproduce the behavior:
I have descripted above

@jidibinlin
Copy link
Author

I used deoplete

@AlxHnr
Copy link

AlxHnr commented Oct 31, 2019

This looks like a regression of #857 and #813. It is supposed to be fixed with 34e695d, but the commit is not in the latest release yet.

@autozimu
Copy link
Owner

autozimu commented Nov 1, 2019

Just released 0.1.155

Issue shall be addressed.

@autozimu autozimu closed this as completed Nov 1, 2019
@AlxHnr
Copy link

AlxHnr commented Nov 1, 2019

0.1.155 is not installed by the install script yet: https://github.com/autozimu/LanguageClient-neovim/blob/next/install.sh#L9

@autozimu
Copy link
Owner

autozimu commented Nov 3, 2019

@AlxHnr Thanks. Just updated the version number in install.sh.

@condy0919
Copy link

It seems the issued not fixed in 0.1.155

nvim --version

NVIM v0.4.3
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/bin/cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -O2 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/build/neovim/src/build/config -I/build/neovim/src/neovim-0.4.3/src -I/usr/include -I/build/neovim/src/build/src/nvim/auto -I/build/neovim/src/build/include
Compiled by builduser

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

ccls --version

ccls version 0.20190823.5-9-gcef02034
clang version 9.0.0 (tags/RELEASE_900/final)

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

4 participants