Copyright-paperwork-exempt: yes
* eglot.el (eglot-completion-at-point): Consider label when
expanding snippets.
GitHub-reference: fix https://github.com/joaotavora/eglot/issues/480
:exit-function
(lambda (proxy _status)
(eglot--dbind ((CompletionItem) insertTextFormat
- insertText
- textEdit
- additionalTextEdits)
+ insertText textEdit additionalTextEdits label)
(funcall
resolve-maybe
(or (get-text-property 0 'eglot--lsp-item proxy)
;; whole completion, since `insertText' is the full
;; completion's text.
(delete-region (- (point) (length proxy)) (point))
- (funcall snippet-fn insertText))))
+ (funcall snippet-fn (or insertText label)))))
(eglot--signal-textDocument/didChange)
(eglot-eldoc-function)))))))