Skip to content

Commit 89cf22f

Browse files
authored
Update README.md
1 parent 2f0f631 commit 89cf22f

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

README.md

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,3 @@
1-
> This repository is a fork of the original [zignd/HTML-CSS-Class-Completion](https://github.com/Zignd/HTML-CSS-Class-Completion). If you are currently using the original extension, please uninstall it first before installing this forked version.
2-
>
3-
> The primary addition in this fork is the `html-css-class-completion.CustomLanguages` configuration. This allows users to specify custom regex patterns, enabling CSS autocompletion in various languages.
4-
>
5-
> Here's an example showcasing how to set up autocompletion for different languages:
6-
>
7-
> ```jsonc
8-
> "html-css-class-completion.CustomizedLanguages": {
9-
> "rust": [
10-
> "class:\\s*\"([\\w- ]*$)",
11-
> "className:\\s*\"([\\w- ]*$)"
12-
> ],
13-
> "cpp": "auto\\s+class[nN]ame\\s*=\\s*\"([\\w- ]*$)" // Strings are also acceptable
14-
> }
15-
> ```
16-
>
17-
> Admittedly, I'm not experienced in vscode extension development and am still grasping the intricacies of regex. The regex patterns provided above were adapted from the original extension's source code. To assist in configuring your own setups, here are the original regex expressions from the extension's source code:
18-
>
19-
> ```js
20-
> const cssClassRegex = /@apply ([.\w- ]*$)/;
21-
> const htmlClassRegex = /class=["|']([\w- ]*$)/;
22-
> const jsAndJsxClassRegex = [/className=["|']([\w- ]*$)/, /class=["|']([\w- ]*$)/];
23-
> ```
24-
25-
261
# IntelliSense for CSS class names in HTML
272

283
A Visual Studio Code extension that provides CSS class name completion for the HTML `class` attribute based on the definitions found in your workspace or external files referenced through the `link` element.

0 commit comments

Comments
 (0)