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

Support autocorrect: contextual #1449

Closed
1 task done
andyw8 opened this issue Mar 4, 2024 · 0 comments · Fixed by #1453
Closed
1 task done

Support autocorrect: contextual #1449

andyw8 opened this issue Mar 4, 2024 · 0 comments · Fixed by #1453
Labels
enhancement New feature or request help-wanted Extra attention is needed

Comments

@andyw8
Copy link
Contributor

andyw8 commented Mar 4, 2024

I have checked that this feature is not already implemented

  • This feature does not exist

Use case

Helps to prevent unwanted autocorrections while writing code. This behaviour was recently added to RuboCop.

Description

See rubocop/rubocop#12657 for details.

Implementation

TBC

@andyw8 andyw8 added enhancement New feature or request help-wanted Extra attention is needed labels Mar 4, 2024
koic added a commit to koic/ruby-lsp that referenced this issue Mar 5, 2024
Resolves Shopify#1449.

This PR applies `RuboCop::LSP.enable`, which is the minimal API for RuboCop to handle in the context of LSP:
https://docs.rubocop.org/rubocop/1.61/usage/lsp.html#language-server-development

Furthermore, `RuboCop::LSP.enable` method and `RuboCop::LSP` module were introduced in RuboCop 1.61.0.
This PR ensures compatibility with existing versions of RuboCop dependencies.
However, in older versions of RuboCop prior to 1.60, `AutoCorrect: contextual` behaves the same as `AutoCorrect: true`.
vinistock pushed a commit that referenced this issue Mar 5, 2024
Resolves #1449.

This PR applies `RuboCop::LSP.enable`, which is the minimal API for RuboCop to handle in the context of LSP:
https://docs.rubocop.org/rubocop/1.61/usage/lsp.html#language-server-development

Furthermore, `RuboCop::LSP.enable` method and `RuboCop::LSP` module were introduced in RuboCop 1.61.0.
This PR ensures compatibility with existing versions of RuboCop dependencies.
However, in older versions of RuboCop prior to 1.60, `AutoCorrect: contextual` behaves the same as `AutoCorrect: true`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help-wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant