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

[Request] want to change the comment style from "#;" which is inserted by "Ctrl + Slash" #1350

Closed
isc-bsaviano opened this issue Apr 18, 2024 · 9 comments · Fixed by #1353
Closed
Assignees
Labels
enhancement New feature or request

Comments

@isc-bsaviano
Copy link
Contributor

Discussed in https://github.com/intersystems-community/vscode-objectscript/discussions/1349

Originally posted by seisuke24am April 18, 2024
Both vscode-objectscript and Studio, when "Ctrl + Slash" is put in the editor window, the comment #; is inserted in the code.

IRIS Studio has the option that users can change this comment style from #; to anything as they like.
image

Currently vscode-objectscript extention does not have this option so they cannot change the comment delimiter style.
So I put this request to add new option to change the comment delimiters.

@isc-bsaviano
Copy link
Contributor Author

@seisuke24am In the future, please post bug reports/feature requests as issues. I don't think this is possible. VS Code's language configuration allow for one comment token per language, per type (block or line).

@gjsjohnmurray Do you know if a way we could support this?

@gjsjohnmurray
Copy link
Contributor

@isc-bsaviano I think we set it here

lineComment: ["objectscript-class", "objectscript-int"].includes(lang) ? "//" : "#;",

So it ought to be possible to support a config setting that overrides what we return to VS Code.

@isc-bsaviano
Copy link
Contributor Author

That's true, but the language configuration is only set once at activation.

@gjsjohnmurray
Copy link
Contributor

So it could be a setting that we state requires a reload.

@gjsjohnmurray
Copy link
Contributor

Or try a listener for the setting change, then dispose the previous setLanguageConfiguration object and set a new one?

@isc-bsaviano
Copy link
Contributor Author

The second approach is the one I would use. I don't feel strongly about this feature, but I'll leave it open for people to comment.

@isc-bsaviano isc-bsaviano added the enhancement New feature or request label Apr 18, 2024
@isc-rsingh
Copy link
Member

@seisuke24am this is an interesting idea. I would like to see additional interest before committing to find the right way to implement this. I advise requesting upvotes with a post on the InterSystems developer community to gain support for your feature.

@seisuke24am
Copy link

Thank you @isc-bsaviano to move my post here. I got it, I'll put similar enhancements requests here in "Issues".

Great idea @isc-rsingh , I posted the article to developer community about this request.
https://community.intersystems.com/post/agree-or-disagree-change-comment-delimiters-vs-code-extension

@isc-bsaviano
Copy link
Contributor Author

Given the comments on the DC post and the fact that this was reported on behalf of a customer, I'm going to implement it.

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

Successfully merging a pull request may close this issue.

4 participants