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

Apply theme_index from configuration on startup #32

Merged
merged 1 commit into from
Jul 9, 2022

Conversation

iainh
Copy link
Contributor

@iainh iainh commented Jun 12, 2022

Currently the theme_index is always set to 0 on startup, regardless
of what is in the configuration file. theme_index is loaded on startup
however so apply it when creating the editor component.

Currently the `theme_index` is always set to `0` on startup, regardless
of what is in the configuration file. `theme_index` is loaded on startup
however so apply it when creating the editor component.
Copy link
Collaborator

@mcobzarenco mcobzarenco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR & sorry for being so slow! The "settings file" is really half-baked, as you can see there's not a lot to configure right now. I am working on changing this in #29 and making more things configurable (e.g. what tree sitter parsers are support, modes, key bindings etc.). In the meantime, we should get this fix in.

@mcobzarenco
Copy link
Collaborator

One thing I thought about is some sort of validation that theme_index is not out of bounds -- as that would just panic, saying "internal zee error", which isn't in this case. But given settings are being rewritten, I think it's fine as is.

@mcobzarenco mcobzarenco merged commit 4c8fbfe into zee-editor:master Jul 9, 2022
@iainh
Copy link
Contributor Author

iainh commented Jul 13, 2022

I actually have a working branch myself where I've been playing around with the highlight-with-queries branch changes as well so I completely understand that anything in settings.toml is ultimately temporary. Thanks for merging this one though, hopefully it is useful to someone in the interim.

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

Successfully merging this pull request may close these issues.

2 participants