File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -13,12 +13,12 @@ export async function activateInlayHints(
1313 context : vscode . ExtensionContext ,
1414 client : langclient . LanguageClient
1515) : Promise < void > {
16- const config = vscode . workspace . getConfiguration ( 'sourcekit-lsp' ) ;
1716 let updater : HintsUpdater | null = null ;
1817
1918 const onConfigChange = async ( ) => {
19+ const config = vscode . workspace . getConfiguration ( 'sourcekit-lsp' ) ;
2020 const wasEnabled = updater !== null ;
21- const isEnabled = config . get < boolean > ( 'inlayHints.enabled' , true ) ;
21+ const isEnabled = config . get < boolean > ( 'inlayHints.enabled' , false ) ;
2222
2323 if ( wasEnabled !== isEnabled ) {
2424 updater ?. dispose ( ) ;
@@ -195,6 +195,8 @@ class HintsUpdater implements vscode.Disposable {
195195 }
196196
197197 dispose ( ) : void {
198+ this . sourceFiles . forEach ( file => file . inFlightInlayHints ?. cancel ( ) ) ;
199+ this . visibleSourceKitLSPEditors . forEach ( editor => this . renderDecorations ( editor , [ ] ) ) ;
198200 this . disposables . forEach ( d => d . dispose ( ) ) ;
199201 }
200202}
You can’t perform that action at this time.
0 commit comments