elixir-tools / elixir-tools.nvim

Neovim plugin for Elixir
MIT License
403 stars 30 forks source link

Error on nvim startup #63

Closed rnestler closed 1 year ago

rnestler commented 1 year ago

I get the following error on nvim startup after an upgrade:

Error detected while processing ~/dotfiles/config/nvim/init.vim:
line  192:
E5108: Error executing lua ...share/nvim/plugged/elixir-tools.nvim/lua/elixir/init.lua:16: attempt to index local 'opts' (a nil value)
stack traceback:
        ...share/nvim/plugged/elixir-tools.nvim/lua/elixir/init.lua:16: in function 'setup'
        [string ":lua"]:50: in main chunk

I'm using https://github.com/junegunn/vim-plug as the plugin manager and the only elixir related config I have is

    Plug 'elixir-tools/elixir-tools.nvim'

    require("elixir").setup()
rnestler commented 1 year ago

Changing

    require("elixir").setup()

to

    require("elixir").setup({})

Seems to fix it.

The readme should probably be adapted accordingly: https://github.com/elixir-tools/elixir-tools.nvim/blob/78df87a84737d02fc67f16e9799557d0db8fd982/README.md?plain=1#L62-L64

mhanberg commented 1 year ago

That was a regression, I fixed it.

Thanks for the report!