From 7a0b93a76d1c53811a1670eb8f8091e3536aa248 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felici=C3=A1n=20N=C3=A9meth?= Date: Sun, 27 Mar 2022 22:58:44 +0200 Subject: [PATCH] Close #900: Map more Emacs variables to LSP FormattingOptions fields * eglot.el (eglot-format): Map require-final-newline to insertFinalNewline and delete-trailing-lines to trimFinalNewlines. --- eglot.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eglot.el b/eglot.el index 1c162408..58ad4588 100644 --- a/eglot.el +++ b/eglot.el @@ -2381,7 +2381,9 @@ is not active." (cl-list* :textDocument (eglot--TextDocumentIdentifier) :options (list :tabSize tab-width - :insertSpaces (if indent-tabs-mode :json-false t)) + :insertSpaces (if indent-tabs-mode :json-false t) + :insertFinalNewline (if require-final-newline t :json-false) + :trimFinalNewlines (if delete-trailing-lines t :json-false)) args) :deferred method))))