Giter Club home page Giter Club logo

Comments (7)

kyazdani42 avatar kyazdani42 commented on April 28, 2024 1

ok well i found the bug. When sourcing, lua tree reevaluates even if it is closed, thus the Tree.bufnr is nil, which causes undefined behaviour. I'll push a fix, tell me if it fixes it on your side

from nvim-tree.lua.

akinsho avatar akinsho commented on April 28, 2024 1

Just tested it and it looks like it's fixed 👍

from nvim-tree.lua.

kyazdani42 avatar kyazdani42 commented on April 28, 2024

hey ! thanks :)
not sure i understand this issue, is the tree overwriting the highlight in your files ? are you sure it isn't related to something else ? I did not encounter something like that so i don't really know how to reproduce this ^^

from nvim-tree.lua.

akinsho avatar akinsho commented on April 28, 2024

Yeah it's a pretty confusing one I'm not 100% sure what happening but the way I can reproduce it locally is it seems to be happening when I
1.) Open nvim tree
2.) Close nvim tree
3.) source my neovim config

I'll try with a minimal init.vim to make sure it isn't my config causing it, except the problem goes away when I don't have nvim tree loaded

from nvim-tree.lua.

akinsho avatar akinsho commented on April 28, 2024

Okay so I managed to reproduce this with a minimal vimrc

call plug#begin(stdpath('data') . '/plugged')
Plug 'kyazdani42/nvim-web-devicons' " for file icons
Plug 'kyazdani42/nvim-tree.lua'
Plug 'rakr/vim-one' 
call plug#end()

colorscheme one
  1. nvim -u minimal.vim
  2. LuaTreeOpen
  3. LuaTreeClose
  4. source /path/to/minimal.vim

And the highlights are broken. Note, that if you try sourcing the minimal init.vim before LuaTreeOpen the highlights are fine

from nvim-tree.lua.

kyazdani42 avatar kyazdani42 commented on April 28, 2024

well that's a strange one. I'm gonna investigate.

from nvim-tree.lua.

kyazdani42 avatar kyazdani42 commented on April 28, 2024

I'm closing this if everything is ok for you. Ask me to reopen if the issue still exists !

from nvim-tree.lua.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.