Skip to content

Diagnostic signs remain in the gutter after fixing all errors #288

@kodemeister

Description

@kodemeister

Hi @autozimu,

I'm having erroneous diagnostic signs even after I fix all syntax errors in C++ code. If I move cursor to the line containing the sign, I don't see any error messages in the status line. Logs also show that the language server returns an empty list in textDocument/publishDiagnostics message. So I believe it's purely displaying issue.

nvim

  • neovim/vim version: NVIM v0.2.2
  • Plugin version (git SHA): ed183d7
  • Minimal vimrc:
call plug#begin('~/.config/nvim/plugged')

Plug 'autozimu/LanguageClient-neovim', {
    \ 'branch': 'next',
    \ 'do': 'bash install.sh',
    \ }

call plug#end()

let g:LanguageClient_serverCommands = {
    \ 'cpp': ['clangd'],
    \ }
let g:LanguageClient_loggingLevel = 'DEBUG'
  • Language server name/link and version: latest clangd 7 from SVN. BTW stable clangd 5 doesn't work for me at all (probably due to clangd completion does not work #72 reintroduced in new rust implementation) but this is another story.
  • Reproduction steps (from clean state):
  1. Open the following C++ file with a syntax error:
#include <iostream>

void foo()
{

int main(int argc, char **argv)
{
	return 0;
}
  1. See the diagnostic signs because of missing closing brace.
  2. Fix the error by adding the missing brace to line 5.

Expected: all diagnostic signs disappear.
Observed: erroneous diagnostic signs still remain in the gutter.

This issue happens only in next branch. Legacy python implementation works correctly.

Thank you for your hard work!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions