Closed ThaiDat closed 1 month ago
Base on current behavior, I guess Cuda indentation guide is per lexer.
Cud's indent-guides are from lexer rules. for your examples:
no, Cud cannot force indent-guides for all indents, no need to do it.
I would prefer to have indentation guide for every indent. But, I know to change it from per-lexer block to indent-based block will require a lot of rework.
May need to hear from other CudaText users.
Even indent based blocks are from lexer rules. we cannot add staples w/o lexer rules.
Plugin Detect_Indent could be updated with a new option to force staples based on indentation. So any line starting with the indentation set for that document (like 4 spaces) would have staples for every indentation.
Detect_Indent only detects. it cannot add staples yet. to add staple, plugin must react to lexer-parsing-done, and then insert fold-ranges based on indents. (each fold range can have staple). and: plugin must avoid adding duplicate fold-ranges (if lexer already added some). I don't plan it. neither in Detect_Indent nor in others.
Did we have a way (i.e. an option) to put staple for every indentation. Below are examples how Cuda, Vscode, and Sublime render indentation guide on same documents:
![image](https://github.com/Alexey-T/CudaText/assets/18527312/b5caf393-5856-4051-be2e-dc7624a38e76)