Skip to content

Commit

Permalink
fix: luacheck errors
Browse files Browse the repository at this point in the history
  • Loading branch information
stevearc-stripe committed Sep 11, 2022
1 parent 347e63d commit 156752b
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 11 deletions.
7 changes: 1 addition & 6 deletions lua/resession/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ M.setup = function(config)
local util = require("resession.util")
local newconf = vim.tbl_deep_extend("force", default_config, config)

if newconf.options.save_all then
newconf.options.include = options.all_options
end

for k, v in pairs(newconf) do
M[k] = v
end
Expand All @@ -76,8 +72,7 @@ M.setup = function(config)
end,
})
autosave_timer = vim.loop.new_timer()
timer = vim.loop.new_timer()
timer:start(
autosave_timer:start(
M.autosave.interval * 1000,
M.autosave.interval * 1000,
vim.schedule_wrap(function()
Expand Down
1 change: 0 additions & 1 deletion lua/resession/extensions/quickfix.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
local M = {}

M.on_save = function()
local list = vim.fn.getqflist()
return vim.tbl_map(function(item)
return {
filename = item.bufnr and vim.api.nvim_buf_get_name(item.bufnr),
Expand Down
2 changes: 0 additions & 2 deletions lua/resession/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ end
---@return string[]
M.list = function(opts)
opts = opts or {}
local config = require("resession.config")
local files = require("resession.files")
local util = require("resession.util")
local session_dir = util.get_session_dir(opts.dir)
Expand Down Expand Up @@ -114,7 +113,6 @@ local function save(name, opts, target_tabpage)
local layout = require("resession.layout")
local util = require("resession.util")
local filename = util.get_session_file(name, opts.dir)
local cwd
local data = {
buffers = {},
tabs = {},
Expand Down
4 changes: 2 additions & 2 deletions lua/resession/layout.lua
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ local function set_winlayout(layout)
end
else
local winids = {}
for i, v in ipairs(layout[2]) do
for i in ipairs(layout[2]) do
if i > 1 then
if type == "row" then
vim.cmd("vsplit")
Expand Down Expand Up @@ -146,7 +146,7 @@ local function set_winlayout_data(layout, scale_factor, visit_data)
visit_data.winid = win.winid
end
else
for i, v in ipairs(layout[2]) do
for _, v in ipairs(layout[2]) do
set_winlayout_data(v, scale_factor, visit_data)
end
end
Expand Down

0 comments on commit 156752b

Please sign in to comment.