-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
fix(lsp): normalize case sensitive root_dir
on Windows
#152
Conversation
Review ChecklistDoes this PR follow the Contribution Guidelines? Following is a partial checklist: Proper conventional commit scoping:
If applicable:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
Looks good. Only the stylua check is failing now. |
root_dir
on Windows
Tks for merge it. Work as expected. Sorry about not response. |
In PR mrcjkb#152, rustacenavim begin storing the `root_dir` with a normalized disk drive format to avoid spawning multiple rust-analyzers while navigating files. This change caused an unintend regression on the neotest integration, as 'find_buffer_by_name' will not match the passed in `path_files`. https://github.com/mrcjkb/rustaceanvim/blob/4987d4159df2f80eb1deda1793ad54082d8ba454/lua/rustaceanvim/rust_analyzer.lua#L61-L63 In summary, neotest would send the following: ``` :Neotest run file -- -> file_path: C:\Users\me\repos\project\src\lib.rs -- -> root_dir: c:\Users\me\projects\src\lib.rs -- -> vim.startswith(file_path, root_dir) -- false No tests found! ``` This commit changes the `rust_analyzer` function to ensure we use the normalized file path when performing the root_dir comparisson, so we can find runnables from Neotest
In PR mrcjkb#152, rustacenavim begin storing the `root_dir` with a normalized disk drive format to avoid spawning multiple rust-analyzers while navigating files. This change caused an unintend regression on the neotest integration, as 'find_buffer_by_name' will not match the passed in `path_files`. https://github.com/mrcjkb/rustaceanvim/blob/4987d4159df2f80eb1deda1793ad54082d8ba454/lua/rustaceanvim/rust_analyzer.lua#L61-L63 In summary, neotest would send the following: ``` :Neotest run file -- -> file_path: C:\Users\me\repos\project\src\lib.rs -- -> root_dir: c:\Users\me\projects\src\lib.rs -- -> vim.startswith(file_path, root_dir) -- false No tests found! ``` This commit changes the `rust_analyzer` function to ensure we use the normalized file path when performing the root_dir comparisson, so we can find runnables from Neotest
In PR mrcjkb#152, rustacenavim begin storing the `root_dir` with a normalized disk drive format to avoid spawning multiple rust-analyzers while navigating files. This change caused an unintend regression on the neotest integration, as 'vim.startswith' will not match the passed in `path_files`. https://github.com/mrcjkb/rustaceanvim/blob/4987d4159df2f80eb1deda1793ad54082d8ba454/lua/rustaceanvim/rust_analyzer.lua#L77 In summary, neotest would send the following: ``` :Neotest run file -- -> file_path: C:\Users\me\repos\project\src\lib.rs -- -> root_dir: c:\Users\me\projects\src\lib.rs -- -> vim.startswith(file_path, root_dir) -- false No tests found! ``` This commit changes the `rust_analyzer` function to ensure we use the normalized file path when performing the root_dir comparisson, so we can find runnables from Neotest
In PR mrcjkb#152, rustacenavim begin storing the `root_dir` with a normalized disk drive format to avoid spawning multiple rust-analyzers while navigating files. This change caused an unintend regression on the neotest integration, as 'vim.startswith' will not match the passed in `path_files`. https://github.com/mrcjkb/rustaceanvim/blob/4987d4159df2f80eb1deda1793ad54082d8ba454/lua/rustaceanvim/rust_analyzer.lua#L77 In summary, neotest would send the following: ``` :Neotest run file -- -> file_path: C:\Users\me\repos\project\src\lib.rs -- -> root_dir: c:\Users\me\projects\src\lib.rs -- -> vim.startswith(file_path, root_dir) -- false No tests found! ``` This commit changes the `rust_analyzer` function to ensure we use the normalized file path when performing the root_dir comparisson, so we can find runnables from Neotest
No description provided.