Open hoyt0084 opened 7 months ago
I've tried this on both mac and linux and couldn't reproduce. To confirm, when you run nvim -u repro.lua .
it opens with an empty buffer?
That is what was happening yesterday, now this only occurs with a file not found and a .swp file message even though I am just opening with nvim .
and closing the buffer. I'm guessing there was something iffy on my machine yesterday or something but I could not get it to work. Even with the repro.lua.
That is what was happening yesterday, now this only occurs with a file not found and a .swp file message even though I am just opening with
nvim .
and closing the buffer. I'm guessing there was something iffy on my machine yesterday or something but I could not get it to work. Even with the repro.lua.
Nevermind, this is still happening with no .swp file message.
Sorry, without being able to repro on my machine there's not much I can do. I'd recommend diving in and adding some debug print
statements to see if you can suss out where it's dropping off
I had the same issue and ended up creating a wrapper funciton and calling it with an alias:
_G.OpenOil = function()
local oil = require "oil"
oil.open()
end
vim.keymap.set("n", "<Leader>ol", _G.OpenOil, { noremap = true, silent = true })
alias vo='vim -c ":lua OpenOil()"'
This works however there is another issue, it's not possible to navigate the buffer, you can notice the rapid cursor blinking at the bottom of the screen:
I have the same issue @stevearc, can you help me debug?
return {
'stevearc/oil.nvim',
opts = {},
-- Optional dependencies
-- dependencies = { { "echasnovski/mini.icons", opts = {} } },
dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if prefer nvim-web-devicons
}
$ system_profiler SPSoftwareDataType
Software:
System Software Overview:
System Version: macOS 14.6 (23G80)
Kernel Version: Darwin 23.6.0
$ nvim --version
NVIM v0.10.1
Build type: Release
LuaJIT 2.1.1713773202
Run "nvim -V1 -v" for more info
@Piotr1215 @hoyt0084 the solution that works for me was simply to disable lazy loading
return {
'stevearc/oil.nvim',
lazy = false,
opts = {},
-- Optional dependencies
-- dependencies = { { "echasnovski/mini.icons", opts = {} } },
dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if prefer nvim-web-devicons
}
Did you check the docs and existing issues?
Neovim version (nvim -v)
0.9.5
Operating system/version
Arch Linux x86_64 Kernel 6.6.10-arch1-1
Describe the bug
When opening neovim with (nvim .), Oil fails to load. I will then execute :Oil which brings me up a directory. Then after going back into the directory I want to be in, all files and directories do not exist.
What is the severity of this bug?
breaking (some functionality is broken)
Steps To Reproduce
Expected Behavior
Expected behavior is for Oil to open in the current directory displaying the sub-directories and files in that directory.
Directory structure
a/b a/c a/text.txt
Repro
Did you check the bug with a clean config?
nvim -u repro.lua
using the repro.lua file above.