aznhe21 / actions-preview.nvim

Fully customizable previewer for LSP code actions.
GNU General Public License v3.0
365 stars 9 forks source link

What is needed to see a diff? #5

Closed t184256 closed 11 months ago

t184256 commented 1 year ago

I get action descriptions where I'd expect to see a diff:

╭──────────────────────────── Code Action Preview ─────────────────────────────╮
│Command: Inline method/variable/parameter (pylsp_rope.refactor.inline)        │

This is the case for both telescope and nui backends. Am I missing some configuration step?

aznhe21 commented 1 year ago

Unfortunately, some Language Servers (including pylsp_rope in this case) realize Code Actions by means of Command, which can perform any operation, instead of TextEdit, which notifies text changes. In these Language Servers, we cannot get the result of text changes by a Code Action, and as a result, we cannot compute and display diffs.

Well, it's hard to read this from the UI, and I'll add it to the README later.

t184256 commented 1 year ago

Thanks for confirming it's not me holding it wrong, and thanks for a nice extension.