[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot 2a410e9 30/45: Move constants to top instead of f
From: |
João Távora |
Subject: |
[elpa] externals/eglot 2a410e9 30/45: Move constants to top instead of forward-declaring |
Date: |
Thu, 22 Nov 2018 19:15:31 -0500 (EST) |
branch: externals/eglot
commit 2a410e9cd1ebe917074ebc69aac8d42697da7416
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
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] externals/eglot 82ae4f6 21/45: Re-enable eclipse-jdt tests, (continued)
- [elpa] externals/eglot 82ae4f6 21/45: Re-enable eclipse-jdt tests, João Távora, 2018/11/22
- [elpa] externals/eglot ee41f06 22/45: Slightly robustify test engine, João Távora, 2018/11/22
- [elpa] externals/eglot faf93ad 13/45: * eglot-tests.el: Disable eclipse connection tests., João Távora, 2018/11/22
- [elpa] externals/eglot c664f40 28/45: * eglot.el (eglot-client-capabilities): Mention supported SymbolKinds., João Távora, 2018/11/22
- [elpa] externals/eglot edc6538 32/45: Fix a bug introduced by previous bugfix, João Távora, 2018/11/22
- [elpa] externals/eglot d6e0ba3 31/45: * eglot-tests.el (eclipse-connect): Increase connect timeout to 20., João Távora, 2018/11/22
- [elpa] externals/eglot 31bfe21 24/45: Add support for code action literals, João Távora, 2018/11/22
- [elpa] externals/eglot 11cd074 29/45: Support ocaml-language-server out of the box (#149), João Távora, 2018/11/22
- [elpa] externals/eglot 7b4ed97 33/45: Fix #124: add ability to move to LSP-precise columns, João Távora, 2018/11/22
- [elpa] externals/eglot f2ccb77 25/45: Simplify eglot-code-action. Fix compilation warning, João Távora, 2018/11/22
- [elpa] externals/eglot 2a410e9 30/45: Move constants to top instead of forward-declaring,
João Távora <=
- [elpa] externals/eglot f74a80f 27/45: Make imenu hierarchical, João Távora, 2018/11/22
- [elpa] externals/eglot 118f966 26/45: Fix a bug when response to definitions request is a single location, João Távora, 2018/11/22
- [elpa] externals/eglot 3c180c0 19/45: Rework test macros for hopefully more stable testing, João Távora, 2018/11/22
- [elpa] externals/eglot b31ba80 35/45: Tweak solution to #125 with a hint from Fangrui Song, João Távora, 2018/11/22
- [elpa] externals/eglot fdb1941 36/45: Add support for TextEdits in completion, João Távora, 2018/11/22
- [elpa] externals/eglot d66f2eb 39/45: Treat tab characters as 1 column wide in position conversion functions, João Távora, 2018/11/22
- [elpa] externals/eglot b731db5 41/45: Add support for R's languageserver (#161), João Távora, 2018/11/22
- [elpa] externals/eglot de1728c 44/45: * eglot.el (eglot-completion-at-point): Less chatter., João Távora, 2018/11/22
- [elpa] externals/eglot fc03d7c 40/45: Fix #160: Properly delete inserted text after completion, João Távora, 2018/11/22
- [elpa] externals/eglot 604c1b0 38/45: Per #144: Format documentation of signature parameters, João Távora, 2018/11/22