-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Migrate assists to SyntaxEditor
#18285
Comments
We have two MLH fellows, @tareknaser, @davidkurilla, who are interested in working on this. |
I'm not sure of the precedent on this sort of thing, but I've got two open PRs, #18458 and #18459, that both have to do with assists, and if it would help I'd gladly migrate those assists as part of those PRs. Specifically I would be migrating:
|
While migrating those PRs I ran into |
Not sure if anyone has a strong opinion, but just putting it directly in |
One observation while adding methods to |
We want to migrate all assists to use the new
SyntaxEditor
/SyntaxFactory
abstraction. This will unblock moving to immutable syntax trees (#15710). In doing so, we can choose a flat, contiguous representation that should yield significant performance wins (#17491).@DropDemBits has outlined the process for migrating most assists:
They have also already migrated the
extract_variable
assist in #18196 which should be a useful reference.The assists are located in
crates/ide-assists/src/handlers
. They should all have tests which you can use to verify that your change works properly by running:replacing
<ASSIST>
with the assist name, e.g.,add_braces
.The text was updated successfully, but these errors were encountered: