问题
I'm seeing following happen when working in intelliJ IDEA with Dart based project
All comments there i.e // AppBar
are auto generated, I assume for easier tracking of what closing brackets belong where. Weird bit is that I can't even highlight them, nor delete them and when I copy code they are not copied over.
Is there a way to disable this feature in the ide?
回答1:
The checkbox is in Settings (Preferences) | Editor | General | Appearance, toggle 'Show closing labels in Dart source code'.
回答2:
And in the vs code editor, change this setting to flase
"dart.closingLabels": true
You can find this setting easily. Go setting and search(Ctrl+f) dart.closingLabels
Update 24.11.2019:
If you want to customize the closing label color, you can do this. In vscode, open your settings.json
file and set this setting
"workbench.colorCustomizations": {
"dart.closingLabels": "#FF5733"
},
来源:https://stackoverflow.com/questions/47962237/remove-automated-closing-bracket-comments-in-intellij-idea