feat(nvim): add run command for nix filetypes

This commit is contained in:
Price Hiller 2023-09-08 02:40:58 -05:00
parent 2a03302867
commit ce3c0bcc2e
No known key found for this signature in database

View File

@ -4,3 +4,14 @@ opt_local.tabstop = 2
opt_local.shiftwidth = 2
vim.api.nvim_buf_set_option(0, "commentstring", "# %s")
vim.keymap.set("n", "<leader>fr", function ()
local cmd = {
"nix-instantiate",
"--eval",
vim.api.nvim_buf_get_name(0)
}
require("toggleterm").exec(table.concat(cmd, " "))
end, {
buffer = true,
})