Welcome to the Power Users community on Codidact!
Power Users is a Q&A site for questions about the usage of computer software and hardware. We are still a small site and would like to grow, so please consider joining our community. We are looking forward to your questions and answers; they are the building blocks of a repository of knowledge we are building together.
Post History
You can't edit it in settings, but I do know where those come from. It's in language-configuration.json, under comments: Comment toggling VS Code offers two commands for comment toggling. Toggl...
Answer
#3: Post edited
I don't know if you can edit it in settings, but I do know where those come from. It's in `language-configuration.json`, under `comments`:- > ## [Comment toggling][docs]
- > VS Code offers two commands for comment toggling. **Toggle Line Comment** and **Toggle Block Comment**. You can specify `comments.blockComment` and `comments.lineComment` to control how VS Code should comment out lines / blocks.
- >
- > ```json
- > {
- > "comments": {
- > "lineComment": "//",
- > "blockComment": ["/*", "*/"]
- > }
- > }
- > ```
Worst case, you may be able to modify the source of the package, but VSC may offer a way to modify package settings in your local config. (It has been a long time since I used it.)[docs]: https://code.visualstudio.com/api/language-extensions/language-configuration-guide#comment-toggling
- You can't edit it in settings, but I do know where those come from. It's in `language-configuration.json`, under `comments`:
- > ## [Comment toggling][docs]
- > VS Code offers two commands for comment toggling. **Toggle Line Comment** and **Toggle Block Comment**. You can specify `comments.blockComment` and `comments.lineComment` to control how VS Code should comment out lines / blocks.
- >
- > ```json
- > {
- > "comments": {
- > "lineComment": "//",
- > "blockComment": ["/*", "*/"]
- > }
- > }
- > ```
- Worst case, you may be able to modify the source of the package. VSC doesn't have options for tweaking those as part of its core. _However,_ since [other people][se] also have this need, Arturo Dent [made a package][dent] to maintain the package tweaks I suggested above.
- > For example, if you prefer your line comments to look like `// *` you can set it to that in specific languages. Here is an example setting in user `settings.json`:
- >
- > ```json
- > "custom-language-properties": {
- > "javascript.comments.lineComment": "// *",
- > "python.comments.lineComment": "# *",
- > "python.brackets": [["{","}"],["[","]"],["(",")"]]
- > }
- > ```
- >
- > These are NOT additional comment styles, the default comment styles will be replaced by those in your setting. I suggest you do not go crazy with comment style for example, as other editors may not recognize them as comments. So something like `// **` is fine (the leading `//` will still be recognized as a comment) but `**` by itself will not be recognized by another editor or person without this extension and that setting.
- [docs]: https://code.visualstudio.com/api/language-extensions/language-configuration-guide#comment-toggling
- [se]: https://stackoverflow.com/q/69138666/241211
- [dent]: https://github.com/ArturoDent/custom-language-properties
#2: Post edited
I don't know if you can edit it in settings, but I do know where those come from. It's in `language-config.json`, under `comments`:- > ## [Comment toggling][docs]
- > VS Code offers two commands for comment toggling. **Toggle Line Comment** and **Toggle Block Comment**. You can specify `comments.blockComment` and `comments.lineComment` to control how VS Code should comment out lines / blocks.
- >
- > ```json
- > {
- > "comments": {
- > "lineComment": "//",
- > "blockComment": ["/*", "*/"]
- > }
- > }
- > ```
- [docs]: https://code.visualstudio.com/api/language-extensions/language-configuration-guide#comment-toggling
- I don't know if you can edit it in settings, but I do know where those come from. It's in `language-configuration.json`, under `comments`:
- > ## [Comment toggling][docs]
- > VS Code offers two commands for comment toggling. **Toggle Line Comment** and **Toggle Block Comment**. You can specify `comments.blockComment` and `comments.lineComment` to control how VS Code should comment out lines / blocks.
- >
- > ```json
- > {
- > "comments": {
- > "lineComment": "//",
- > "blockComment": ["/*", "*/"]
- > }
- > }
- > ```
- Worst case, you may be able to modify the source of the package, but VSC may offer a way to modify package settings in your local config. (It has been a long time since I used it.)
- [docs]: https://code.visualstudio.com/api/language-extensions/language-configuration-guide#comment-toggling
#1: Initial revision
I don't know if you can edit it in settings, but I do know where those come from. It's in `language-config.json`, under `comments`: > ## [Comment toggling][docs] > VS Code offers two commands for comment toggling. **Toggle Line Comment** and **Toggle Block Comment**. You can specify `comments.blockComment` and `comments.lineComment` to control how VS Code should comment out lines / blocks. > > ```json > { > "comments": { > "lineComment": "//", > "blockComment": ["/*", "*/"] > } > } > ``` [docs]: https://code.visualstudio.com/api/language-extensions/language-configuration-guide#comment-toggling