Open PEZ opened 1 year ago
Another option for the tokenization is that we add an API to Calva to get the tokens it has already lexed out. For larger documents it might save performance to not tokenize several times.
Hello, thanks for creating this issue. Well, I guess I have good news. Blockman has disabled square bracket ([]
) and round bracket (()
) block rendering by default, because I think most languages does not need other than only curly bracket block rendering (otherwise it may look too overloaded) as a visual help for most users. So you can enable square and round brackets:
Go to VS Code settings, and search:
blockman n23 analyze square brackets
make it true
then search:
blockman n24 analyze round brackets
make it true
That's it.
I hope it will work. If not, please let me know.
Awesome! It works great for Clojure. Looks like so now:
It doesn't start highlighting blocks in JS and JSON files for me. Which is good, but a bit strange, since I enabled it.
Is there a way you can make it possible to scope Blockman settings by language? Then users could do:
"[clojure]": {
"blockman.n23AnalyzeSquareBrackets": true,
"blockman.n24AnalyzeRoundBrackets": true
},
That currently is marked as a problem with the message: ”This setting cannot be applied because it is not registered as language override setting.” Indicating that we can registering settings as being overridable by language. And then Blockman could provide configurationDefaults
for [clojure]
, making it work out of the box.
Thanks, I'll try that soon.
Thanks for providing Blockman!
I would love for it to have Clojure support. Clojure is a LISP, so therefore structured, similar to XML, but using only
()
,[]
, and{}
to mark start and end of forms (a.k.a. S-expressions).In this screenshot you can see that Blockman does the right thing (afaiu) on
{}
forms, but doesn't mark up the two other form types:At line 29 I have tried to trick Blockman by putting
}
inside a string, and also in a line comment, but Blockman handles it. Leading me to think that at least basic Clojure support might be in close reach for it (speculation, but anyway 😄).If you think you need a ”real” Clojure tokenizer, I have one in Calva to use for inspiration, and if that one is not a good fit, I think I know where to find two other JavaScript implementations. But hopefully a naïve ”if Clojure or other LISP, do whatever is currently done with
{}
with()
and[]
too” could work.Cheers!