elihunter173 / dirbuf.nvim

A file manager for Neovim which lets you edit your filesystem like you edit text
GNU Affero General Public License v3.0
423 stars 7 forks source link

Undefined variable: g:terminal_color_4 #10

Closed bart9h closed 2 years ago

bart9h commented 2 years ago

First time using Neovim. Installed it from source, just to try dirbuf.

My init.vim has just this:

set winminheight=0                                                                                                                                                                                                                                 
lua require('plugins')

and lua/plugins.lua has:

vim.cmd [[packadd packer.nvim]]                                                                                                                                                                                                                    
return require('packer').startup(function()                                                                                                                                                                                                        
    use 'wbthomason/packer.nvim'                                                                                                                                                                                                                   
    use 'elihunter173/dirbuf.nvim'                                                                                                                                                                                                                 
end)

After running :PackerSync and :e . I get this error:

Error detected while processing BufEnter Autocommands for "*":                                                                                                                                                                           
E5108: Error executing lua .../dirbuf.lua:66: Vim(execute):E121: Undefined variable: g:terminal_color_4
stack traceback:
        [C]: in function 'nvim_buf_set_option'
        ...e/nvim/site/pack/packer/start/dirbuf.nvim/lua/dirbuf.lua:66: in function 'set_dirbuf_opts'
        ...e/nvim/site/pack/packer/start/dirbuf.nvim/lua/dirbuf.lua:92: in function 'edit_dirbuf'
        [string ":lua"]:1: in main chunk

I probably missed something obvious, sorry to take your time.

elihunter173 commented 2 years ago

I found the same issue when testing a minimal config recently. This should be fixed as of ~10 minutes ago in 6e805525a84071fdf21857bdb177c33106119045, so please update dirbuf.nvim (:PackerSync) and tell me if that fixes the issue.

And no need to apologize :)

JSchrtke commented 2 years ago

I encountered that aswell when making the repro for #9, but left that out of there for the sake of brevity. I can however confirm this is fixed now, I can't reproduce it anymore.

bart9h commented 2 years ago

updated, and it's working now.

thanks.