Skip to content

Commit

Permalink
feat(autocmd): deprecate list to set Ex command (#203)
Browse files Browse the repository at this point in the history
  • Loading branch information
aileot authored Feb 4, 2023
1 parent 8a005ed commit c1d7bbf
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions fnl/nvim-laurel/macros.fnl
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,18 @@
"another name"
:v0.6.0
`cb#))}))
(and (list? extra-opts.command) (not vim?))
`(vim.tbl_extend :keep (or ,?api-opts {})
(let [cb# ,extra-opts.command
str?# (= :string
(type cb#))]
{:command (when str?#
,(deprecate "bare-list to set Ex command"
"&vim, or rename symbol to match `^<.+>`,"
:v0.6.0
`cb#))
:callback (when (not str?#)
cb#)}))
?api-opts))]
`(vim.api.nvim_create_autocmd ,events
,(if deprecated-opts-command?
Expand Down

0 comments on commit c1d7bbf

Please sign in to comment.