@@ -336,8 +336,8 @@ config({opts}, {namespace}) *vim.diagnostic.config()*
336
336
that returns any of the above.
337
337
338
338
Parameters: ~
339
- {opts} table|nil When omitted or "nil", retrieve the
340
- current configuration. Otherwise, a
339
+ {opts} ( table|nil) When omitted or "nil", retrieve
340
+ the current configuration. Otherwise, a
341
341
configuration table with the following keys:
342
342
• underline: (default true) Use underline for
343
343
diagnostics. Options:
@@ -401,36 +401,36 @@ config({opts}, {namespace}) *vim.diagnostic.config()*
401
401
displayed before lower severities (e.g.
402
402
ERROR is displayed before WARN). Options:
403
403
• reverse: (boolean) Reverse sort order
404
- {namespace} number|nil Update the options for the given
404
+ {namespace} ( number|nil) Update the options for the given
405
405
namespace. When omitted, update the global
406
406
diagnostic options.
407
407
408
408
disable({bufnr} , {namespace} ) *vim.diagnostic.disable()*
409
409
Disable diagnostics in the given buffer.
410
410
411
411
Parameters: ~
412
- {bufnr} number|nil Buffer number, or 0 for current
412
+ {bufnr} ( number|nil) Buffer number, or 0 for current
413
413
buffer. When omitted, disable diagnostics in
414
414
all buffers.
415
- {namespace} number|nil Only disable diagnostics for the
415
+ {namespace} ( number|nil) Only disable diagnostics for the
416
416
given namespace.
417
417
418
418
enable({bufnr} , {namespace} ) *vim.diagnostic.enable()*
419
419
Enable diagnostics in the given buffer.
420
420
421
421
Parameters: ~
422
- {bufnr} number|nil Buffer number, or 0 for current
422
+ {bufnr} ( number|nil) Buffer number, or 0 for current
423
423
buffer. When omitted, enable diagnostics in
424
424
all buffers.
425
- {namespace} number|nil Only enable diagnostics for the
425
+ {namespace} ( number|nil) Only enable diagnostics for the
426
426
given namespace.
427
427
428
428
fromqflist({list} ) *vim.diagnostic.fromqflist()*
429
429
Convert a list of quickfix items to a list of diagnostics.
430
430
431
431
Parameters: ~
432
- {list} table A list of quickfix items from | getqflist() |
433
- or | getloclist() | .
432
+ {list} ( table) A list of quickfix items from
433
+ | getqflist() | or | getloclist() | .
434
434
435
435
Return: ~
436
436
array of diagnostics | diagnostic-structure |
@@ -439,77 +439,79 @@ get({bufnr}, {opts}) *vim.diagnostic.get()*
439
439
Get current diagnostics.
440
440
441
441
Parameters: ~
442
- {bufnr} number|nil Buffer number to get diagnostics from.
443
- Use 0 for current buffer or nil for all buffers.
444
- {opts} table|nil A table with the following keys:
442
+ {bufnr} (number|nil) Buffer number to get diagnostics
443
+ from. Use 0 for current buffer or nil for all
444
+ buffers.
445
+ {opts} (table|nil) A table with the following keys:
445
446
• namespace: (number) Limit diagnostics to the
446
447
given namespace.
447
448
• lnum: (number) Limit diagnostics to the given
448
449
line number.
449
450
• severity: See | diagnostic-severity | .
450
451
451
452
Return: ~
452
- table A list of diagnostic items | diagnostic-structure | .
453
+ ( table) A list of diagnostic items | diagnostic-structure | .
453
454
454
455
get_namespace({namespace} ) *vim.diagnostic.get_namespace()*
455
456
Get namespace metadata.
456
457
457
458
Parameters: ~
458
- {namespace} number Diagnostic namespace
459
+ {namespace} ( number) Diagnostic namespace
459
460
460
461
Return: ~
461
- table Namespace metadata
462
+ ( table) Namespace metadata
462
463
463
464
get_namespaces() *vim.diagnostic.get_namespaces()*
464
465
Get current diagnostic namespaces.
465
466
466
467
Return: ~
467
- table A list of active diagnostic namespaces
468
+ ( table) A list of active diagnostic namespaces
468
469
| vim.diagnostic | .
469
470
470
471
get_next({opts} ) *vim.diagnostic.get_next()*
471
472
Get the next diagnostic closest to the cursor position.
472
473
473
474
Parameters: ~
474
- {opts} table See | vim.diagnostic.goto_next() |
475
+ {opts} ( table) See | vim.diagnostic.goto_next() |
475
476
476
477
Return: ~
477
- table Next diagnostic
478
+ ( table) Next diagnostic
478
479
479
480
get_next_pos({opts} ) *vim.diagnostic.get_next_pos()*
480
481
Return the position of the next diagnostic in the current
481
482
buffer.
482
483
483
484
Parameters: ~
484
- {opts} table See | vim.diagnostic.goto_next() |
485
+ {opts} ( table) See | vim.diagnostic.goto_next() |
485
486
486
487
Return: ~
487
- table Next diagnostic position as a (row, col) tuple.
488
+ ( table) Next diagnostic position as a (row, col) tuple.
488
489
489
490
get_prev({opts} ) *vim.diagnostic.get_prev()*
490
491
Get the previous diagnostic closest to the cursor position.
491
492
492
493
Parameters: ~
493
- {opts} table See | vim.diagnostic.goto_next() |
494
+ {opts} ( table) See | vim.diagnostic.goto_next() |
494
495
495
496
Return: ~
496
- table Previous diagnostic
497
+ ( table) Previous diagnostic
497
498
498
499
get_prev_pos({opts} ) *vim.diagnostic.get_prev_pos()*
499
500
Return the position of the previous diagnostic in the current
500
501
buffer.
501
502
502
503
Parameters: ~
503
- {opts} table See | vim.diagnostic.goto_next() |
504
+ {opts} ( table) See | vim.diagnostic.goto_next() |
504
505
505
506
Return: ~
506
- table Previous diagnostic position as a (row, col) tuple.
507
+ (table) Previous diagnostic position as a (row, col)
508
+ tuple.
507
509
508
510
goto_next({opts} ) *vim.diagnostic.goto_next()*
509
511
Move to the next diagnostic.
510
512
511
513
Parameters: ~
512
- {opts} table|nil Configuration table with the following
514
+ {opts} ( table|nil) Configuration table with the following
513
515
keys:
514
516
• namespace: (number) Only consider diagnostics
515
517
from the given namespace.
@@ -533,7 +535,7 @@ goto_prev({opts}) *vim.diagnostic.goto_prev()*
533
535
Move to the previous diagnostic in the current buffer.
534
536
535
537
Parameters: ~
536
- {opts} table See | vim.diagnostic.goto_next() |
538
+ {opts} ( table) See | vim.diagnostic.goto_next() |
537
539
538
540
hide({namespace} , {bufnr} ) *vim.diagnostic.hide()*
539
541
Hide currently displayed diagnostics.
@@ -547,10 +549,10 @@ hide({namespace}, {bufnr}) *vim.diagnostic.hide()*
547
549
| vim.diagnostic.disable() | .
548
550
549
551
Parameters: ~
550
- {namespace} number|nil Diagnostic namespace. When
552
+ {namespace} ( number|nil) Diagnostic namespace. When
551
553
omitted, hide diagnostics from all
552
554
namespaces.
553
- {bufnr} number|nil Buffer number, or 0 for current
555
+ {bufnr} ( number|nil) Buffer number, or 0 for current
554
556
buffer. When omitted, hide diagnostics in all
555
557
buffers.
556
558
@@ -573,16 +575,16 @@ match({str}, {pat}, {groups}, {severity_map}, {defaults})
573
575
<
574
576
575
577
Parameters: ~
576
- {str} string String to parse diagnostics from.
577
- {pat} string Lua pattern with capture groups.
578
- {groups} table List of fields in a
578
+ {str} ( string) String to parse diagnostics from.
579
+ {pat} ( string) Lua pattern with capture groups.
580
+ {groups} ( table) List of fields in a
579
581
| diagnostic-structure | to associate with
580
582
captures from {pat} .
581
- {severity_map} table A table mapping the severity field
583
+ {severity_map} ( table) A table mapping the severity field
582
584
from {groups} with an item from
583
585
| vim.diagnostic.severity | .
584
- {defaults} table|nil Table of default values for any
585
- fields not listed in {groups} . When
586
+ {defaults} ( table|nil) Table of default values for
587
+ any fields not listed in {groups} . When
586
588
omitted, numeric values default to 0 and
587
589
"severity" defaults to ERROR.
588
590
@@ -594,7 +596,7 @@ open_float({opts}, {...}) *vim.diagnostic.open_float()*
594
596
Show diagnostics in a floating window.
595
597
596
598
Parameters: ~
597
- {opts} table|nil Configuration table with the same keys
599
+ {opts} ( table|nil) Configuration table with the same keys
598
600
as | vim.lsp.util.open_floating_preview() | in
599
601
addition to the following:
600
602
• bufnr: (number) Buffer number to show
@@ -665,29 +667,29 @@ reset({namespace}, {bufnr}) *vim.diagnostic.reset()*
665
667
| vim.diagnostic.hide() | .
666
668
667
669
Parameters: ~
668
- {namespace} number|nil Diagnostic namespace. When
670
+ {namespace} ( number|nil) Diagnostic namespace. When
669
671
omitted, remove diagnostics from all
670
672
namespaces.
671
- {bufnr} number|nil Remove diagnostics for the given
673
+ {bufnr} ( number|nil) Remove diagnostics for the given
672
674
buffer. When omitted, diagnostics are removed
673
675
for all buffers.
674
676
675
677
set({namespace} , {bufnr} , {diagnostics} , {opts} ) *vim.diagnostic.set()*
676
678
Set diagnostics for the given namespace and buffer.
677
679
678
680
Parameters: ~
679
- {namespace} number The diagnostic namespace
680
- {bufnr} number Buffer number
681
- {diagnostics} table A list of diagnostic items
681
+ {namespace} ( number) The diagnostic namespace
682
+ {bufnr} ( number) Buffer number
683
+ {diagnostics} ( table) A list of diagnostic items
682
684
| diagnostic-structure |
683
- {opts} table|nil Display options to pass to
685
+ {opts} ( table|nil) Display options to pass to
684
686
| vim.diagnostic.show() |
685
687
686
688
setloclist({opts} ) *vim.diagnostic.setloclist()*
687
689
Add buffer diagnostics to the location list.
688
690
689
691
Parameters: ~
690
- {opts} table|nil Configuration table with the following
692
+ {opts} ( table|nil) Configuration table with the following
691
693
keys:
692
694
• namespace: (number) Only add diagnostics from
693
695
the given namespace.
@@ -703,7 +705,7 @@ setqflist({opts}) *vim.diagnostic.setqflist()*
703
705
Add all diagnostics to the quickfix list.
704
706
705
707
Parameters: ~
706
- {opts} table|nil Configuration table with the following
708
+ {opts} ( table|nil) Configuration table with the following
707
709
keys:
708
710
• namespace: (number) Only add diagnostics from
709
711
the given namespace.
@@ -718,28 +720,28 @@ show({namespace}, {bufnr}, {diagnostics}, {opts})
718
720
Display diagnostics for the given namespace and buffer.
719
721
720
722
Parameters: ~
721
- {namespace} number|nil Diagnostic namespace. When
723
+ {namespace} ( number|nil) Diagnostic namespace. When
722
724
omitted, show diagnostics from all
723
725
namespaces.
724
- {bufnr} number|nil Buffer number, or 0 for current
725
- buffer. When omitted, show diagnostics in
726
- all buffers.
727
- {diagnostics} table|nil The diagnostics to display. When
728
- omitted, use the saved diagnostics for the
729
- given namespace and buffer. This can be
726
+ {bufnr} ( number|nil) Buffer number, or 0 for
727
+ current buffer. When omitted, show
728
+ diagnostics in all buffers.
729
+ {diagnostics} ( table|nil) The diagnostics to display.
730
+ When omitted, use the saved diagnostics for
731
+ the given namespace and buffer. This can be
730
732
used to display a list of diagnostics
731
733
without saving them or to display only a
732
734
subset of diagnostics. May not be used when
733
735
{namespace} or {bufnr} is nil.
734
- {opts} table|nil Display options. See
736
+ {opts} ( table|nil) Display options. See
735
737
| vim.diagnostic.config() | .
736
738
737
739
toqflist({diagnostics} ) *vim.diagnostic.toqflist()*
738
740
Convert a list of diagnostics to a list of quickfix items that
739
741
can be passed to | setqflist() | or | setloclist() | .
740
742
741
743
Parameters: ~
742
- {diagnostics} table List of diagnostics
744
+ {diagnostics} ( table) List of diagnostics
743
745
| diagnostic-structure | .
744
746
745
747
Return: ~
0 commit comments