]> git.lizzy.rs Git - micro.git/blobdiff - runtime/plugins/ftoptions/ftoptions.lua
Merge
[micro.git] / runtime / plugins / ftoptions / ftoptions.lua
index 0d78de35b9f171a131461ee5318fa84656169198..bc57dcdcc4c6108099ab44e487af1955bc08b5fc 100644 (file)
@@ -1,9 +1,17 @@
+if GetOption("ftoptions") == nil then
+    AddOption("ftoptions", true)
+end
+
 function onViewOpen(view)
+    if not GetOption("ftoptions") then
+        return
+    end
+
     local ft = view.Buf.Settings["filetype"]
 
     if ft == "makefile" or ft == "go" then
         SetOption("tabstospaces", "off")
-    elseif ft == "python" then
+    elseif ft == "python" or ft == "python2" or ft == "python3" then
         SetOption("tabstospaces", "on")
     end
 end