@@ -2,9 +2,10 @@ import { Disposable, ScopeType } from "@cursorless/common";
2
2
import { pull } from "lodash" ;
3
3
import { ScopeSupport , ScopeSupportEventCallback , ScopeSupportInfo } from ".." ;
4
4
import { Debouncer } from "../core/Debouncer" ;
5
+ import { LanguageDefinitions } from "../languages/LanguageDefinitions" ;
5
6
import { ide } from "../singletons/ide.singleton" ;
6
- import { ScopeSupportChecker } from "./ScopeSupportChecker" ;
7
7
import { ScopeInfoProvider } from "./ScopeInfoProvider" ;
8
+ import { ScopeSupportChecker } from "./ScopeSupportChecker" ;
8
9
9
10
/**
10
11
* Watches for changes to the scope support of the active editor and notifies
@@ -16,6 +17,7 @@ export class ScopeSupportWatcher {
16
17
private listeners : ScopeSupportEventCallback [ ] = [ ] ;
17
18
18
19
constructor (
20
+ languageDefinitions : LanguageDefinitions ,
19
21
private scopeSupportChecker : ScopeSupportChecker ,
20
22
private scopeInfoProvider : ScopeInfoProvider ,
21
23
) {
@@ -30,6 +32,7 @@ export class ScopeSupportWatcher {
30
32
// happens when the contents changes but also when other things like the
31
33
// dirty-state changes.
32
34
ide ( ) . onDidChangeTextDocument ( this . debouncer . run ) ,
35
+ languageDefinitions . onDidChangeDefinition ( this . debouncer . run ) ,
33
36
this . scopeInfoProvider . onDidChangeScopeInfo ( this . debouncer . run ) ,
34
37
this . debouncer ,
35
38
) ;
0 commit comments