hedyhli / outline.nvim

Code outline sidebar powered by LSP. Significantly enhanced & refactored fork of symbols-outline.nvim.
https://sr.ht/~hedy/outline.nvim
MIT License
543 stars 15 forks source link

expose highlight group for `auto_jump = true` #27

Closed gennaro-tedesco closed 9 months ago

gennaro-tedesco commented 9 months ago

Thank you very much for the great work you have been doing to revive symbols-outline: this plugin is awesome!

Is it possible to customise the highlight group of the code reference that one gets using (see README)

outline_window = {
  auto_jump = true,
},

namely when setting the above option, scrolling through the outline list of methods highlights the corresponding piece of code in the main buffer? If I understand correctly such highlight is currently defaulting to the Visual highlight group - would it be possible to expose it to the user to customise it? The reason is that one may like a "less invasive" highlight group to show when scrolling fast through the outline list (and in many neovim themes the visual highlight group stands out very much).

hedyhli commented 9 months ago

I agree with the reasoning. The highlight group as well as the duration of the highlight should also be customizable for a better experience.

I'm currently working on #23, will get to this as soon as that one's shipped 👍

hedyhli commented 9 months ago

https://github.com/hedyhli/outline.nvim/assets/50042066/cb453a8e-eccf-4b8a-943f-725ef31839ff

Let me know if you encounter any issues!

gennaro-tedesco commented 9 months ago

Thank you for working on it so fast!

Isn't the configuration option available via outline_window.winhl? If I set it up via command (like in your example) it works perfectly, if I specify it as an option it takes no effect (thus I suspect you didn't add it to the setup options?).

hedyhli commented 9 months ago

You can't use winhl for this because this highlight group is for code window and not for outline window :)

gennaro-tedesco commented 9 months ago

Aaaaah, of course! I will set it in the general options though, thank you!