You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an example of semantic highlighting: requires scanning prior source code and collecting constant symbols. Can be CPU consuming. Other elements get coloring purely after their syntax.
The editor will rescan the document on open and save events. If you added or removed a new constant, it won't be reflecting in highlighting until you save the document. It saves a lot of resources on background scanning.
variable type keywords (int, float, string) highlighted in bold as keywords
shorter form variables highlighted as regular variables
constants highlighted after their value (numbers/variables/strings) - this one is quite controversial, I'd probably stick to a single color, blue for example
I think it should be unified into one color. In addition, I think blue is not very good. @x87 Can I modify the highlight color by myself in the menu settings?
@x87 I did a highlight test for the new version. There is no problem with the highlighting of the declared data type (int float). However, the highlighting of const_end does not support the highlighting of hexadecimal data names:
RsGlobal = 0x009B48D8
Another strange question. It seems that for some cleo I wrote before, I opened the source code txt with SB, const will not be highlighted, even if I modify and save them, it still will not be highlighted. I noticed that the language service status of the lower display panel is "Disabled" , To be honest, I don't understand its meaning too much, but this kind of txt will not be highlighted.
An additional question: highlighting will only be displayed after the file is saved. This seems inconvenient to write. Shouldn't this be your final plan? Is it possible to highlight when writing?
I noticed that the language service status of the lower display panel is "Disabled"
Interesting. Do you have any Unicode characters in the opened file path? Do you have Language service enabled in the options (F10->Editor tab).
An additional question: highlighting will only be displayed after the file is saved. This seems inconvenient to write. Shouldn't this be your final plan? Is it possible to highlight when writing?
That was my initial plan to offload main thread and not block rendering. Now that I have a separate service that scans files in background I can probably revisit the initial approach and try to scan symbols in-memory. I will think about it.
@x87 The alpha 1 version of the highlight has been greatly improved. But some minor problems:
Using the cleo.txt of the header file, it cannot be highlighted immediately after opening it, but it will be highlighted only after typing or modifying the current cleo (for example, just press Enter to add a line or delete a line, it will be highlighted) .
Multi-level header file highlighting is not supported, for example:
Main file:
const
_player = $PLAYER_CHAR
GS = 1.0
xmds = "xmds"
_HAAA = 3000
RsGlobal = 0x009B48D8
end
float x
float y
float z
int _health
int Resolution_w
CLEO.txt:
:1
wait 0
if
0256: player _PLAYER defined
jf @1
015D: set_gamespeed GS
00A0: store_actor $PLAYER_ACTOR position_to x y z
0226: _health = actor $PLAYER_ACTOR health
_health += _HAAA
06D2: 28@v = xmds // @v = string
0223: set_actor $PLAYER_ACTOR health_to _health
0A8D: Resolution_w = read_memory RsGlobal size 4 virtual_protect 0
cleo.txt will not be highlighted. This hierarchical header file should be supported
3.The last problem is still an old one, just like SB does not support non-English paths since 3.6.0, highlighting usually does not support non-English paths, even if we use non-English naming cleo, it also does not support highlighting.
cleo.txt will not be highlighted. This hierarchical header file should be supported
this is by design. When you open CLEO.txt as a separate document in Sanny it has the isolated file tree. CLEO.txt does not have references to other files or const declarations so there is nothing to highlight. If you try to compile CLEO.txt Sanny throws an error as it does not know what _PLAYER is.
_PLAYER will be highlighted only in the main document (one with $INCLUDE) and in ConstVar.txt.
Using the cleo.txt of the header file, it cannot be highlighted immediately after opening it, but it will be highlighted only after typing or modifying the current cleo (for example, just press Enter to add a line or delete a line, it will be highlighted) .
Can you please provide a screenshot of Sanny Builder window so I know what files you have opened and what symbols are not highlighted?
Using the cleo.txt of the header file, it cannot be highlighted immediately after opening it, but it will be highlighted only after typing or modifying the current cleo (for example, just press Enter to add a line or delete a line, it will be highlighted) .
Can you please provide a screenshot of Sanny Builder window so I know what files you have opened and what symbols are not highlighted?
When i open:
They are not highlighted,When I typed two carriage returns two more lines, it was highlighted:
@x87 I just tested it again, some cleo.txt is opened, and a few lines need to be added or deleted, otherwise it will not be highlighted
@x87 I encountered a new problem. I am not sure how they came about. Maybe it is because the cleo code is long and bright, or it is caused by other reasons. I was writing cleo, and an error message appeared:
I use the alpha-1 version. After this prompt appears during writing, if you continue writing, it may cause the sb tool to freeze and not respond.
x87 I have conducted multiple tests. As long as I press Enter to empty multiple lines or delete these lines, SB will enter an unresponsive state. It seems to only appear when highlighting is used (I said before that when you enter a few blank lines, it will highlight). In addition, it seems that when highlighting, press Enter at the end of cleo, and the line number of sb will flash and jump. This should also be a bug.
In addition, there is such a prompt if there is no response:
Activity
[-]Feature: Hightlight constants[/-][+]Feature: Highlight constants[/+]x87 commentedon May 17, 2020
This is an example of semantic highlighting: requires scanning prior source code and collecting constant symbols. Can be CPU consuming. Other elements get coloring purely after their syntax.
x87 commentedon Nov 9, 2020
The editor will rescan the document on open and save events. If you added or removed a new constant, it won't be reflecting in highlighting until you save the document. It saves a lot of resources on background scanning.
x87 commentedon Dec 6, 2020
A small preview on const/variable highlighting:
Note the difference:
Opinions?
XMDS commentedon Dec 8, 2020
I think it should be unified into one color. In addition, I think blue is not very good. @x87 Can I modify the highlight color by myself in the menu settings?
x87 commentedon Dec 8, 2020
It uses Variable color.
4 remaining items
XMDS commentedon Jan 2, 2021
@x87 I did a highlight test for the new version. There is no problem with the highlighting of the declared data type (int float). However, the highlighting of const_end does not support the highlighting of hexadecimal data names:
Another strange question. It seems that for some cleo I wrote before, I opened the source code txt with SB, const will not be highlighted, even if I modify and save them, it still will not be highlighted. I noticed that the language service status of the lower display panel is "Disabled" , To be honest, I don't understand its meaning too much, but this kind of txt will not be highlighted.
An additional question: highlighting will only be displayed after the file is saved. This seems inconvenient to write. Shouldn't this be your final plan? Is it possible to highlight when writing?
x87 commentedon Jan 2, 2021
thanks for noticing, I missed this.
Interesting. Do you have any Unicode characters in the opened file path? Do you have Language service enabled in the options (F10->Editor tab).
That was my initial plan to offload main thread and not block rendering. Now that I have a separate service that scans files in background I can probably revisit the initial approach and try to scan symbols in-memory. I will think about it.
XMDS commentedon Jan 3, 2021
Any non-English paths are currently not supported. There is also a new problem:
@x87 When there is a comment behind, it will not be highlighted
x87 commentedon Jan 3, 2021
@XMDS Thanks for your feedback. I have published alpha.1 with some of the issues addressed. Please check it out:
https://github.com/sannybuilder/dev/releases/tag/v3.7.0-alpha.1
XMDS commentedon Jan 4, 2021
@x87 The alpha 1 version of the highlight has been greatly improved. But some minor problems:
Main file:
ConstVar.txt:
CLEO.txt:
cleo.txt will not be highlighted. This hierarchical header file should be supported
3.The last problem is still an old one, just like SB does not support non-English paths since 3.6.0, highlighting usually does not support non-English paths, even if we use non-English naming cleo, it also does not support highlighting.
x87 commentedon Jan 4, 2021
this is by design. When you open CLEO.txt as a separate document in Sanny it has the isolated file tree. CLEO.txt does not have references to other files or const declarations so there is nothing to highlight. If you try to compile CLEO.txt Sanny throws an error as it does not know what _PLAYER is.
_PLAYER will be highlighted only in the main document (one with $INCLUDE) and in ConstVar.txt.
x87 commentedon Jan 4, 2021
Can you please provide a screenshot of Sanny Builder window so I know what files you have opened and what symbols are not highlighted?
XMDS commentedon Jan 4, 2021
When i open:



