Skip to content

Commit

Permalink
fix: forgot an argument that broke this plugin for non-md files #24
Browse files Browse the repository at this point in the history
  • Loading branch information
gaoDean committed Sep 14, 2022
1 parent 060da8e commit 02333ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lua/autolist/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ local function get_preloaded_pattern(pre)
return val
end

local function setmap(func, mappings, mode)
local function setmap(func, mappings, ft, mode)
for _, map in pairs(mappings) do
local args = (map:match("%+%(.*%)") or ""):sub(3, -2)
local catch = (map:match("%+%[.*%]") or ""):sub(3, -2)
Expand Down Expand Up @@ -128,8 +128,8 @@ M.update = function(opts)

-- for each filetype in th enabled filetypes
for ft, _ in pairs(filetype_lists) do
for func, mappings in pairs(newconf.normal_mappings) do setmap(func, mappings, "nnoremap") end
for func, mappings in pairs(newconf.insert_mappings) do setmap(func, mappings, "inoremap") end
for func, mappings in pairs(newconf.normal_mappings) do setmap(func, mappings, ft, "nnoremap") end
for func, mappings in pairs(newconf.insert_mappings) do setmap(func, mappings, ft, "inoremap") end
end
end

Expand Down

0 comments on commit 02333ee

Please sign in to comment.