goolord / alpha-nvim

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

Using plugin without Vim package managers #182

Closed dinkopehar closed 1 year ago

dinkopehar commented 1 year ago

Hello.

I have problem using some of the plugins similar to this. I'm configuring my work environment using Nix Package manager. In the README.md , it is stated how to use it with Lazy.nvim or Packer.

I installed this plugin using Nix, and sourced to see that requires are working.

This is my Lua script for this plugin:

alpha = require("alpha")
api = vim.api

api.nvim_create_autocmd("VimEnter", {
  callback = function()
    print("This prints, but below is not executed ?")
    alpha.setup(
      require("alpha.themes.dashboard").config
    )
  end
})

I want to show dashboard on startup, but I don't see it. If I run :Alpha, the dashboard is show. Even if I simplify Lua script for this (without VimEnter), it still doesn't work. Any help ?

goolord commented 1 year ago

hard to say without seeing the rest of your config. setup registers a VimEnter autocmd, which might be why that's not working. but if you say it's truly not even starting without that autocmd I'm at a loss. how does plugin management work with nix? does it compile your config for you?

the setup function also registers the Alpha command, so it is in fact running

dinkopehar commented 1 year ago

I think it's something how I configure vim plugins using Nix. I have contacted maintainers of this package manager for additional help at https://github.com/nix-community/home-manager/issues/3683

I will update here once how to use your plugin with Nix package manager. This could be a good resource for Nix users.

dinkopehar commented 1 year ago

I can confirm that plugin works with Packer correctly. So it's something related to how I setup Neovim using home-manager. Nix users can follow above linked issue.

Closing this issue. Thank you for support 🚀