Skip to content

Commit

Permalink
feat(cli): add --stdio argument to lsp-proxy command
Browse files Browse the repository at this point in the history
  • Loading branch information
nhedger committed Mar 7, 2024
1 parent 63d43be commit 314dc19
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 8 additions & 5 deletions crates/biome_cli/src/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,9 @@ pub enum BiomeCommand {
/// Allows to set a custom path when discovering the configuration file `biome.json`
#[bpaf(env("BIOME_CONFIG_PATH"), long("config-path"), argument("PATH"))]
Option<PathBuf>,
/// Bogus argument to make the command work with vscode-languageclient
#[bpaf(long("stdio"), hide, hide_usage, switch)]
bool,
),
/// It updates the configuration when there are breaking changes
#[bpaf(command)]
Expand Down Expand Up @@ -327,7 +330,7 @@ impl BiomeCommand {
| BiomeCommand::Ci { cli_options, .. }
| BiomeCommand::Format { cli_options, .. }
| BiomeCommand::Migrate { cli_options, .. } => cli_options.colors.as_ref(),
BiomeCommand::LspProxy(_)
BiomeCommand::LspProxy(_, _)
| BiomeCommand::Start(_)
| BiomeCommand::Stop
| BiomeCommand::Init(_)
Expand All @@ -350,7 +353,7 @@ impl BiomeCommand {
| BiomeCommand::Start(_)
| BiomeCommand::Stop
| BiomeCommand::Explain { .. }
| BiomeCommand::LspProxy(_)
| BiomeCommand::LspProxy(_, _)
| BiomeCommand::RunServer { .. }
| BiomeCommand::PrintSocket => false,
}
Expand All @@ -373,7 +376,7 @@ impl BiomeCommand {
| BiomeCommand::Stop
| BiomeCommand::Init(_)
| BiomeCommand::Explain { .. }
| BiomeCommand::LspProxy(_)
| BiomeCommand::LspProxy(_, _)
| BiomeCommand::RunServer { .. }
| BiomeCommand::PrintSocket => false,
}
Expand All @@ -387,7 +390,7 @@ impl BiomeCommand {
| BiomeCommand::Ci { cli_options, .. }
| BiomeCommand::Migrate { cli_options, .. } => cli_options.log_level.clone(),
BiomeCommand::Version(_)
| BiomeCommand::LspProxy(_)
| BiomeCommand::LspProxy(_, _)
| BiomeCommand::Rage(..)
| BiomeCommand::Start(_)
| BiomeCommand::Stop
Expand All @@ -406,7 +409,7 @@ impl BiomeCommand {
| BiomeCommand::Migrate { cli_options, .. } => cli_options.log_kind.clone(),
BiomeCommand::Version(_)
| BiomeCommand::Rage(..)
| BiomeCommand::LspProxy(_)
| BiomeCommand::LspProxy(_, _)
| BiomeCommand::Start(_)
| BiomeCommand::Stop
| BiomeCommand::Init(_)
Expand Down
2 changes: 1 addition & 1 deletion crates/biome_cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ impl<'app> CliSession<'app> {
),
BiomeCommand::Explain { doc } => commands::explain::explain(self, doc),
BiomeCommand::Init(emit_jsonc) => commands::init::init(self, emit_jsonc),
BiomeCommand::LspProxy(config_path) => commands::daemon::lsp_proxy(config_path),
BiomeCommand::LspProxy(config_path, _) => commands::daemon::lsp_proxy(config_path),
BiomeCommand::Migrate {
cli_options,
write,
Expand Down

0 comments on commit 314dc19

Please sign in to comment.