-
-
Notifications
You must be signed in to change notification settings - Fork 426
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
Internal define configuration #3267
Conversation
a8681f7
to
9aa96eb
Compare
I see, so the idea is that we can add configuration for a given mode/class anywhere in the codebase? As an example, in this case, you are using it to add several default modes to a context-buffer? This allows us to remove the resolve-sym hack to add the default modes for a context-buffer? This also allows us to load our files in a more flexible order then? |
I am not sure about the distinction between |
So imagine we set up some modes in Nyxt. I'm already doing this in this PR. And imagine that the user sets up their modes too—in their config. So we have several hook handlers customizing
or the actually problematic:
So we need to somehow prevent Nyxt from running config before the user one. Mainly so that user config can easily override the defaults. That's why there's |
Yes, yes, yes, and yes. |
@aartaka I see. But all user instances of |
I am OK with the use if the |
You're totally right, I'm just being overly cautious about the order of application. It shouldn't be a problem in most of the cases, so I'll remove the |
|
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.
Good piece of work, as it simplifies the internal logic.
I've left some comments. Note that the branch needs to be rebased onto master.
8f92664
to
a56dd6a
Compare
Updated, rebased onto master, removed the changelog entry. Safe to merge (or just donate—it's a single commit now), I believe. |
By using define-configuration internally, modes can be appended from place where they're defined.
a56dd6a
to
7299a2f
Compare
Pushed with a minor commit message rephrasing. Thanks! |
Description
This allows for use of
define-configuration
in Nyxt code, making several things (define-modes
in particular) simpler to do. See the discussion in https://github.com/atlas-engineer/nyxt/pull/3199/files#r1344010508 for the potential problems usingdefine-configuration
internally would cause.Fixes #2877.
Checklist:
Everything in this checklist is required for each PR. Please do not approve a PR that does not have all of these items.
cd /path/to/nyxt/checkout git submodule add https://gitlab.common-lisp.net/nyxt/py-configparser _build/py-configparser
:documentation
s written in the aforementioned style. (It's OK to skip the docstring for really trivial parts.)changelog.lisp
with my changes if it's anything user-facing (new features, important bug fix, compatibility breakage).migration.lisp
entry for all compatibility-breaking changes.(asdf:test-system :nyxt)
and(asdf:test-system :nyxt/gi-gtk)
) and they pass.