-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Indentation issue : "\in" #757
Comments
Hi. Sadly the Poor work around: put parenthesis around |
The lexer now glues a "\" to an immediately following word if it is itself preceded by a space. Note that for really good indentation you should try to add something like this to your configuration: (setq coq-smie-user-tokens '(("\\in" . "="))) to tell the indentation grammar that \in has the same precedence as "=".
Actually I think I found a simple way to fix this. @KimayaBedarkar can you test this? Require Import mathcomp.ssreflect.ssrbool.
Definition xx := nat.
Module foo.
(* from PG issue #757 *)
Lemma test:
forall a : nat,
a \in [::] -> (* "\in" should be detected as one token *)
False.
Proof.
Abort.
Lemma test2:
forall a : nat,
a \in (* "\in" should be detected as one token *)
[::] ->
False.
End foo. |
The lexer now glues a "\" to an immediately following word if it is itself preceded by a space. Note that for really good indentation you should try to add something like this to your configuration: (setq coq-smie-user-tokens '(("\\in" . "="))) to tell the indentation grammar that \in has the same precedence as "=". Test added.
The lexer now glues a "\" to an immediately following word if it is itself preceded by a space. Note that for really good indentation you should try to add something like this to your configuration: (setq coq-smie-user-tokens '(("\\in" . "="))) to tell the indentation grammar that \in has the same precedence as "=".
SSReflect uses
\in
as opposed to the unicode∈
to indicate membership in lists. However, the former is not indented correctly.Example:
as opposed to:
The text was updated successfully, but these errors were encountered: