vscode-lean
vscode-lean copied to clipboard
Add some basic snippets
Not sure if these are really all that useful, but though I'd suggest them anyway.
I think these could prove to be fairly controversial. You automatically get a lot of text when you type structure
. I don't see an easy way to avoid the snippets since you need to type structure
as a keyword. Can we add an options in the settings to enable them?
Note that it's also possible to add the snippets to e.g. mathlib.
I don't see an easy way to avoid the snippets since you need to type
structure
as a keyword. Can we add an options in the settings to enable them?
vscode lets you pick between the two options, and uses your last choice as a default:
Can we add an options in the settings to enable them?
We could, but there are already extensions to manage unwanted snippets like https://github.com/svipas/vscode-control-snippets. https://github.com/Microsoft/vscode/issues/10565 is related.
Ok, so I've tried them out a bit.
- They are not triggered automatically unless you explicitly select them in the dropdown. This is good.
- The
structure
snippet does not follow the mathlib style guide. The:=
should be at the end of the first line. The fields should not be indented. - The input abbreviation does not work in snippets. That is, you can't type
\nat
in a snippet field. :sob: - I'm not sure how much they help. The lean syntax does not have much boilerplate. At best I don't have to type
:=
but that's it.
I've posted a thread in the PR reviews stream on zulip.