I'am glad to share with you my little experiment of writing lexers, it's was such funny so i decided share the result with community :)
Meet Pigment! It may be useful for writing internal/personal scripts require showing the JSON data, when you faced with lack of flexibility of existing libs (not all support custom color themes, styling - bold, underline etc) or no need all their features (e.g. huge lib which can be colorize 20+ different data format, but you need only the one - json).
> This is project was created when I needed something like REPL for http request in terminal, there are many great tools exist: Postman, Insomnia, httpie, curl etc but i wanted something little bit different, something lightweight, simple and fast, something like REPL when I can quickly modify request, send it and see the response with all the details. I wanted such utility with minimal magic, ideally without any black magic under the hood.
> The project has no ambitious goals. It is not killer of Postman or httpie or curl. I hope you may find it useful.
Hello! First of all, I'm glad to say you thank for feedback!
> Like I don't see how the author proposes Enter for navigating in the parameters but no way to get back when you want to edit something you've went before.
Current key bindings for navigation:
Shift+right next item
Shift+left prev item
Enter set value (and move to the next one)
In demo I used Enter for moving because vhs doesn't support shift+right/left combinations, also there is historical reason of use enter - bubbletea examples =)
Anyway the current key bindings is not ideal, I'd say more: it may conflict with particular terminal key bindings of someone who has the same key binding for another things, so to solve this problem I want make all them configurable like I did recently for colors - every color value may be overridden in config, I want the same for key bindings.
I'am glad to share with you my little experiment of writing lexers, it's was such funny so i decided share the result with community :)
Meet Pigment! It may be useful for writing internal/personal scripts require showing the JSON data, when you faced with lack of flexibility of existing libs (not all support custom color themes, styling - bold, underline etc) or no need all their features (e.g. huge lib which can be colorize 20+ different data format, but you need only the one - json).
Demo: https://imgur.com/ojdMg7W Project home: https://github.com/1buran/pigment