@@ -389,7 +389,7 @@ func (c *Client) openKeyConfigFiles(ctx context.Context) {
389389 filepath.Join(workDir, "package.json"),
390390 filepath.Join(workDir, "jsconfig.json"),
391391 }
392−
392+
393393 // Also find and open a few TypeScript files to help the server initialize
394394 c.openTypeScriptFiles(ctx, workDir)
395395 case ServerTypeGo:
@@ -547,12 +547,12 @@ func (c *Client) openTypeScriptFiles(ctx context.Context, workDir string) {
547547// shouldSkipDir returns true if the directory should be skipped during file search
548548func shouldSkipDir(path string) bool {
549549 dirName := filepath.Base(path)
550−
550+
551551 // Skip hidden directories
552552 if strings.HasPrefix(dirName, ".") {
553553 return true
554554 }
555−
555+
556556 // Skip common directories that won't contain relevant source files
557557 skipDirs := map[string]bool{
558558 "node_modules": true,
@@ -562,7 +562,7 @@ func shouldSkipDir(path string) bool {
562562 "vendor": true,
563563 "target": true,
564564 }
565−
565+
566566 return skipDirs[dirName]
567567}
568568
@@ -776,3 +776,10 @@ func (c *Client) GetDiagnosticsForFile(ctx context.Context, filepath string) ([]
776776
777777 return diagnostics, nil
778778}
779+
780+// ClearDiagnosticsForURI removes diagnostics for a specific URI from the cache
781+func (c *Client) ClearDiagnosticsForURI(uri protocol.DocumentUri) {
782+ c.diagnosticsMu.Lock()
783+ defer c.diagnosticsMu.Unlock()
784+ delete(c.diagnostics, uri)
785+}