I've founded some items that were incorrectly highlight and some that are missing, i would like to share them and we will see how many of these could be fixed/added , i will also try my self to help on these.
Tested under: One Dark Pro (theme)
alias test1 {
echo -a IS: /load -rs $qt($script)
; the >> -rs << should not be highlighted
}
on *:close:#*: { echo -s IS: $1- }
; that event does not get highlight
on ^*:topic:%channels: { echo -a OK }
ON *:TOPIC:$($channels): { echo -a OK }
ctcp *:*:%channels: { echo -a OK }
ctcp *:*:$($channels): { echo -a OK }
; these event coding style does not get highlight
; its because >> :%channels: << and >> :$($channels): <<
on ^*:open:?:*$test*: { my_custom_command $1- }
; /my_custom_command does not get highlight
alias testme { echo -a IS: $(test) }
; the >> $ << does not get highlight on $()
alias test { echo -a IS $file($mircini).size }
; here it should highlight >> .size << and not only the $prop name (size), it should include also the '.' as already does '-' for flags (-whatever)
alias test2 { .timer[test] 1 5 echo mysignal $nick }
; here are 2
; 1 = the >> .timer[test] << the ']' should also be highlight because its the /timer name
; 2 = the >> echo << does not get highlight, it should because its a /command
alias test3 { echo -a IS: $+(%,variable) }
alias test4 { echo -a IS: $+($,alias) }
; here the >> % << and >> $ << inside the $() should get a highlight
alias test5 {
if ($(!) !isin %trusted) {
if ($left(%trusted,1) != *) %trusted = * $+ %trusted
%trusted = *! $+ %trusted
}
echo -a nothing
return $false
echo -a anything
/noop
}
; here for an unknown reason it stops highlighing after the if statement
alias test6 {
; if (%test) { echo ok }
; elseif (%test2) { echo ok2 }
if ($me) { echo -a ok }
echo -a Not getting highlight
}
; here if having some comment out lines that ending with '}' then it stops progressing the highlight on the rest code
alias test7 {
if ($1 isnum 1-600) { echo -a OK }
if ($1 isnum 601-) { echo -a OK }
}
; here the >> 1-600 << and >> 601 << numbers does not getting highlight
alias test8 {
goto next
noop
:next
noop
}
; here, i don't know if it is not yet supported but, >> :next << group should be highlight
alias test9 {
var %pattern = var %re /^(?:(https?)(?::\/\/))?([^\s\/]+)(.*)$/F
}
; here the regex pattern seems not getting a highlight, i am not sure if this is fully supported.
alias test10 { echo -a IS: $left(test,1-) }
; here the >> 1- << does not gets a highlight, as '-1' does
alias test11 { bset -ta &gif 61 +M8p47Eh4SAD4z9FkwqDh05tzOJ2LSsCGo52S7ByuHQYJLu1yghX7fkR8MiD }
; here the >> +M8p47Eh4SAD4z9FkwqDh05tzOJ2LSsCGo52S7ByuHQYJLu1yghX7fkR8MiD << should not get a highlight
alias test12 {
var %ticks = %ticks % 1000
%ticks = % 1000
}
; here the 2nd >> 1000 << number does not get highlight as 1st does with /var
alias test13 { scon -a debug -c off }
; here the >> debug << should get a highlight color because its a valid /command
ON !*:JOIN:#: { echo -a Channel is: # }
; here the >> # << does not get a highlight as it parsing, ok i know it could be '$chan' instead but some people keep using '#'
[ ] channel symbol to be treated as a special character/identifier
Notes:
We currently do not use a strict switches highlighting rule, we use a global rule so it takes into account commands that use switches that are separated by spaces and other arguments.
No documentation was found on having the channel symbol as a valid target on close event
Might not only be a problem for on topic because we use a non-variable/non-identifier friendly on the targets for events
Same as 3.
Currently grouped with the on close event, which does not require a matchtext argument
$() needs to be added as a valid identifier
To be consistent with the switches highlighting . should be added to the highlighting part
Unknown reason as to why it is not highlighting the last characters as the regex says to include non-space characters, might have to do with the (?=\b) flag
I do not agree with this as % and $ are not variables nor identifiers and should be treated as text only
Seems as if the if code block does not consume the } and the alias code block takes it
Single line comments are stopped when it finds a }
Highlighting number ranges is more of an enhancement rather than a bug
Same as 12.
Same as 12.
Same as 12.
Same as 1.
Unknown reason as to why is not highlighting the number, numbers are part of the constant group in the language file
Again, we are using more global rules to parse each command, we would need to add a specific rule for certain commands
Same as 12.
I believe we could split this issue into 2, one with all the bugs and another one with all the enhancements, as issues should take a different priority over enhancements.
Hello,
I've founded some items that were incorrectly highlight and some that are missing, i would like to share them and we will see how many of these could be fixed/added , i will also try my self to help on these.
Tested under:
One Dark Pro
(theme)