Merge pull request #201 from charmbracelet/fix-lsp-watch

Kujtim Hoxha created

Change summary

internal/lsp/watcher/watcher.go | 3 +++
1 file changed, 3 insertions(+)

Detailed changes

internal/lsp/watcher/watcher.go 🔗

@@ -606,6 +606,9 @@ func (w *WorkspaceWatcher) matchesPattern(path string, pattern protocol.GlobPatt
 		return fullPathMatch || baseNameMatch
 	}
 
+	if basePath == "" {
+		return false
+	}
 	// For relative patterns
 	basePath = protocol.DocumentURI(basePath).Path()
 	basePath = filepath.ToSlash(basePath)