tamago324 / lir.nvim

Neovim file explorer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting error message after latest update 'Error detected while processing BufEnter Autocommands for "*":'

thekaganugur opened this issue · comments

I started to get error when I enter lir, I can proceed to use it but error pops out every time I use lir.nvim.

Here is the message:

Error detected while processing BufEnter Autocommands for "*":
E5108: Error executing lua ...l/share/nvim/site/pack/packer/start/lir.nvim/lua/lir.lua:243: Vim(lua):E5108: Error executing lua ...ck/packer
/start/lir.nvim/lua/lir/float/curdir_window.lua:113: attempt to index field 'curdir_window' (a nil value)

Thank you.

Thanks for the report.
However, it seems to be working fine in my environment.

minvimrc
set encoding=utf-8

filetype plugin indent on
if has('vim_starting')
  let s:pluin_manager_dir='~/.config/nvim/.plugged/vim-plug'
  execute 'set runtimepath+=' . s:pluin_manager_dir
endif
call plug#begin('~/.config/nvim/.plugged')
Plug 'tamago324/lir.nvim'
Plug 'kyazdani42/nvim-web-devicons'
Plug 'nvim-lua/plenary.nvim'
call plug#end()

set nobackup
set nowritebackup
set noswapfile
set updatecount=0
set backspace=indent,eol,start
language messages en_US.utf8

lua << EOF

local actions = require'lir.actions'

require'lir'.setup {
  show_hidden_files = false,
  devicons_enable = true,
  mappings = {
    ['l']     = actions.edit,
    ['h']     = actions.up,
    ['q']     = actions.quit,
  },
  float = {
    winblend = 0,
    curdir_window = {
      enable = true,
      highlight_dirname = true,
    },

    -- You can define a function that returns a table to be passed as the third
    -- argument of nvim_open_win().
    win_opts = function()
      local width = math.floor(vim.o.columns * 0.5)
      local height = math.floor(vim.o.lines * 0.5)

      return {
        border = 'single',
        -- border = require("lir.float.helper").make_border_opts({
        --   "+",
        --   "",
        --   "+",
        --   "",
        --   "+",
        --   "",
        --   "+",
        --   "",
        -- }, "Normal"),
        width = width,
        height = height,
      }
    end,
  },
  hide_cursor = true,
}

vim.cmd [[augroup lir-settings]]
vim.cmd [[  autocmd!]]
vim.cmd [[  autocmd Filetype lir :lua LirSettings()]]
vim.cmd [[augroup END]]

vim.api.nvim_set_keymap(
  "n",
  "<C-e>",
  "<Cmd>lua require'lir.float'.toggle()<CR>",
  { silent = true, noremap = true }
)
EOF

Could you please update it again?

Hi, I had float = {} in my require'lir'.setup { } after deleting that line lirstarted working againg.

I was using commit commit = '5a7b21b0fdafe73719902b9848880fb3eb8500aa' in the meanwhile. Sorry for not communicating with you I was very busy.

Thanks for the info!
We have just corrected the problem.

Don't worry, I can be slow to reply too.