plugin CudaFormatter + its formatters

Plugins for SynWrite and CudaText...
SamC
Posts: 208
Joined: 12.08.2023 00:49

CudaFormatter plugin issues

Post 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!
Attachments
20231028122036.png
20231028122036.png (7.68 KiB) Viewed 7773 times
main Alexey
Posts: 2323
Joined: 25.08.2021 18:15

Re: about cudaformatter

Post 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.
main Alexey
Posts: 2323
Joined: 25.08.2021 18:15

Re: about cudaformatter

Post 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.
SamC
Posts: 208
Joined: 12.08.2023 00:49

Re: about cudaformatter

Post 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.
main Alexey
Posts: 2323
Joined: 25.08.2021 18:15

Re: about cudaformatter

Post 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'.
Post Reply