Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: can't use on home level #206

Closed
3 tasks done
thjbdvlt opened this issue Oct 28, 2023 · 2 comments
Closed
3 tasks done

bug: can't use on home level #206

thjbdvlt opened this issue Oct 28, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@thjbdvlt
Copy link

thjbdvlt commented Oct 28, 2023

Did you check the docs and existing issues?

  • I have read the docs
  • I have searched the existing issues

Neovim version (nvim -v)

0.8.3

Operating system/version

debian 11

Describe the bug

hi :) and thank you for posting this fantastic plugin. i love using it :-)
my problem is that i cannot use oil.nvim on my home level or higher (~ or /home, or /). it produces following error:

Error executing luv callback:
...ocal/share/nvim/lazy/oil.nvim/lua/oil/adaptaters/files.lua:23. E5560: vimL function must not be called in a lua loop callback
stack traceback:
[C]: in function 'fnamodify'
...ocal/share/nvim/lazy/oil.nvim/lua/oil/adaptaters/files.lua:23: in function <...ocal/share/nvim/lazy/oil.nvim/lua/oil/adaptaters/files.lua:16>

i had not this problems few weeks ago, but dont really know when this started.
(i installed oil.nvim with Lazy, but with Packer i already had this problem.)
have a nice day :)

Steps To Reproduce

cd ~ 
nvim -c "Oil"

Expected Behavior

open the directory as it usually do in oil.nvim

Directory structure

No response

Repro

-- 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",
  {
        "stevearc/oil.nvim",
        config = function()
            require("oil").setup({
              -- add any needed settings here
            })
        end,
  },
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here

Did you check the bug with a clean config?

  • I have confirmed that the bug reproduces with nvim -u repro.lua using the repro.lua file above.
@thjbdvlt thjbdvlt added the bug Something isn't working label Oct 28, 2023
@thjbdvlt
Copy link
Author

i updated to newer version of nvim (0.9.4) and problem disappear, so i mark as 'solved' but maybe the version required for oil.nvim is not 0.8 but higher? anyway, thank's again for creating and maintaining this plugin, it totally changed my command-line based computing life :)

@stevearc
Copy link
Owner

Thanks for the stack trace! I was able to find and fix the problem pretty quickly. The problem may have stopped for you, but there was definitely an underlying bug that was still there. Thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants