Skip to content

Commit

Permalink
Switch to PR version of lsp-server
Browse files Browse the repository at this point in the history
  • Loading branch information
schrieveslaach committed Nov 14, 2023
1 parent 5f14539 commit d66daa4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/nu-lsp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ reedline = { version = "0.26" }

crossbeam-channel = "0.5.8"
lsp-types = "0.94.1"
lsp-server = "0.7.4"
lsp-server = { version = "0.7.4", git = "https://github.com/schrieveslaach/rust-analyzer.git", branch = "cancelable-initialization" }
miette = "5.10"
ropey = "1.6.1"
serde = "1.0"
Expand Down
4 changes: 1 addition & 3 deletions crates/nu-lsp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,9 @@ impl LanguageServer {
})
.expect("Must be serializable");

// TODO: raise a PR to add ctrlc support otherwise it is impossible to use ctrl-c to quit
// the process in the initialization stage
let _initialization_params = self
.connection
.initialize(server_capabilities)
.initialize_while(server_capabilities, || !ctrlc.load(Ordering::SeqCst))
.into_diagnostic()?;

while !ctrlc.load(Ordering::SeqCst) {
Expand Down

0 comments on commit d66daa4

Please sign in to comment.