diff options
Diffstat (limited to 'support/texlab/crates/parser/src/config.rs')
-rw-r--r-- | support/texlab/crates/parser/src/config.rs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/support/texlab/crates/parser/src/config.rs b/support/texlab/crates/parser/src/config.rs index 3a2e9e3e93..6537d21b0d 100644 --- a/support/texlab/crates/parser/src/config.rs +++ b/support/texlab/crates/parser/src/config.rs @@ -7,6 +7,7 @@ pub struct SyntaxConfig { pub enum_environments: FxHashSet<String>, pub verbatim_environments: FxHashSet<String>, pub citation_commands: FxHashSet<String>, + pub label_reference_commands: FxHashSet<String>, } impl Default for SyntaxConfig { @@ -31,12 +32,18 @@ impl Default for SyntaxConfig { .map(ToString::to_string) .collect(); + let label_reference_commands = DEFAULT_LABEL_REFERENCE_COMMANDS + .iter() + .map(ToString::to_string) + .collect(); + Self { follow_package_links: false, math_environments, enum_environments, verbatim_environments, citation_commands, + label_reference_commands, } } } @@ -155,3 +162,24 @@ static DEFAULT_CITATION_COMMANDS: &[&str] = &[ "citeA", "citeA*", ]; + +static DEFAULT_LABEL_REFERENCE_COMMANDS: &[&str] = &[ + "ref", + "vref", + "Vref", + "autoref", + "pageref", + "cref", + "cref*", + "Cref", + "Cref*", + "namecref", + "nameCref", + "lcnamecref", + "namecrefs", + "nameCrefs", + "lcnamecrefs", + "labelcref", + "labelcpageref", + "eqref", +]; |