neovim: Fix setup_filetype

The function arguments are not what they actually should be.
This commit is contained in:
Simon Bruder 2023-03-09 19:57:45 +01:00
parent e81cbc6539
commit b65129018a
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC

View file

@ -15,7 +15,7 @@ end
local function associate_filetype(glob, ft) local function associate_filetype(glob, ft)
cmd('autocmd BufRead,BufNewFile ' .. glob .. ' set filetype=' .. ft) cmd('autocmd BufRead,BufNewFile ' .. glob .. ' set filetype=' .. ft)
end end
local function setup_filetype(ft, tab, expandtab, opts) local function setup_filetype(ft, tab, opts)
local cmdline = 'autocmd Filetype ' .. ft .. ' setlocal' local cmdline = 'autocmd Filetype ' .. ft .. ' setlocal'
if tab then cmdline = cmdline .. ' ts=' .. tab .. ' sw=' .. tab .. ' sts=' .. tab end if tab then cmdline = cmdline .. ' ts=' .. tab .. ' sw=' .. tab .. ' sts=' .. tab end
if opts then cmdline = cmdline .. ' ' .. opts end -- FIXME: opts should be a table if opts then cmdline = cmdline .. ' ' .. opts end -- FIXME: opts should be a table