Page 2 of 2
CudaFormatter plugin issues
Posted: 28.10.2023 04:22
by SamC
Hello,
It seems cuda formatter supply 4 formater as maximum namde A B C and D, could we add more formatter to it?
Also what's the main purpose for cross-lexer formatter, I didn't use it now because not very sure about the meaning.
Thanks!
Re: about cudaformatter
Posted: 28.10.2023 09:47
by main Alexey
1. I am not sure we really need >4 formatters per one lexer. give me example of 5 formatters for one lexer.
2. WIki has the info:
https://wiki.freepascal.org/CudaText_plugins
Formatter cross-lexer 1...4
Runs formatter for current editor file, which has cross-lexer label (1, 2, 3, 4). For example, when you have a formatter XY assigned to the label "2", the command "Formatter cross-lexer: 2" always runs XY, ignoring the current lexer.
Re: about cudaformatter
Posted: 28.10.2023 12:08
by main Alexey
'cross-lexer' formatter must be used only for special cases. when formatter is very general and/or can auto-detect the syntax/lexer.
Re: about cudaformatter
Posted: 30.10.2023 05:20
by SamC
Thanks, Now I know that the formatter ABCD can used for each different lexer. I used to take the formatter A can just used for one certain lexer, that's why I want to add more.
Re: about cudaformatter
Posted: 30.10.2023 05:51
by main Alexey
yes, for example, you can have formatter FF1 assigned to 'B' for JavaScript;
and formatter CC1 assigned to 'B' for C++.
they both are called by 'formatter per-lexer B'.