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

looks: when there is no file, display a single bar in the quickfix #33

Closed

Conversation

emmanueltouzery
Copy link

@emmanueltouzery emmanueltouzery commented Dec 23, 2024

it's really a question of aesthetics. i'm often dealing with quickfix lists not mapped to any files. in that case the display is

 |  |data

I find it ugly, so this changes it in that case to just:

  |data

I don't think we can do much better. If we don't put anything then vim puts || anyway, which is even worse. Maybe we could have a single leading space, maybe a space after the bar or something, but this seems quite diminishing returns. And a space after the bar will be visible on many configs which highlight trailing spaces. I think after this change, the display is good enough and to my eyes much better than with the double separator.

@github-actions github-actions bot requested a review from stevearc December 23, 2024 22:29
@emmanueltouzery
Copy link
Author

Although maybe using quickfix without any backing file may not be quite "the right way". If you think I'm holding it wrong, feel free to reject the pr of course.

@stevearc
Copy link
Owner

You're definitely not holding it wrong; this is a legitimate use case for quickfix. It's designed to store things like grep or LSP references results, but the original use case was to get the output of make and store the locations of error and also all the other random stdout from the process. When errorformat can't parse anything, you get a quickfix with no filenames that starts with ||.

I have a pending PR to completely redo the display (#32) that I'm going to merge soon. I added a commit to that which will do mostly the same thing as this PR. Give it a try and see if it works as expected for you.

@emmanueltouzery
Copy link
Author

great, thank you! i started testing the new branch, I think a trailing space is added if there is no text in the output:
image

i have configured neovim to display trailing spaces, so it'll a little distracting. but this is already much better!

@stevearc
Copy link
Owner

Great, I'll continue the development on that PR branch

@stevearc stevearc closed this Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants