diff options
Diffstat (limited to 'language-web/src/main/js/language')
-rw-r--r-- | language-web/src/main/js/language/indentation.ts | 2 | ||||
-rw-r--r-- | language-web/src/main/js/language/problemLanguageSupport.ts | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/language-web/src/main/js/language/indentation.ts b/language-web/src/main/js/language/indentation.ts index b2f0134b..973b4a80 100644 --- a/language-web/src/main/js/language/indentation.ts +++ b/language-web/src/main/js/language/indentation.ts | |||
@@ -78,7 +78,7 @@ export function indentDeclaration(context: TreeIndentContext): number { | |||
78 | export function indentPredicate(context: TreeIndentContext): number { | 78 | export function indentPredicate(context: TreeIndentContext): number { |
79 | const clauseIndent = indentDeclarationStrategy(context, 1); | 79 | const clauseIndent = indentDeclarationStrategy(context, 1); |
80 | if (/^\s+(;|\.)/.exec(context.textAfter) !== null) { | 80 | if (/^\s+(;|\.)/.exec(context.textAfter) !== null) { |
81 | return clauseIndent - context.unit; | 81 | return clauseIndent - 2; |
82 | } | 82 | } |
83 | return clauseIndent; | 83 | return clauseIndent; |
84 | } | 84 | } |
diff --git a/language-web/src/main/js/language/problemLanguageSupport.ts b/language-web/src/main/js/language/problemLanguageSupport.ts index c9e61b31..80d25d71 100644 --- a/language-web/src/main/js/language/problemLanguageSupport.ts +++ b/language-web/src/main/js/language/problemLanguageSupport.ts | |||
@@ -3,6 +3,7 @@ import { | |||
3 | foldInside, | 3 | foldInside, |
4 | foldNodeProp, | 4 | foldNodeProp, |
5 | indentNodeProp, | 5 | indentNodeProp, |
6 | indentUnit, | ||
6 | LanguageSupport, | 7 | LanguageSupport, |
7 | LRLanguage, | 8 | LRLanguage, |
8 | } from '@codemirror/language'; | 9 | } from '@codemirror/language'; |
@@ -79,5 +80,7 @@ const problemLanguage = LRLanguage.define({ | |||
79 | }); | 80 | }); |
80 | 81 | ||
81 | export function problemLanguageSupport(): LanguageSupport { | 82 | export function problemLanguageSupport(): LanguageSupport { |
82 | return new LanguageSupport(problemLanguage); | 83 | return new LanguageSupport(problemLanguage, [ |
84 | indentUnit.of(' '), | ||
85 | ]); | ||
83 | } | 86 | } |