prompt: Syntax Highlighting in Prompt
Will require some seirous modifications to liner in order to get this to work. I'm insure of the best approach for implementing this feature at the moment. Regex or a parsing crate may be ideal. Solution needs to focus on performance though. The following needs to occur:
-
Color the command based on if the command exists or not -
Single quoted text should have a different color from double quoted text -
Operators should have their own unique colors -
Specific keywords should be highlighted, such as end
andif
-
Variables should also be highlighted -
Arrays should have a different color than variables -
Functions and aliases may also have different colors -
The coloring should be user-configurable and ideally match the grammar usage (in treesitter)