Skip to content

Commit

Permalink
Merge branch 'master' into simd-json
Browse files Browse the repository at this point in the history
  • Loading branch information
nanakura authored Jan 16, 2025
2 parents 206d0a0 + 5f702a2 commit 2f67533
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

9 changes: 8 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
[package]
name = "emacs-lsp-booster"
version = "0.0.0" # this package will never be published as lib, so ignore this version field
description = "Emacs LSP performance booster "
homepage = "https://github.com/blahgeek/emacs-lsp-booster"
repository = "https://github.com/blahgeek/emacs-lsp-booster"
readme = "README.md"
keywords = ["emacs", "lsp"]
categories = ["command-line-utilities", "development-tools"]
license = "MIT"
version = "0.2.1"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,10 @@ For Linux or Windows users, you may download the prebuilt binary from [release](
*(The macOS binary in the release page lacks proper code signing for now.)*
A flake for nix users is available [here](https://github.com/slotThe/emacs-lsp-booster-flake).

Alternatively, you may build the target locally:
Alternatively, you may install it from [crates.io](https://crates.io/crates/emacs-lsp-booster):

1. Setup [Rust toolchain](https://www.rust-lang.org/tools/install)
2. Run `RUSTFLAGS='-C target-cpu=native' cargo build --release`
3. Find the built binary in `target/release/emacs-lsp-booster`

Then, put the `emacs-lsp-booster` binary in your $PATH (e.g. `~/.local/bin`).
2. Run `RUSTFLAGS='-C target-cpu=native' cargo install emacs-lsp-booster`. Make sure to include the cargo bin folder in your $PATH.

### Configure `lsp-mode`

Expand Down
10 changes: 8 additions & 2 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ pub fn run_app_forever(client_reader: impl std::io::Read + Send + 'static,
client_writer: impl std::io::Write + Send + 'static,
mut server_cmd: std::process::Command,
options: AppOptions) -> Result<std::process::ExitStatus> {
info!("Running server {:?}", server_cmd);
info!("About to run the lsp server with command {:?}", server_cmd);
if let Some(ref bytecode_options) = options.bytecode_options {
info!("Will convert server json to bytecode! bytecode options: {:?}", bytecode_options);
} else {
Expand All @@ -113,7 +113,13 @@ pub fn run_app_forever(client_reader: impl std::io::Read + Send + 'static,
.stdin(std::process::Stdio::piped())
.stdout(std::process::Stdio::piped())
.stderr(std::process::Stdio::inherit())
.spawn()?;
.spawn()
.with_context(|| {
format!(
"Failed to run the lsp server with command: {:?}",
server_cmd
)
})?;

let (c2s_channel_pub, c2s_channel_sub) = mpsc::channel::<String>();
let c2s_channel_counter = Arc::new(AtomicI32::new(0));
Expand Down

0 comments on commit 2f67533

Please sign in to comment.