Skip to content

Conversation

CPardi
Copy link
Contributor

@CPardi CPardi commented Sep 25, 2025

Hi, I've had a look at implementing the unused with assist described on #39. The changes include adding a remove_unused_with function that:

  • Retrieves diagnostics at the cursor position.
  • Checks for an UnusedWith diagnostic overlapping the with keyword range; if none is found, the assist does not apply.
  • Removes the entire with expression, including the with keyword, its expression, the semicolon, and any trailing trivia.

Additionally, I have added some tests and updated the code_action.md document.

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.

1 participant