Closed TheLukeGuy closed 1 year ago
I just thought about it last night!
But I found that typ
is not an exclusive extension for Typst. GitHub Linguist have some discussion on it: https://github.com/github-linguist/linguist/issues/6358#issuecomment-1493706282 and they finally use some pattern matching like pattern: '^#(import|show|let|set)'
to tell the file type.
I'm not sure is this applicable to cloc
.
As a temporary workaround, put the following cloc definition under a text file such as typst-def.txt
Typst
filter rm_comments_in_strings " /* */
filter rm_comments_in_strings " //
filter call_regexp_common C++
extension typ
3rd_gen_scale 1.00
And instruct cloc
to recognise Typst locally:
cloc --read-lang-def=typst-def.txt .
The result should be fine with Typst.
This is a request for language support for Typst.
.typ
//
/*
and end with*/
Thanks! :)