F3: suspended Phpactor start, ConPTY shell in a job, cancel superseded completions, syntax proptest
- lutra_proc::spawn_suspended: CREATE_SUSPENDED, join the kill-on-close job, resume via a Tool Help thread snapshot. Opt-in for long-lived children (Phpactor); git, php -l and the probe keep spawn because the snapshot costs ~60 ms per start. - lutra_proc::adopt + Guard (Windows): the terminal's ConPTY shell joins a job, so processes it started end with the tab or with Lutra. - lsp.completion cancels the previous pending completion on the same server ($/cancelRequest); the cancelled command resolves empty. - Syntax proptests compare leaf kinds, outline and folding instead of the S-expression (tree-sitter-php 0.25.1 keeps a union_type wrapper after an undo); Malte's seed added. - docs/development.md: data dirs, target dir inside the repo, parallel builds, deleting ui/node_modules. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
7ad3005217
commit
ebbc89832c
17 changed files with 468 additions and 36 deletions
|
|
@ -16,7 +16,9 @@
|
|||
//! document version; `didClose` publishes no diagnostics; `didSave` sends
|
||||
//! `fake/saved` with the text it received.
|
||||
//! - Requests: `textDocument/hover` answers `hover L:C`,
|
||||
//! `textDocument/completion` a scripted list (see [`completion`]),
|
||||
//! `textDocument/completion` a scripted list (see [`completion`]), or,
|
||||
//! when the document contains `SLOW`, nothing until it is cancelled (like
|
||||
//! `fake/sleep`),
|
||||
//! `textDocument/signatureHelp` one signature whose active parameter is
|
||||
//! the column modulo 2,
|
||||
//! `textDocument/definition` the same position, `fake/echo` its params,
|
||||
|
|
@ -260,6 +262,10 @@ impl Fake {
|
|||
.get(uri)
|
||||
.map(Buffer::text)
|
||||
.unwrap_or_default();
|
||||
if text.contains("SLOW") {
|
||||
self.sleeping.push(id);
|
||||
return;
|
||||
}
|
||||
respond(
|
||||
id,
|
||||
Ok(completion(
|
||||
|
|
|
|||
|
|
@ -493,7 +493,7 @@ impl Shared {
|
|||
use std::os::windows::process::CommandExt;
|
||||
command.creation_flags(CREATE_NO_WINDOW);
|
||||
}
|
||||
lutra_proc::spawn(command).map_err(|error| LspError::Spawn {
|
||||
lutra_proc::spawn_suspended(command).map_err(|error| LspError::Spawn {
|
||||
command: self.launch.command.to_string_lossy().into_owned(),
|
||||
detail: error.to_string(),
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue