Fork me on GitHub
#vscode
<
2020-01-27
>
sogaiu18:01:24

@pez while rabbit-holing on this, i noticed that vscode-tree-sitter uses web-tree-sitter (https://github.com/tree-sitter/tree-sitter/tree/master/lib/binding_web). i'm not confident about this, but it appears that by using web-tree-sitter, vscode-tree-sitter avoids compiling tree sitter c bits for each platform -- instead it uses wasm. do you know if vscode extensions can work with wasm? i came across: https://github.com/microsoft/vscode/issues/65559#issuecomment-471279633 and wondered what the status was.

pez20:01:42

That I haven't investigated.

sogaiu21:01:57

thanks -- i had assumed using tree sitter would lead to having to compile 3 different binaries for inclusion in an extension or have 3 different extensions. on a related note, i didn't know that this was under consideration: https://github.com/microsoft/vscode/issues/23251 the "when" seems very vague.

sogaiu23:01:45

@pez i think i got the basic machinery working for `vscode-tree-sitter` + `tree-sitter-clojure`.

sogaiu23:01:52

that's just demo-ing that the tree-sitter info is being employed in some of the highlighting. it's by no means making full use of the obtained info in any sophisticated manner -- just picking out function names and keywords to be colored apart from just using the textmate grammar.