neo-tree.nvim
neo-tree.nvim copied to clipboard
BUG: editorconfig raises an error on file open
trafficstars
Did you check docs and existing issues?
- [X] I have read all the docs.
- [X] I have searched the existing issues.
- [X] I have searched the existing discussions.
Neovim Version (nvim -v)
0.9.4
Operating System / Version
Ubuntu 23.10
Describe the Bug
When opening a file, there's an error:
[Neo-tree ERROR] Error opening file: vim/_editor.lua:0: nvim_exec2()..BufReadPost Autocommands for "*": Vim(append):Error executing lua callback: /snap/nvim/2819/usr/share/n
vim/runtime/lua/editorconfig.lua:193: Is a directory
stack traceback:
^I[C]: in function '(for generator)'
^I/snap/nvim/2819/usr/share/nvim/runtime/lua/editorconfig.lua:193: in function 'parse'
^I/snap/nvim/2819/usr/share/nvim/runtime/lua/editorconfig.lua:236: in function 'config'
^I...nvim/2819/usr/share/nvim/runtime/plugin/editorconfig.lua:11: in function <...nvim/2819/usr/share/nvim/runtime/plugin/editorconfig.lua:4>
^I[C]: in function 'nvim_exec2'
^Ivim/_editor.lua: in function <vim/_editor.lua:0>
^I[C]: in function 'pcall'
^I...cal/share/nvim/lazy/neo-tree.nvim/lua/neo-tree/utils.lua:612: in function 'open_file'
^I...y/neo-tree.nvim/lua/neo-tree/sources/common/commands.lua:569: in function 'open'
^I...y/neo-tree.nvim/lua/neo-tree/sources/common/commands.lua:600: in function 'open_with_cmd'
^I...y/neo-tree.nvim/lua/neo-tree/sources/common/commands.lua:609: in function 'open'
^I...o-tree.nvim/lua/neo-tree/sources/filesystem/commands.lua:184: in function 'func'
^I...are/nvim/lazy/neo-tree.nvim/lua/neo-tree/ui/renderer.lua:800: in function <...are/nvim/lazy/neo-tree.nvim/lua/neo-tree/ui/renderer.lua:798>
Screenshots, Traceback
No response
Steps to Reproduce
install Ubuntu 23.10 install nvim snap install nvim with lazy.nvim, neo-tree. start nvim and open a file.
Expected Behavior
Opening file without exception.
Your Configuration
neotree.lua
require'window-picker'.setup({
autoselect_one = false,
include_current = false,
filter_rules = {
bo = {
filetype = {'neo-tree', "neo-tree-popup", "notify"},
buftype = {'terminal', "quickfix"}
}
},
other_win_hl_color = '#e35e4f'
})
vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
vim.fn.sign_define("DiagnosticSignError",
{text = " ", texthl = "DiagnosticSignError"})
vim.fn.sign_define("DiagnosticSignWarn",
{text = " ", texthl = "DiagnosticSignWarn"})
vim.fn.sign_define("DiagnosticSignInfo",
{text = " ", texthl = "DiagnosticSignInfo"})
vim.fn.sign_define("DiagnosticSignHint",
{text = "", texthl = "DiagnosticSignHint"})
require("neo-tree").setup({
filesystem = {
filtered_items = {
visible = true, -- This is what you want: If you set this to `true`, all "hide" just mean "dimmed out"
hide_dotfiles = false,
hide_gitignored = true,
},
}
})
local lazypath = root .. "/plugins/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", lazypath, })
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
local plugins = {
"folke/tokyonight.nvim",
-- add any other plugins here
}
local neotree_config = {
"nvim-neo-tree/neo-tree.nvim",
dependencies = { "MunifTanjim/nui.nvim", "nvim-tree/nvim-web-devicons", "nvim-lua/plenary.nvim" },
cmd = { "Neotree" },
keys = {
{ "<Leader>e", "<Cmd>Neotree<CR>" }, -- change or remove this line if relevant.
},
opts = {
-- Your config here
-- ...
},
}
table.insert(plugins, neotree_config)
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
vim.cmd.colorscheme("tokyonight")
-- add anything else here
I have the same issue on Archlinux, nvim 0.9.5
@Khnykin-Artem @baddate
Do you happen to have a directory named .editorconfig/?
Please add this to the top of your config (init.lua) and retry.
vim.g.editorconfig = false