goolord / alpha-nvim

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

config help #60

Closed barkanido closed 2 years ago

barkanido commented 2 years ago

hey, a lua newbie here. using the config example form the readme file:

use {
    'goolord/alpha-nvim',
    requires = { 'kyazdani42/nvim-web-devicons' },
    config = function ()
        require'alpha'.setup(require'alpha.themes.startify'.opts)
    end
}

gives me:

E5113: Error while calling lua chunk: .config/nvim/lua/init.lua:122: attempt to call global 'use' (a nil value)
goolord commented 2 years ago

the example in the readme assumes you're using the https://github.com/wbthomason/packer.nvim plugin manager to install plugins. you can use any plugin manager. if you've never installed a plugin before there will be more info there, it might be also fruitful to look at other people's configs (https://github.com/goolord/nvim)

barkanido commented 2 years ago

I am using vim-plug so in init.vim I have:

Plug 'goolord/alpha-nvim'

and in the sourced lua file I had this 'use' what is the equivalent lua for this? something like this?

goolord commented 2 years ago
Plug 'goolord/alpha-nvim'
Plug 'kyazdani42/nvim-web-devicons'

lua << EOF

require'alpha'.setup(require'alpha.themes.startify'.opts

EOF

this should work