Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display virtualtext on each error/warning, not only current #2446

Open
GoldsteinE opened this issue Dec 23, 2019 · 8 comments
Open

Display virtualtext on each error/warning, not only current #2446

GoldsteinE opened this issue Dec 23, 2019 · 8 comments

Comments

@GoldsteinE
Copy link

Subj. Internal NeoVim's LSP client shows virtualtext descriptions on each warning, so it should be possible.

@blueyed
Copy link
Member

blueyed commented Dec 23, 2019

You can try to call :call neomake#virtualtext#show_errors() manually.
I've thought for it to be less distracting to only display the current error.

@GoldsteinE
Copy link
Author

:call neomake#virtualtext#show() works nice, thanks!
It would be cool if it was avialable as built-in option. Maybe I'll send a PR.

@blueyed
Copy link
Member

blueyed commented Dec 23, 2019

Cool. It could be done by changing neomake#virtualtext#displayhandle_current_error to display all errors then maybe. But it seems not trivial to refactor / change this.
And I'd rather use popup / floating windows instead then, which allows to display more information and for positioning them, deprecating/removing virtualtext support then.

@GoldsteinE
Copy link
Author

I added this to my vimrc:

autocmd User NeomakeJobFinished silent call neomake#virtualtext#hide() | call neomake#virtualtext#show()

but it doesn't show info messages.
One big usecase for virtualtext on all diagnostics is messages referring other messages, like this:
image

@GoldsteinE
Copy link
Author

UPD: it's probably not because of message type, but because clangcheck entry doesn't contain bufnr.

@blueyed
Copy link
Member

blueyed commented Dec 23, 2019

UPD: it's probably not because of message type, but because clangcheck entry doesn't contain bufnr.

Yeah. Check the output of :echo getloclist(0) to see where the entries differ - if there's an entry for the "previous definition is here" message after all.

I think you might be better off using LSP for this in general (only) for now.

@GoldsteinE
Copy link
Author

Seems like only first message is shown
image

@FelipeLema
Copy link

you may want to check out https://codeberg.org/FelipeLema/neomake-diagnostics.nvim if provided solutions do not seem enough

xref #2554 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants