goolord / alpha-nvim

a lua powered greeter like vim-startify / dashboard-nvim
MIT License
1.78k stars 104 forks source link

Literally does not work #178

Closed s1nistr4 closed 1 year ago

s1nistr4 commented 1 year ago
  1. Install Neovim
  2. Install this using Packer through Lua, copying and pasting the code from the docs
  3. Doesn't work

This does not work at all on a fresh install of the latest version of Neovim provided by Fedora (0.8.3)

jiriks74 commented 1 year ago

I can confirm. I use this in AstroNvim. Commit 704ff0f is the one from which stuff doesn't work.

Note Last working commit was 21a0f25.

flatplate commented 1 year ago

Same as @jiriks74 , using astronvim, does not work after updating.

Error detected while processing VimEnter Autocommands for "*":
Error executing lua callback: ...share/nvim/site/pack/packer/opt/alpha-nvim/lua/alpha.lua:449: attempt to index local 'conf' (a nil value)
stack traceback:
    ...share/nvim/site/pack/packer/opt/alpha-nvim/lua/alpha.lua:449: in function 'enable_alpha'
    ...share/nvim/site/pack/packer/opt/alpha-nvim/lua/alpha.lua:652: in function 'start'
    /Users/ural.bayhan/.config/nvim/lua/core/autocmds.lua:141: in function </Users/ural.bayhan/.config/nvim/lua/core/autocmds.lua:127>

Pinning the commit to 21a0f25 works

goolord commented 1 year ago

there was a bug in an older commit but it should be fixed in HEAD, I can't reproduce this with the debug config or by installing from github with Lazy.nvim 😕

goolord commented 1 year ago

yeah I'm pretty convinced that this is caused by using an older revision of alpha, I can't reproduce this with the latest commit at all

goolord commented 1 year ago

ah i see this is caused by some misuse of alpha.start in AstroNvim, which is probably why the steps you said to take to reproduce don't work :)

i'll try to push a fix for this even tho it's (imo) an abuse of the api

goolord commented 1 year ago

proper support for start with no args here https://github.com/goolord/alpha-nvim/commit/de59ce6b9e9a743e632cb3b8b0e89684bc6cb207

mehalter commented 1 year ago

@goolord thanks for looking into this. I know I discussed this stuff with you recently when the changes to alpha came out. Just to provide some context, AstroNvim does not currently have any issues with alpha and everything works out our end as expected! The latest release of AstroNvim uses an older version of Alpha and therefore doesn't have a problem with using start with no arguments.

The upcoming release of AstroNvim is currently in an unreleased state and does use a new version of Alpha and does not call start with no arguments:  https://github.com/AstroNvim/AstroNvim/blob/v3/lua/core/autocmds.lua#L125-L142

We do have some interesting uses of the API and I agree that you should not have changed the API to support what AstroNvim was doing with the old release as that's not what we are doing now

goolord commented 1 year ago

I try (and seldom succeed, lol) to avoid breaking changes, and I am kind of erring on the side of making the API as flexible as possible. I program in statically typed languages all day at work, so sometimes when I come home I forget that polyvariadic functions exist. Very happy to be a part of your distribution, gl and thanks for the patience T~T

mehalter commented 1 year ago

Thanks! Sorry for the unnecessary noise here. This plugin has definitely been going great :)