[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot f6bb0a7 08/11: Attempt to handle RLS sophisticate
From: |
João Távora |
Subject: |
[elpa] externals/eglot f6bb0a7 08/11: Attempt to handle RLS sophisticated globs for didChangeWWatchedFiles |
Date: |
Sun, 10 Jun 2018 09:57:29 -0400 (EDT) |
branch: externals/eglot
commit f6bb0a74e849fc75c546f663aeb9c0ca14f2ddec
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Attempt to handle RLS sophisticated globs for didChangeWWatchedFiles
* eglot.el (eglot--wildcard-to-regexp): New helper.
(eglot--register-workspace/didChangeWatchedFiles): Use it.
---
eglot.el | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/eglot.el b/eglot.el
index 97db8fc..9dd98f0 100644
--- a/eglot.el
+++ b/eglot.el
@@ -1610,6 +1610,18 @@ If SKIP-SIGNATURE, don't try to send
textDocument/signatureHelp."
;;; Dynamic registration
;;;
+(defun eglot--wildcard-to-regexp (wildcard)
+ "(Very lame attempt to) convert WILDCARD to a Elisp regexp."
+ (cl-loop
+ with substs = '(("{" . "\\\\(")
+ ("}" . "\\\\)")
+ ("," . "\\\\|"))
+ with string = (wildcard-to-regexp wildcard)
+ for (pattern . rep) in substs
+ for target = string then result
+ for result = (replace-regexp-in-string pattern rep target)
+ finally return result))
+
(cl-defun eglot--register-workspace/didChangeWatchedFiles (server &key id
watchers)
"Handle dynamic registration of workspace/didChangeWatchedFiles"
(eglot--unregister-workspace/didChangeWatchedFiles server :id id)
@@ -1623,7 +1635,7 @@ If SKIP-SIGNATURE, don't try to send
textDocument/signatureHelp."
((and (memq action '(created changed deleted))
(cl-find file globs
:test (lambda (f glob)
- (string-match (wildcard-to-regexp
+ (string-match (eglot--wildcard-to-regexp
(expand-file-name glob))
f))))
(eglot--notify
- [elpa] externals/eglot updated (e103d5f -> e460e50), João Távora, 2018/06/10
- [elpa] externals/eglot 1f7bcb1 06/11: Slightly polish the Flymake integration, João Távora, 2018/06/10
- [elpa] externals/eglot 327119e 04/11: Shoosh compiler, João Távora, 2018/06/10
- [elpa] externals/eglot 7bd271f 05/11: * eglot.el (eglot--make-process): Use 'utf-8-emacs-unix, João Távora, 2018/06/10
- [elpa] externals/eglot 4501831 02/11: Close #12: support purposedly ignoring a server capability, João Távora, 2018/06/10
- [elpa] externals/eglot 5e63dcb 03/11: Cleanup the Flymake 26.1 hack slightly, João Távora, 2018/06/10
- [elpa] externals/eglot 133bee1 01/11: Fix typos, João Távora, 2018/06/10
- [elpa] externals/eglot 94fa254 07/11: Close #16: check flymake-mode before calling report-fn, João Távora, 2018/06/10
- [elpa] externals/eglot 1506172 10/11: Close #17: New eglot-ensure to put in a major-mode's hook, João Távora, 2018/06/10
- [elpa] externals/eglot f6bb0a7 08/11: Attempt to handle RLS sophisticated globs for didChangeWWatchedFiles,
João Távora <=
- [elpa] externals/eglot e460e50 11/11: * eglot.el (Version): Bump to 0.9, João Távora, 2018/06/10
- [elpa] externals/eglot 935edcc 09/11: Fix indentation address@hidden by previous commit, João Távora, 2018/06/10