-
Notifications
You must be signed in to change notification settings - Fork 50
refactor: better state management #102
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
base: main
Are you sure you want to change the base?
Conversation
lua/fff/state.lua
Outdated
| M = { | ||
| initialized = false, | ||
| last_scan_time = 0, | ||
| config = { |
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.
can we have the default config isolted somewhere so it is easy to link this from the readme
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.
Moved the default config into its own variable in the file.
dmtrKovalenko
left a comment
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 doing this. This is huge, I was always delaying writing the type defs for all the state and configuration
5689ef1 to
7e4ac6a
Compare
|
Merged main into this branch. Fixed conflicts. |
Attempt to standardise state management by refactor state management into its own module, and add type hints for the state table. This makes it easier to add additional fields to the state later on.
Also fixed a few places where the user config is not being respected.