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

chore(vscode): Auto apply select quick fixes after inline code completion/code edit #3159

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

shankarg87
Copy link
Contributor

@shankarg87 shankarg87 commented Sep 18, 2024

fix for issue 2965

Pending:

  • Tests
  • Config knob
    - why apply only quick fixes related to imports, why not others?
    - May introduce unpredictable behavior in conjunction with bad plugins

   - Inline Code Completion
   - Refactor edits
* Only quick fixes associated with an "import" action will be applied
* Tested with vscode [Auto Import Plugin](https://marketplace.visualstudio.com/items?itemName=steoates.autoimport)
@wsxiaoys
Copy link
Member

Thanks for the PR! could you provide a screen recording (e.g like in PR #3146) when you test the functionality?

@shankarg87
Copy link
Contributor Author

shankarg87 commented Sep 19, 2024

@shankarg87 shankarg87 marked this pull request as ready for review September 19, 2024 21:44
@shankarg87
Copy link
Contributor Author

Marking as ready for review but can continue to add tests, config knobs if needed

@wsxiaoys wsxiaoys self-requested a review September 20, 2024 00:52
@wsxiaoys
Copy link
Member

  • why apply only quick fixes related to imports, why not others?

The goal is primarily to fix imports for symbols introduced in ghost text. Generally, auto-import function of LSPs tend to have a much higher success rate (e.g., 80%+) compared to other quick fixes.

@shankarg87
Copy link
Contributor Author

shankarg87 commented Sep 20, 2024

  • why apply only quick fixes related to imports, why not others?

The goal is primarily to fix imports for symbols introduced in ghost text. Generally, auto-import function of LSPs tend to have a much higher success rate (e.g., 80%+) compared to other quick fixes.

Ack. Are any safety checks needed when applying the workspace edits/commands suggested by the plugin? If not I think the PR is mostly complete (excepting tests - but not clear to me where to add them)?

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