Skip to content

Commit 5887f98

Browse files
authored
Handle gopls generate commands server-side (#1142)
1 parent 437ee93 commit 5887f98

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

src/extensions/gopls.rs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ pub mod command {
99
// so probably a good idea to maintain both for a while.
1010
pub(super) const TEST: &str = "test";
1111
pub(super) const GOPLS_TEST: &str = "gopls.test";
12-
pub(super) const GENERATE: &str = "generate";
13-
pub(super) const GOPLS_GENERATE: &str = "gopls.generate";
1412
}
1513

1614
impl LanguageClient {
@@ -44,21 +42,6 @@ impl LanguageClient {
4442
}
4543
}
4644
}
47-
command::GENERATE | command::GOPLS_GENERATE => {
48-
if let Some(arguments) = &cmd.arguments {
49-
if let Some(package) = arguments.get(0) {
50-
let package = String::deserialize(package)?;
51-
let recursive =
52-
bool::deserialize(arguments.get(1).unwrap_or(&Value::Bool(false)))?;
53-
let cmd = match (package, recursive) {
54-
(package, false) => format!("term go generate -x {}", package),
55-
(_, true) => "term go generate -x ./...".into(),
56-
};
57-
self.vim()?.command(cmd)?;
58-
}
59-
}
60-
}
61-
6245
_ => return Ok(false),
6346
}
6447

0 commit comments

Comments
 (0)