From 0d89dd73ff02bd0f70e2fcca0c2dcedf821faeb3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Tue, 13 Apr 2021 01:16:31 +0100 Subject: [PATCH] Add a passing test demonstrating clangd + tramp works ... It works at least within the minimal, well-controlled reproducible settings of this test. Maybe if we knew something more about the setup of the user who submitted this report we would be able to concoct a failing test, but we don't. * eglot-tests.el (subr-x): Require it (eglot--make-file-or-dir): Return expanded file name. (eglot-tests--lsp-abiding-column-1): New helper. (eglot-lsp-abiding-column): Use it. (eglot--tramp-test): Fix `skip-unless` condition. (eglot--tramp-test-2): New test. GitHub-reference: per https://github.com/joaotavora/eglot/issues/667 --- lisp/progmodes/eglot.el | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index cbde1b7a4c7..20f59956f81 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -25,7 +25,7 @@ ;;; Commentary: ;; Simply M-x eglot should be enough to get you started, but here's a -;; little info (see the accompanying README.md or the URL for more). + ;; little info (see the accompanying README.md or the URL for more). ;; ;; M-x eglot starts a server via a shell-command guessed from ;; `eglot-server-programs', using the current major-mode (for whatever @@ -2791,6 +2791,15 @@ If NOERROR, return predicate, else erroring function." if (file-directory-p f) append (eglot--files-recursively f) else collect (expand-file-name f)))) +(defun eglot--directories-recursively (&optional dir) + "Because `directory-files-recursively' isn't complete in 26.3." + (cons (setq dir (expand-file-name (or dir default-directory))) + (cl-loop with default-directory = dir + with completion-regexp-list = '("^[^.]") + for f in (file-name-all-completions "" dir) + if (file-directory-p f) append (eglot--files-recursively f) + else collect (expand-file-name f)))) + (defun eglot--directories-matched-by-globs (dir globs) "Discover subdirectories of DIR with files matched by one of GLOBS. Each element of GLOBS is either an uncompiled glob-string or a -- 2.39.2