From e10f933d613e7acefbfc39f590b14d856f901acd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Fri, 15 Jun 2018 23:56:29 +0100 Subject: [PATCH] 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. --- lisp/progmodes/eglot.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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)) -- 2.39.2