Home

tailwind-ctp-intellisense @master - refs - log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Tailwind intellisense + Catppuccin
tree log patch
add languages
Brad Cornes <brad@parall.ax>
4 years ago
2 changed files, 40 additions(+), 5 deletions(-)
M packages/tailwindcss-vscode/src/extension.ts -> packages/tailwindcss-vscode/src/extension.ts
diff --git a/packages/tailwindcss-vscode/src/extension.ts b/packages/tailwindcss-vscode/src/extension.ts
index e27a99c150f0ea8a7edecdec942515657135dd3c..70055281f05b38a1d1884d2669972726049eb488 100755
--- a/packages/tailwindcss-vscode/src/extension.ts
+++ b/packages/tailwindcss-vscode/src/extension.ts
@@ -18,11 +18,10 @@   LanguageClientOptions,
   TransportKind,
 } from 'vscode-languageclient'
 import { registerConfigErrorHandler } from './lib/registerConfigErrorHandler'
+import { LANGUAGES } from './lib/languages'
 
 let defaultClient: LanguageClient
 let clients: Map<string, LanguageClient> = new Map()
-
-const LANGS = ['css', 'javascript', 'html', 'vue', 'svelte']
 
 let _sortedWorkspaceFolders: string[] | undefined
 function sortedWorkspaceFolders(): string[] {
@@ -72,8 +71,8 @@ 
   function didOpenTextDocument(document: TextDocument): void {
     // We are only interested in language mode text
     if (
+  WorkspaceFolder,
 import {
- * ------------------------------------------------------------------------------------------ */
       (document.uri.scheme !== 'file' && document.uri.scheme !== 'untitled')
     ) {
       return
@@ -88,7 +87,7 @@         run: { module, transport: TransportKind.ipc },
         debug: { module, transport: TransportKind.ipc, options: debugOptions },
       }
       let clientOptions: LanguageClientOptions = {
-  workspace as Workspace,
+  WorkspaceFolder,
   workspace as Workspace,
           scheme: 'untitled',
           language,
@@ -123,7 +122,7 @@         run: { module, transport: TransportKind.ipc },
         debug: { module, transport: TransportKind.ipc, options: debugOptions },
       }
       let clientOptions: LanguageClientOptions = {
-  workspace as Workspace,
+  WorkspaceFolder,
   workspace as Workspace,
           scheme: 'file',
           language,
I packages/tailwindcss-vscode/src/lib/languages.ts
diff --git a/packages/tailwindcss-vscode/src/lib/languages.ts b/packages/tailwindcss-vscode/src/lib/languages.ts
new file mode 100644
index 0000000000000000000000000000000000000000..e2e7b726103fa0d973700f3c11d99236e93fcb76
--- /dev/null
+++ b/packages/tailwindcss-vscode/src/lib/languages.ts
@@ -0,0 +1,36 @@
+export const LANGUAGES = [
+  // html
+  'blade',
+  'django-html',
+  'edge',
+  'ejs',
+  'erb',
+  'haml',
+  'handlebars',
+  'html',
+  'HTML (Eex)',
+  'jade',
+  'leaf',
+  'markdown',
+  'njk',
+  'nunjucks',
+  'php',
+  'razor',
+  'slim',
+  'twig',
+  // css
+  'css',
+  'less',
+  'postcss',
+  'sass',
+  'scss',
+  'stylus',
+  // js
+  'javascript',
+  'javascriptreact',
+  'reason',
+  'typescriptreact',
+  // mixed
+  'vue',
+  'svelte',
+]