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

Automatic insertion of end keyword #18

Open
pdesaulniers opened this issue Jul 5, 2020 · 1 comment
Open

Automatic insertion of end keyword #18

pdesaulniers opened this issue Jul 5, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@pdesaulniers
Copy link
Member

It would be nice if end tokens were inserted automatically when we press Return after then, record, etc.

See https://github.com/kaiwood/vscode-endwise for reference.

@pdesaulniers pdesaulniers added the enhancement New feature or request label Jul 5, 2020
@pdesaulniers pdesaulniers changed the title Automatic insertion of end tags Automatic insertion of end keyword Jul 5, 2020
@pdesaulniers
Copy link
Member Author

pdesaulniers commented Nov 13, 2021

It seems like we could implement this with onEnterRules.action.appendText in language-configuration.json: https://code.visualstudio.com/api/language-extensions/language-configuration-guide#on-enter-rules

EDIT: Nevermind, I think this wouldn't work. Pressing Enter might generate superfluous end tokens. We need to insert the matching end token ONLY if it is missing in the document.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant