Skip to content

Commit

Permalink
Revert "Add workaround to fix clangd not being able to perform cross-…
Browse files Browse the repository at this point in the history
…file renames on Windows"

This reverts commit e86613a.
  • Loading branch information
LagoLunatic committed Nov 20, 2024
1 parent e86613a commit 12c8373
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions tools/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -1672,15 +1672,7 @@ def try_replace(flag: str) -> bool:

def default_format(o):
if isinstance(o, Path):
path_str = o.resolve().as_posix()
if os.name == "nt":
# clangd has an issue dealing with case-insensitive paths on Windows.
# If the drive letter of a path is a capital letter, clangd will fail to handle
# cross-file rename operations, so we have to convert the first character of the
# path to lowercase as a workaround.
# https://github.com/clangd/clangd/issues/108
path_str = path_str[0].lower() + path_str[1:]
return path_str
return o.resolve().as_posix()
return str(o)

json.dump(clangd_config, w, indent=2, default=default_format)
Expand Down

0 comments on commit 12c8373

Please sign in to comment.