stevearc / qf_helper.nvim

A collection of improvements for the quickfix buffer
MIT License
98 stars 1 forks source link

Suggestion: Use a cursorline alternative for highlighting the cursor line #10

Open ColinKennedy opened 1 year ago

ColinKennedy commented 1 year ago

From what I can see, poking around in the source code, track_location = true uses cursor positioning in order to highlight the nearest line entry. For colorschemes that like to highlight the current line number (CursorLineNr) but not the current line (CursorLine), this means that the tracked line is invisible even when track_location = true.

As an alternative, would you be up for a PR to replace the cursorline logic with vim.api.nvim_buf_set_extmark? That would give the most amount of control. For backwards compatibility, we could link the highlight group of vim.api.nvim_buf_set_extmark to CursorLine so current users are visually unaffected but then others like myself can override the custom highlight group for extmark to something else

stevearc commented 11 months ago

Yeah, I'd be open to reviewing a PR for that