Skip to content

Commit 0b82318

Browse files
committed
Temporarily disable completion resolve support for neovim
1 parent c6208c8 commit 0b82318

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

crates/rust-analyzer/src/config.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -1455,7 +1455,7 @@ impl Config {
14551455
limit: self.completion_limit(source_root).to_owned(),
14561456
enable_term_search: self.completion_termSearch_enable(source_root).to_owned(),
14571457
term_search_fuel: self.completion_termSearch_fuel(source_root).to_owned() as u64,
1458-
fields_to_resolve: if self.client_is_helix() {
1458+
fields_to_resolve: if self.client_is_helix() || self.client_is_neovim() {
14591459
CompletionFieldsToResolve::empty()
14601460
} else {
14611461
CompletionFieldsToResolve::from_client_capabilities(&client_capability_fields)
@@ -2183,6 +2183,10 @@ impl Config {
21832183
pub fn client_is_helix(&self) -> bool {
21842184
self.client_info.as_ref().map(|it| it.name == "helix").unwrap_or_default()
21852185
}
2186+
2187+
pub fn client_is_neovim(&self) -> bool {
2188+
self.client_info.as_ref().map(|it| it.name == "Neovim").unwrap_or_default()
2189+
}
21862190
}
21872191
// Deserialization definitions
21882192

crates/rust-analyzer/src/lsp/capabilities.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pub fn server_capabilities(config: &Config) -> ServerCapabilities {
4141
})),
4242
hover_provider: Some(HoverProviderCapability::Simple(true)),
4343
completion_provider: Some(CompletionOptions {
44-
resolve_provider: if config.client_is_helix() {
44+
resolve_provider: if config.client_is_helix() || config.client_is_neovim() {
4545
None
4646
} else {
4747
Some(config.caps().completions_resolve_provider())

0 commit comments

Comments
 (0)