Skip to content

Commit

Permalink
fix hookup
Browse files Browse the repository at this point in the history
  • Loading branch information
baronfel committed Aug 1, 2023
1 parent aa18afb commit 683dade
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions src/Components/CSharpExtensionSupport.fs
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ module CSharpExtension =

hasWarned <- true

let activate () =
let activate (context: ExtensionContext) =
// when extensions are installed or removed we need to update our state for the C# extension
// so enablement/disablement works correctly
extensions.onDidChange.Invoke(fun _ ->
tryFindCSharpExtension () |> ignore
None)
context.Subscribe(
extensions.onDidChange.Invoke(fun _ ->
tryFindCSharpExtension () |> ignore
None)
)
2 changes: 1 addition & 1 deletion src/fsharp.fs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ let activate (context: ExtensionContext) : JS.Promise<Api> =
logger.Error $"Error while activating feature '{label}': {ex}"
Unchecked.defaultof<_>

CSharpExtensionSupport.activate ()
CSharpExtension.activate(context)

LanguageService.start context
|> Promise.catch (fun e -> logger.Error $"Error activating FSAC: %A{e}") // prevent unhandled rejected promises
Expand Down

0 comments on commit 683dade

Please sign in to comment.