Oil is an alternative file explorer for Neovim that lets you edit the filesystem inside a normal buffer. The buffer has the type oil and is named oil:///<file path> (or, I believe, oil-ssh:///<file path>, since Oil also has ssh support)
The issue is that since the Oil opens directories in simple buffers, vim-helm calls this function on them (also, I'm not sure why, but findfile("Chart.yaml", expand('%:p:h').';') is always returning something, regardless of the current directory being emtpy. i.e. if I'm on an empty /foo directory and I call findfile("Chart.yaml", expand('%:p:h').';') on it, it will return /foo/Chart.yaml)
Reproducing:
Considering a neovim installation with both Oil.nvim and vim-helm, and an empty directory /Users/foo, when I open that directory with nvim /Users/foo and execute:
:echo findfile("Chart.yaml", expand('%:p:h').';')
I see:
(notice the filetype set to helm and the output of the findfile command)
Oil is an alternative file explorer for Neovim that lets you edit the filesystem inside a normal buffer. The buffer has the type
oil
and is namedoil:///<file path>
(or, I believe,oil-ssh:///<file path>
, since Oil also has ssh support)The issue is that since the Oil opens directories in simple buffers,
vim-helm
calls this function on them (also, I'm not sure why, butfindfile("Chart.yaml", expand('%:p:h').';')
is always returning something, regardless of the current directory being emtpy. i.e. if I'm on an empty/foo
directory and I callfindfile("Chart.yaml", expand('%:p:h').';')
on it, it will return/foo/Chart.yaml
)Reproducing:
Considering a neovim installation with both
Oil.nvim
andvim-helm
, and an empty directory/Users/foo
, when I open that directory withnvim /Users/foo
and execute:I see: (notice the filetype set to
helm
and the output of the findfile command)