Is installation specific to lua only?

According to the quickstart in the README:

  1. Add the language server setup to your init.lua.
    require’lspconfig’.pyright.setup{}

What if I’m using init.vim instead? Is this specific to lua only? Otherwise as i s I get an error of:

Error detected while processing /home/codewarrior/.config/nvim/init.lua:
E5113: Error while calling lua chunk: /home/codewarrior/.config/nvim/init.lua:1: module 'lspconfig' not found:
        no field package.preload['lspconfig']
        no file './lspconfig.lua'
        no file '/usr/share/luajit-2.1.0-beta3/lspconfig.lua'
        no file '/usr/local/share/lua/5.1/lspconfig.lua'
        no file '/usr/local/share/lua/5.1/lspconfig/init.lua'
        no file '/usr/share/lua/5.1/lspconfig.lua'
        no file '/usr/share/lua/5.1/lspconfig/init.lua'
        no file './lspconfig.so'
        no file '/usr/local/lib/lua/5.1/lspconfig.so'
        no file '/usr/lib/x86_64-linux-gnu/lua/5.1/lspconfig.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
        [C]: in function 'require'
        /home/codewarrior/.config/nvim/init.lua:1: in main chunk

You can call lua code via lua command in a .vim file. For example:

lua <<EOF
require’lspconfig’.pyright.setup{}
EOF

Or

lua require’lspconfig’.pyright.setup{}

And to fix the second problem module 'lspconfig' not found, you have to install the neovim/nvim-lspconfig using some plugin manager such as packer.nvim, lazy.nvim, vim-plug, dein.vim, etc. See the document of the plugin manager for details.