Day 34: De-duping Code Actions
🌧 Mood: Jumping in puddles.
🎵 Soundtrack: Letter Blue
📚 Reading Github Issues
Nothing exciting.
🩺 Making My Own Diagnostic Code Action
So I kind of got my diagnostic code action working. (If you remember, I am
trying to make a code action appear that will fix all of the diagnostics in the
area you highlighted so you don’t need to fix one diagnostic at a time.) Here is
my progression for today:
- Added logic to make a code action. This is a suggestion that will only pop up when you highlight over text.
- But then when I did the code action it wasn’t replacing the text properly. it was turning “amelia” -> “ameowowlia” instead of “ameowlia”.
- Through some logging figured out that my code action had the action multiple times. So it was replacing the text twice, even though the text had changed before the second replacement.
- Tried to make it so when I was combining the actions it would also de-dupe.
- Somehow made a blue box of death for all code actions.
- Why is de-dupling so hard?
- Why does it keep hating my code actions!
- Ended the day with my code action only fixing the first highlighted issue. I can see where the json is incorrect, but I’m struggling to make the json correct. Sounds like tomorrow’s problem :D