-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
highlight individual line #175
Comments
Sounds good!
I'd prefer using a background color, but this could be problematic when using different (dark or light) themes, I guess.
Not sure, but we translate syntect style => ANSI style ourselves, so it should be easy to modify the style in the highlighted lines.
That would be problematic if no sidebar / no line-numbers are used. |
Related: trishume/syntect#198 |
The next syntect release will include the mentioned helper to modify line style. |
Looks likes syntec has a new release! https://github.com/trishume/syntect/releases |
See #345 |
Actually, I just realized that we might not need that helper function after all 😄. We never use background colors so far, so we can additional set them when we render to ANSI codes. I have implemented an initial prototype on the If someone wants to take this and turn it into a fully-working solution, that'd be greatly appreciated! There are a few things to work out:
|
#346 but I forgot about the full line highlight. Yeah at the moment it just does background with content. |
Released in v0.10.0. |
Now that bat supports displaying a range of lines I would like to have bat be able to highlight one line.
My use case has to do with utilizing bat as a preview command in a fuzzy finder like fzf or skim.
Here is what we can do currently with bat:
(I'm just using a copy of preview.sh I've put up here)
So how can or should this be done? Invert the colors of the line? Does syntec api have something that makes this easy? Or should we just manipulate the grid portion of the display like the line number or insert an arrow in that gutter?
Again I'd be happy to work on it but would like some input before I do.
The text was updated successfully, but these errors were encountered: