-
Notifications
You must be signed in to change notification settings - Fork 15
Add the option to show diagnostics in the echo area #10
Comments
Hmm I'll try to see if it's possible, but having will having 50-70 lines in echo area help? Just curious though. Also I'm working on some custom preview in completion-nvim inspired by ncm, will this be a better place to show diagnostics? Let me know what you think:) |
Do you mean the Maybe if implementing diagnostic messages in the echo area is too much work, would it instead be possible to show a popup window when hovering the cursors over the offending text, instead of having to use the NextDiagnostic and PrevDiagnostic commands? I can open a new issue and close this one if you like? |
Actually implement it in echo area is definitely possible, but that could lead to various issues. For one example, if the echo area exceed one line it would requires you to press enter to continue editing, which will also be distracting. let g:diagnostic_auto_popup_while_jump = 1 and trigger the line diagnostic with a mapping instead. nnoremap <leader>d <cmd>lua vim.lsp.util.show_line_diagnostics()<CR> |
Thanks for the suggestion, but running let g:diagnostic_auto_popup_while_jump = 1
" let g:diagnostic_enable_virtual_text = 0
" let g:diagnostic_insert_delay = 0
" let g:diagnostic_level = 'Information'
" let g:space_before_virtual_text = 2 |
Oh my fault, first of all you should use nnoremap <leader>d <cmd>lua require'diagnostic.util'.show_line_diagnostics()<CR> I should put this in README though. |
For those like me who found this issue by searching, I believe that last comment is out of date. However, the mapping mentioned earlier works:
|
Hi,
Great work with this plugin, your plugins have quickyl become an essential part of my setup! :)
Would it be possible to add the ability to show diagnostics in the echo area, ala https://github.com/Shougo/echodoc.vim ?
I find popups annoying because they obstruct my code and get in the way, and virtual text is also quite jarring and looks silly when chatty languages like Rust attempt to show errors that are 50-70 characters long and they end up going off screen. Especially when I have splits open, the error messages can be quite useless because they show nothing of use before getting cut off.
The echo area seems like the ideal place to show diagnostics to me, and I'm surprised more plugins don't use it.
Thanks.
The text was updated successfully, but these errors were encountered: