From 5d2f6bc667afb8252170690ad9523f327d93bc74 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Felici=C3=A1n=20N=C3=A9meth?= Date: Sun, 27 Mar 2022 22:58:44 +0200 Subject: [PATCH] Map more emacs variables to lsp formattingoptions fields * eglot.el (eglot-format): Map require-final-newline to insertFinalNewline and delete-trailing-lines to trimFinalNewlines. GitHub-reference: close https://github.com/joaotavora/eglot/issues/900 --- lisp/progmodes/eglot.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 1c162408905..58ad4588aed 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/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)))) -- 2.39.5