pulsar-edit / pulsar

A Community-led Hyper-Hackable Text Editor
https://pulsar-edit.dev
Other
3.33k stars 140 forks source link

Tree-sitter fixes (1.116 edition) #968

Closed savetheclocktower closed 7 months ago

savetheclocktower commented 7 months ago

This is a great one! I'm declaring victory in our experiment from #878. We are switching Markdown parsers. The newer one is actively maintained and has fixed the one bug that was standing in the way of our original adoption.

I've also thrown in some TypeScript fixes, and I expect for there to be a few more by the time I'm done.

savetheclocktower commented 7 months ago

Taking this one out of draft a week early because of how big it is (the replacement Markdown grammar).

savetheclocktower commented 7 months ago

I saw the comments in src/wasm-tree-sitter-grammar, do we know why that file has an activation/deactivation? It's not like that file is a grammar unto itself, so there shouldn't be any need for [de]activations, right?

It's a grammar, but it's not a package, so you're right that it's not entirely clear why it has activate and deactivate. I had copied those over from tree-sitter-grammar.js, but I'm not sure they were ever used in that class either.

Spiker985 commented 7 months ago

Hmm...do we know what happens if we remove them...?

savetheclocktower commented 7 months ago

Hmm...do we know what happens if we remove them...?

No, but I'll leave that until next month's PR. :)