How to change comment formatting in VS Code
Asked Answered
M

2

10

I am having the opposite problem than this question: In a SASS .scss file, I want comments command (ctrl/⌘ + /, ctrl/⌘ + K ctrl/⌘ + C) to default to //, and use the Block comment /* ... */ only when using the block comment (shift+alt+A).

I have been unable to find a way to change this setting, via the user settings or even a plugin. Is it possible? Is my google-fu just bad?

Meteor answered 16/11, 2016 at 15:25 Comment(0)
C
6

A very belated answer, but you can amend the language-configuration.json file for the language in question. More here: https://code.visualstudio.com/api/language-extensions/language-configuration-guide.

Camellia answered 9/8, 2019 at 21:15 Comment(3)
Where ist this file located?Pernicious
Looks like this file (and these settings) are for if you create your own VSCode extension. I'm not seeing anywhere/way to do this in a settings file. Otherwise yes this is the way to fix this for any language 😄 I'm voting for this answer as there's (literally) no other way to do this 🙄Perilous
With a default installation these files are in C:\Program Files\Microsoft VS Code\resources\app\extensions\<language>\language-configuration.json. You need a restart for the changes to take effectBoresome
M
0

It seems like at some point in the years since I posted this question, the default language behavior for sass / .scss files has changed and is behaving as I was wanting it to. (As observed in October 2023)

Meteor answered 5/10, 2023 at 17:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.