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

Automatically Closing the Location List For Diagnostics #817

Closed
husainaloos opened this issue May 17, 2020 · 2 comments
Closed

Automatically Closing the Location List For Diagnostics #817

husainaloos opened this issue May 17, 2020 · 2 comments
Labels

Comments

@husainaloos
Copy link

Currently when Diagnostics command is run, a location list will be open. When these diagnostics are fixed in the code, running the command does not automatically close the location list. I suggest that the list should be automatically closed.

The code in question:

if empty(l:result)
call lsp#utils#error('No diagnostics results found')
else
echo 'Retrieved diagnostics results'
botright lopen

The suggested change is to use botright lwindow in both the if and the else (replacing botright lopen).

@stale
Copy link

stale bot commented Oct 17, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Oct 17, 2020
@stale stale bot closed this as completed Oct 25, 2020
@tshirtman
Copy link

Code has moved to

if empty(l:result)
call lsp#utils#error('No diagnostics results')
return
else
call setloclist(0, l:result)
echo 'Retrieved diagnostics results'
but still the same behavior. I changed that code locally to

    if empty(l:result)
        call lsp#utils#error('No diagnostics results')
    else
        echo 'Retrieved diagnostics results'
    endif
    call setloclist(0, l:result)
    botright lwindow

(lwindow didn’t close if the loclist wasn’t emptied)
and it works as i want it. I can make a MR for it.

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

No branches or pull requests

2 participants