Skip to content

Add manpage syntax highlighting support#9

Merged
arrrgi merged 1 commit intorose-pine:mainfrom
simono:fix/manpage-highlighting
Mar 7, 2026
Merged

Add manpage syntax highlighting support#9
arrrgi merged 1 commit intorose-pine:mainfrom
simono:fix/manpage-highlighting

Conversation

@simono
Copy link
Contributor

@simono simono commented Mar 7, 2026

Man pages rendered via bat -lman lack syntax highlighting because the theme is missing scopes that bat's man page syntax definition emits.

This adds:

  • entity.name to the class name rule — colors bold command/function names
  • markup.heading as a new rule — styles section headers (NAME, SYNOPSIS, etc.)

Equivalent fixes were applied to bat's bundled themes in sharkdp/bat#2994.

Add `entity.name` scope for command/function names and `markup.heading`
scope for section headers (NAME, SYNOPSIS, DESCRIPTION, etc.).

See sharkdp/bat#2994 for the equivalent fix applied to bat's bundled
themes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
simono added a commit to simono/dotfiles that referenced this pull request Mar 7, 2026
The Solarized theme override for man pages is no longer needed now that
the upstream Rosé Pine tmTheme includes manpage scopes. MANPAGER is no
longer theme-dependent, so move it to bat.fish.

See rose-pine/tm-theme#9.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@arrrgi
Copy link
Collaborator

arrrgi commented Mar 7, 2026

Thanks for the submission @simono

Could you please share before/after screenshots as part of your PR?

@simono
Copy link
Contributor Author

simono commented Mar 7, 2026

Thanks for the submission @simono

Could you please share before/after screenshots as part of your PR?

Thanks for the review @arrrgi. Sure, here are three screenshots.

man with bat's builtin Solarized Theme

solarized

man with Rosé Pine without this Patch

orig

man with Rosé Pine with this Patch

patched

simono added a commit to simono/dotfiles that referenced this pull request Mar 7, 2026
The Solarized theme override for man pages is no longer needed now that
the upstream Rosé Pine tmTheme includes manpage scopes. MANPAGER is no
longer theme-dependent, so move it to bat.fish.

See rose-pine/tm-theme#9.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@arrrgi arrrgi merged commit 23bb25b into rose-pine:main Mar 7, 2026
@simono simono deleted the fix/manpage-highlighting branch March 8, 2026 08:53
simono added a commit to simono/dotfiles that referenced this pull request Mar 9, 2026
The Solarized theme override for man pages is no longer needed now that
the upstream Rosé Pine tmTheme includes manpage scopes. MANPAGER is no
longer theme-dependent, so move it to bat.fish.

See rose-pine/tm-theme#9.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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