From: Felicián Németh Date: Sun, 27 Mar 2022 20:58:44 +0000 (+0200) Subject: Map more emacs variables to lsp formattingoptions fields X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~63 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5d2f6bc667afb8252170690ad9523f327d93bc74;p=emacs.git 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 --- 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))))