summaryrefslogtreecommitdiff
path: root/src/ide
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-03-18 19:27:31 +0100
committerLaurenz <laurmaedje@gmail.com>2023-03-18 19:27:31 +0100
commita69b5874558eb50c96293813cbe67aac38174644 (patch)
treec59e671a4f73b467fc1f7f4de1d01ed6cfe24afe /src/ide
parenta16726ae6652a795ff24f368ca25f93bae673366 (diff)
Rename formula to equation
Diffstat (limited to 'src/ide')
-rw-r--r--src/ide/complete.rs12
-rw-r--r--src/ide/highlight.rs6
2 files changed, 9 insertions, 9 deletions
diff --git a/src/ide/complete.rs b/src/ide/complete.rs
index 66590160..4a1f0216 100644
--- a/src/ide/complete.rs
+++ b/src/ide/complete.rs
@@ -237,13 +237,13 @@ fn markup_completions(ctx: &mut CompletionContext) {
ctx.snippet_completion(
"math (inline)",
"$${x}$",
- "Inserts an inline-level mathematical formula.",
+ "Inserts an inline-level mathematical equation.",
);
ctx.snippet_completion(
"math (block)",
"$ ${sum_x^2} $",
- "Inserts a block-level mathematical formula.",
+ "Inserts a block-level mathematical equation.",
);
}
@@ -251,7 +251,7 @@ fn markup_completions(ctx: &mut CompletionContext) {
fn complete_math(ctx: &mut CompletionContext) -> bool {
if !matches!(
ctx.leaf.parent_kind(),
- Some(SyntaxKind::Formula)
+ Some(SyntaxKind::Equation)
| Some(SyntaxKind::Math)
| Some(SyntaxKind::MathFrac)
| Some(SyntaxKind::MathAttach)
@@ -935,10 +935,10 @@ impl<'a> CompletionContext<'a> {
/// Add completions for all font families.
fn font_completions(&mut self) {
- let formula = self.before[self.cursor.saturating_sub(25)..].contains("formula");
+ let equation = self.before[self.cursor.saturating_sub(25)..].contains("equation");
for (family, iter) in self.world.book().families() {
let detail = summarize_font_family(iter);
- if !formula || family.contains("Math") {
+ if !equation || family.contains("Math") {
self.value_completion(
None,
&Value::Str(family.into()),
@@ -1121,7 +1121,7 @@ impl<'a> CompletionContext<'a> {
let in_math = matches!(
self.leaf.parent_kind(),
- Some(SyntaxKind::Formula)
+ Some(SyntaxKind::Equation)
| Some(SyntaxKind::Math)
| Some(SyntaxKind::MathFrac)
| Some(SyntaxKind::MathAttach)
diff --git a/src/ide/highlight.rs b/src/ide/highlight.rs
index 6214328b..e948975b 100644
--- a/src/ide/highlight.rs
+++ b/src/ide/highlight.rs
@@ -27,9 +27,9 @@ pub enum Tag {
ListMarker,
/// A term in a term list.
ListTerm,
- /// The delimiters of a math formula.
+ /// The delimiters of an equation.
MathDelimiter,
- /// An operator with special meaning in a math formula.
+ /// An operator with special meaning in an equation.
MathOperator,
/// A keyword.
Keyword,
@@ -138,7 +138,7 @@ pub fn highlight(node: &LinkedNode) -> Option<Tag> {
SyntaxKind::EnumMarker => Some(Tag::ListMarker),
SyntaxKind::TermItem => None,
SyntaxKind::TermMarker => Some(Tag::ListMarker),
- SyntaxKind::Formula => None,
+ SyntaxKind::Equation => None,
SyntaxKind::Math => None,
SyntaxKind::MathIdent => highlight_ident(node),