I am using the Rainmeter lexer for INI files, but am wanting to change how it shows a Section. I really don't know anything about adjusting lexers though.
EG, currently, the Rainmeter lexer shows a Section in one of two ways.
1. A section named like this: [MySectionName] shows correctly, nicely highlighted easy to see when scanning through a file.
2. But, a section name like this: [My Section Name] or with any symbols in like this: [My-Section.Name] causes it to display as normal text with highlighted brackets and not in bold.
The lexer I used to use for INI files works better and always shows the Section name bold and highlighted.
Is there any way to adjust the Rainmeter lexer without affecting the rest of the highlighting options/settings?
Thanks
How to edit a lexer
How to edit a lexer
Last edited by sl23 on 11.09.2024 12:38, edited 1 time in total.
Live for an ideal and leave no place in the mind for anything else.
-
- Posts: 2236
- Joined: 25.08.2021 18:15
Re: How to edit a lexer
1. I fixed the Rainmeter lexer, it's updated in addons-manager.
changed regex for sections to simple: ^\[.+\]$
2. how to edit --
Lexers modification and creation
in the wiki https://wiki.freepascal.org/CudaText
changed regex for sections to simple: ^\[.+\]$
2. how to edit --
Lexers modification and creation
in the wiki https://wiki.freepascal.org/CudaText
Re: How to edit a lexer
Oh that's great thanks for that!
Live for an ideal and leave no place in the mind for anything else.
Re: How to edit a lexer
Hi Alexey, this has been working perfectly, until today I noticed that single words no longer show in bold or highlighted as they originally did. Sort of the opposite of what I was getting in the first post.
Would you be able to adjust to fix that please.
EDIT: No worries, there was a space after the closed square bracket! Sorry.
Would you be able to adjust to fix that please.
EDIT: No worries, there was a space after the closed square bracket! Sorry.
Live for an ideal and leave no place in the mind for anything else.
-
- Posts: 2236
- Joined: 25.08.2021 18:15
Re: How to edit a lexer
you are right, I fixed this regex again. to allow trailing spaces. updated the lexer.
Re: How to edit a lexer
Ah ok thanks for the fix!
Live for an ideal and leave no place in the mind for anything else.