Skip to content
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

feat: auto-close angle brackets #405

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

mhuisi
Copy link
Collaborator

@mhuisi mhuisi commented Mar 13, 2024

This PR adjusts the language-configuration.json to automatically insert a closing bracket when typing \<, automatically triggering the \<> abbreviation, making it look like we auto-closed . The only downside of this approach is that then deleting will not delete the corresponding (as would be the case with actual auto-closed brackets), but implementing this is a lot more difficult, since sending edits to VS Code is often subject to race conditions (c.f. #389).

We unfortunately cannot use this approach for \f< and \f<< as VS Code would always automatically auto-close \f< due to the common prefix, making it impossible to type \f<<.

Resolves #331.

@mhuisi mhuisi merged commit 62ff13b into leanprover:master Mar 14, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Autoclosing convention for unicode brackets
1 participant