Skip to content

Commit 2161e22

Browse files
Merge pull request #31 from sourcegraph/stevey/multi-workspace-support
Added automatic multi-workspace support
2 parents 66b4104 + 56c6b63 commit 2161e22

File tree

9 files changed

+163407
-161437
lines changed

9 files changed

+163407
-161437
lines changed

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20.4.0

.tool-versions

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# These have to match ../cody/.tool-versions
2+
nodejs 20.4.0
3+
pnpm 8.6.7

Eask

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
(script "test"
2323
(require 'package)
2424
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
25-
2625
(package-initialize)
2726

27+
;; Bootstrap straight.el
2828
(let ((bootstrap-file (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
2929
(bootstrap-version 5))
3030
(unless (file-exists-p bootstrap-file)
@@ -37,32 +37,30 @@
3737
(load bootstrap-file nil 'nomessage))
3838

3939
(straight-use-package 'uuidgen)
40-
(require 'uuidgen)
41-
4240
(straight-use-package 'buttercup)
41+
42+
(require 'uuidgen)
4343
(require 'buttercup)
4444

4545
;; TODO: Manually set PATH for the CI environment
4646
;;(setenv "PATH" (concat "/custom/path/to/node/bin:" (getenv "PATH")))
4747

48+
;; Output the path variables for debugging
49+
(message "load-path: %s" load-path)
50+
(message "default-directory: %s" default-directory)
51+
4852
(message "Starting test loading.")
4953
(let* ((default-directory (file-name-directory (or load-file-name buffer-file-name)))
5054
(project-root (file-name-directory (locate-dominating-file default-directory "Eask")))
5155
(test-dir (expand-file-name "tests" project-root))
52-
(buttercup-files (directory-files test-dir t "cody-doc-sync-tests\\.el$"))
53-
(ert-files (directory-files test-dir t "cody-doc-sync-ert-tests\\.el$")))
56+
(buttercup-files (directory-files test-dir t "\\.el$")))
5457
(message "Project root: %s" project-root)
58+
(message "buttercup-files: %s" buttercup-files)
5559
(add-to-list 'load-path project-root)
5660
(add-to-list 'load-path test-dir)
5761

5862
;; Load and run Buttercup tests.
5963
(dolist (file buttercup-files)
6064
(message "Loading Buttercup test file: %s" file)
6165
(load file t t t))
62-
(buttercup-run-discover)
63-
64-
;; Load and run ERT tests.
65-
(dolist (file ert-files)
66-
(message "Loading ERT test file: %s" file)
67-
(load file t t t))
68-
(ert-run-tests-batch-and-exit)))
66+
(buttercup-run-discover)))

README.org

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
#+TITLE: cody.el: Sourcegraph Cody in Emacs
22

3-
Do not use this yet; it is in development.
3+
Feel free to use it experimentally.
44

55
* Status
66

7-
- completely broken at the moment from all the protocol changes
7+
Completions should be working now. You should see completions in
8+
your active workspace, which is the value of `cody--workspace-root',
9+
typically the repo root for that workspace.
10+
11+
Cody currently supports one active workspace at a time. Files in the
12+
currently active workspace have a color Cody icon, and others are
13+
monochrome. You can also see the active workspace in `M-x cody-dashboard'.
814

915
* Configuration
1016

@@ -30,9 +36,7 @@ though this is less secure
3036
(setq cody--access-token "sgp_etc")
3137
#+end_src
3238

33-
To try it out, evaluate the buffer and `M-x cody-login'.
34-
35-
TODO: gnugpg and/or local host keychain support
39+
To try it out, evaluate the buffer and `M-x cody-login`.
3640

3741
** Sample Configuration
3842

0 commit comments

Comments
 (0)