It is currently March 29th, 2024, 2:13 pm

RainLexer 2.20.0 (syntax highlighter for Notepad++)

Plugins and Addons popular with the Community
oZone
Posts: 154
Joined: May 14th, 2018, 4:46 pm

Re: RainLexer 2.5.0 (syntax highlighter for Notepad++)

Post by oZone »

jsmorley wrote: November 23rd, 2019, 10:12 pm Yeah, I think the number highlighting might need some more work at some point. I wonder if you could do the 1) and 2) stuff separately so I can get them in?
I have some backup files, but there may be some other modifications. But those should be versions before I started using plugin template.

only updates
files removed

updates + number highligts
files removed

If they won't work I will use original source code and update it later.
Last edited by oZone on November 27th, 2019, 7:10 pm, edited 2 times in total.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: RainLexer 2.5.0 (syntax highlighter for Notepad++)

Post by jsmorley »

Thanks, I'll give the first one a go...

As to the number highlighting thing, I'm not really in favor of it. I really don't think there is any logical way to create "rules" for it that make sense. There can be numbers anywhere in any part of the "value" of an option, and sometimes they make sense as a distinct number, and sometimes they really don't. Looking at what you have now, it just seems sorta arbitrary and doesn't really do what color-coding is primarily intended for, to draw your eyes to distinct elements, making the code easier to read and follow.

I can see highlighting numbers when they are being used as a number value in a numeric option, but don't see it when they are being used as a string in a textual option for instance. In Rainmeter, those are tricky to distinguish...
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: RainLexer 2.5.0 (syntax highlighter for Notepad++)

Post by jsmorley »

Guess what I'm getting at is like this:

FontSize=11
X=22R
ToolTipIcon=#ImagePath#MyIcon48.ico

See what I mean? I have no interest in "48" being highlighted, that is just hideously confusing. Rainmeter has just boatloads of examples like this.
oZone
Posts: 154
Joined: May 14th, 2018, 4:46 pm

Re: RainLexer 2.5.0 (syntax highlighter for Notepad++)

Post by oZone »

jsmorley wrote: November 24th, 2019, 1:11 pm Thanks, I'll give the first one a go...

As to the number highlighting thing, I'm not really in favor of it. I really don't think there is any logical way to create "rules" for it that make sense. There can be numbers anywhere in any part of the "value" of an option, and sometimes they make sense as a distinct number, and sometimes they really don't. Looking at what you have now, it just seems sorta arbitrary and doesn't really do what color-coding is primarily intended for, to draw your eyes to distinct elements, making the code easier to read and follow.
For me it's very helpful as I can easily identify part of code in option with long line e.g. in shape option or action option with several bangs.
I think it depends on user.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: RainLexer 2.5.0 (syntax highlighter for Notepad++)

Post by jsmorley »

oZone wrote: November 24th, 2019, 1:23 pm For me it's very helpful as I can easily identify part of code in option with long line e.g. in shape option or action option with several bangs.
I think it depends on user.
I understand. I'll be interested in seeing if you can come up with and implement something with some "rules" that make sense. At first glance, it seems like a bit of a challenge to me.
oZone
Posts: 154
Joined: May 14th, 2018, 4:46 pm

Re: RainLexer 2.5.0 (syntax highlighter for Notepad++)

Post by oZone »

jsmorley wrote: November 24th, 2019, 1:22 pm Guess what I'm getting at is like this:

FontSize=11
ToolTipIcon=#ImagePath#MyIcon48.ico

See what I mean? I have no interest in "48" being highlighted, that is just hideously confusing. Rainmeter has just boatloads of examples like this.
"48" should not be highlighted. I tried to make that only numerical values are highlighted. It's not perfect, if user try to write 48meter, meter-8-cpu, 4.8.6, ... these will be highlighted.
jsmorley wrote: November 24th, 2019, 1:27 pm I understand. I'll be interested in seeing if you can come up with and implement something with some "rules" that make sense. At first glance, it seems like a bit of a challenge to me.
It is. I would need to completely rewrite lex function, but because I don't have skill and mainly time I can't do it now.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: RainLexer 2.5.0 (syntax highlighter for Notepad++)

Post by jsmorley »

Make no mistake, I really appreciate what you have done for this so far. You are a lifesaver!
oZone
Posts: 154
Joined: May 14th, 2018, 4:46 pm

Re: RainLexer 2.5.0 (syntax highlighter for Notepad++)

Post by oZone »

Some small fixes which backup files didn't have.

fixes:
1) some EOF/EOL situation
2) duplicate headers in Lexer.h
3) include .vs folder in .gitignore

files removed

@jsmorley could you delete some files from repository: PluginDefinition.cpp and PluginDefinition.h are from plugin template version and are not needed, also maybe .vs folder
Last edited by oZone on November 27th, 2019, 7:52 pm, edited 2 times in total.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: RainLexer 2.6.0 (syntax highlighter for Notepad++)

Post by jsmorley »

oZone
Posts: 154
Joined: May 14th, 2018, 4:46 pm

Re: RainLexer 2.6.0 (syntax highlighter for Notepad++)

Post by oZone »

Some updates and fixes.
1)Updated Notedpad++ header files. Looking through code, changes are mainly cosmetics.
2)Fixed RainLexer.sln, it had wrong EOL (lf instead of crlf). Updated it to VS2019 (Visual Studio Version 16).
3)Change RainLexer.vcxproj ToolsVersion="16.0" to ToolsVersion="Current".
Documentation, Related
4)Change RainLexer.vcxproj.filter ToolsVersion="16.0" to ToolsVersion="4.0".
*.vcxproj.filter files are used only by IDE and not msbuild so I changed to it default value
(same value is generated even in latest Visual Studio 2019).

These changes are mainly cosmetics.
RainLexer updates
File Removed


I noticed that people are dowloading my version with number highlight, so I have updated it.
It is based on 2.6.0 version with updates described above.
zip file contains only relevant source code (get missing files from official version),
modified RainLexer.xml and pre-built DLL.
File Removed


btw
Rainmeter source code also has same issue with project files.
Here is zip file with modified project files based on documention and VS2019 generated project files.
File Removed
Last edited by oZone on December 14th, 2019, 2:11 pm, edited 1 time in total.