micro/runtime/plugins/ftoptions/ftoptions.lua
Zachary Yedidia 7c2baa6086 Add default ftoptions plugin to override settings
The ftoptions plugin will override values in settings.json based
on language requirements (e.g. using tabs in makefiles).
2016-11-08 09:34:12 -05:00

10 lines
239 B
Lua

function onViewOpen(view)
local ft = view.Buf.Settings["filetype"]
if ft == "makefile" or ft == "go" then
SetOption("tabstospaces", "off")
elseif ft == "python" then
SetOption("tabstospaces", "on")
end
end