@@ -2,9 +2,10 @@ import { Disposable, ScopeType } from "@cursorless/common";
22import { pull } from "lodash" ;
33import { ScopeSupport , ScopeSupportEventCallback , ScopeSupportInfo } from ".." ;
44import { Debouncer } from "../core/Debouncer" ;
5+ import { LanguageDefinitions } from "../languages/LanguageDefinitions" ;
56import { ide } from "../singletons/ide.singleton" ;
6- import { ScopeSupportChecker } from "./ScopeSupportChecker" ;
77import { ScopeInfoProvider } from "./ScopeInfoProvider" ;
8+ import { ScopeSupportChecker } from "./ScopeSupportChecker" ;
89
910/**
1011 * Watches for changes to the scope support of the active editor and notifies
@@ -16,6 +17,7 @@ export class ScopeSupportWatcher {
1617 private listeners : ScopeSupportEventCallback [ ] = [ ] ;
1718
1819 constructor (
20+ languageDefinitions : LanguageDefinitions ,
1921 private scopeSupportChecker : ScopeSupportChecker ,
2022 private scopeInfoProvider : ScopeInfoProvider ,
2123 ) {
@@ -30,6 +32,7 @@ export class ScopeSupportWatcher {
3032 // happens when the contents changes but also when other things like the
3133 // dirty-state changes.
3234 ide ( ) . onDidChangeTextDocument ( this . debouncer . run ) ,
35+ languageDefinitions . onDidChangeDefinition ( this . debouncer . run ) ,
3336 this . scopeInfoProvider . onDidChangeScopeInfo ( this . debouncer . run ) ,
3437 this . debouncer ,
3538 ) ;
0 commit comments