Comments (13)
Can't reproduce with a fresh LazyVim starter template. Even tried the repro you provided (with some slight changes, since Util
cannot be resolved and threw an error and mapleader
was also not set) and the same result.
from lazyvim.
Thanks for the response. So, if I started this all from scratch - no ~/.config/nvim
folder, and I've removed ~/.local/share/nvim
and ~/.local/state/nvim
and ~/.repro
, and I just run nvim -u repro.lua .
, where do you suggest I look? I'm able to repro this with the repro lua pretty easily.
(also, that repro is the lua template supplied on the issue submission page, with a minimal neo-tree config added).
from lazyvim.
Can you try the following
1. `mkdir ~/.config/lazytest`
2. `git clone https://github.com/LazyVim/starter ~/.config/lazytest`
3. `NVIM_APPNAME=lazytest nvim` and wait for the installation to complete
4. Restart Neovim with the command provided in step 3
Do you observe the same behavior with LazyVim defaults? Don't make any changes of your own.
For cleanup
rm -rf ~/.config/lazytest
rm -rf ~/.local/share/lazytest
rm -rf ~/.local/state/lazytest
rm -rf ~/.cache/lazytest
from lazyvim.
Oh, this is weird:
If I run exactly your steps, culminating in NVIM_APPNAME=lazytest nvim
, I get
If I run these steps but provide a directory to open? As in NVIM_APPNAME=lazytest nvim .
? I get
Now, if I put my setup back in place and just run nvim
, and launch the tree with <leader>E
, it also works:
It sure would be nice to be able to open a path from the command line, but with that particular wrinkle it feels like it's a neo-tree
issue? Thanks for the updated repro steps!
from lazyvim.
Its look like some ptoblem with your color theme
So, the betrer way to test
Install fresh version of LazyVim
Check if all look nice, aplly your color theme - check again and back to default color theme to last check.
from lazyvim.
@steve-down
Yes, I can reproduce when opening a directory. However I don't believe it's a LazyVim issue. In the repro file that you provided I commented out folke/LazyVim
, so the only plugins that are installed then are lazy.nvim, neo-tree.nvim, nui.nvim, plenary.nvim and tokyonight.nvim
. So, I was able to reproduce this without LazyVim by commenting it out in your repro.lua
.
That's why I believe it has something to do with neo-tree
itself.
from lazyvim.
I agree - it's a strange edge condition, it would seem - no command-line == OK. file on the command line == OK. Directory on the command line == failed.
Thanks so much for your help!
from lazyvim.
@steve-down
Can you try the following? Instead of the init
function that you use in your configuration, try to replace it with this
init = function()
vim.api.nvim_create_autocmd("BufEnter", {
-- make a group to be able to delete it later
group = vim.api.nvim_create_augroup("NeoTreeInit", { clear = true }),
callback = function()
local f = vim.fn.expand("%:p")
if vim.fn.isdirectory(f) ~= 0 then
vim.cmd("Neotree left dir=" .. f)
-- neo-tree is loaded now, delete the init autocmd
vim.api.nvim_clear_autocmds({ group = "NeoTreeInit" })
end
end,
})
end,
I'm not exactly sure why, but this seems to avoid the problem you're observing. I'm not sure why this happens and not familiar with neo-tree
's internals, so you might want to ask a question at their repo as to what the correct approach should be.
from lazyvim.
Um, this is embarrassing... I think... you see the 0.10.0-dev version up there?
brew remove neovim
brew install neovim
Problem appears solved against this repro.lua. Will also try your change to it. Thanks again!
from lazyvim.
What is the Neovim version you use that solved your issue?
from lazyvim.
The latest version available with Homebrew:
NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1703358377
from lazyvim.
Whenever you read this, I believe that the colorscheme doesn't load immediately in the init
function of neo-tree
. In Neovim 0.9.5 I also see a different colorscheme for the menu when trying to delete a file than the default tokyonight
.
My local workaround for this is the following
init = function()
if vim.fn.argc(-1) == 1 then
local plugin = require("lazy.core.config").spec.plugins["LazyVim"]
local Opts = require("lazy.core.plugin").values(plugin, "opts", false)
local stat = vim.loop.fs_stat(vim.fn.argv(0))
if stat and stat.type == "directory" then
require("neo-tree")
vim.defer_fn(function()
return Opts.colorscheme and vim.cmd.colorscheme(Opts.colorscheme) or vim.cmd.colorscheme("tokyonight")
end, 100)
end
end
end,
Not sure if it's the best way to deal with this, that's why I'm hesitant to make a PR with this change. I hope you can shed more light into this and a better solution.
from lazyvim.
If this is the case, then this should be fixed in neotree.
They should llisten for ColorScheme
events and update their default colors accordingly.
from lazyvim.
Related Issues (20)
- bug: An error occured at startup, even with a blank installation (no plugins) HOT 14
- bug: Slow file navigation in LazyGit in LazyVim HOT 4
- bug: cannot jump to next field when using native snippets HOT 1
- bug: Error failed to source nvim-treesitter-textobjects.vim HOT 5
- bug: I just updated LazyVim and I am getting indent-blankline.lua error HOT 1
- bug: mini.starter: `buf_id` in `refresh()` is not an identifier of valid Starter buffer. HOT 15
- bug: cache_loader: module luasnip not found HOT 4
- bug: Bad autoindent on cpp files HOT 4
- bug: `LazyVim.telescope("files")` fails on mapped network drive HOT 1
- bug: the color of modified file in neo-tree is not orange HOT 2
- ci and cil not working as expected anymore HOT 3
- bug: New plugins not being added HOT 15
- bug: Failed to run config for mason.nvim HOT 2
- bug: vim.schedule error when opening a TeX file HOT 4
- feature: Explicit CUDA, OpenCL support in Clangd extra HOT 1
- bug: Custom snippets not working after latest update HOT 15
- bug: tab navigation breaks after Lsp initlization HOT 5
- bug: Uninstalling a(ny) plugin will reinstall the plugin on next load. HOT 1
- bug: after LspRestart nvim spams method textDocument/documentHighlight is not supported by any of the servers registered for the current buffer HOT 18
- bug: Windows line-endings in README-DE.md causing upgrade problems HOT 1
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 lazyvim.