bug: opens the file in the floating mode modal
Did you check the docs and existing issues?
- [X] I have read the docs
- [X] I have searched the existing issues
Neovim version (nvim -v)
0.9.5 Release
Operating system/version
Arch linux 6.7.8-arch1-1
Describe the bug
when i open oil in floating mode, and while i keep it open i open a telescope window and open a file, it opens in the floating oil modal.
What is the severity of this bug?
minor (annoyance)
Steps To Reproduce
- open oil in float mode
- open telescope
- select file in live_grep or find_files
- open this file
Expected Behavior
think the Oil window should be closed.
Directory structure
No response
Repro
return {
"stevearc/oil.nvim",
event = "VimEnter",
keys = {
{ "<leader>e", "<cmd>Oil --float<cr>", mode = { "n" }, desc = "File explorer" },
},
opts = {
default_file_exporer = true,
view_options = {
show_hidden = true,
},
columns = {
"icon",
--"mtime",
--"size",
},
float = {
padding = 2,
max_width = 155,
max_height = 32,
border = "rounded",
win_options = {
winblend = 0,
},
preview = {
max_width = 0.9,
min_width = { 40, 0.4 },
width = nil,
max_height = 0.9,
min_height = { 5, 0.1 },
height = nil,
border = "rounded",
win_options = {
winblend = 0,
},
update_on_cursor_moved = true,
},
override = function(conf)
return conf
end,
},
},
}
Did you check the bug with a clean config?
- [X] I have confirmed that the bug reproduces with
nvim -u repro.luausing the repro.lua file above.
Please use the minimal init.lua template in the bug report template to produce a single file that I can use to reproduce the issue.
Please use the minimal init.lua template in the bug report template to produce a single file that I can use to reproduce the issue.
yes, I have also used the minimum configuration and the bug is reproduced in the same way.
return {
"stevearc/oil.nvim",
config = function()
require("oil").setup({})
end,
}
I mean use a full minimal init.lua file such as below
-- save as repro.lua
-- run with nvim -u repro.lua
-- DO NOT change the paths
local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "runtime", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"--single-branch",
"https://github.com/folke/lazy.nvim.git",
lazypath,
})
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
local plugins = {
"folke/tokyonight.nvim",
-- add any other plugins here
{
"stevearc/oil.nvim",
config = function()
require("oil").setup({})
end,
},
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
vim.cmd.colorscheme("tokyonight")
-- add anything else here
and provide exact steps (keymaps, commands) to reproduce the issue
- install lazy , Oil and Telescope in init.lua
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
{
"stevearc/oil.nvim",
config = function()
require("oil").setup({})
end,
},
{
"nvim-telescope/telescope.nvim",
tag = "0.1.6",
dependencies = { "nvim-lua/plenary.nvim" },
},
})
- reload neovim and open Oil in float mode
Oil --float
- Open any file with telescope or :edit
:edit init.lua
the file opens, but in the oil pop-up window