diff --git a/init.lua b/init.lua index 1b271f0..1df33ac 100644 --- a/init.lua +++ b/init.lua @@ -25,17 +25,11 @@ local save_bookmark = ya.sync(function(state, idx) } end) -local all_bookmarks = ya.sync(function(state) - return state.bookmarks or {} -end) +local all_bookmarks = ya.sync(function(state) return state.bookmarks or {} end) -local delete_bookmark = ya.sync(function(state, idx) - table.remove(state.bookmarks, idx) -end) +local delete_bookmark = ya.sync(function(state, idx) table.remove(state.bookmarks, idx) end) -local delete_all_bookmarks = ya.sync(function(state) - state.bookmarks = nil -end) +local delete_all_bookmarks = ya.sync(function(state) state.bookmarks = nil end) return { entry = function(_, args) @@ -45,7 +39,7 @@ return { end if action == "save" then - local key = ya.which({ cands = SUPPORTED_KEYS, silent = true }) + local key = ya.which { cands = SUPPORTED_KEYS, silent = true } if key then save_bookmark(key) end @@ -57,7 +51,7 @@ return { end local bookmarks = all_bookmarks() - local selected = #bookmarks > 0 and ya.which({ cands = bookmarks }) + local selected = #bookmarks > 0 and ya.which { cands = bookmarks } if not selected then return end diff --git a/stylua.toml b/stylua.toml new file mode 100644 index 0000000..722d02c --- /dev/null +++ b/stylua.toml @@ -0,0 +1,6 @@ +indent_width = 2 +call_parentheses = "NoSingleTable" +collapse_simple_statement = "FunctionOnly" + +[sort_requires] +enabled = true