How to set lua variable contains dot

Hi, I am porting the init.vim to init.lua, and I have trouble with following configuration:

# init.vim
    let g:Lf_GtagsfilesCmd = {
            \ '.git': 'git ls-files --recurse-submodules',
            \ '.hg': 'hg files',
            \ 'default': 'rg --no-messages --files'
            \}

How to set the '.git', '.hg' variable in lua?
Thanks.

There you go:

vim.g.Lf_GtagsfilesCmd = {
  ['.git'] = 'git ls-files --recurse-submodules',
  ['.hg'] = 'hg files',
  default = 'rg --no-messages --files',
}
2 Likes