mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-14 14:13:58 +00:00
Temporarily disable completion resolve support for neovim
This commit is contained in:
parent
c6208c86a5
commit
ad01392756
2 changed files with 7 additions and 3 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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())
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue