rust-tools.nvim
rust-tools.nvim copied to clipboard
Standalone files are not recognized inside git repo
When single file is opened inside the git repo, get_root_dir doesn't return nil, instead it returns a path to the git root:
https://github.com/simrat39/rust-tools.nvim/blob/9f89fe6d9762ef89973bbb698c750dd21b94ec44/lua/rust-tools.lua#L175-L178
Because of that, the standalone client is not run:
https://github.com/simrat39/rust-tools.nvim/blob/9f89fe6d9762ef89973bbb698c750dd21b94ec44/lua/rust-tools.lua#L192-L198
It might be not safe to just remove the line checking for the git repo, hence not proposing a PR.
I assume the following part might be an issue:
https://github.com/simrat39/rust-tools.nvim/blob/9f89fe6d9762ef89973bbb698c750dd21b94ec44/lua/rust-tools.lua#L181-L186
Not sure how to fix this, don't exactly wanna remove the check for git root but then I can't think of any other way