folke / tokyonight.nvim

🏙 A clean, dark Neovim theme written in Lua, with support for lsp, treesitter and lots of plugins. Includes additional themes for Kitty, Alacritty, iTerm and Fish.
Apache License 2.0
6.25k stars 414 forks source link

bug: nvim-tree.lua plugin detection uses wrong name #593

Closed ava5627 closed 2 months ago

ava5627 commented 2 months ago

Did you check docs and existing issues?

Neovim version (nvim -v)

v0.10.0

Operating system/version

Nixos 24.11

Describe the bug

The nvim tree plugin is not automatically detected because it is looking for nvim-tree instead of nvim-tree.lua . adding "nvim-tree" to plugins manually does work

Steps To Reproduce

Open nvim with nvim-tree.lua installed Open tree, highlights are not applied

Expected Behavior

Nvim tree plugin is detected and correct highlights are applied

Repro

-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "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", "https://github.com/folke/lazy.nvim.git", lazypath, })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  "folke/tokyonight.nvim",
  {
    "nvim-tree/nvim-tree.lua",
    config = true,
  }
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

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