yegappan / lsp

Language Server Protocol (LSP) plugin for Vim9
MIT License
484 stars 56 forks source link

fix: move additionalTextEdits switch #397

Open Shane-XB-Qian opened 1 year ago

Shane-XB-Qian commented 1 year ago

refine #389

Shane-XB-Qian commented 1 year ago

perhaps this is ok to merge too, it is to make that switch only control the additionalTextedit, and it was for that. last PR #389 make it lost scope, this is to fix that.

yegappan commented 1 year ago

If 'completionTextEdit' option is set, then the expectation is that a snippet completion plugin will expand the snippet and apply the text edits. So I am not sure the command in the completion reply can be applied using codeaction.DoCommand() if this option is set. Is it possible to test this change with a snippet plugin to verify this?

Shane-XB-Qian commented 1 year ago

If 'completionTextEdit' option is set, then the expectation is that a snippet completion plugin will expand the snippet and apply the text edits. So I am not sure the command in the completion reply can be applied using codeaction.DoCommand() if this option is set. Is it possible to test this change with a snippet plugin to verify this?

supposed i got your concern: you're worrying that switch should toggle 'additionaltext' with 'command' together? actually i donnot know but per general sense 'command' is not same scope with 'additionaltext', and/but most specifical thing is i added this 'switch' was just for 'additionaltext'. and i didnot see any lsp server combine them, but @vimposter said haskell did? // BTW: i roughly check vsnip, looks it didnot mention any about 'command', so at least for now seems it is not part of it.

-- shane.xb.qian