Files
zyedidia.micro/runtime/plugins/ftoptions/ftoptions.lua
Jipok ade0e9dd39 Use spaces for nim
From manual:
Nim's standard grammar describes an indentation sensitive language. This means that all the control structures are recognized by indentation. Indentation consists only of spaces; tabulators are not allowed.
2017-10-14 20:21:41 +05:00

18 lines
446 B
Lua

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" or ft == "python2" or ft == "python3" or ft == "yaml" or ft =="nim" then
SetOption("tabstospaces", "on")
end
end