Skip to content

Commit

Permalink
adds fix to refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgomez committed Jul 30, 2024
1 parent 619a217 commit 20ea213
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ls.nim
Original file line number Diff line number Diff line change
Expand Up @@ -665,8 +665,9 @@ proc getProjectFile*(fileUri: string, ls: LanguageServer): Future[string] {.asyn
for mapping in mappings:
if find(cstring(pathRelativeToRoot), re(mapping.fileRegex), 0, pathRelativeToRoot.len) != -1:
result = string(rootPath) / mapping.projectFile
trace "getProjectFile", project = result, uri = fileUri, matchedRegex = mapping.fileRegex
return result
if fileExists(result):
trace "getProjectFile", project = result, uri = fileUri, matchedRegex = mapping.fileRegex
return result
else:
trace "getProjectFile does not match", uri = fileUri, matchedRegex = mapping.fileRegex

Expand Down

0 comments on commit 20ea213

Please sign in to comment.