You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to perform multiple edits of different types but I couldn't figure out what's supposed to be the idiomatic way to create an Editor which provides multiple edits as all implementations of it have the in_order_edits function return iter::once.
This is assuming that an editor should even perform multiple edits and it should be done using the tree-sitter-edit api.
I've tried another approach using the tree-sitter rust bindings api to reparse the tree after each edit but couldn't get this to work, besides seeing as in_order_edits is plural I'd think it should be possible using tree-sitter-edit only without having to reparse the tree.
Some extra info about my usecase fyi, but irrelevant to the question really:
Looking through your repos for any example usage I came across marki. Accidentally I'm trying to use your library for the same purpose, albeit a bit different, namely bidirectionally converting latex files to anki notes. To do so, I for instance have to replace my custom latex cloze environment \begin{cloze}[<number>] ... \end{cloze} with anki's cloze syntax and other such changes, the bulk of which is to convert valid latex to valid mathjax and vice versa. I've got a really finicky hand written parser for this working but I'd like to replace it with edits based on treesitter queries, so that other people could use it with their own custom latex/ mathjax macros and for general reliability/ extensibility.
Hopefully you don't mind me opening an issue to ask a question.
The text was updated successfully, but these errors were encountered:
I'd like to perform multiple edits of different types but I couldn't figure out what's supposed to be the idiomatic way to create an
Editor
which provides multiple edits as all implementations of it have thein_order_edits
function returniter::once
.This is assuming that an editor should even perform multiple edits and it should be done using the tree-sitter-edit api.
I've tried another approach using the tree-sitter rust bindings api to reparse the tree after each edit but couldn't get this to work, besides seeing as
in_order_edits
is plural I'd think it should be possible using tree-sitter-edit only without having to reparse the tree.Some extra info about my usecase fyi, but irrelevant to the question really:
Looking through your repos for any example usage I came across marki. Accidentally I'm trying to use your library for the same purpose, albeit a bit different, namely bidirectionally converting latex files to anki notes. To do so, I for instance have to replace my custom latex cloze environment
\begin{cloze}[<number>] ... \end{cloze}
with anki's cloze syntax and other such changes, the bulk of which is to convert valid latex to valid mathjax and vice versa. I've got a really finicky hand written parser for this working but I'd like to replace it with edits based on treesitter queries, so that other people could use it with their own custom latex/ mathjax macros and for general reliability/ extensibility.Hopefully you don't mind me opening an issue to ask a question.
The text was updated successfully, but these errors were encountered: