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

How to bind the cursorline to the current item in quickfix list like in the videos #23

Closed
231tr0n opened this issue Aug 22, 2024 · 6 comments

Comments

@231tr0n
Copy link

231tr0n commented Aug 22, 2024

Hi stevearc!! Thank you for this amazing plugin. I was trying it out and found few things out which I wanted to clarify about:-

  1. Moving cursor inside the quickfix does not move the current selected item of the quickfix list along with it like it does in your demo. What do you think I might be doing wrong here for it to not happen? image
  2. In the same picture above, first level indentations are given only 1 space rather than 2 even though my tabstop is 2. Is it possible for all the lines to be of same indentation.
@serranomorante
Copy link
Contributor

serranomorante commented Sep 8, 2024

Hi! about cursorline, I have this in nvim/syntax/qf.vim. It might help:

if exists('b:current_syntax')
    finish
endif

setlocal cursorline
setlocal cursorlineopt=line

let b:current_syntax = 'qf'

If you have syntax off you might need to enable syntax for qf filetypes.

@231tr0n
Copy link
Author

231tr0n commented Sep 8, 2024

Hi! about cursorline, I have this in nvim/syntax/qf.vim. It might help:

if exists('b:current_syntax')
    finish
endif

setlocal cursorline
setlocal cursorlineopt=line

let b:current_syntax = 'qf'

If you have syntax off you might need to enable syntax for qf filetypes.

Hi! Thank you for responding. Let me check if it works.

@231tr0n
Copy link
Author

231tr0n commented Sep 8, 2024

Hi! about cursorline, I have this in nvim/syntax/qf.vim. It might help:

if exists('b:current_syntax')
    finish
endif

setlocal cursorline
setlocal cursorlineopt=line

let b:current_syntax = 'qf'

If you have syntax off you might need to enable syntax for qf filetypes.

@serranomorante apparantly it does not work as it was in the videos with the options you provided. I read the help file for the options which you suggested and I think it changes how cursorline highlighting works ig. But I dont think it will bind the cursor to the current quickfix item afaik.

@serranomorante
Copy link
Contributor

The snippet I provided will add a highlight to your cursor as you navigate (to better identify the highlighted row), but it don't actually selects any quickfix item. You mean moving the cursor should also change the selected buffer (outside the quickfix list) live?

qf-cursorline-2024-09-08_19.11.26.webm

@231tr0n
Copy link
Author

231tr0n commented Sep 8, 2024

The snippet I provided will add a highlight to your cursor as you navigate (to better identify the highlighted row), but it don't actually selects any quickfix item. You mean moving the cursor should also change the selected buffer (outside the quickfix list) live?
qf-cursorline-2024-09-08_19.11.26.webm

No I meant moving the cursor should change the selected item in the quickfix list along with it as shown in the video

@stevearc
Copy link
Owner

In the video I was actually using my old quickfix plugin for having the cursor follow along. That plugin was a little janky, not very featureful, and is deprecated now. For a while quicker.nvim did not have the feature to scroll the quickfix window to the closest item, but I have just added it! Set follow.enabled = true when you call setup().

As for the indentation, I've also recently provided some more configuration via the trim_leading_whitespace option. You can opt for conform to remove all the leading whitespace, none of it, or only the amount of leading whitespace shared among all the results from the same file (the default option).

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

No branches or pull requests

3 participants