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

Small inconsistency with property files (*.ini) #1220

Closed
Heihon opened this issue Sep 9, 2016 · 3 comments
Closed

Small inconsistency with property files (*.ini) #1220

Heihon opened this issue Sep 9, 2016 · 3 comments

Comments

@Heihon
Copy link

Heihon commented Sep 9, 2016

Geany 1.28 Release (Windows and Linux) and Geany 1.29 and I think also Geany 1.27 and before

Lines that start with ';' are syntax highlighted as comment.
Lines that start with '#' are syntax highlighted as comment.
An entry "key=value" in a line starting with ';' is shown in the symbols list.
An entry "key=value" in a line starting with '#' is not shown in the symbols list.

I attached a small test file test.ini, but I had to rename it to test.ini.txt because github refused to upload test.ini
test.ini.txt

@codebrainz
Copy link
Member

With the default settings, ; shouldn't be highlighted as a comment (we even tell it to use # as the comment start). I guess the syntax highlighter must have it hard-coded inside to always support Windows-style ; comments.

@elextr
Copy link
Member

elextr commented Sep 10, 2016

The highlighting of comments is the Scintilla lexer, which highlights several similar versions of properties files and is hard coded to use #, ! and ; for comments. There is not way to change that without changing Scintilla, which is a separate project from Geany, you can raise a request here. But since all such properties files tend to use the extensions .ini, .conf etc interchangably its hard to tell them apart and I suggest it should remain general despite the fact that an occasional error may occur in highlighting.

The symbol parser is hard coded to use # and // as comments. There is no way of changing that without changing the ctags parser. The parsers mostly come from the universal-ctags project. The Geany one is the parent of the uctags one, but that has been changed to look for ; as well. There is an ongoing exercise to align Geany's parsers with uctags. @techee, maybe this should be added to the TODO list if it isn't already.

@techee
Copy link
Member

techee commented Jan 2, 2022

Seems to be fixed with the updated parser.

@techee techee closed this as completed Jan 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants