Skip to content

Commit defd979

Browse files
Ecmel ErcanEcmel Ercan
authored andcommitted
Added laravel-blade support
1 parent 22d3897 commit defd979

File tree

4 files changed

+27
-8
lines changed

4 files changed

+27
-8
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@ CSS support in HTML documents.
1111
- Supports optional resource.json file for fine tuned resource selection.
1212
- Uses [vscode-css-languageservice](https://github.com/Microsoft/vscode-css-languageservice).
1313

14-
## resource.json
14+
## Supported Languages
1515

16-
If a resource.json file is found in the root of the workspace, only files listed in the file will be
17-
used for class attribute completion.
16+
- html
17+
- laravel-blade
18+
19+
## Optional resource.json
20+
21+
If a resource.json file is found in the root of the workspace, only files listed in the file will be used for class attribute completion.
1822

1923
### Example
2024

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vscode-html-css",
33
"displayName": "HTML CSS Support",
44
"description": "CSS support in HTML documents",
5-
"version": "0.0.17",
5+
"version": "0.0.18",
66
"publisher": "ecmel",
77
"license": "MIT",
88
"homepage": "https://github.com/ecmel/vscode-html-css",
@@ -23,7 +23,8 @@
2323
"attribute"
2424
],
2525
"activationEvents": [
26-
"onLanguage:html"
26+
"onLanguage:html",
27+
"onLanguage:laravel-blade"
2728
],
2829
"contributes": {
2930
"jsonValidation": [

src/extension.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,12 +220,15 @@ export function activate(context: vsc.ExtensionContext) {
220220

221221
let styleServer = new StyleServer();
222222

223-
context.subscriptions.push(vsc.languages.registerCompletionItemProvider('html', styleServer));
224-
context.subscriptions.push(vsc.languages.registerHoverProvider('html', styleServer));
223+
context.subscriptions.push(vsc.languages.registerCompletionItemProvider(
224+
['html', 'laravel-blade'], styleServer));
225+
context.subscriptions.push(vsc.languages.registerHoverProvider(
226+
['html', 'laravel-blade'], styleServer));
225227

226228
let classServer = new ClassServer();
227229

228-
context.subscriptions.push(vsc.languages.registerCompletionItemProvider('html', classServer));
230+
context.subscriptions.push(vsc.languages.registerCompletionItemProvider(
231+
['html', 'laravel-blade'], classServer));
229232
}
230233

231234
export function deactivate() {

test/test.blade.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<html>
2+
<head>
3+
<style>
4+
.test {
5+
color: red;
6+
}
7+
</style>
8+
</head>
9+
<body class="external test">
10+
</body>
11+
</html>

0 commit comments

Comments
 (0)