feat(nvim): add run command for nix filetypes
This commit is contained in:
parent
2a03302867
commit
ce3c0bcc2e
@ -4,3 +4,14 @@ opt_local.tabstop = 2
|
|||||||
opt_local.shiftwidth = 2
|
opt_local.shiftwidth = 2
|
||||||
|
|
||||||
vim.api.nvim_buf_set_option(0, "commentstring", "# %s")
|
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,
|
||||||
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user