Skip to content

Commit eb58a17

Browse files
gselzerclaude
andcommitted
Serve appose-python as language servers
Completion now comes from two lsp4j language servers, which code-lsp's LanguageServerService merges: PythonSyntaxServerPlugin (tree-sitter: instant names, parameters, builtins and keywords) and JediServerPlugin (jedi-language-server, against the script's environment plus overlays, seeing the script as plain Python). ApposePythonEnvironments holds what the completer knew about environments; ApposePythonCodeCompleter, and its merge and time budget, are gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 8633b64 commit eb58a17

11 files changed

Lines changed: 1213 additions & 1395 deletions

‎README.md‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,17 +148,20 @@ script's own line numbers.
148148

149149
## Code completion
150150

151-
The Script Editor completes code in these scripts, in two layers:
151+
The Script Editor completes code in these scripts with two language servers,
152+
which `scijava-code-lsp`'s `LanguageServerService` merges into one (so any
153+
other LSP client of it gets the same):
152154

153155
* **Instantly, with no Python needed:** names in scope (variables,
154156
functions, classes, imports, parameters of the enclosing function), the
155157
script's `#@` parameters, `task`, builtins and keywords. This comes from
156-
parsing the script with [tree-sitter](https://tree-sitter.github.io/).
158+
parsing the script with [tree-sitter](https://tree-sitter.github.io/)
159+
(`PythonSyntaxServerPlugin`).
157160
* **With a language server,
158161
[jedi-language-server](https://github.com/pappasam/jedi-language-server)
159-
(built on [Jedi](https://jedi.readthedocs.io/)):** members of objects and
160-
modules, function signatures (with parameter names and types) and
161-
documentation. The server runs in a small environment of its own
162+
(built on [Jedi](https://jedi.readthedocs.io/)), via `JediServerPlugin`:**
163+
members of objects and modules, function signatures (with parameter names
164+
and types), documentation, hover and syntax errors. The server runs in a small environment of its own
162165
(`appose-python-completion`: Python, jedi-language-server, Appose and uv),
163166
which is built in the background the first time you complete code, and
164167
takes a while only then. The server talks to the editor via the

0 commit comments

Comments
 (0)