feat(nvim): add run key for asm

This commit is contained in:
Price Hiller 2023-07-24 16:44:12 -05:00
parent 89a803abbc
commit 88a870eb69
Signed by: Price
SSH Key Fingerprint: SHA256:Y4S9ZzYphRn1W1kbJerJFO6GGsfu9O70VaBSxJO7dF8

View File

@ -1 +1,20 @@
vim.opt_local.commentstring = "# %s" vim.opt_local.commentstring = "# %s"
vim.keymap.set("n", "<leader>fr", function()
local curr_file = vim.fn.expand("%:p")
vim.fn.expand("%:p")
local curr_dir = vim.fn.expand("%:p:h")
vim.fn.expand("%:p")
require("toggleterm").exec(
string.format(
"as %s -o %s/obj.o && ld %s/obj.o -o %s/out && %s/out",
curr_file,
curr_dir,
curr_dir,
curr_dir,
curr_dir
)
)
end, {
buffer = true,
})