-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add path-mapping function #2579
base: main
Are you sure you want to change the base?
Conversation
Why did you close this? It seems useful. Note that it can be hard for maintainers to make time to review every pull request. I will re-open this just in case. |
I am fixing some bugs, so I have temporarily closed it. |
I have converted the PR status to "draft" then. You can remove the "draft" status when you think it's ready. |
Alright, it should now be usable to some extent. At least on the surface, it seems that no new trouble have been introduced. |
Could you describe the use case for this; there isn't any linked issue or explanation in the opening comment, and I don't have any intuition just from the config description
why I would want to map paths like that. Apparently it has something to do with WSL. I think from the regular contributors I'm the only Windows user, but I've never really used WSL, so if this requires a certain setup then a step by step description would be useful if we want to test this PR. Ideally this PR would have a test with something that currently doesn't work, but will be fixed by this PR (if this is applicable here). |
I use it in the WSL environment, but it is a general feature. clangd also has a path mapping option, and their functions should be consistent. However, clangd also has bugs and cannot meet my needs. @rwols Should be able to provide more explanation about this feature. In my use case, I code using an editor on Windows and compile it with the toolchain and libraries in WSL. Since the project is compiled on Linux, the paths in the compile_commands used by clangd are all Linux paths. To correctly navigate to files, the LSP needs to map the Linux paths provided by clangd to Windows paths. It's not the most natural way to implement it, but for someone like me who is not familiar with the LSP source code, it's the simplest way to do it. Even so, a strange bug still occurred. |
No description provided.