mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-18 14:57:18 +09:00
Handle initialization and didOpen properly
This commit is contained in:
@@ -13,6 +13,7 @@ function init()
|
||||
micro.SetStatusInfoFn("status.lines")
|
||||
micro.SetStatusInfoFn("status.bytes")
|
||||
micro.SetStatusInfoFn("status.size")
|
||||
micro.SetStatusInfoFn("status.lsp")
|
||||
config.AddRuntimeFile("status", config.RTHelp, "help/status.md")
|
||||
end
|
||||
|
||||
@@ -32,6 +33,13 @@ function size(b)
|
||||
return humanize.Bytes(b:Size())
|
||||
end
|
||||
|
||||
function lsp(b)
|
||||
if b:HasLSP() then
|
||||
return "on"
|
||||
end
|
||||
return "off"
|
||||
end
|
||||
|
||||
function branch(b)
|
||||
if b.Type.Kind ~= buffer.BTInfo then
|
||||
local shell = import("micro/shell")
|
||||
|
||||
Reference in New Issue
Block a user