Skip to content

Commit 6b1a7f7

Browse files
authored
Merge pull request #151 from BenjjinF/master
Added django-html to supported language modes
2 parents fcea5a6 + 31df1c1 commit 6b1a7f7

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ A Visual Studio Code extension that provides CSS class name completion for the H
2424
* Embedded Ruby (.html.erb) [requires [rebornix.Ruby](https://marketplace.visualstudio.com/items?itemName=rebornix.Ruby)]
2525
* Handlebars
2626
* EJS (.ejs)
27+
* Django Templates
2728

2829
## Specific Support
2930
* "@apply" directive in CSS, SASS and SCSS Files for [Tailwind CSS](https://tailwindcss.com)

src/extension.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ function provideCompletionItemsGenerator(languageSelector: string, classMatchReg
122122

123123
function enableEmmetSupport(disposables: Disposable[]) {
124124
const emmetRegex = /(?=\.)([\w-\. ]*$)/;
125-
const languageModes = ["html", "razor", "php", "blade", "vue", "twig", "markdown", "erb",
125+
const languageModes = ["html", "django-html", "razor", "php", "blade", "vue", "twig", "markdown", "erb",
126126
"handlebars", "ejs", "typescriptreact", "javascript", "javascriptreact"];
127127
languageModes.forEach((language) => {
128128
emmetDisposables.push(provideCompletionItemsGenerator(language, emmetRegex, "", "."));
@@ -181,7 +181,7 @@ export async function activate(context: ExtensionContext): Promise<void> {
181181
});
182182

183183
// HTML based extensions
184-
["html", "razor", "php", "blade", "vue", "twig", "markdown", "erb", "handlebars", "ejs"].forEach((extension) => {
184+
["html", "django-html", "razor", "php", "blade", "vue", "twig", "markdown", "erb", "handlebars", "ejs"].forEach((extension) => {
185185
context.subscriptions.push(provideCompletionItemsGenerator(extension, /class=["|']([\w- ]*$)/));
186186
});
187187

0 commit comments

Comments
 (0)