mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-24 17:50:15 +09:00
Update ftoptions and statusline plugin configuration options
This commit is contained in:
@@ -1,23 +1,15 @@
|
||||
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"]
|
||||
function onBufferOpen(b)
|
||||
local ft = b:FileType()
|
||||
|
||||
if ft == "go" or
|
||||
ft == "makefile" then
|
||||
SetOption("tabstospaces", "off")
|
||||
b:SetOption("tabstospaces", "off")
|
||||
elseif ft == "fish" or
|
||||
ft == "python" or
|
||||
ft == "python2" or
|
||||
ft == "python3" or
|
||||
ft == "yaml" or
|
||||
ft == "nim" then
|
||||
SetOption("tabstospaces", "on")
|
||||
b:SetOption("tabstospaces", "on")
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user