Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-core/src/completion.rs')
-rw-r--r--helix-core/src/completion.rs15
1 files changed, 14 insertions, 1 deletions
diff --git a/helix-core/src/completion.rs b/helix-core/src/completion.rs
index 0bd111eb..c13b440c 100644
--- a/helix-core/src/completion.rs
+++ b/helix-core/src/completion.rs
@@ -1,6 +1,6 @@
use std::borrow::Cow;
-use crate::Transaction;
+use crate::{diagnostic::LanguageServerId, Transaction};
#[derive(Debug, PartialEq, Clone)]
pub struct CompletionItem {
@@ -9,4 +9,17 @@ pub struct CompletionItem {
pub kind: Cow<'static, str>,
/// Containing Markdown
pub documentation: String,
+ pub provider: CompletionProvider,
+}
+
+#[derive(Debug, PartialEq, Eq, Hash, Clone, Copy)]
+pub enum CompletionProvider {
+ Lsp(LanguageServerId),
+ Path,
+}
+
+impl From<LanguageServerId> for CompletionProvider {
+ fn from(id: LanguageServerId) -> Self {
+ CompletionProvider::Lsp(id)
+ }
}