seblj / nvim-echo-diagnostics

Echo diagnostics from nvim-lspconfig

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nvim-echo-diagnostics

This plugin uses nvim-lspconfig, and provides functions to echo the entire message.

Installation

packer.nvim

use 'seblj/nvim-echo-diagnostics'
use 'neovim/nvim-lspconfig'

vim-plug

call plug#begin()

Plug 'seblj/nvim-echo-diagnostics'
Plug 'neovim/nvim-lspconfig'

call plug#end()

Setup

require("echo-diagnostics").setup{
    show_diagnostic_number = true,
    show_diagnostic_source = false,
}

Usage

You can now utilize the functions to echo the entire message or a message that fits in the commandline based on set cmdheight

" NOTE: You should consider setting updatetime to less than default.
" This could be set with `set updatetime=300`
" This will echo the diagnostics on CursorHold, and will also consider cmdheight
autocmd CursorHold * lua require('echo-diagnostics').echo_line_diagnostic()

" This will echo the entire diagnostic message.
" Should prompt you with Press ENTER or type command to continue.

nnoremap <leader>cd <cmd>lua require("echo-diagnostics").echo_entire_diagnostic()<CR>

About

Echo diagnostics from nvim-lspconfig

License:MIT License


Languages

Language:Lua 100.0%