Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/WhoIsSethDaniel/toggle-lsp-diagnostics.nvim

Neovim plugin for toggling the LSP diagnostics.
https://github.com/WhoIsSethDaniel/toggle-lsp-diagnostics.nvim

lsp neovim neovim-lsp neovim-plugin nvim-plugin plugin

Last synced: 12 days ago
JSON representation

Neovim plugin for toggling the LSP diagnostics.

Lists

README

        

# Description

A Neovim plugin for toggling the LSP diagnostics. Turn all diagnostics on/off or turn on/off
individual features of diagnostics (virtual text, underline, signs, etc...).

## Compatibility

Neovim >= 0.5.0

## Installation

Install using your favorite plugin manager.

If you use vim-plug:

```vim
Plug 'WhoIsSethDaniel/toggle-lsp-diagnostics.nvim'
```

Or if you use Vim 8 style packages:

```bash
cd
git clone https://github.com/WhoIsSethDaniel/toggle-lsp-diagnostics.nvim
```

## Configuration

Somwhere in your config you should have this:

```lua
require('toggle_lsp_diagnostics').init()
```

If you are using Vimscript for configuration:

```vim
lua <(toggle-lsp-diag-underline)`
Toggle underlining diagnostic information.

`(toggle-lsp-diag-signs)`
Toggle displaying signs in the sign column.

`(toggle-lsp-diag-vtext)`
Toggle displaying virtual text in your code.

`(toggle-lsp-diag-update_in_insert)`
Toggle updating diagnostic information while in insert mode.

`(toggle-lsp-diag)`
Toggle all diagnostics. Turn them all off / or back to what was passed to init().

`(toggle-lsp-diag-default)`
Set all diagnostics to their default. The default is everything is on, unless other values were
passed to init().

`(toggle-lsp-diag-on)`
Turn all diagnostics on.

`(toggle-lsp-diag-off)`
Turn all diagnostics off.

An example configuration:

```vim
nmap tlu (toggle-lsp-diag-underline)
nmap tls (toggle-lsp-diag-signs)
nmap tlv (toggle-lsp-diag-vtext)
nmap tlp (toggle-lsp-diag-update_in_insert)

nmap tld (toggle-lsp-diag)
nmap tldd (toggle-lsp-diag-default)
nmap tldo (toggle-lsp-diag-off)
nmap tldf (toggle-lsp-diag-on)
```

## Commands

The following commands are available:

`:ToggleDiag`
Toggle ALL diagnostics on/off

`:ToggleDiagDefault`
Toggle ALL diagnostics to their default

`:ToggleDiagOn`
Turn ALL diagnostics on

`:ToggleDiagOff`
Turn ALL diagnostics off