autozimu / LanguageClient-neovim

Language Server Protocol (LSP) support for vim and neovim.
MIT License
3.55k stars 274 forks source link

ccls diagnostics can't disappear in some case #861

Closed fcying closed 5 years ago

fcying commented 5 years ago

Describe the bug

after I fix error, diagnostics can't disappear.

Environment

test_vimrc

set nocompatible
set encoding=utf-8
set runtimepath+=~/.vim/plugged/ncm2
set runtimepath+=~/.vim/plugged/vim-hug-neovim-rpc
set runtimepath+=~/.vim/plugged/LanguageClient-neovim
set hidden
set number
set laststatus=2

inoremap {<CR> {}<ESC>i<CR><c-o><s-o> 

let g:LanguageClient_serverCommands = {
      \ 'c': ['ccls'],
      \ 'cpp': ['ccls'],
      \ }
filetype plugin indent on
syntax enable

To Reproduce

Steps to reproduce the behavior:

  1. vim -u ~/test_vimrc main.c
  2. insert: if (rc == ) { , click<CR>
  3. save file
  4. fix error: if (rc == 0), save
  5. diagnostics can't disappear

asciicast

Screenshots

If applicable, add screenshots to help explain your problem. 图片 图片

autozimu commented 5 years ago

Is this still reproducible?

I'm not able to reproduce it locally with

autozimu commented 5 years ago

No longer reproducible and no response during 7 days.

fcying commented 5 years ago

@autozimu reproducible with vim 8.1 Included patches: 1-1950. Tested 5 times reproduce once

$ccls --version
ccls version <unknown> (install from brew)
clang version 8.0.0 (tags/RELEASE_800/final)

LanguageClient-neovim ‹next›$git rev-parse --short HEAD
baea090

LanguageClient-neovim ‹next›$bin/languageclient --version
languageclient 0.1.147