]> git.lizzy.rs Git - micro.git/blob - runtime/plugins/ftoptions/ftoptions.lua
Merge branch 'master' into highlight-nimscript
[micro.git] / runtime / plugins / ftoptions / ftoptions.lua
1 function onBufferOpen(b)
2     local ft = b:FileType()
3
4     if ft == "go" or
5     ft == "makefile" then
6         b:SetOption("tabstospaces", "off")
7     elseif ft == "fish" or
8            ft == "python" or
9            ft == "python2" or
10            ft == "python3" or
11            ft == "yaml" or
12            ft == "nim" then
13         b:SetOption("tabstospaces", "on")
14     end
15 end