-
-
Notifications
You must be signed in to change notification settings - Fork 112
Disable-able Syntax Highlighting Preference #1664
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
Conversation
|
Also, I see that the build fails, but I am not sure if it has anything to do with my changes. |
|
Funnily enough I just started work on this. I have pushed work for info. Your PR looks more elegant but does it listen to changes in the setting? |
|
There seems to be an issue with Flatpak CI. Not sure why - it doesn't seem to be associated with the project code though. I can build a Flatpak OK locally so I am ignoring it for now. |
|
I'll let you complete your PR as you started first and look like you're on the right lines. |
|
I guess it is all I have :) It already picks up live preference changes. See So, I have tested the implementation on my current build, and it works for me. |
|
@lobre You are right. The problem with this function I've noticed is that all the settings are restored when any one of them changes. Also there are several places around the code base where different classes monitor specific settings which this function also monitors so things get called twice. I think that for this PR we can leave things as they are but we probably need to have a review of settings handling at some point. It would seem |
jeremypw
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.
Works as expected - lets go!
Makes sense effectively, thank you again for the merge! |
Hey,
I have tried to answer my self-created issue:
#1659
As a sum-up, I have added a new syntax-highlighting GSettings key plus a toggle under
Preferences -> Interfaceso users who prefer monochrome editing can disable highlighting globally while leaving the existing language picker active for commenting, Markdown shortcuts, etc.The SourceView simply toggles
Gtk.SourceBuffer.highlight_syntax, so search hits and other non-language effects keep working, and the language dropdown now says "Document language" to better reflect its broader role.Happy to adjust any of this if you think there is a better way to expose the preference, or if there is anything with the implementation.