rust-tools.nvim icon indicating copy to clipboard operation
rust-tools.nvim copied to clipboard

Standalone files are not recognized inside git repo

Open anstadnik opened this issue 3 years ago • 1 comments

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

anstadnik avatar Apr 07 '22 08:04 anstadnik

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

simrat39 avatar Apr 26 '22 03:04 simrat39