volar-service-pug
Advanced tools
Comparing version 0.0.0 to 0.0.1
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
console.warn('volar-service-pug: This plugin is not support on web yet.'); | ||
console.warn('volar-service-pug: this module is not yet supported for web.'); | ||
exports.default = () => () => ({}); | ||
//# sourceMappingURL=empty.js.map |
@@ -1,5 +0,9 @@ | ||
import type { Service, ServiceContext } from '@volar/language-service'; | ||
import type { InjectionKey, Service, ServiceContext } from '@volar/language-service'; | ||
import type * as html from 'vscode-html-languageservice'; | ||
import { TextDocument } from 'vscode-languageserver-textdocument'; | ||
import * as pug from './languageService'; | ||
export declare const rulesInjectionKey: InjectionKey<{ | ||
pugDocument: pug.PugDocument; | ||
languageService: pug.LanguageService; | ||
}>; | ||
export interface PluginInstance extends ReturnType<Service> { | ||
@@ -6,0 +10,0 @@ getHtmlLs: () => html.LanguageService; |
@@ -29,5 +29,7 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.rulesInjectionKey = void 0; | ||
const volar_service_html_1 = __importDefault(require("volar-service-html")); | ||
const language_service_1 = require("@volar/language-service"); | ||
const pug = __importStar(require("./languageService")); | ||
exports.rulesInjectionKey = Symbol(); | ||
exports.default = () => (context) => { | ||
@@ -41,16 +43,17 @@ if (!context) { | ||
return { | ||
rules: { | ||
provide: { | ||
[exports.rulesInjectionKey](document) { | ||
return worker(document, (pugDocument) => { | ||
return { | ||
pugDocument, | ||
languageService: pugLs, | ||
}; | ||
}); | ||
}, | ||
}, | ||
}, | ||
...htmlPlugin, | ||
getPugLs: () => pugLs, | ||
getPugDocument, | ||
resolveRuleContext(context) { | ||
worker(context.document, (pugDocument) => { | ||
if (pugDocument.ast) { | ||
context.pug = { | ||
rootNode: pugDocument.ast, | ||
languageService: pugLs, | ||
}; | ||
} | ||
}); | ||
return context; | ||
}, | ||
provideCompletionItems(document, position, _) { | ||
@@ -57,0 +60,0 @@ return worker(document, (pugDocument) => { |
{ | ||
"name": "volar-service-pug", | ||
"version": "0.0.0", | ||
"version": "0.0.1", | ||
"main": "out/index.js", | ||
"license": "MIT", | ||
"files": [ | ||
"rules.d.ts", | ||
"out/**/*.js", | ||
@@ -20,3 +19,3 @@ "out/**/*.d.ts" | ||
"pug-parser": "^6.0.0", | ||
"volar-service-html": "0.0.0", | ||
"volar-service-html": "0.0.1", | ||
"vscode-html-languageservice": "^5.0.4", | ||
@@ -33,3 +32,3 @@ "vscode-languageserver-textdocument": "^1.0.8", | ||
}, | ||
"gitHead": "1011561ac4bbf79c53c3b80c27692569bf861519" | ||
"gitHead": "5bf5152f076f25cb1ddbc7aa6978a8d1c7009fd6" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37171
27
853
+ Addedvolar-service-html@0.0.1(transitive)
- Removedvolar-service-html@0.0.0(transitive)
Updatedvolar-service-html@0.0.1