Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Live Reload #63

Open
WaywardWizard opened this issue Jan 20, 2025 · 2 comments
Open

Live Reload #63

WaywardWizard opened this issue Jan 20, 2025 · 2 comments

Comments

@WaywardWizard
Copy link

Thankyou for this nice tool.

Suggestion

Live update toggle for TUI

Usecase

When editing files in cuelang, jsonnet, dhall or similar that when evaluated emit JSON/YAML/, it is useful to see live updates.

@fioncat
Copy link
Owner

fioncat commented Jan 21, 2025

Thanks for your suggestion. Maybe provide a new action with the "R" key binding to trigger config reload manually?

@WaywardWizard
Copy link
Author

Thanks for your suggestion. Maybe provide a new action with the "R" key binding to trigger config reload manually?

Your welcome - that will work OK. If its possible to watch the source json file for changes then i think this is will be preferable as this would allow someone to be editing the source (.{cue,jsonnet,dhall}), compile it to a JSON (i have an automated action on write), and see the change reflected in otree. All without leaving their text editor. For example i have a nvim window where i edit, and an otree window next to it. The live feedback without needing to switch to otree to send the R key would make for a better workflow in my case.

"entr" is an external tool that could do what i am suggesting;

$ ls myfile.json | entr otree /_

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants