fix(format): +format-with-eglot-fn: eglot detection

This commit is contained in:
Henrik Lissner 2024-03-11 20:46:02 -04:00
parent 5f858bb142
commit 5cc4056abf
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -116,7 +116,7 @@ the requested feature."
Does nothing if `+format-with-lsp' is nil or the active server doesn't support Does nothing if `+format-with-lsp' is nil or the active server doesn't support
the requested feature." the requested feature."
(and +format-with-lsp (and +format-with-lsp
(bound-and-true-p eglot-managed-mode) (bound-and-true-p eglot--managed-mode)
(pcase op (pcase op
('buffer (if (eglot--server-capable :documentFormattingProvider) ('buffer (if (eglot--server-capable :documentFormattingProvider)
(always (eglot-format-buffer)))) (always (eglot-format-buffer))))