Closed farzadmf closed 3 years ago
You can try changing the root-strategies to ["cwd"], default is
[
"workspace",
"cwd",
"sourceBuffer",
"reveal"
]
https://github.com/weirongxu/coc-explorer#--root-strategies-root-strategies
For some files, workspace.root
is empty because LSP did not resolve workspace.root
Thank you @weirongxu for the answer, I'll try your suggestions and update here with the results :+1:
Hi,
I've set my config so that when I open
coc-explorer
, it focues the file in the tree, however, it seems to ignore the current working directory (pwd
) when opening some files.This is the scenario:
git
directory in/home/farzad/mydir
./home/farzad/mydir/level/one
and I opennvim
/home/.../level/one/my.go
, when I opencoc-explorer
, it properly expands/home/.../level/one
directory (which is the directory reported by:pwd
as well)/home/.../level/one/my.rb
, when I opencoc-explorer
, it expands/home/farzad/mydir
(the rootgit
directory), not respecting the:pwd
Is there something wrong with my config?
Thank you in advance
UPDATE: this doesn't seem to be consistent either, even for
.rb
files, sometimes it opens the current directory and sometimes it opens the rootgit
directory, so I'm not exactly sure what's happening