refactor(nvim): use nix eval to run nix files

This commit is contained in:
Price Hiller 2023-12-06 23:15:47 -06:00
parent d3527d9708
commit 651359a54b
Signed by: Price
SSH Key Fingerprint: SHA256:Y4S9ZzYphRn1W1kbJerJFO6GGsfu9O70VaBSxJO7dF8

View File

@ -7,9 +7,9 @@ vim.api.nvim_buf_set_option(0, "commentstring", "# %s")
vim.keymap.set("n", "<leader>fr", function()
local cmd = {
"nix-instantiate",
"--eval",
"--strict",
"nix",
"eval",
"--file",
vim.api.nvim_buf_get_name(0),
}
require("toggleterm").exec(table.concat(cmd, " "))
@ -20,10 +20,10 @@ end, {
vim.keymap.set("n", "<leader>fj", function()
local cmd = {
"nix-instantiate",
"--eval",
"--strict",
"nix",
"eval",
"--json",
"--file",
vim.api.nvim_buf_get_name(0),
"|",
"jq",