diff --git a/internal/lsp/watcher/watcher.go b/internal/lsp/watcher/watcher.go index 58f7830eb19f9841e72aa0356ad1d4c3d2aec7d1..75d6a9229b9991945d0e61e21b16c7c3abc2eefe 100644 --- a/internal/lsp/watcher/watcher.go +++ b/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)