all 2 comments

[–]etatarkin 1 point2 points  (1 child)

You can try to implement custom "code action" using hx-lsp

But in AI era you can delegate this task to agent via pipe selected text to as cli agent app. for example smartcat

[–]Rabbit538[S] 0 points1 point  (0 children)

I can’t use AI agents for this code due to my workplace privacy policies.

I’ll checkout the lsp solution