From b7b14ff7e488c9586106a04dec563ff5c630a1e2 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Wed, 3 Dec 2025 07:56:25 -0800 Subject: [PATCH] Don't ask for checker immediately in ProvideCodeActions --- internal/ls/codeactions.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/internal/ls/codeactions.go b/internal/ls/codeactions.go index a85a9d32ba..f843c49aeb 100644 --- a/internal/ls/codeactions.go +++ b/internal/ls/codeactions.go @@ -5,7 +5,6 @@ import ( "slices" "github.com/microsoft/typescript-go/internal/ast" - "github.com/microsoft/typescript-go/internal/checker" "github.com/microsoft/typescript-go/internal/compiler" "github.com/microsoft/typescript-go/internal/core" "github.com/microsoft/typescript-go/internal/lsp/lsproto" @@ -25,7 +24,6 @@ type CodeFixContext struct { Span core.TextRange ErrorCode int32 Program *compiler.Program - Checker *checker.Checker LS *LanguageService Diagnostic *lsproto.Diagnostic Params *lsproto.CodeActionParams @@ -53,12 +51,6 @@ var codeFixProviders = []*CodeFixProvider{ func (l *LanguageService) ProvideCodeActions(ctx context.Context, params *lsproto.CodeActionParams) (lsproto.CodeActionResponse, error) { program, file := l.getProgramAndFile(params.TextDocument.Uri) - // Get the type checker - ch, done := program.GetTypeCheckerForFile(ctx, file) - if done != nil { - defer done() - } - var actions []lsproto.CommandOrCodeAction // Process diagnostics in the context to generate quick fixes @@ -84,7 +76,6 @@ func (l *LanguageService) ProvideCodeActions(ctx context.Context, params *lsprot Span: core.NewTextRange(int(position), int(endPosition)), ErrorCode: errorCode, Program: program, - Checker: ch, LS: l, Diagnostic: diag, Params: params,