Intro to Lua

Reload init.lua

One approach:

vim.keymap.set('n', '<leader>rc', function ()
    print('nvim configuration reloaded!')
    vim.cmd.source("fullpath")
end)

Or

vim.keymap.set(
  'n',
  '<Leader>cr',
  '<CMD>source $MYVIMRC | echo "Reloaded nvim config!"<CR>'
)

Or even

----
-- Reload $MYVIMRC.
--
vim.keymap.set(
  'n',
  '<Leader>cr',
  function ()
    vim.api.nvim_cmd(
      {
        cmd = 'source',
        args = {
          vim.fn.expand '$MYVIMRC'
        },
      },
      {}
    )
    print('Reloaded nvim config!')
  end
)