Skip to content

Commit 91a8b4b

Browse files
committed
plugin.d.ts: Document plugin priority correctly
1 parent 912eb42 commit 91a8b4b

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

typings/plugin.d.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@ import * as express from "express"
1818
*
1919
* Plugins are just node modules.
2020
*
21-
* code-server uses $CS_PLUGIN_PATH to find plugins. Each subdirectory in
21+
* 1. code-server uses $CS_PLUGIN to find plugins.
22+
*
23+
* e.g. CS_PLUGIN=/tmp/will:/tmp/teffen will cause code-server to load
24+
* /tmp/will and /tmp/teffen as plugins.
25+
*
26+
* 2. code-server uses $CS_PLUGIN_PATH to find plugins. Each subdirectory in
2227
* $CS_PLUGIN_PATH with a package.json where the engine is code-server is
2328
* a valid plugin.
2429
*
@@ -29,16 +34,14 @@ import * as express from "express"
2934
* ~/.local/share/code-server/plugins:/usr/share/code-server/plugins
3035
* if unset.
3136
*
32-
* code-server also uses $CS_PLUGIN to find plugins.
3337
*
34-
* e.g. CS_PLUGIN=/tmp/will:/tmp/teffen will cause code-server to load
35-
* /tmp/will and /tmp/teffen as plugins.
38+
* 3. Built in plugins are loaded from __dirname/../plugins
3639
*
37-
* Built in plugins are also loaded from __dirname/../plugins
40+
* Plugins are required as soon as they are found and then initialized.
41+
* See the Plugin interface for details.
3842
*
39-
* Priority is $CS_PLUGIN, $CS_PLUGIN_PATH and then the builtin plugins.
40-
* After the search is complete, plugins will be required in first found order and
41-
* initialized. See the Plugin interface for details.
43+
* If two plugins are found with the exact same name, then code-server will
44+
* use the first one and emit a warning.
4245
*
4346
* There is also a /api/applications endpoint to allow programmatic access to all
4447
* available applications. It could be used to create a custom application dashboard
@@ -51,9 +54,6 @@ import * as express from "express"
5154
* The plugin's name, description and version are fetched from its module's package.json
5255
*
5356
* The plugin's router will be mounted at <code-sever-root>/<plugin-name>
54-
*
55-
* If two plugins are found with the exact same name, then code-server will
56-
* use the last one and emit a warning.
5757
*/
5858
export interface Plugin {
5959
/**

0 commit comments

Comments
 (0)