mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 07:00:04 +08:00
feat(format): support :Format! filetype
This commit is contained in:
parent
a7fbe2415b
commit
545a3bc5fa
@ -11,6 +11,10 @@ function M.format(bang, user_input, start_line, end_line)
|
||||
end
|
||||
|
||||
local filetype = vim.o.filetype
|
||||
local argvs = vim.split(user_input, '%s+')
|
||||
if bang and #argvs > 0 then
|
||||
filetype = argvs[1]
|
||||
end
|
||||
|
||||
if filetype == '' then
|
||||
return util.msg('format: skip empty filetype')
|
||||
|
Loading…
Reference in New Issue
Block a user