Implement Syntax Highlighting for --inspect#131
Conversation
|
Cool. What is the change in the binary size? And compilation time? Please measure before/after for a release target |
|
Binary Size: 1.8x
Compile Time: 2.3x D:
Execution time: 4.3x 😔
This seems like a terrible change haha. I'm brainstorming on possible solutions. |
|
Perhaps the highlighting could be locked behind a flag to ensure |
|
Upon benchmarking it seems the latest commit has not helped with the previously found issues. I think I will have this feature on my fork (for my NixOS config). If something comes to mind, I shall implement and test. |
|
Thanks for checking. I think it's probably not worth it then. If there's a flag for it, it's probably easier to just run |
Implemented syntax highlighting for the
--inspectflag, fix #130This PR will change the behavior of the
--inspectflag. In addition to printing a preview, it will now also syntax highlight the preview using syntect. This crate is used by several projects like bat, delta, yazi and ...many more.Here is a showcase of the change



Here, with varying themes (tested on windows)


All tests pass on my machine running NixOS on WSL.

It is to note that tests do NOT pass on Windows, even on
master: