You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+27-11Lines changed: 27 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,21 +13,17 @@ HTML `id` and `class` attribute completion for Visual Studio Code.
13
13
- Supports go to definition for selectors
14
14
- Validates class attributes on demand
15
15
16
-
## Usage
17
-
18
-
You can view a list of `id` and `class` attribute suggestions in configured languages.
19
-
20
16
## Supported Languages
21
17
22
-
Supported languages can be configured with the `css.enabledLanguages` setting. By default `html` is enabled:
18
+
Supported languages can be configured with the `css.enabledLanguages`global setting. By default `html` is enabled:
23
19
24
20
```json
25
21
{
26
22
"css.enabledLanguages": ["html"]
27
23
}
28
24
```
29
25
30
-
Extension can be configured to support any language where it makes sense such as `nunjucks`, `twig`, `mustache`, `typescript` etc. You should also install corresponding language extension which registers the language id in VS Code.
26
+
Extension can be configured to support any language where it makes sense such as `nunjucks`, `twig`, `mustache`, `vue`, `typescript` etc. You should also install corresponding language extension which registers the specific language id in VS Code.
31
27
32
28
This setting is application scoped and changing the setting requires restarting VS Code.
33
29
@@ -47,7 +43,7 @@ Glob patterns for local style sheets can have the following syntax:
47
43
48
44
## Examples
49
45
50
-
Configuration depends on your layout of the project. The following most basic setting will suggest from all your `css` files in your project's `src` folder:
46
+
Configuration depends on your layout of the project. The following most basic setting will suggest from all `css` files in project's `src` folder:
51
47
52
48
**`.vscode/settings.json`**
53
49
@@ -59,7 +55,9 @@ Configuration depends on your layout of the project. The following most basic se
59
55
60
56
### [Bootstrap](https://getbootstrap.com/)
61
57
62
-
If you are using Bootstrap `npm` module with additional `scss` this can be a starting point:
58
+
If Bootstrap `npm` module is used with additional `scss` the following can be a starting point:
59
+
60
+
**`.vscode/settings.json`**
63
61
64
62
```json
65
63
{
@@ -70,7 +68,9 @@ If you are using Bootstrap `npm` module with additional `scss` this can be a sta
70
68
}
71
69
```
72
70
73
-
or if you are using Bootstrap CDN with additional plain `css`:
71
+
or in case of Bootstrap CDN with additional plain `css`:
72
+
73
+
**`.vscode/settings.json`**
74
74
75
75
```json
76
76
{
@@ -81,9 +81,11 @@ or if you are using Bootstrap CDN with additional plain `css`:
81
81
}
82
82
```
83
83
84
+
All of Bootstrap's class selectors with additional user defined styles in the project will be available for completion in `html` files.
85
+
84
86
### [Lit](https://lit.dev/)
85
87
86
-
First`typescript` or `javascript`should be enabled in global settings depending on your usage and VS Code should be restarted:
88
+
Enable`typescript` or `javascript` in global settings depending on your usage and restart VS Code:
87
89
88
90
```json
89
91
{
@@ -93,15 +95,29 @@ First `typescript` or `javascript` should be enabled in global settings dependin
93
95
94
96
Component's [static styles](https://lit.dev/docs/components/styles/) will be available for completion elsewhere in the component. If you need to use some base styles in every component you can specify as follows:
95
97
98
+
**`.vscode/settings.json`**
99
+
96
100
```json
97
101
{
98
102
"css.styleSheets": ["src/base-styles.ts"]
99
103
}
100
104
```
101
105
106
+
### [Vue](https://vuejs.org/)
107
+
108
+
Install your favorite Vue language extension from [Marketplace](https://marketplace.visualstudio.com/search?term=tag%3Avue&target=VSCode&category=All%20categories&sortBy=Relevance) which registers `vue` language id then enable `vue` in global settings and restart VS Code:
109
+
110
+
```json
111
+
{
112
+
"css.enabledLanguages": ["html", "vue"]
113
+
}
114
+
```
115
+
116
+
Styles defined in component's `<style>` section will be available for completion in component's `<template>` section.
117
+
102
118
## Go to Definition
103
119
104
-
Go to definition for `id` and `class` selectors for local style sheets are supported. Selecting `Go to Definition` from context menu, pressing `F12` or `⌘ click` on a selector will open the local style sheet which the selector is defined.
120
+
Go to definition for `id` and `class` selectors for local style sheets are supported. Selecting `Go to Definition` from context menu (`F12` or `⌘ click`) on a selector will open the local style sheet which the selector is defined.
0 commit comments