@@ -420,7 +420,7 @@ export class DiagnosticBuffer implements SyncItem {
420
420
nvim . resumeNotification ( true , true )
421
421
} else if ( displayByVimDiagnostic ) {
422
422
nvim . pauseNotification ( )
423
- this . setDiagnosticInfo ( )
423
+ this . setDiagnosticInfo ( true )
424
424
nvim . resumeNotification ( true , true )
425
425
} else {
426
426
let emptyCollections : string [ ] = [ ]
@@ -485,7 +485,7 @@ export class DiagnosticBuffer implements SyncItem {
485
485
this . nvim . call ( 'coc#ui#update_signs' , [ this . bufnr , group , signs ] , true )
486
486
}
487
487
488
- public setDiagnosticInfo ( ) : void {
488
+ public setDiagnosticInfo ( full = false ) : void {
489
489
let lnums = [ 0 , 0 , 0 , 0 ]
490
490
let info = { error : 0 , warning : 0 , information : 0 , hint : 0 , lnums }
491
491
let items : DiagnosticItem [ ] = [ ]
@@ -510,21 +510,22 @@ export class DiagnosticBuffer implements SyncItem {
510
510
info . error = info . error + 1
511
511
}
512
512
513
- let { start, end } = diagnostic . range
514
- items . push ( {
515
- file : URI . parse ( this . doc . uri ) . fsPath ,
516
- lnum : start . line + 1 ,
517
- end_lnum : end . line + 1 ,
518
- col : start . character + 1 ,
519
- end_col : end . character + 1 ,
520
- code : diagnostic . code ,
521
- source : diagnostic . source ,
522
- message : diagnostic . message ,
523
- severity : getSeverityName ( diagnostic . severity ) ,
524
- level : diagnostic . severity ?? 0 ,
525
- location : Location . create ( this . doc . uri , diagnostic . range )
526
-
527
- } )
513
+ if ( full ) {
514
+ let { start, end } = diagnostic . range
515
+ items . push ( {
516
+ file : URI . parse ( this . doc . uri ) . fsPath ,
517
+ lnum : start . line + 1 ,
518
+ end_lnum : end . line + 1 ,
519
+ col : start . character + 1 ,
520
+ end_col : end . character + 1 ,
521
+ code : diagnostic . code ,
522
+ source : diagnostic . source ,
523
+ message : diagnostic . message ,
524
+ severity : getSeverityName ( diagnostic . severity ) ,
525
+ level : diagnostic . severity ?? 0 ,
526
+ location : Location . create ( this . doc . uri , diagnostic . range )
527
+ } )
528
+ }
528
529
}
529
530
}
530
531
let buf = this . nvim . createBuffer ( this . bufnr )
0 commit comments