From: João Távora Date: Fri, 15 Jun 2018 22:56:29 +0000 (+0100) Subject: Minor cleanup to new textdocument/formatting feature X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~500 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e10f933d613e7acefbfc39f590b14d856f901acd;p=emacs.git Minor cleanup to new textdocument/formatting feature * README.md (Language feature): Tick textDocument/formatting * eglot.el (eglot-client-capabilities): Add formatting capability. Also move codeAction capability to the correct section. (eglot-format-buffer): Remove unused lexical variable before-point. --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 98802dea60b..ac17fb895f8 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -163,7 +163,6 @@ deferred to the future.") :workspace (list :applyEdit t :executeCommand `(:dynamicRegistration :json-false) - :codeAction `(:dynamicRegistration :json-false) :workspaceEdit `(:documentChanges :json-false) :didChangeWatchesFiles `(:dynamicRegistration t) :symbol `(:dynamicRegistration :json-false)) @@ -179,6 +178,8 @@ deferred to the future.") :definition `(:dynamicRegistration :json-false) :documentSymbol `(:dynamicRegistration :json-false) :documentHighlight `(:dynamicRegistration :json-false) + :codeAction `(:dynamicRegistration :json-false) + :formatting `(:dynamicRegistration :json-false) :rename `(:dynamicRegistration :json-false) :publishDiagnostics `(:relatedInformation :json-false)) :experimental (list)))) @@ -1397,8 +1398,6 @@ DUMMY is ignored." :tabSize tab-width :insertSpaces (not indent-tabs-mode))) :textDocument/formatting)) - (before-point - (buffer-substring (max (- (point) 60) (point-min)) (point))) (after-point (buffer-substring (point) (min (+ (point) 60) (point-max)))) (regexp (and (not (bobp))