@@ -22,7 +22,7 @@ scripts.
2222 └──► server processes (e.g. jedi-language-server), via LspServerSpec
2323```
2424
25- It does four things, each in a package of its own.
25+ It does three things, each in a package of its own.
2626
2727## 1. Brokering between scripts and servers (` org.scijava.code.lsp ` )
2828
@@ -34,14 +34,21 @@ jedi's) combines them itself.
3434Clients ask about a script through a ` ScriptSession ` from the service, with
3535a server of its own: it keeps the server's copy of the script up to date,
3636names it (its file's URI, or an ` untitled: ` one), takes offsets into its text
37- (see ` Positions ` ), and reports the problems found in it. Servers need know
38- nothing of SciJava scripts: the session shows them plain code (see 3). For code typed into
37+ (see ` Positions ` ), and reports the problems found in it. For code typed into
3938a running interpreter, the server learns the interpreter's state through its
4039` Environment ` . Tools that ask once (e.g. to check a
4140script) can call ` LanguageServerService.diagnose ` . For code typed into an
4241interpreter whose language no plugin serves, a session completes the
4342interpreter's variables.
4443
44+ Servers need know nothing of SciJava scripts. A SciJava script is not quite
45+ plain code of its language: its ` #@ ` parameters define variables before it
46+ runs. ` LanguageServerService.scriptParameters ` parses them; a ` ScriptDocument `
47+ is the script as plain code, with them declared with their run-time types, as
48+ a ` ScriptDialect ` says. Each ` LanguageServerPlugin ` names the dialect its
49+ servers read; a session shows its server the script in that dialect, and maps
50+ positions in the server's answers back.
51+
4552## 2. Running server processes (` org.scijava.code.lsp.launch ` )
4653
4754For servers that are not Java in the SciJava process (e.g. jedi-language-server,
@@ -51,17 +58,7 @@ and returning its streams (an `LspConnection`). Plugins get such a server via
5158` LanguageServerService.launch ` : started when first needed, one per
5259environment, restarted if it stops, and stopped when idle.
5360
54- ## 3. Translating SciJava scripts (` org.scijava.code.lsp.script ` )
55-
56- A SciJava script is not quite plain code of its language: its ` #@ `
57- parameters define variables before it runs. ` LanguageServerService.scriptParameters `
58- parses them; a ` ScriptDocument ` is the script as plain code, with them
59- declared with their run-time types, as a ` ScriptDialect ` says. Each
60- ` LanguageServerPlugin ` names the dialect its servers read; a session shows its
61- server the script in that dialect, and maps positions in the server's answers
62- back.
63-
64- ## 4. A toolkit for in-process servers (` org.scijava.code.lsp.jvm ` )
61+ ## 3. A toolkit for in-process servers (` org.scijava.code.lsp.jvm ` )
6562
6663For servers of JVM languages, written in Java (e.g. Groovy's and Jython's):
6764` ScriptLanguageServer ` , a base class keeping the open documents and turning
@@ -73,13 +70,13 @@ javadoc.
7370
7471## Who uses what
7572
76- | | 1 | 2 | 3 | 4 |
77- | -------------------------| ---| ---| ---| --- |
78- | script-editor | ✓ | | | |
79- | scripting-groovy | ✓ | | ✓ | ✓ |
80- | scripting-jython | ✓ | ✓ | ✓ | ✓ |
81- | scripting-appose-python | ✓ | ✓ | ✓ | |
73+ | | 1 | 2 | 3 |
74+ | -------------------------| ---| ---| ---|
75+ | script-editor | ✓ | | |
76+ | scripting-groovy | ✓ | | ✓ |
77+ | scripting-jython | ✓ | ✓ | ✓ |
78+ | scripting-appose-python | ✓ | ✓ | |
8279
8380The specialized packages depend only on ` org.scijava.code.lsp ` , never on each
84- other. The module exports all four ; its implementation
81+ other. The module exports all three ; its implementation
8582(` org.scijava.code.lsp.impl ` ) is internal.
0 commit comments