How to override one specific color of a scheme ? #6061
-
What Operating System(s) are you running on?Windows Which Wayland compositor or X11 Window manager(s) are you using?No response WezTerm versionwezterm 20240203-110809-5046fc22 Ask your question!I am aware that ... local wezterm = require 'wezterm'
local scheme = wezterm.color.get_builtin_schemes()['Gruvbox Light']
scheme.background = 'red'
return {
color_schemes = {
-- Override the builtin Gruvbox Light scheme with our modification.
['Gruvbox Light'] = scheme,
-- We can also give it a different name if we don't want to override
-- the default
['Gruvbox Red'] = scheme,
},
color_scheme = 'Gruvbox Light',
} ... Is a thing but it does not seem to cover my use case at all. How do I change a value in the scheme that is associated with a specific syntax higlight ? Like change the color of whatever highlight group would be assigned for pwsh args like -Recurse or -Force ? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
I think you are confused, a terminal like wezterm has no knowledge of what is being displayed and does not have syntax highlight groups, it just knows about cells and their current color based on what the running program told the terminal how these cells should be printed at the time. So in this case it is Powershell that defines that some part of its output should be colored in X color, and when printing a folder name for example powershell just tells the terminal "for the next stuff I print, color it in that specific blue", then after the name powershell tells the terminal "for the next stuff, reset the color". I'd suggest you look into configuration of Powershell if you want to change how the output is colored. (hopefully it helps you see the difference, don't hesitate to ask further question) |
Beta Was this translation helpful? Give feedback.
-
Oh okay I was applying a flawed logic to this. Thanks a lot for pointing it out ! So these are the value I want to change right: OperatorColor : "`e[90m"
ParameterColor : "`e[90m" Which afaik are the ones who correspond to "bright black" ? Will look into replacing these values only for my current theme and report. |
Beta Was this translation helpful? Give feedback.
-
Out of interest, why not use
without needing to involve wezterm? |
Beta Was this translation helpful? Give feedback.
Ok so figured it out. For someone else who would want to do this...
get-PSReadLineOption
in pwsh will show you the ansi espace codes for the associated powershell syntax. (Same output as above)We can then set cherry picked colors this way:
And if you want custom tab colors, like I do too, I think we then have to use: