[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot dc08e8e 134/139: Fix automatic project creation
From: |
João Távora |
Subject: |
[elpa] externals/eglot dc08e8e 134/139: Fix automatic project creation |
Date: |
Mon, 14 May 2018 09:55:10 -0400 (EDT) |
branch: externals/eglot
commit dc08e8e3c4bd2a907533ef0713552e17ec75cbe6
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Fix automatic project creation
* eglot.el (eglot): Take PROJECT arg. Return process.
(eglot--interactive): Returns a project.
---
eglot.el | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/eglot.el b/eglot.el
index c1b63ea..3d5d492 100644
--- a/eglot.el
+++ b/eglot.el
@@ -292,6 +292,7 @@ INTERACTIVE is t if inside interactive call."
"\n" base-prompt)))))
(list
managed-mode
+ (or (project-current) `(transient . default-directory))
(if prompt
(split-string-and-unquote
(read-shell-command prompt
@@ -302,11 +303,13 @@ INTERACTIVE is t if inside interactive call."
t)))
;;;###autoload
-(defun eglot (managed-major-mode command &optional interactive)
+(defun eglot (managed-major-mode project command &optional interactive)
"Start a Language Server Protocol server.
Server is started with COMMAND and manages buffers of
MANAGED-MAJOR-MODE for the current project.
+PROJECT is a project instance as returned by `project-current'.
+
COMMAND is a list of strings, an executable program and
optionally its arguments. If the first and only string in the
list is of the form \"<host>:<port>\" it is taken as an
@@ -323,8 +326,7 @@ MANAGED-MAJOR-MODE.
INTERACTIVE is t if called interactively."
(interactive (eglot--interactive))
- (let* ((project (project-current 'maybe))
- (short-name (eglot--project-short-name project)))
+ (let* ((short-name (eglot--project-short-name project)))
(let ((current-process (eglot--current-process)))
(if (and (process-live-p current-process)
interactive
@@ -339,7 +341,8 @@ INTERACTIVE is t if called interactively."
interactive)))
(eglot--message "Connected! Process `%s' now \
managing `%s' buffers in project `%s'."
- proc managed-major-mode short-name))))))
+ proc managed-major-mode short-name)
+ proc)))))
(defun eglot-reconnect (process &optional interactive)
"Reconnect to PROCESS.
- [elpa] externals/eglot 29f6b4c 129/139: Tweak README.md, (continued)
- [elpa] externals/eglot 29f6b4c 129/139: Tweak README.md, João Távora, 2018/05/14
- [elpa] externals/eglot 1fb2bcb 132/139: Ask server for textDocument/signatureHelp if it supports it, João Távora, 2018/05/14
- [elpa] externals/eglot e63dad0 092/139: Simplify mode-line code with a helper., João Távora, 2018/05/14
- [elpa] externals/eglot ab575d2 120/139: Rename functions. eglot--request is now the synchronous one, João Távora, 2018/05/14
- [elpa] externals/eglot 41f5922 137/139: Now send willSaveWaitUntil, João Távora, 2018/05/14
- [elpa] externals/eglot 458bc69 110/139: More correctly setup rust-mode-related autoloads, João Távora, 2018/05/14
- [elpa] externals/eglot 9af84a2 124/139: Prepare to sumbit to GNU ELPA, João Távora, 2018/05/14
- [elpa] externals/eglot 0625b6c 123/139: (eglot--xref-make): Fix Use of cl-destructuring-bind., João Távora, 2018/05/14
- [elpa] externals/eglot 589e1ea 138/139: Remove an unused variable, João Távora, 2018/05/14
- [elpa] externals/eglot 49fb02f 135/139: Use RLS in Travis CI and add actual tests, João Távora, 2018/05/14
- [elpa] externals/eglot dc08e8e 134/139: Fix automatic project creation,
João Távora <=
- [elpa] externals/eglot e964abe 091/139: Get rid of eglot--buffer-open-count, João Távora, 2018/05/14
- [elpa] externals/eglot c7b9002 116/139: Only call deferred actions after a full message has been received, João Távora, 2018/05/14
- [elpa] externals/eglot 418412b 131/139: Fix copyright header. Obviously not since 2003, João Távora, 2018/05/14
- [elpa] externals/eglot 714e5be 086/139: Half-baked textDocument/hover support, João Távora, 2018/05/14
- [elpa] externals/eglot bfd82b5 108/139: Fancier RLS spinner, João Távora, 2018/05/14
- [elpa] externals/eglot 8a80fb7 105/139: Simplify `eglot-shutdown`, João Távora, 2018/05/14
- [elpa] externals/eglot af14364 093/139: Only request stuff that server says it's capable of, João Távora, 2018/05/14
- [elpa] externals/eglot 77856c2 130/139: Reinstate the catch/loop/throw idiom in eglot-request, João Távora, 2018/05/14
- [elpa] externals/eglot 29f58a6 127/139: Get rid of catch/loop/throw idiom (suggested by Thien-Thi Nguyen), João Távora, 2018/05/14
- [elpa] externals/eglot d0b7773 117/139: Reduce log chatter, João Távora, 2018/05/14