[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 1.2 9cee9eb 086/101: Move constants to top instead of forward-dec
From: |
Christian Johansson |
Subject: |
[elpa] 1.2 9cee9eb 086/101: Move constants to top instead of forward-declaring |
Date: |
Thu, 29 Apr 2021 15:09:06 -0400 (EDT) |
tag: 1.2
commit 9cee9ebbe016d63811acc2b1ccfaa11f7f8140da
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>
Move constants to top instead of forward-declaring
* eglot.el (eglot--symbol-kind-names, eglot--kind-names): Move to
top of file.
---
eglot.el | 42 ++++++++++++++++++++++--------------------
1 file changed, 22 insertions(+), 20 deletions(-)
diff --git a/eglot.el b/eglot.el
index 2ce9d08..e177174 100644
--- a/eglot.el
+++ b/eglot.el
@@ -174,6 +174,28 @@ let the buffer grow forever."
:type '(choice (const :tag "No limit" nil)
(integer :tag "Number of characters")))
+
+;;; Constants
+;;;
+(defconst eglot--symbol-kind-names
+ `((1 . "File") (2 . "Module")
+ (3 . "Namespace") (4 . "Package") (5 . "Class")
+ (6 . "Method") (7 . "Property") (8 . "Field")
+ (9 . "Constructor") (10 . "Enum") (11 . "Interface")
+ (12 . "Function") (13 . "Variable") (14 . "Constant")
+ (15 . "String") (16 . "Number") (17 . "Boolean")
+ (18 . "Array") (19 . "Object") (20 . "Key")
+ (21 . "Null") (22 . "EnumMember") (23 . "Struct")
+ (24 . "Event") (25 . "Operator") (26 . "TypeParameter")))
+
+(defconst eglot--kind-names
+ `((1 . "Text") (2 . "Method") (3 . "Function") (4 . "Constructor")
+ (5 . "Field") (6 . "Variable") (7 . "Class") (8 . "Interface")
+ (9 . "Module") (10 . "Property") (11 . "Unit") (12 . "Value")
+ (13 . "Enum") (14 . "Keyword") (15 . "Snippet") (16 . "Color")
+ (17 . "File") (18 . "Reference")))
+
+
;;; API (WORK-IN-PROGRESS!)
;;;
(cl-defmacro eglot--with-live-buffer (buf &rest body)
@@ -198,8 +220,6 @@ let the buffer grow forever."
"JSON object to send under `initializationOptions'"
(:method (_s) nil)) ; blank default
-(defvar eglot--symbol-kind-names)
-
(cl-defgeneric eglot-client-capabilities (server)
"What the EGLOT LSP client supports for SERVER."
(:method (_s)
@@ -738,24 +758,6 @@ Doubles as an indicator of snippet support."
(symbol-value 'yas-minor-mode)
'yas-expand-snippet))
-(defconst eglot--kind-names
- `((1 . "Text") (2 . "Method") (3 . "Function") (4 . "Constructor")
- (5 . "Field") (6 . "Variable") (7 . "Class") (8 . "Interface")
- (9 . "Module") (10 . "Property") (11 . "Unit") (12 . "Value")
- (13 . "Enum") (14 . "Keyword") (15 . "Snippet") (16 . "Color")
- (17 . "File") (18 . "Reference")))
-
-(defconst eglot--symbol-kind-names
- `((1 . "File") (2 . "Module")
- (3 . "Namespace") (4 . "Package") (5 . "Class")
- (6 . "Method") (7 . "Property") (8 . "Field")
- (9 . "Constructor") (10 . "Enum") (11 . "Interface")
- (12 . "Function") (13 . "Variable") (14 . "Constant")
- (15 . "String") (16 . "Number") (17 . "Boolean")
- (18 . "Array") (19 . "Object") (20 . "Key")
- (21 . "Null") (22 . "EnumMember") (23 . "Struct")
- (24 . "Event") (25 . "Operator") (26 . "TypeParameter")))
-
(defun eglot--format-markup (markup)
"Format MARKUP according to LSP's spec."
(pcase-let ((`(,string ,mode)
- [elpa] 1.2 912d10f 088/101: Fix a bug introduced by previous bugfix, (continued)
- [elpa] 1.2 912d10f 088/101: Fix a bug introduced by previous bugfix, Christian Johansson, 2021/04/29
- [elpa] 1.2 8529b55 089/101: Fix #124: add ability to move to LSP-precise columns, Christian Johansson, 2021/04/29
- [elpa] 1.2 90b3bfd 090/101: Fix #148: complex completions work when chosen from *completions*, Christian Johansson, 2021/04/29
- [elpa] 1.2 63c2bbc 092/101: Add support for TextEdits in completion, Christian Johansson, 2021/04/29
- [elpa] 1.2 d52738f 095/101: Treat tab characters as 1 column wide in position conversion functions, Christian Johansson, 2021/04/29
- [elpa] 1.2 7e9cc05 098/101: Fix #154: fix potential security issue fontifying LSP doc, Christian Johansson, 2021/04/29
- [elpa] 1.2 2bbf06e 097/101: Add support for R's languageserver (#161), Christian Johansson, 2021/04/29
- [elpa] 1.2 c667d79 093/101: Fix #125: add ability to report LSP-compliant columns, Christian Johansson, 2021/04/29
- [elpa] 1.2 a39a446 020/101: Close #61: Snappier completions that don't hinder typing, Christian Johansson, 2021/04/29
- [elpa] 1.2 2e21c12 084/101: * eglot.el (eglot-client-capabilities): Mention supported SymbolKinds., Christian Johansson, 2021/04/29
- [elpa] 1.2 9cee9eb 086/101: Move constants to top instead of forward-declaring,
Christian Johansson <=
- [elpa] 1.2 fc9bbf7 096/101: Fix #160: Properly delete inserted text after completion, Christian Johansson, 2021/04/29
- [elpa] 1.2 b573d42 003/101: Close #44: Don't turn on flymake-mode any more than is needed, Christian Johansson, 2021/04/29
- [elpa] 1.2 13d8da4 039/101: Fix textDocument/hover responses where MarkedString is a plist (#72), Christian Johansson, 2021/04/29
- [elpa] 1.2 cf4881c 081/101: Simplify eglot-code-action. Fix compilation warning, Christian Johansson, 2021/04/29
- [elpa] 1.2 0f8091f 082/101: Fix a bug when response to definitions request is a single location, Christian Johansson, 2021/04/29
- [elpa] 1.2 a81bb01 091/101: Tweak solution to #125 with a hint from Fangrui Song, Christian Johansson, 2021/04/29
- [elpa] 1.2 ba41ed8 099/101: Fix #167: correctly insert TextEdit-less snippets, Christian Johansson, 2021/04/29
- [elpa] 1.2 aa3de04 021/101: Require jsonrpc.el 1.0.2 (GNU ELPA didn't build 1.0.1), Christian Johansson, 2021/04/29
- [elpa] 1.2 7342d88 054/101: Close #115: Don't block kill-buffer-hook if server somehow hangs, Christian Johansson, 2021/04/29
- [elpa] 1.2 985ba0f 062/101: Improve signature help, Christian Johansson, 2021/04/29