File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " zenstack-v3" ,
33 "publisher" : " zenstack" ,
4- "version" : " 3.0.9 " ,
4+ "version" : " 3.0.11 " ,
55 "displayName" : " ZenStack V3 Language Tools" ,
66 "description" : " VSCode extension for ZenStack (v3) ZModel language" ,
77 "private" : true ,
Original file line number Diff line number Diff line change @@ -94,13 +94,19 @@ export function createZModelLanguageServices(
9494
9595 // when documents reach Parsed state, inspect plugin declarations and load corresponding
9696 // plugin zmodel docs
97+ // Note we must use `onBuildPhase` instead of `onDocumentPhase` here because the latter is
98+ // not called when not running inside a language server.
9799 shared . workspace . DocumentBuilder . onBuildPhase ( DocumentState . Parsed , async ( documents ) => {
98100 for ( const doc of documents ) {
99101 if ( doc . parseResult . lexerErrors . length > 0 || doc . parseResult . parserErrors . length > 0 ) {
100102 // balk if there are lexer or parser errors
101103 continue ;
102104 }
103105
106+ if ( doc . uri . scheme !== 'file' ) {
107+ continue ;
108+ }
109+
104110 const schemaPath = fileURLToPath ( doc . uri . toString ( ) ) ;
105111 const pluginSchemas = getPluginDocuments ( doc . parseResult . value as Model , schemaPath ) ;
106112 for ( const plugin of pluginSchemas ) {
You can’t perform that action at this time.
0 commit comments