Skip to content

Commit

Permalink
Handle macro referencing issues mentioned in #135
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Caldwell committed Feb 19, 2023
1 parent 7c2d9fa commit 44d2886
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions fnl/aniseed/macros/autocmds.fnl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
(fn autocmds [...]
(var form `(do))
(each [_ v (ipairs [...])]
(table.insert form
`(autocmd ,(unpack v))))
(table.insert form (autocmd (unpack v))))
(table.insert form 'nil)
form)

Expand All @@ -16,7 +15,7 @@
(each [_ v (ipairs [...])]
(let [(event opt) (unpack v)]
(tset opt :group group)
(table.insert cmds `(autocmd ,event ,opt))))
(table.insert cmds (autocmd event opt))))
(table.insert cmds 'nil)
`(let [,group
(vim.api.nvim_create_augroup ,name {:clear true})]
Expand Down
5 changes: 2 additions & 3 deletions lua/aniseed/macros/autocmds.fnl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
(fn autocmds [...]
(var form `(do))
(each [_ v (ipairs [...])]
(table.insert form
`(autocmd ,(unpack v))))
(table.insert form (autocmd (unpack v))))
(table.insert form 'nil)
form)

Expand All @@ -16,7 +15,7 @@
(each [_ v (ipairs [...])]
(let [(event opt) (unpack v)]
(tset opt :group group)
(table.insert cmds `(autocmd ,event ,opt))))
(table.insert cmds (autocmd event opt))))
(table.insert cmds 'nil)
`(let [,group
(vim.api.nvim_create_augroup ,name {:clear true})]
Expand Down

0 comments on commit 44d2886

Please sign in to comment.