Zulip Chat Archive
Stream: mathlib4
Topic: Linting in VS code
Thomas Murrills (Nov 17 2022 at 22:25):
Is VS code with the lean extension supposed to word-wrap for you? Currently word wrapping in VS code (alt Z) refers only to visual word-wrapping, as opposed to actually chopping up lines with newlines when they get too long. (I tried running scripts/lint-style.sh
on advice, but got the error (touch: scripts/style-exceptions.txt: No such file or directory
)
Yaël Dillies (Nov 17 2022 at 22:26):
No, sorry for the confusion, it's only a visual aid.
Thomas Murrills (Nov 17 2022 at 22:28):
Gotcha! Others seemed to suggest that somehow the lean extension was capable of wrapping via newlines at 100 characters, though. Did I interpret what was said correctly?
Yaël Dillies (Nov 17 2022 at 22:29):
Pretty sure they meant the vertical bar here
Thomas Murrills (Nov 17 2022 at 22:30):
Hmm, ok. So is it standard practice to go through and insert newlines at 100 characters by hand?
Mario Carneiro (Nov 17 2022 at 22:32):
yes. Automatic line wrapping would play havoc with lean's whitespace sensitivity unless lean is doing the reformatting
Jireh Loreaux (Nov 17 2022 at 22:32):
Generally you're writing new code instead of copying, so hitting Enter
isn't a big deal. It's just a bit weird because mathport is outputting long lines in comments right now.
Mario Carneiro (Nov 17 2022 at 22:33):
in comments? If they are lean 3 comments then they should already be line-wrapped
Mario Carneiro (Nov 17 2022 at 22:33):
do you mean mathport's own notes (e.g. error messages)?
Jireh Loreaux (Nov 17 2022 at 22:38):
Yeah, for example, the output of dubious translations.
Jireh Loreaux (Nov 17 2022 at 22:39):
I'm not saying it's a big deal, only that it's not something that would be an issue under normal circumstances.
Mario Carneiro (Nov 17 2022 at 22:39):
those lines should generally be deleted from the file
Mario Carneiro (Nov 17 2022 at 22:40):
I think mathport's output can also be > 100 characters in regular code, it's using the default formatter settings which I think might be a bit more than 100 chars
Jireh Loreaux (Nov 17 2022 at 22:41):
I've seen that in a few places too.
Last updated: Dec 20 2023 at 11:08 UTC