mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-02 22:20:06 +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
|
end
|
||||||
|
|
||||||
local filetype = vim.o.filetype
|
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
|
if filetype == '' then
|
||||||
return util.msg('format: skip empty filetype')
|
return util.msg('format: skip empty filetype')
|
||||||
|
Loading…
Reference in New Issue
Block a user