diff --git a/src/lsp.cc b/src/lsp.cc index 71520181b..e4e9f0e9b 100644 --- a/src/lsp.cc +++ b/src/lsp.cc @@ -33,6 +33,14 @@ struct UriCache { if (cache.TryGet(path, &resolved)) return resolved; LOG_S(INFO) << "No cached URI for " << path; + + // If we do not have the value in the cache, try to renormalize it. + // Otherwise we will return paths with all lower-case letters which may + // break vscode. + optional normalized = NormalizePath(path.path); + if (normalized) + return normalized->path; + return path; }