Skip to content

Commit a93e2c9

Browse files
authored
Merge pull request #44 from cgay/registry
Make OPEN_DYLAN_USER_REGISTRIES customizable
2 parents e2d3690 + 9c0625a commit a93e2c9

File tree

3 files changed

+21
-13
lines changed

3 files changed

+21
-13
lines changed

.github/workflows/build-and-test.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ jobs:
2828

2929
- name: Install Open Dylan
3030
uses: dylan-lang/install-opendylan@v3
31-
with:
32-
version: 2024.1
33-
tag: v2024.1.0
3431

3532
- name: Install dependencies
3633
run: dylan update

documentation/source/index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ which must be on your :envvar:`PATH`.
7979
When you open each new file in your editor the LSP client may try to start a
8080
new project if the file isn't part of the same :program:`deft` workspace
8181
directory. If you want the client to use just one project, use a `multi-package
82-
workspace <https://opendylan.org/package/deft/index.html#workspaces>`_.
82+
workspace <https://package.opendylan.org/deft/index.html#workspaces>`_.
8383

8484
.. note:: Always run ``deft update`` and ``deft build -a`` in your workspace
8585
**before** starting the LSP server, or :program:`dylan-lsp-server`
@@ -130,6 +130,7 @@ The emacs client has a customization group "lsp-dylan" which is a member of the
130130
* ``lsp-dylan-extra-command-line-options``
131131
* ``lsp-dylan-log-pathname``
132132
* ``lsp-dylan-open-dylan-release``
133+
* ``lsp-dylan-open-dylan-registry``
133134

134135
These are documented in the customization interface within emacs. Use ``M-x
135136
customize-group`` ``lsp-dylan`` to customize these variables.

lsp-dylan.el

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,35 @@
1616

1717
(defcustom lsp-dylan-exe-pathname "dylan-lsp-server"
1818
"Name of the dylan-lsp-server executable.
19-
Must be an absolute pathname or the binary must be on your PATH."
19+
Must be an absolute pathname or the binary must be on your PATH."
2020
:type 'string)
2121

2222
(defcustom lsp-dylan-extra-command-line-options '()
2323
"List of command-line options to pass to dylan-lsp-server.
24-
Possible values are \"--debug-opendylan\" and \"--debug-server\".
25-
See `dylan-lsp-server --help` for more information on these options."
24+
Possible values are \"--debug-opendylan\" and \"--debug-server\".
25+
See `dylan-lsp-server --help` for more information on these options."
2626
:type '(repeat string))
2727

2828
(defcustom lsp-dylan-log-pathname nil
2929
"Pathname of the server's log file.
30-
The default is dylan-lsp-server.log, in the server's working directory,
31-
which is normally the directory of the Dylan source file where the LSP
32-
client was started."
30+
The default is dylan-lsp-server.log, in the server's working directory,
31+
which is normally the directory of the Dylan source file where the LSP
32+
client was started."
3333
:type 'file)
3434

3535
(defcustom lsp-dylan-open-dylan-release nil
3636
"Absolute pathname of the Open Dylan installation directory.
37-
If nil, infer the installation directory from the location
38-
of the dylan-compiler binary, which must be on the path."
37+
If nil, infer the installation directory from the location
38+
of the dylan-compiler binary, which must be on the path."
39+
:type '(choice string (const nil)))
40+
41+
(defcustom lsp-dylan-open-dylan-registry nil
42+
"Absolute pathname of the Open Dylan registry directory. If you expect to
43+
modify Open Dylan libraries point this at the registry in your Git checkout so
44+
that lsp-dylan will use the sources you are working on.
45+
46+
If nil, the registry in `lsp-dylan-open-dylan-release'/sources/registry is
47+
used."
3948
:type '(choice string (const nil)))
4049

4150
(add-to-list 'lsp-language-id-configuration '(dylan-mode . "dylan"))
@@ -65,7 +74,8 @@
6574
(getenv "OPEN_DYLAN_RELEASE_INSTALL")
6675
(lsp-dylan--infer-install-dir)
6776
(error "Can't find Open Dylan install directory")))
68-
(registry-dir (or (getenv "OPEN_DYLAN_USER_REGISTRIES")
77+
(registry-dir (or lsp-dylan-open-dylan-registry
78+
(getenv "OPEN_DYLAN_USER_REGISTRIES")
6979
(expand-file-name "sources/registry"
7080
(file-name-as-directory install-dir)))))
7181
(list

0 commit comments

Comments
 (0)