-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
Add support for automatic reloading the config when it has been changed (based on #50) #69
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for cleaning this up! Left a few more remarks.
A general note: file watching is difficult and I fear there's a bit more work required to make this work universally. Depending on the editor you use to edit a Solving this is tricky: you'll have to watch the entire directory the |
I'm not sure which editors this would be a problem for, only been testing on nvim and it seems to work very consistently. Did a test autoincrementing a number 250 times (mostly to check that we're not leaking on reload), and seemed to reload consistently every time. An idea to address this issue could be adding a small delay (50-100ms?) (incremented every new event) before saving? |
256213a
to
317c797
Compare
… be closed on deck change
317c797
to
e035729
Compare
I guess there's no interest in progressing this PR so I will just close it. |
Yeah, to be honest I'm not sure it's worth properly solving this. It would require a bunch of nasty code with tons of (platform and filesystem specific) edge-cases. Thanks for looking into it, tho! |
Automatic reloading is very useful, and I've been using it locally, but #50 seems to be abandoned, so I forked it and tried to address the remaining review comments.