I am using Geany in Linux Mint Cinnamon and Kubuntu. What is needed to be modified please?
AFAIK it is not possible to disable brace highlighting, but you can change your `brace_good` and `brace_bad` styles to be the same as default, see https://www.geany.org/manual/current/index.html#id4
Thanks for the link, tried various combinations, until I realized that it can't be done, and the only current remedy is testing various themes until a comfortable combination is found. Otherwise, please put this on a wish list if there is one.
Closed #3555 as completed.
You can always edit the colour scheme yourself, say you like the "foobar" colour scheme except the brace highlight. Just copy `path_to_your_config/colorschemes/foobar.conf` to say `my_foobar.conf` and edit it to copy the `default` style to the `brace_good` and `brace_bad` lines, change the name to `my_foobar` save and then `View->Change Colour Scheme...->my_foobar` and although brace highlighting still happens the highlight is indistinguishable from the unhighlighted version. This WFM.
If you use the default colour scheme you need to edit filetypes.common `tools->Configuration Files..->filetypes.common` and do the same in the `[named_styles]` section (which heading you may need to uncomment unless you are using the latest Git Geany).
@elextr
You write in the comments above:
... it is not possible to disable brace highlighting.
... and although brace highlighting still happens the highlight is indistinguishable from the unhighlighted version.
If I understand you right, the highlighting can't be disabled, but one can change the values in that way, that one can't see the highlighting effect. Well, I tried so many things to disable brace/brackets, but I still can see brace highlighting.
I use Gedit as color scheme. This is the part of Gedit: ``` brace_good=#fff;#bebebe;true;false brace_bad=#fff;#f00;true;false ``` How should I change the values that I can't see brace highlighting? Thank you very much in advance for an answer.
I erased the two brace-lines from gedit.conf. Then I saved the document. I restarted Geany. When the zoom is 0%, then indeed I can't see brace highlighting. But in some zoom sizes (for example three times less than the maximum zoom) I can definitively see sometimes a change of the closing curly brackets and also the closing box brackets when moving with the arrow-keys. With other brackets, like for example round brackets or or angle brackets or the opening curly bracket, I don't see a change when changing the zoom size. So, my experience stands in contradiction to your statement:
... and although brace highlighting still happens the highlight is indistinguishable from the unhighlighted version.
@ralf3u 1. I said to set those styles to the value of the default style, not delete them. What happens with them deleted is undefined behaviour. The styles will still be applied[^1], but its unknown what their value will be, default or random uninitialised memory or what.
2. I said "This WFM" (works for me) not necessarily that I guaranteed it will be everyones experience.
3. you have provided no data to reproduce it, what font? what sizes? X11 or Wayland or some other platform, what version of Geany. So nobody can debug it.
[^1]: in this context a "style" is just a small number that indexes into a table of the actual values for the style, so it depends on what the table is initialised to (or not), it may not be your colourscheme default, it may be some global default, only the code knows.
Sorry, for my words, I typed 'WFM what means' in a search engine, and the answer was to that time 'workforce management'. So, there was a misunderstanding.
I copied pasted from the document filetypes.common, that is located in .config/geany/filedefs in gedit.conf those lines: ```` brace_good=0x0000ff;0xFFFFFF;true;false brace_bad=0xff0000;0xFFFFFF;true;false ```` The problem is then, that if my zoom is set to 0, then I can see highlighted curved brackets, highlighted box brackets and highlighted curly brackets (but not highlighted angle brackets). So, for me it is better when the two brace-lines are removed.
I use Geany 1.38 in Lubuntu 23.10 with no Wayland. The Font name is Liberation Mono, the Style is Normal and the Point size is 28.
Ahh, we have a miscommunication about "default", I mean the value of `default` a few lines above the `brace_good`/`brace_bad` lines, not the default value of the `brace_good`/`brace_bad` lines from `filetype.conf`. And if you are using a non-default colour scheme you need to set `brace_good`/`brace_bad` to the value of `default` in the colour scheme, not the global default since it is probably different from the colour scheme and you want the brace to look the same as default so you can't see them.
... I mean the value of default a few lines above the brace_good/brace_bad lines, ...
I found this in the document filetypes.common that is located in .config/geany/filedefs ``` default=0x000000;0xffffff;false;false ``` I copied and pasted the value of default in gedit.conf like this: ``` brace_good=0x000000;0xffffff;false;false brace_bad=0x000000;0xffffff;false;false
``` I saved the document. I closed Geany, and then I reopened Geany. I checked in the menu in View, Change Color Scheme if Gedit is the current color scheme. Then I made the test. The issue is not any more there when zoom is set to 0. But the issue is still there: In some zoom sizes (for example three times less than the maximum zoom or one time less than when the zoom is 0%) I can see sometimes a change of the closing curly bracket and also the closing box bracket when moving with the arrow-keys. With other brackets, like for example round brackets or or angle brackets or the opening curly bracket, I don't see a change when changing the zoom size. What I mean with "sometimes a change": It is not the highlighting effect, but I can see that for example that the vertical line of the closing box bracket becomes just a little bit smaller than before.
Could you please test if you can reproduce the issue? This is how the test goes:
Set the zoom to maximum. Then move with the left/right-arrow-keys three or four times through the closing box bracket to see if there is not a very small change. If not, then zoom out one time, and test again, ...
Do you see the issue?
No.
I said " if you are using a non-default colour scheme you need to set `brace_good`/`brace_bad` to the value of `default` in the colour scheme, not the global default". Since you are editing `gedit.conf` you need to use the value of default from `gedit.conf` not the value of `default` from `filetypes.common` (which is the default colour scheme).
The default default defaulted to the default default's default ... yeah, its confusing with all the defaults, but I don't know how to describe it better :grin:
Yes, now I understood. I'm sorry for that. I will test it again.
The issue is still there.
If I see the issue, but you don't, does that mean that I have to install Geany tarball to test the issue there?
I just tested also the color scheme Metallic Bottle. Before that, I did that: - I changed in metallic-bottle.conf the brace_good=-value and the brace_bad=-value like the default=-value of metallic-bottle.conf. - I saved the document. I changed to the color scheme Metallic Bottle. I closed Geany. I opened Geany again and checked if Metallic Bottele is the active color scheme.
The issue is also there in some zoom sizes.
I don't see any issue. Of course I don't have exactly the same system as you, and I'm using Geany 2.0.
If it only occurs at some zoom sizes it sounds like its an issue somewhere in the rendering stack, Scintilla, GTK, Pango, Harfbuzz, or the fonts, lots of moving parts.
It _might_ be worth trying Geany 2.0 but I can't guarantee anything, the only part of the render chain it changes is Scintilla.
Using Linux Mint Cinnamon, I blocked out the following lines in the "/usr/share/gtksourceview-3.0/styles/cobalt.xml" which eliminated my problem. If this would have been helpful, my apologies for not posting this solution ``` <!-- Bracket Matching <style name="bracket-match" background="steelblue3"/> <style name="bracket-mismatch" background="dark_red"/> --> ```
@ineuw not sure how that works since Geany does not use gtksourceview :confused:
In one of my comments I was somehow wrong with my information about the font. I wrote: `The Font name is Liberation Mono, the Style is Normal and the Point size is 28.` That is the font of my system, but not the font of Geany. The Font of Geany where I can see the issue is: Monospace Regular` size 27.
I changed in the Prerences of Geany in Interface, in Interface, in Editor the font from `Monospace Regular` size 27 to `Liberation Mono Regular` size 27. The issue does not occur any more, in all zoom sizes.
@ineuw not sure how that works since Geany does not use gtksourceview 😕
It is a mystery to me as well, but it works. Perhaps the link is made by Cinnamon's preferred text editor settings.
@elextr Could you please try my next comment to know if you see the issue?
Conditions These are the conditions to see the issue: In the Prerences in Interface, in Interface, in Editor, Font: `Monospace Regular` size 27 Color scheme: Gedit. gedit.conf: brace_good- and brace_bad-values like default-values of gedit.conf.
Issue In some zoom sizes (for example three times less than the maximum zoom or one time less than when the zoom is 0%) I can see sometimes a change of the closing curly bracket and also the closing box bracket when moving with the arrow-keys. With other brackets, like for example round brackets or or angle brackets or the opening curly bracket, I don't see a change when changing the zoom size. What I mean with "sometimes a change": It is not the highlighting effect, but for example I can see that the vertical line of the closing box bracket becomes just a little bit smaller than before.
Test This is how the test goes: Set the zoom to maximum. Then move with the left/right-arrow-keys three or four times through the closing box bracket to see if there is not a very small change. If not, then zoom out one time, and test again, ...
@ralf3u thank you for the detailed reproducer.
I do not see any change in the characters themselves, but what there is is a change in the background.
This is as instructed by the gedit theme (with the edits as above) because the `current_line` sets background to `#edeceb` but when the cursor gets to the the brace, the background is set by the `brace_good/brace_bad` to `#fff`, I'm not sure thats `#ffffff` or `#f0f0f0` :-S but its different to `#edeceb`.
So as I said in the first place, it can't be turned off, and have to add now that all the visual changes can't always be hidden, although they can be minimised, since the background of the line at the caret brace is `current_line` until the caret is beside the brace and if the other brace is on another line the background will be the `default` value, so one of them will change since the brace settings cannot have two values. Maybe you can minimise it by setting the brace backgrounds to in between.
As I said I don't see changes to the character, but with the characters enlarged that much, maybe what you are seeing is a change in anti-aliasing (which is blending the character colour with the background colour, which changes). That has had changes between the Scintilla in Geany 1.38 and 2.0. Or maybe there is something different in the versions stack of rendering software I listed above between your system and mine.
This is as instructed by the gedit theme (with the edits as above) because the current_line sets background to #edeceb but when the cursor gets to the the brace, the background is set by the brace_good/brace_bad to #fff, I'm not sure thats #ffffff or #f0f0f0 :-S but its different to #edeceb.
That was the problem! In gedit.conf, that is located in .config/geany/colorschemes/, I set current_line=#000;#edeceb;true to: current_line=#000;#fff;true In gedit.conf I set the brace_good=-value and the brace_bad=-value like the default=-vaule of gedit.conf, so these are my further settings: brace_good=#000;#fff;false;false brace_bad=#000;#fff;false;false I set the Font to Monospace Regular size 27 to verify the issue. I closed Geany, I opened Geany and I checked if Monospace Regular size 27 is active and if the color scheme Gedit is active. Then I made the tests. Now the issue does not appear any more in all zoom sizes.
Thank you so much for your help.
github-comments@lists.geany.org