They are not highlighted,When I typed two carriage returns two more lines, it was highlighted:
@x87 I just tested it again, some cleo.txt is opened, and a few lines need to be added or deleted, otherwise it will not be highlighted
XMDS commentedon Jan 4, 2021
In addition, I noticed that even if there are non-English characters behind the comment "//", they will still not be highlighted after saving it.
XMDS commentedon Jan 4, 2021
@x87 I encountered a new problem. I am not sure how they came about. Maybe it is because the cleo code is long and bright, or it is caused by other reasons. I was writing cleo, and an error message appeared:

I use the alpha-1 version. After this prompt appears during writing, if you continue writing, it may cause the sb tool to freeze and not respond.
XMDS commentedon Jan 4, 2021
x87 I have conducted multiple tests. As long as I press Enter to empty multiple lines or delete these lines, SB will enter an unresponsive state. It seems to only appear when highlighting is used (I said before that when you enter a few blank lines, it will highlight). In addition, it seems that when highlighting, press Enter at the end of cleo, and the line number of sb will flash and jump. This should also be a bug.
In addition, there is such a prompt if there is no response:

x87 commentedon Jan 4, 2021
@XMDS do you have sanny.log file next to sanny.exe? it may have some extra details regarding last error
XMDS commentedon Jan 4, 2021
@x87 My latest crash just now:
x87 commentedon Jan 6, 2021
@XMDS Please try alpha.2 version. It should be much more stable now.