rc coq: remove unconventional indentation

The next commit will touch this file.
This commit is contained in:
Johannes Altmanninger 2022-05-08 14:59:26 +02:00
parent fea851b78b
commit 19806a4b4c

View File

@ -27,27 +27,27 @@ provide-module coq %{
# Syntax
# ------
# This is a `looks sensible' keyword syntax highlighting, far from being correct.
# Note that only the core language and the proof language is supported,
# the Ltac language is not (for now).
# This is a `looks sensible' keyword syntax highlighting, far from being correct.
# Note that only the core language and the proof language is supported,
# the Ltac language is not (for now).
add-highlighter shared/coq regions
add-highlighter shared/coq regions
add-highlighter shared/coq/comment region -recurse \Q(* \Q(* \Q*) fill comment
add-highlighter shared/coq/string region (?<!")" (?<!")("")*" fill string
add-highlighter shared/coq/comment region -recurse \Q(* \Q(* \Q*) fill comment
add-highlighter shared/coq/string region (?<!")" (?<!")("")*" fill string
add-highlighter shared/coq/command default-region group
add-highlighter shared/coq/command default-region group
# This is not any lexical convention of coq, simply highlighting used to make
# proofs look better, based on how people usually use notations
add-highlighter shared/coq/command/ regex [`!@#$%^&*-=+\\:\;|<>/]+ 0:operator
add-highlighter shared/coq/command/ regex \(dfs\)|\(bfs\) 0:operator
add-highlighter shared/coq/command/ regex [()\[\]{}] 0:operator
# This is not any lexical convention of coq, simply highlighting used to make
# proofs look better, based on how people usually use notations
add-highlighter shared/coq/command/ regex [`!@#$%^&*-=+\\:\;|<>/]+ 0:operator
add-highlighter shared/coq/command/ regex \(dfs\)|\(bfs\) 0:operator
add-highlighter shared/coq/command/ regex [()\[\]{}] 0:operator
# numeral literals
add-highlighter shared/coq/command/ regex [-]?[0-9][0-9_]*(\.[0-9_]+)?([eE][+-][0-9_]+)? 0:value
# numeral literals
add-highlighter shared/coq/command/ regex [-]?[0-9][0-9_]*(\.[0-9_]+)?([eE][+-][0-9_]+)? 0:value
evaluate-commands %sh{
evaluate-commands %sh{
# These are builtin keywords of the Gallina language (without tactics)
keywords="_ IF Prop SProp Set Type as at by cofix discriminated else end exists exists2 fix for"
keywords="${keywords} forall fun if in lazymatch let match multimatch return then using where with"
@ -101,7 +101,7 @@ provide-module coq %{
printf %s "
add-highlighter shared/coq/command/ regex \b(${tactics_regex})\b 0:keyword
"
}
}
# Indentation
# -----------
@ -109,7 +109,7 @@ provide-module coq %{
# not based on explicit, unique delimiters, like braces in C-family.
# So it is difficult to properly indent using only regex...
# Hence here only a simple mechanism of copying indent is done.
define-command -hidden coq-copy-indent-on-newline %{
define-command -hidden coq-copy-indent-on-newline %{
evaluate-commands -draft -itersel %{
try %{ execute-keys -draft k <a-x> s ^\h+ <ret> y gh j P }
}