-
Couldn't load subscription status.
- Fork 17
Open
Description
Currently, ApplyCodeAction deletes the very node that the CodeAction specifies, but this is not sound enough.
Given
Module[{a, b = 2 (* b is unused *)}, a]The symbol b is marked, but in fact, we want to remove b = 2. So I think a code action can be populated up until it reaches the node that can actually fix the problem. Moreover, the trailing comment seems easy to be removed if we treat it as the same as the trailing comma, but it will still be convenient to provide an additional list of nodes that can be removed as well.
I know that CodeParser`CodeAction` is not ready yet, so I am just sharing the idea.
Metadata
Metadata
Assignees
Labels
No labels