@@ -148,40 +148,8 @@ script's own line numbers.
148148
149149## Code completion
150150
151- The Script Editor completes code in these scripts with a Python language
152- server, ` scijava-lsp-ty ` 's: [ ty] ( https://docs.astral.sh/ty/ ) . This
153- plugin's
154- ` ApposePythonDialect ` shows it each script as plain Python, and says where
155- the script runs (so any other client of ` scijava-lsp ` 's
156- ` LanguageServerService ` gets the same). It completes names in scope,
157- the script's ` #@ ` parameters, ` task ` , builtins and keywords, and members of
158- objects and modules; and it gives function signatures (with parameter names
159- and types), documentation, hover and syntax errors.
160-
161- The server runs in a small environment of its own (` code-lsp-ty ` : Python,
162- NumPy and ty), which is built in the background
163- the first time you complete code, and takes a while only then; until it is, there are no completions. The server
164- talks to the editor via the
165- [ Language Server Protocol] ( https://microsoft.github.io/language-server-protocol/ )
166- (see ` scijava-lsp ` ); it sees the script as plain Python, with its ` #@ `
167- parameters declared. One server runs per script environment; servers
168- unused for 10 minutes stop. Their error output goes to
169- ` code-lsp-ty-server.log ` , next to Appose's environments.
170-
171- Once a script's environment is built (in this session or an earlier one),
172- the server analyzes the script against it, so that the packages installed
173- there are known too. An environment not built yet, e.g. because you just
174- added a dependency, is built in the background once the script's environment
175- declaration has stayed the same for a few seconds; so its packages are known
176- before you run the script, and the next run need not build it. This covers
177- every kind of declaration: PyPI and conda packages, and environment files.
178- A script running in the environment is waited for first, so an environment
179- is never rebuilt beneath a running script; building replaces the
180- environment's worker, as the script's next run would. Script parameters are
181- known by the Python types they have at run time, e.g. images as NumPy
182- arrays.
183-
184- Typing never waits for the server: if its answer for a word is not ready
185- within a moment (the first answer for a package can take a few seconds), it
186- is shown once ready. Questions that are no longer of interest (e.g. as you
187- type on) are cancelled.
151+ The Script Editor completes code in appose-python scripts using a Python language
152+ server (see [ ` scijava-lsp-ty ` ] ( https://github.com/scijava/scijava/tree/main/scijava-lsp-ty ) ).
153+ The ` ApposePythonDialect ` plugin is used to:
154+ - convert SciJava scripts into text that language server can understand
155+ - derive ` org.scijava.lsp.Environment ` s from information contained within the script (including environment filepaths and inline script metadata).
0 commit comments