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

fix: Only send OnEnter for sway files #183

Merged
merged 2 commits into from
May 25, 2024
Merged

Conversation

sdankel
Copy link
Member

@sdankel sdankel commented May 24, 2024

Closes #182

The bug was that the client was sending on_enter requests for non-sway files when those files were inside of a sway project.

I assumed that the plugin only received onDidChangeTextDocument events for changes to sway files, since we specify the language when initializing the language client. However, it appears that registering for that event gives events for all files, ignoring the document selectors in main.ts.

@sdankel sdankel enabled auto-merge (squash) May 24, 2024 17:52
@github-actions github-actions bot added the fix label May 24, 2024
@sdankel sdankel requested a review from a team May 24, 2024 17:52
Copy link
Member

@JoshuaBatty JoshuaBatty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@sdankel sdankel merged commit 983aee6 into master May 25, 2024
4 checks passed
@sdankel sdankel deleted the sophie/on_enter_language_check branch May 25, 2024 02:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LSP crash on rust file inside of sway project
2 participants