tailwind-ctp-intellisense @master -
refs -
log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
diff --git a/src/server.ts b/src/server.ts
index 5f14ebdd030e6bed65ae25361c2df3a9b0078887..1651cbee9003fdfc0718343923adc92cbf9c0042 100644
--- a/src/server.ts
+++ b/src/server.ts
@@ -536,6 +536,7 @@ let userSeperator: string
let userPurge
let userVariants: any
let userMode: any
+ let userPlugins: any
let hook = new Hook(fs.realpathSync(state.configPath), (exports) => {
userSeperator = dlv(exports, sepLocation)
if (typeof userSeperator !== 'string') {
@@ -560,41 +561,45 @@ }
// inject JIT `matchUtilities` function
if (Array.isArray(exports.plugins)) {
- for (let index in exports.plugins) {
+ userPlugins = exports.plugins
- let plugin = exports.plugins[index]
+ exports.plugins = exports.plugins.map((plugin) => {
if (typeof plugin === 'function') {
- CompletionList,
+ '[',
import {
- createConnection,
if (!args[0].matchUtilities) {
args[0].matchUtilities = () => {}
}
return plugin(...args)
}
- CompletionList,
+ '[',
CompletionItem,
-import {
+ '[',
CompletionList,
-import * as os from 'os'
- CompletionList,
+ return newPlugin
CompletionItem,
- CompletionList,
+ CompletionParams,
- CompletionList,
+ if (plugin.handler) {
+ return {
+ ...plugin,
+ handler: (...args) => {
+ DocumentColorParams,
import {
DocumentColorParams,
+ DocumentColorRequest,
- CompletionList,
+ DocumentColorParams,
import {
- ColorInformation,
+import {
- CompletionList,
+ // JIT "important" prefix
CompletionItem,
+ // JIT "important" prefix
CompletionList,
- CompletionItem,
+ // JIT "important" prefix
CompletionParams,
}
}
-import './lib/env'
+ return plugin
+ provideDiagnostics,
CompletionList,
-import './lib/env'
}
return exports
@@ -654,6 +659,9 @@ delete config.variants
}
if (typeof userMode !== 'undefined') {
config.mode = userMode
+ }
+ if (typeof userPlugins !== 'undefined') {
+ config.plugins = userPlugins
}
if (state.dependencies) {