Skip to content

Commit

Permalink
Temporarily disable completion resolve support for neovim
Browse files Browse the repository at this point in the history
Veykril committed Dec 6, 2024
1 parent c6208c8 commit ad01392
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion crates/rust-analyzer/src/config.rs
Original file line number Diff line number Diff line change
@@ -1455,7 +1455,7 @@ impl Config {
limit: self.completion_limit(source_root).to_owned(),
enable_term_search: self.completion_termSearch_enable(source_root).to_owned(),
term_search_fuel: self.completion_termSearch_fuel(source_root).to_owned() as u64,
fields_to_resolve: if self.client_is_helix() {
fields_to_resolve: if self.client_is_helix() || self.client_is_neovim() {
CompletionFieldsToResolve::empty()
} else {
CompletionFieldsToResolve::from_client_capabilities(&client_capability_fields)
@@ -2183,6 +2183,10 @@ impl Config {
pub fn client_is_helix(&self) -> bool {
self.client_info.as_ref().map(|it| it.name == "helix").unwrap_or_default()
}

pub fn client_is_neovim(&self) -> bool {
self.client_info.as_ref().map(|it| it.name == "Neovim").unwrap_or_default()
}
}
// Deserialization definitions

4 changes: 2 additions & 2 deletions crates/rust-analyzer/src/lsp/capabilities.rs
Original file line number Diff line number Diff line change
@@ -41,8 +41,8 @@ pub fn server_capabilities(config: &Config) -> ServerCapabilities {
})),
hover_provider: Some(HoverProviderCapability::Simple(true)),
completion_provider: Some(CompletionOptions {
resolve_provider: if config.client_is_helix() {
None
resolve_provider: if config.client_is_helix() || config.client_is_neovim() {
config.completion_item_edit_resolve().then_some(true)
} else {
Some(config.caps().completions_resolve_provider())
},

0 comments on commit ad01392

Please sign in to comment.