Comments (7)
Your video doesn't load for me. Also they are not very helpful in the first place anyway, we are not sure what you are trying to show, reproducible steps are way better, but you failed to provide them twice. You have also choose not to provide all other essential information as per our bug reporting form (https://github.com/nvim-tree/nvim-tree.lua/issues/new?assignees=&labels=bug&projects=&template=bug_report.yml); that, and the fact that neither of us has access to Windows machine makes it impossible to try to help with your issue. Please open new issue, with all required information filled in, but instead of using configuration file from bug report form please us this snippet (put it into nvt-min.lua
instead):
for name, url in pairs {
tree = 'https://github.com/nvim-tree/nvim-tree.lua.git',
devicons = 'https://github.com/nvim-tree/nvim-web-devicons.git',
} do
local install_path = vim.fn.fnamemodify('/tmp/nvim_issue/' .. name, ':p') -- TODO: Please change the path here!!!
if vim.fn.isdirectory(install_path) == 0 then vim.fn.system { 'git', 'clone', '--depth=1', url, install_path } end
vim.opt.runtimepath:append(install_path)
end
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
require('nvim-tree').setup()
print 'Minimal Config Ready!'
Please pay attention to line with install_path
, you will need to change it so it works on Windows.
from nvim-tree.lua.
Please provide reproducible configuration and steps as per https://github.com/nvim-tree/nvim-tree.lua/wiki/Troubleshooting#clean-room-replication.
from nvim-tree.lua.
I followed nvt-min.lua
, and it's unable to reproduce the problem.
But I can reproduce the problem on lazy.nvim
when I open nvim-qt.exe
.
In addition, if I open nvim.exe
in powershell
, the problem can't be reproduce.
But I've gotten used to using lazy.nvim
instead of packer.nvim
.
Here is my config:
2023-07-22.01-31-58.1.mp4
$localappdata/nvim/init.lua
:
vim.g.mapleader = " "
local vimruntime = vim.fn.expand("$VIMRUNTIME")
local pack = vimruntime .. '\\pack\\'
local lazypath = pack .. "lazy\\start\\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,
})
vim.opt.rtp:prepend(lazypath)
end
require('lazy').setup({
spec = {
{ import = 'nvt-min' },
},
root = pack .. "lazy\\plugins",
})
local file = require('plenary.path'):new(pack):joinpath('nvim_config', 'test.log').filename
pcall(vim.api.nvim_del_autocmd, vim.g.test_au1)
vim.g.test_au1 = vim.api.nvim_create_autocmd({
"CursorMoved",
"TextChanged",
"OptionSet",
}, {
callback = function(ev)
vim.fn.writefile({ string.format([[%-3.3f %-2d %-20s - "%s"]], os.clock(), ev.buf, ev.event, ev.file) }, file, 'a')
end,
})
share\nvim\runtime\pack\nvim_config\start\lazy\lua\nvt-min\nvimtree.lua
:
return {
'nvim-tree/nvim-tree.lua',
dependencies = {
'nvim-tree/nvim-web-devicons',
'nvim-lua/plenary.nvim',
},
config = function()
require('nvim-tree').setup({})
end,
}
from nvim-tree.lua.
But I can reproduce the problem on
lazy.nvim
when I opennvim-qt.exe
.
Are there any plugins other than nvim-tree running under that configuration? If so it's likely that they are be the cause.
My opinion:
Lazy solves a problem that doesn't exist, but adds a great deal of complexity (actual plugin loading) as well as configuration complexity.
Perhaps you might profile startup time / load with lazy running and with a regular, eager plugin manager. If there is an order of magnitude or two difference AND lazy loading doesn't affect your experience at runtime with pauses etc., then you might have a case for lazy.
I've never received an answer when asking a lazy user to profile their startup with/without lazy.
from nvim-tree.lua.
I am going to close this issue now. It's not reproducible without additional plugins. If there is conflict between nvim-tree and some other conflict there might be something actionable by us, otherwise there isn't much we can do.
You could check what auto commands are firing and see where they are coming from. That should help narrowing the issue.
(We could improve minimal config, especially use of NVIM_APPNAME
, see NeogitOrg/neogit#621 for some details.)
from nvim-tree.lua.
2023-07-22.22-17-16.mp4
I reproduce this problem maybe in packer.nvim
.
Here is my new computer, there is only one folder in my Desktop
containing nvim-win64
and nvt-min\nvt-min.lua
:
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
vim.cmd [[set runtimepath=$VIMRUNTIME]]
vim.cmd [[set packpath=C:\Users\llydr\Desktop\nv\nvt-min\site]]
local package_root = [[C:\Users\llydr\Desktop\nv\nvt-min\site\pack]]
local install_path = package_root .. [[\packer\start\packer.nvim]]
local function load_plugins()
require("packer").startup {
{
"wbthomason/packer.nvim",
"nvim-tree/nvim-tree.lua",
"nvim-tree/nvim-web-devicons",
-- ADD PLUGINS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
},
config = {
package_root = package_root,
compile_path = install_path .. "/plugin/packer_compiled.lua",
display = { non_interactive = true },
},
}
end
if vim.fn.isdirectory(install_path) == 0 then
print "Installing nvim-tree and dependencies."
vim.fn.system { "git", "clone", "--depth=1", "https://github.com/wbthomason/packer.nvim", install_path }
end
load_plugins()
require("packer").sync()
vim.cmd [[autocmd User PackerComplete ++once echo "Ready!" | lua setup()]]
vim.opt.termguicolors = true
vim.opt.cursorline = true
-- MODIFY NVIM-TREE SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
_G.setup = function()
require("nvim-tree").setup {}
local file = [[C:\Users\llydr\Desktop\nv\nvt-min\nvt-min.log]]
pcall(vim.api.nvim_del_autocmd, vim.g.test_au1)
vim.g.test_au1 = vim.api.nvim_create_autocmd({
"CursorMoved",
"TextChanged",
"OptionSet",
}, {
callback = function(ev)
vim.fn.writefile({ string.format([[%-3.3f %-2d %-20s - "%s"]], os.clock(), ev.buf, ev.event, ev.file) }, file, 'a')
end,
})
end
OptionSet
is not always triggered. It seems to have something to do with git, but I'm not sure.
Thanks!
from nvim-tree.lua.
(We could improve minimal config, especially use of
NVIM_APPNAME
, see NeogitOrg/neogit#621 for some details.)
Nice... it sounds like it's time. The packer auto load is sometimes quite problematic.
I've had to stray quite far from the minimal configuration for my dev/replication setup: https://github.com/alex-courtis/arch/blob/02507049a79a230febbf4aa9c0ff73deb1331bf5/config/nvim/nvt-dev-template.lua
from nvim-tree.lua.
Related Issues (20)
- Inconsistent behavior: Python files from some folders are highlighted as `NvimTreeExecFile` HOT 6
- How can I make the nvim-tree display ".. "Folder?
- New git glyph option: 'added' HOT 7
- sync_root_with_cwd appears to be broken HOT 3
- Scrolling downwards is overriden by keymap HOT 3
- Incompatibility with fugitive and oil.nvim and other plugins HOT 5
- An option to control weather change root_folder when root_folder be clicked. HOT 1
- If using floating mode and creating a new file the floating window becomes the created file. HOT 2
- Bookmark filter should include parent directory HOT 1
- Bad contrast for NvimTreeWindowPicker & NvimTreeBookmarkHL on default colorscheme HOT 7
- Mappings/functionality discoverability discussion HOT 10
- update_root won't update with respect_buf_cwd when open file HOT 3
- change_root_to_node() does not work on files HOT 1
- how to use one instance in different tab HOT 2
- Sticky nvim-tree and not using window_picker: How to remember the window where navigating into nvim-tree from?
- Quitting neovim takes a long time when toggling git ignore folders HOT 3
- Add winfixbuf to view options HOT 4
- Provide interface to customize the comparing function between two nodes HOT 1
- 0.10 luadoc and lsp integration
- Parent folder deleted when deleting a folder starting with $ HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvim-tree.lua.