aboutsummaryrefslogtreecommitdiff
path: root/plugins/memoryusage.lua
diff options
context:
space:
mode:
authorGuldoman <giulio.lettieri@gmail.com>2022-07-15 06:34:52 +0200
committerGitHub <noreply@github.com>2022-07-15 00:34:52 -0400
commitdfd0a5020fbf5904ca674256ff42510be5e11a48 (patch)
treeb02f25411f3e40a819577ebf2d607fe77a214f65 /plugins/memoryusage.lua
parenta1c7102578f166df804bf5dbdbe6aac6810dff2d (diff)
downloadlite-xl-plugins-dfd0a5020fbf5904ca674256ff42510be5e11a48.tar.gz
lite-xl-plugins-dfd0a5020fbf5904ca674256ff42510be5e11a48.zip
Use new `StatusView:add_item` syntax (#117)
Diffstat (limited to 'plugins/memoryusage.lua')
-rw-r--r--plugins/memoryusage.lua17
1 files changed, 8 insertions, 9 deletions
diff --git a/plugins/memoryusage.lua b/plugins/memoryusage.lua
index d84a8c2..16220fc 100644
--- a/plugins/memoryusage.lua
+++ b/plugins/memoryusage.lua
@@ -30,11 +30,10 @@ config.plugins.memoryusage = common.merge({
}
}, config.plugins.memoryusage)
-core.status_view:add_item(
- nil,
- "status:memory-usage",
- StatusView.Item.RIGHT,
- function()
+core.status_view:add_item({
+ name = "status:memory-usage",
+ alignment = StatusView.Item.RIGHT,
+ get_item = function()
return {
style.text,
string.format(
@@ -43,8 +42,8 @@ core.status_view:add_item(
)
}
end,
- nil,
- 1,
- "lua memory usage"
-).separator = core.status_view.separator2
+ potition = 1,
+ tooltip = "lua memory usage",
+ separator = core.status_view.separator2
+})