Skip to content
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

Apply on_enter edits from the client #158

Merged
merged 3 commits into from
Jul 31, 2023
Merged

Apply on_enter edits from the client #158

merged 3 commits into from
Jul 31, 2023

Conversation

sdankel
Copy link
Member

@sdankel sdankel commented Jul 26, 2023

Related FuelLabs/sway#4728

Adds a listener for file changes which calls the new on_enter custom method when a file change containing a newline has been made. The result is we get better performance for comment continuation. It's still slow, however.

I timed the actual logic that builds the Workspace Edit, and that part is extremely fast. From the logs I can see that the response is ready to go, but can take several seconds to be returned to the client. Meanwhile, other LSP responses are taking similar amounts of time (1-3 seconds).

Note: I will wait for the server change to be release before releasing this change, otherwise there could be errors.

Jul-26-2023 19-05-11

@sdankel sdankel marked this pull request as ready for review July 27, 2023 02:06
@sdankel sdankel requested a review from JoshuaBatty July 27, 2023 02:06
@JoshuaBatty
Copy link
Member

Hmmm that is rather slow.

Perhaps we could put this feature behind a toggle in the config and have it default to being turned off. That we we can land this work and then debug how to speed it up later. How does that sound?

@sdankel sdankel merged commit 836a4b7 into master Jul 31, 2023
@sdankel sdankel deleted the sophie/onEnterCustom branch July 31, 2023 22:26
sdankel added a commit that referenced this pull request Apr 17, 2024
* Apply on_enter edits from the client

* Default to false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants