2021-04-02 17:54:14 +00:00
|
|
|
{:augroup
|
|
|
|
(fn [name ...]
|
|
|
|
`(do
|
|
|
|
(nvim.ex.augroup ,(tostring name))
|
|
|
|
(nvim.ex.autocmd_)
|
|
|
|
,...
|
|
|
|
(nvim.ex.augroup :END)))
|
|
|
|
|
|
|
|
:autocmd
|
|
|
|
(fn [...]
|
|
|
|
`(nvim.ex.autocmd ,...))
|
|
|
|
|
|
|
|
:_:
|
|
|
|
(fn [name ...]
|
|
|
|
`((. nvim.ex ,(tostring name)) ,...))
|
|
|
|
|
|
|
|
:viml->fn
|
|
|
|
(fn [name]
|
2021-05-01 13:20:02 +00:00
|
|
|
`(.. "lua require('" *module-name* "')['" ,(tostring name) "']()"))
|
|
|
|
|
2021-05-08 21:41:47 +00:00
|
|
|
:dbg
|
|
|
|
(fn [x]
|
|
|
|
`(let [view# (. (require "aniseed.fennel") :view)]
|
|
|
|
(print (.. `,(tostring x) " => " (view# ,x)))
|
|
|
|
,x))
|
|
|
|
|
2021-05-01 13:20:02 +00:00
|
|
|
:dbg-call
|
|
|
|
(fn [x ...]
|
|
|
|
`(do
|
|
|
|
(a.println ,...)
|
2021-05-05 17:23:32 +00:00
|
|
|
(,x ,...)))
|
|
|
|
|
|
|
|
:pkg
|
|
|
|
(fn [name mappings ...]
|
2021-05-08 18:51:05 +00:00
|
|
|
`(if (~= nil (. packer_plugins `,(tostring name)))
|
|
|
|
(let ,mappings ,...)
|
2021-05-08 17:31:04 +00:00
|
|
|
(print (.. "plugin disabled " `,(tostring name)))))
|
|
|
|
|
2021-05-08 20:24:53 +00:00
|
|
|
:vim-let
|
|
|
|
(fn [field value]
|
|
|
|
(let [text (.. "let " `,(tostring field) "=\"" value "\"")]
|
|
|
|
`(vim.cmd ,text)))
|
|
|
|
|
2021-05-08 17:31:04 +00:00
|
|
|
:each-pair
|
|
|
|
(fn [args ...]
|
|
|
|
(let [[l# r# d#] args]
|
|
|
|
`(let [data# ,d#]
|
|
|
|
(for [i# 1 (a.count data#) 2]
|
|
|
|
(let [,l# (. data# i#)
|
|
|
|
,r# (. data# (+ i# 1))]
|
|
|
|
,...)))))}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-05-05 17:23:32 +00:00
|
|
|
|
|
|
|
|
2021-05-01 13:20:02 +00:00
|
|
|
|