mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-21 08:17:15 +09:00
Have go plugin create its own options
This commit is contained in:
@@ -1,8 +1,15 @@
|
||||
if GetOption("goimports") == nil then
|
||||
AddOption("goimports", false)
|
||||
end
|
||||
if GetOption("gofmt") == nil then
|
||||
AddOption("gofmt", true)
|
||||
end
|
||||
|
||||
function go_onSave()
|
||||
if view.Buf.Filetype == "Go" then
|
||||
if settings.GoImports then
|
||||
if GetOption("goimports") then
|
||||
go_goimports()
|
||||
elseif settings.GoFmt then
|
||||
elseif GetOption("gofmt") then
|
||||
go_gofmt()
|
||||
end
|
||||
go_build()
|
||||
|
||||
Reference in New Issue
Block a user