In VS Code, by default, the function of double-clicking to select a class name will be determined according to the word separators (Word Separators) in the editor. In most cases, a hyphen - in the class name class-name is considered a word separator, so the double-click selection will not include the entire class name.
If you want to use class-name and want to be able to double-click to select the class name, you can do so by modifying the settings of VS Code.
1. Open VS Code settings: You can go to "File" -> "Preferences" -> "Settings" in the menu bar or use the shortcut keys Ctrl + , (Windows/Linux) or Cmd + , (Mac) to open Settings.
2. Enter " word separators " in the setting search box, and then find the "Editor: Word Separators" option.
3. Click the "Edit in settings.json" link and change the value of the "Editor: Word Separators" option to a string containing only spaces, for example:
`~!@#$%^&*()=+[{]}\|;:'",.<>/?
it was like this
`~!@#$%^&*()-=+[{]}\|;:'",.<>/?