Skip to content

Commit d43e685

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 1d07b04 commit d43e685

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
@@ -137,17 +137,20 @@ script's own line numbers.
137137

138138
## Code completion
139139

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

142144
* **Instantly, with no Python needed:** names in scope (variables,
143145
functions, classes, imports, parameters of the enclosing function), the
144146
script's `#@` parameters, `task`, builtins and keywords. This comes from
145-
parsing the script with [tree-sitter](https://tree-sitter.github.io/).
147+
parsing the script with [tree-sitter](https://tree-sitter.github.io/)
148+
(`PythonSyntaxServerPlugin`).
146149
* **With a language server,
147150
[jedi-language-server](https://github.com/pappasam/jedi-language-server)
148-
(built on [Jedi](https://jedi.readthedocs.io/)):** members of objects and
149-
modules, function signatures (with parameter names and types) and
150-
documentation. The server runs in a small environment of its own
151+
(built on [Jedi](https://jedi.readthedocs.io/)), via `JediServerPlugin`:**
152+
members of objects and modules, function signatures (with parameter names
153+
and types), documentation, hover and syntax errors. The server runs in a small environment of its own
151154
(`appose-python-completion`: Python, jedi-language-server, Appose and uv),
152155
which is built in the background the first time you complete code, and
153156
takes a while only then. The server talks to the editor via the

0 commit comments

Comments
 (0)