mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 13:00:04 +08:00
fix(flygrep): make sure command startswith set filetype=
This commit is contained in:
parent
98de528e19
commit
be6f16768d
@ -308,7 +308,7 @@ local function preview_timer(_)
|
|||||||
})
|
})
|
||||||
-- logger.info(vim.inspect(ftdetect_autocmd))
|
-- logger.info(vim.inspect(ftdetect_autocmd))
|
||||||
if ftdetect_autocmd[1] then
|
if ftdetect_autocmd[1] then
|
||||||
if ftdetect_autocmd[1].command then
|
if ftdetect_autocmd[1].command and vim.startswith(ftdetect_autocmd[1].command, 'set filetype=') then
|
||||||
ft = ftdetect_autocmd[1].command:gsub('set filetype=', '')
|
ft = ftdetect_autocmd[1].command:gsub('set filetype=', '')
|
||||||
vim.api.nvim_buf_set_option(preview_bufnr, 'syntax', ft)
|
vim.api.nvim_buf_set_option(preview_bufnr, 'syntax', ft)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user