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

Support for comment continuation as a convenience? #536

Closed
hindol opened this issue Dec 31, 2019 · 6 comments
Closed

Support for comment continuation as a convenience? #536

hindol opened this issue Dec 31, 2019 · 6 comments

Comments

@hindol
Copy link

hindol commented Dec 31, 2019

Do we want to support certain groups of ; as block comments? Meaning, upon hitting <enter> the new line begins as a comment.

Before:

;;; A quick brown fox... [cursor] <enter>

After:

;;; A quick brown fox...
;;; [cursor]

Maybe we can follow the ELisp convention to identify which ones are block comments.

@PEZ
Copy link
Collaborator

PEZ commented Feb 22, 2020

Hello. Sorry for the complete radio silence! Good that @filipesilva reminded me about this suggestion.

Anyway, here's a VSIX with the continuation implemented. I think it feels pretty good and would answer yes to your question.

https://4021-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.77-wip-add-comment-continuation-d5898ba7.vsix

Right now I only continue line comments with two semicolons. But it would be easy to do it for any line starting with any number of semicolons.

Please give it a spin and we can talk about what to do about this.

@PEZ
Copy link
Collaborator

PEZ commented Feb 22, 2020

And here's a build where we don't count the semicolons in order for continuation to happen. 😄

https://4026-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.77-wip-add-comment-continuation-1861c8da.vsix

@hindol
Copy link
Author

hindol commented Feb 23, 2020

Cool! Thanks for working on it. How do I use this VSIX thing? Never used one before.

@PEZ
Copy link
Collaborator

PEZ commented Feb 23, 2020

@PEZ PEZ closed this as completed in d5898ba Feb 23, 2020
@hindol
Copy link
Author

hindol commented Feb 23, 2020

@PEZ I tried the first build, and I like it! Although, it seems you mixed up the builds as this one does not seem to care how many semicolons are there.

Personally, I would like two or more semicolons to continue automatically to the next line. Single semicolons left alone.

@PEZ
Copy link
Collaborator

PEZ commented Feb 24, 2020

I opted for continuation on any line that starts with a semicolon or more. So if a single semi colon is used at the end of a line, it won't be continued.

PEZ added a commit that referenced this issue Mar 6, 2020
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

No branches or pull requests

2 participants