diff options
Diffstat (limited to 'support/texlab/crates/parser/src/latex/lexer/commands.rs')
-rw-r--r-- | support/texlab/crates/parser/src/latex/lexer/commands.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/support/texlab/crates/parser/src/latex/lexer/commands.rs b/support/texlab/crates/parser/src/latex/lexer/commands.rs index c5fe48e0c9..b6e1d11737 100644 --- a/support/texlab/crates/parser/src/latex/lexer/commands.rs +++ b/support/texlab/crates/parser/src/latex/lexer/commands.rs @@ -1,6 +1,6 @@ use crate::SyntaxConfig; -use super::types::{CommandName, SectionLevel}; +use super::types::{CommandName, ParagraphLevel, SectionLevel}; pub fn classify(name: &str, config: &SyntaxConfig) -> CommandName { match name { @@ -13,8 +13,8 @@ pub fn classify(name: &str, config: &SyntaxConfig) -> CommandName { "section" | "section*" => CommandName::Section(SectionLevel::Section), "subsection" | "subsection*" => CommandName::Section(SectionLevel::Subsection), "subsubsection" | "subsubsection*" => CommandName::Section(SectionLevel::Subsubsection), - "paragraph" | "paragraph*" => CommandName::Section(SectionLevel::Paragraph), - "subparagraph" | "subparagraph*" => CommandName::Section(SectionLevel::Subparagraph), + "paragraph" | "paragraph*" => CommandName::Paragraph(ParagraphLevel::Paragraph), + "subparagraph" | "subparagraph*" => CommandName::Paragraph(ParagraphLevel::Subparagraph), "item" => CommandName::EnumItem, "caption" => CommandName::Caption, "usepackage" | "RequirePackage" => CommandName::PackageInclude, @@ -67,9 +67,8 @@ pub fn classify(name: &str, config: &SyntaxConfig) -> CommandName { | "Glsentrylong" | "glsentrylongpl" | "Glsentrylongpl" | "glsentryshort" | "Glsentryshort" | "glsentryshortpl" | "Glsentryshortpl" | "glsentryfullpl" | "Glsentryfullpl" => CommandName::AcronymReference, - "newtheorem" | "newtheorem*" | "declaretheorem" | "declaretheorem*" => { - CommandName::TheoremDefinition - } + "newtheorem" | "newtheorem*" => CommandName::TheoremDefinitionAmsThm, + "declaretheorem" | "declaretheorem*" => CommandName::TheoremDefinitionThmTools, "color" | "colorbox" | "textcolor" | "pagecolor" => CommandName::ColorReference, "definecolor" => CommandName::ColorDefinition, "definecolorset" => CommandName::ColorSetDefinition, |