mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 03:04:57 +02:00
enable theming of the command line syntax (#3606)
* enable theming of the command line syntax * added missing flatshape, sorted flatshapes for easier reading. * sorted flat shapes again and saved it this time * added sample rwb.json syntax them file to docs
This commit is contained in:
@ -84,7 +84,12 @@ impl rustyline::highlight::Highlighter for Helper {
|
||||
}
|
||||
|
||||
fn highlight<'l>(&self, line: &'l str, _pos: usize) -> Cow<'l, str> {
|
||||
Painter::paint_string(line, &self.context.scope, &DefaultPalette {})
|
||||
let cfg = &self.context.configs.lock();
|
||||
if let Some(palette) = &cfg.syntax_config {
|
||||
Painter::paint_string(line, &self.context.scope, palette)
|
||||
} else {
|
||||
Painter::paint_string(line, &self.context.scope, &DefaultPalette {})
|
||||
}
|
||||
}
|
||||
|
||||
fn highlight_char(&self, _line: &str, _pos: usize) -> bool {
|
||||
|
Reference in New Issue
Block a user