emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/eglot efc0f45 02/12: Minor cleanup to new textDocument/


From: João Távora
Subject: [elpa] externals/eglot efc0f45 02/12: Minor cleanup to new textDocument/formatting feature
Date: Fri, 22 Jun 2018 11:52:15 -0400 (EDT)

branch: externals/eglot
commit efc0f452ead0b44ae257ba498d54b6e24e4e3f35
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>

    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.
---
 README.md | 2 +-
 eglot.el  | 5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/README.md b/README.md
index 2ced833..936aaea 100644
--- a/README.md
+++ b/README.md
@@ -155,7 +155,7 @@ eglot-shutdown`.
 - [ ] documentLink/resolve
 - [ ] textDocument/documentColor
 - [ ] textDocument/colorPresentation (3.6.0)
-- [ ] textDocument/formatting 
+- [x] textDocument/formatting 
 - [ ] textDocument/rangeFormatting
 - [ ] textDocument/onTypeFormatting
 - [x] textDocument/rename
diff --git a/eglot.el b/eglot.el
index 98802de..ac17fb8 100644
--- a/eglot.el
+++ b/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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]