From d824120a2cfb1ffa8cf73b5280a8f6dfe2cf3148 Mon Sep 17 00:00:00 2001 From: Zsolt Dollenstein Date: Thu, 15 Feb 2024 10:27:10 -0800 Subject: [PATCH] starlark_lsp: remove all completion triggers Summary: D53530861 removed a few completion triggers that were uncontroversial, and this improved the appearance of annoying autocomplete popups. This diff removes the rest of the trigger characters, because after further testing they aren't very useful: opening parenthesis: {F1456353169} string quote: {F1456353307} assignment doesn't seem to work anyway. Reviewed By: JakobDegen Differential Revision: D53756130 fbshipit-source-id: 8bc9ef96158f9320d37f8382406de298099e5f0a --- starlark-rust/starlark_lsp/src/server.rs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/starlark-rust/starlark_lsp/src/server.rs b/starlark-rust/starlark_lsp/src/server.rs index e2bd17b135d4..4b317e6ea825 100644 --- a/starlark-rust/starlark_lsp/src/server.rs +++ b/starlark-rust/starlark_lsp/src/server.rs @@ -47,7 +47,6 @@ use lsp_types::request::GotoDefinition; use lsp_types::request::HoverRequest; use lsp_types::CompletionItem; use lsp_types::CompletionItemKind; -use lsp_types::CompletionOptions; use lsp_types::CompletionParams; use lsp_types::CompletionResponse; use lsp_types::DefinitionOptions; @@ -406,17 +405,6 @@ impl Backend { ServerCapabilities { text_document_sync: Some(TextDocumentSyncCapability::Kind(TextDocumentSyncKind::FULL)), definition_provider, - completion_provider: Some(CompletionOptions { - trigger_characters: Some(vec![ - // e.g. function call - "(".to_owned(), - // e.g. variable assignment - "=".to_owned(), - // e.g. string literal (load path, target name) - "\"".to_owned(), - ]), - ..Default::default() - }), hover_provider: Some(HoverProviderCapability::Simple(true)), ..ServerCapabilities::default() }