-
Notifications
You must be signed in to change notification settings - Fork 7
lifetimes #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
With tree-house the |
Why does the highlighter not own its own data? This seems very odd to create a struct with a reference, that's very non-rust and anti-ownership. |
In order to own its data I don't agree that this is non-idiomatic. I don't have a set of examples but in my experience this is very common in Rust. |
Thats interesting, it seems update takes a slice of edits, so why couldn't it run multiple queries at a time? It seems thats what helix does as well. But thats good to know. |
What is the benefit of holding onto the syntax tree your self instead of letting the library handle it? |
I'm not sure what it would look like to have the library handle it. Something needs to hold onto the tree information and storing all of it in a static globally seems less flexible to me. |
Hi, the last big problem I was having is with the lifetimes with syntax. I wanted to ask why do we need a reference? Why can't the highlighter type take ownership of the variables required?
As you can see this quickly becomes a nightmare very fast.
The text was updated successfully, but these errors were encountered: