[Geany-Users] Override comment_single in custom filetypes.xres.conf
D.T.
ohnonot-github at xxxxx
Sun Aug 30 13:24:01 UTC 2020
Hello,
I have been struggling with this for a couple of hours, mostly reading
https://geany.org/manual/index.html#custom-filetypes to no avail, now
it's time to ask for your help!
I have a rather simplistic custom filetype for Xresources files:
[styling]
default=default
comment=comment
section=tag
key=attribute
assignment=operator
defval=value
[lexer_properties]
lexer.props.allow.initial.spaces=0
[settings]
extension=xres
mime_type=text/x-xres
lexer_filetype=Conf
wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234
56789#
comment_single=!
It works well enough; the only aspect where it differs from the Conf
filetype is that comments start with a '!', not with a '#'.
This works well enough, but not with #include directives that are also
valid Xresources syntax.
How can I tell geany to see _only_ lines starting with '!' as comments?
Currently it treats lines starting with '!' and '#' both as comments.
Additional bonus: customised syntax highlighting for #include
directives. Example:
#include </path/to/includes/X.xres>
Thanks for a great lightweight IDE!
o.
More information about the Users
mailing list