summaryrefslogtreecommitdiff
path: root/support/texlab/src/syntax/lsp_kind.rs
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-05-23 03:00:39 +0000
committerNorbert Preining <norbert@preining.info>2021-05-23 03:00:39 +0000
commitf1261b349e875b842745b63258c3e338cb1fe3bf (patch)
treeb5d402b3e80818cde2c079a42249f3dcb9732247 /support/texlab/src/syntax/lsp_kind.rs
parent58aa1ac09b1d9e4769d0a0661cf12e2b2db41b14 (diff)
CTAN sync 202105230300
Diffstat (limited to 'support/texlab/src/syntax/lsp_kind.rs')
-rw-r--r--support/texlab/src/syntax/lsp_kind.rs93
1 files changed, 0 insertions, 93 deletions
diff --git a/support/texlab/src/syntax/lsp_kind.rs b/support/texlab/src/syntax/lsp_kind.rs
deleted file mode 100644
index 7d92fd4ee4..0000000000
--- a/support/texlab/src/syntax/lsp_kind.rs
+++ /dev/null
@@ -1,93 +0,0 @@
-use super::lang_data::BibtexEntryTypeCategory;
-use crate::protocol::{CompletionItemKind, SymbolKind};
-
-#[derive(Debug, PartialEq, Eq, Clone, Copy)]
-pub enum Structure {
- Command,
- Snippet,
- Environment,
- Section,
- Float,
- Theorem,
- Equation,
- Item,
- Label,
- Folder,
- File,
- PgfLibrary,
- TikzLibrary,
- Color,
- ColorModel,
- Package,
- Class,
- Entry(BibtexEntryTypeCategory),
- Field,
- Argument,
- GlossaryEntry,
-}
-
-impl Structure {
- pub fn completion_kind(self) -> CompletionItemKind {
- match self {
- Self::Command => CompletionItemKind::Function,
- Self::Snippet => CompletionItemKind::Snippet,
- Self::Environment => CompletionItemKind::Enum,
- Self::Section => CompletionItemKind::Module,
- Self::Float => CompletionItemKind::Method,
- Self::Theorem => CompletionItemKind::Variable,
- Self::Equation => CompletionItemKind::Constant,
- Self::Item => CompletionItemKind::EnumMember,
- Self::Label => CompletionItemKind::Constructor,
- Self::Folder => CompletionItemKind::Folder,
- Self::File => CompletionItemKind::File,
- Self::PgfLibrary => CompletionItemKind::Property,
- Self::TikzLibrary => CompletionItemKind::Property,
- Self::Color => CompletionItemKind::Color,
- Self::ColorModel => CompletionItemKind::Color,
- Self::Package => CompletionItemKind::Class,
- Self::Class => CompletionItemKind::Class,
- Self::Entry(BibtexEntryTypeCategory::Misc) => CompletionItemKind::Interface,
- Self::Entry(BibtexEntryTypeCategory::String) => CompletionItemKind::Text,
- Self::Entry(BibtexEntryTypeCategory::Article) => CompletionItemKind::Event,
- Self::Entry(BibtexEntryTypeCategory::Book) => CompletionItemKind::Struct,
- Self::Entry(BibtexEntryTypeCategory::Collection) => CompletionItemKind::TypeParameter,
- Self::Entry(BibtexEntryTypeCategory::Part) => CompletionItemKind::Operator,
- Self::Entry(BibtexEntryTypeCategory::Thesis) => CompletionItemKind::Unit,
- Self::Field => CompletionItemKind::Field,
- Self::Argument => CompletionItemKind::Value,
- Self::GlossaryEntry => CompletionItemKind::Keyword,
- }
- }
-
- pub fn symbol_kind(self) -> SymbolKind {
- match self {
- Self::Command => SymbolKind::Function,
- Self::Snippet => unimplemented!(),
- Self::Environment => SymbolKind::Enum,
- Self::Section => SymbolKind::Module,
- Self::Float => SymbolKind::Method,
- Self::Theorem => SymbolKind::Variable,
- Self::Equation => SymbolKind::Constant,
- Self::Item => SymbolKind::EnumMember,
- Self::Label => SymbolKind::Constructor,
- Self::Folder => SymbolKind::Namespace,
- Self::File => SymbolKind::File,
- Self::PgfLibrary => SymbolKind::Property,
- Self::TikzLibrary => SymbolKind::Property,
- Self::Color => unimplemented!(),
- Self::ColorModel => unimplemented!(),
- Self::Package => SymbolKind::Class,
- Self::Class => SymbolKind::Class,
- Self::Entry(BibtexEntryTypeCategory::Misc) => SymbolKind::Interface,
- Self::Entry(BibtexEntryTypeCategory::String) => SymbolKind::String,
- Self::Entry(BibtexEntryTypeCategory::Article) => SymbolKind::Event,
- Self::Entry(BibtexEntryTypeCategory::Book) => SymbolKind::Struct,
- Self::Entry(BibtexEntryTypeCategory::Collection) => SymbolKind::TypeParameter,
- Self::Entry(BibtexEntryTypeCategory::Part) => SymbolKind::Operator,
- Self::Entry(BibtexEntryTypeCategory::Thesis) => SymbolKind::Object,
- Self::Field => SymbolKind::Field,
- Self::Argument => SymbolKind::Number,
- Self::GlossaryEntry => unimplemented!(),
- }
- }
-}