mirror of
https://github.com/stevenproctor/dotfiles.git
synced 2026-11-22 15:08:25 -06:00
nvim - start playing with some terraform helpers
This commit is contained in:
1 parent
b005718a80
commit
e2bd2b2497
1 file changed
+22
@@ -0,0 +1,22 @@
|
|||||||
|
(module dotfiles.terraform-helpers
|
||||||
|
{autoload {a aniseed.core}
|
||||||
|
require {anenv aniseed.env
|
||||||
|
nvim aniseed.nvim
|
||||||
|
nu aniseed.nvim.util
|
||||||
|
u dotfiles.util}})
|
||||||
|
|
||||||
|
(defn append-to-buf [bufno lines]
|
||||||
|
(when lines
|
||||||
|
(nvim.buf_set_lines buffno -1 -1 false lines)))
|
||||||
|
|
||||||
|
(var tf-log-bufno nil)
|
||||||
|
(defn tf-log-buffer [])
|
||||||
|
|
||||||
|
(defn terraform-import []
|
||||||
|
(vim.fn.jobstart [:terraform :import :-no-color address id]
|
||||||
|
{:stdout_buffered true
|
||||||
|
:on_stdout (fn [_ data]
|
||||||
|
(append-to-buf bufno data))}))
|
||||||
|
|
||||||
|
; (nu.fn-bridge :ZoomToggle :dotfiles.zoom-toggle :zoom-toggle {:return false})
|
||||||
|
; (u.nnoremap :<C-W>z ":call ZoomToggle()<CR>")
|
||||||
Reference in new issue
Block a user