Open shogo-sugihara opened 2 months ago
It would be great if commented out lines were included in the ignore.
Thanks for the feedback, such advanced cases is also interesting for me. Right now Blockman has basic detection of code blocks. When I have time, I'm going to try to implement advanced parsing/tokenization of many languages, so Blockman maybe will be able to manipulate rendering based on advanced logic chosen by user.
The main problem is that it is not an easy thing to implement advanced parsing/tokenization, because VS Code does not expose it's native parsed/tokenized AST, so I have to find third party libraries, and they are not many, especially there are probably only one or two high quality parser libraries which work in JS environment and support parsing many languages, and they have their technical difficulties and performance issues, so I need to do some experiments to make sure they will work fine with Blockman.
So far, I have found shiki and tree-sitter (or web-tree-sitter), and I hope I will be able to do some experiments with them soon.
Thank you for your response and consideration !
Considering the cost-effectiveness, switching the syntax analysis parser seems like a big deal. You may end up with new many problems after switching.
I checked the scope of the #if/#endif tokens
If the Blockman can obtain the token's scope information, it can exclude those lines to include the tokens with the "punctuation.definition.directive.c" and "keyword.control.directive.conditional.c" scope from the enclosure process.
I will have to wait for the Visual studio code extension API to be updated.
I'm really grateful for Bookman. Thank you for the great plugin ! I have one problem.
I'm using your tool in C/C++ language. If the #if/#endif codes are at the beginning of a line,, all block enclosures are left-justified. Is it possible to ignore those un-indented preprocessing commands beginning with # and have The left edge of the enclosure start at the indent position?
Sorry if there's a similar comment before, I missed it.