Skip to content

Commit

Permalink
use createAsyncLanguageServicePlugin
Browse files Browse the repository at this point in the history
  • Loading branch information
mizdra committed Dec 8, 2024
1 parent 086a9b4 commit e73b0e1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/index.cjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
const { createLanguageServicePlugin } = require('@volar/typescript/lib/quickstart/createLanguageServicePlugin.js');
const ts = require('typescript');
const { createAsyncLanguageServicePlugin } = require('@volar/typescript/lib/quickstart/createAsyncLanguageServicePlugin.js');
const { createPngLanguagePlugin } = require('./language-plugin.cjs');

module.exports = createLanguageServicePlugin((ts, info) => {
module.exports = createAsyncLanguageServicePlugin(['.png'], ts.ScriptKind.TS, async (ts, info) => {
if (info.project.projectKind !== ts.server.ProjectKind.Configured) {
return { languagePlugins: [] };
}
Expand Down

0 comments on commit e73b0e1

Please sign in to comment.