diff options
| author | Mike Vink <mike1994vink@gmail.com> | 2023-10-08 23:46:31 +0200 |
|---|---|---|
| committer | Mike Vink <mike1994vink@gmail.com> | 2023-10-08 23:46:31 +0200 |
| commit | 2f3508027c334a92a4d70fcfa872d1d46754fc85 (patch) | |
| tree | 2cdd0f3a1ac0e51aee306fd5556180c36fd32a3b /mut | |
| parent | 770a0226a6eb363337a72354da9ce14fcda52203 (diff) | |
nix develop
Diffstat (limited to 'mut')
| -rw-r--r-- | mut/neovim/fnl/conf/events.fnl | 4 | ||||
| -rw-r--r-- | mut/neovim/fnl/conf/init.fnl | 1 | ||||
| -rw-r--r-- | mut/neovim/fnl/conf/nix-develop/init.fnl | 25 |
3 files changed, 17 insertions, 13 deletions
diff --git a/mut/neovim/fnl/conf/events.fnl b/mut/neovim/fnl/conf/events.fnl index d93f7e0..4bc3729 100644 --- a/mut/neovim/fnl/conf/events.fnl +++ b/mut/neovim/fnl/conf/events.fnl @@ -17,5 +17,7 @@ :group "conf#events"}) (event [:FileType] {:pattern [:dirvish] - :callback #(vim.cmd "silent! unmap <buffer> <C-p>") + :callback (fn [] + (vim.cmd "silent! unmap <buffer> <C-p>") + (vim.cmd "set buflisted")) :group "conf#events"}) diff --git a/mut/neovim/fnl/conf/init.fnl b/mut/neovim/fnl/conf/init.fnl index 1ee3b7f..8850bac 100644 --- a/mut/neovim/fnl/conf/init.fnl +++ b/mut/neovim/fnl/conf/init.fnl @@ -6,6 +6,7 @@ (require :conf.settings) (require :conf.pkgs) +(require :conf.nix-develop) (tset _G :P (lambda [...] (let [inspected (icollect [_ v (ipairs [...])] diff --git a/mut/neovim/fnl/conf/nix-develop/init.fnl b/mut/neovim/fnl/conf/nix-develop/init.fnl index 0983e06..fe9ea1e 100644 --- a/mut/neovim/fnl/conf/nix-develop/init.fnl +++ b/mut/neovim/fnl/conf/nix-develop/init.fnl @@ -63,23 +63,23 @@ (vim.schedule (fn [] (local json (vim.fn.json_decode shellhook-env)) - ; (P json) (each [key value (pairs json)] (set-env key value))))))))) (stdin:write (.. shellhook "jq -n 'env'\n\n")) (stdin:close)) (fn handle-nix-print-dev-env [str] - (vim.schedule (fn [] - (local json (. (vim.fn.json_decode str) :variables)) - (-> (icollect [key {: type : value} (pairs json)] - (do - (if (and (exported? type) (not (ignored? key))) - (set-env key value)) - (if (= key :shellHook) - value))) - (#(each [_ shellhook (ipairs $1)] - (handle-shellhook shellhook))))))) + (vim.schedule + (fn [] + (local json (. (vim.fn.json_decode str) :variables)) + (-> (icollect [key {: type : value} (pairs json)] + (do + (if (and (exported? type) (not (ignored? key))) + (set-env key value)) + (if (= key :shellHook) + value))) + (#(each [_ shellhook (ipairs $1)] + (handle-shellhook shellhook))))))) (fn nix-develop [fargs unload] (if unload @@ -100,7 +100,8 @@ (fn [err data] (assert (not err) err) (if data - (set nix-print-dev-env (.. nix-print-dev-env data)) + (do + (set nix-print-dev-env (.. nix-print-dev-env data))) (do (vim.schedule #(vim.notify "nix-develop: stdout end")) (if (not= nix-print-dev-env "") |
