Skip to content

Commit

Permalink
Fix for #34
Browse files Browse the repository at this point in the history
  • Loading branch information
JPinkney committed Jan 15, 2018
1 parent db9c406 commit a72fa11
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/languageService/yamlLanguageService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export interface LanguageService {
doHover(document: TextDocument, position: Position, doc, isKubernetes: Boolean);
findDocumentSymbols(document: TextDocument, doc);
doResolve(completionItem);
resetSchema(uri: string): boolean;
}

export function getLanguageService(schemaRequestService, workspaceContext, contributions, promiseConstructor?): LanguageService {
Expand All @@ -113,6 +114,7 @@ export function getLanguageService(schemaRequestService, workspaceContext, contr
doResolve: completer.doResolve.bind(completer),
doValidation: yamlValidation.doValidation.bind(yamlValidation),
doHover: hover.doHover.bind(hover),
findDocumentSymbols: yamlDocumentSymbols.findDocumentSymbols.bind(yamlDocumentSymbols)
findDocumentSymbols: yamlDocumentSymbols.findDocumentSymbols.bind(yamlDocumentSymbols),
resetSchema: (uri: string) => schemaService.onResourceChange(uri)
}
}
2 changes: 1 addition & 1 deletion src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ connection.onDidChangeWatchedFiles((change) => {
// Monitored files have changed in VSCode
let hasChanges = false;
change.changes.forEach(c => {
if (languageService.resetSchema(c.uri)) {
if (customLanguageService.resetSchema(c.uri)) {
hasChanges = true;
}
});
Expand Down

0 comments on commit a72fa11

Please sign in to comment.