Skip to content

Commit 1ee1272

Browse files
authored
fix(lsp): use checker pool for deno program (#26)
1 parent 492ae22 commit 1ee1272

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

internal/lsp/server.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1599,6 +1599,9 @@ func (s *Server) createDenoProgramEntry(ctx context.Context, compilerOptionsKey
15991599
Host: compilerHost,
16001600
Config: parsedCommandLine,
16011601
JSDocParsingMode: ast.JSDocParsingModeParseAll,
1602+
CreateCheckerPool: func(p *compiler.Program) compiler.CheckerPool {
1603+
return project.DenoNewCheckerPool(4, p, func(msg string) {})
1604+
},
16021605
})
16031606
projectPath := tspath.ToPath(s.cwd, "", denoVFS.UseCaseSensitiveFileNames())
16041607

internal/project/checkerpool.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,3 +219,7 @@ func (p *CheckerPool) size() int {
219219
}
220220

221221
func noop() {}
222+
223+
func DenoNewCheckerPool(maxCheckers int, program *compiler.Program, log func(msg string)) *CheckerPool {
224+
return newCheckerPool(maxCheckers, program, log)
225+
}

0 commit comments

Comments
 (0)