diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2026-04-07 14:01:18 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2026-04-07 14:01:18 +0200 |
| commit | 3bf3c748eec38c776dd3c54cbb30be1d44ffb5c3 (patch) | |
| tree | 9700ccca2924d263da341e141543507dd07a26a6 /.nvim.lua | |
| parent | 482f431213b77b3ec72d4cfb5c77e23b34e8e68f (diff) | |
| download | teachos-3bf3c748eec38c776dd3c54cbb30be1d44ffb5c3.tar.xz teachos-3bf3c748eec38c776dd3c54cbb30be1d44ffb5c3.zip | |
ide: simplify overall configuration
Diffstat (limited to '.nvim.lua')
| -rw-r--r-- | .nvim.lua | 34 |
1 files changed, 7 insertions, 27 deletions
@@ -49,39 +49,19 @@ local function launch_qemu(artifact_path, is_debug) end local paths = resolve_build_paths(artifact_path) + local debug_flag = is_debug and "1" or "0" + local shell_cmd = string.format("%s/scripts/qemu-wrapper.sh '%s' '%s' '%s' '%s'", + workspace_folder, workspace_folder, paths.build_type, paths.iso, debug_flag) - local cmd = { - "qemu-system-x86_64", - "-m", "32M", - "-machine", "q35", - "-smp", "4,sockets=1,cores=4,threads=1", - "-display", "curses", - "-debugcon", string.format("file:%s/qemu-debugcon-%s.log", workspace_folder, paths.build_type), - "-cdrom", paths.iso - } - - if is_debug then - table.insert(cmd, 2, "-s") - table.insert(cmd, 3, "-no-reboot") - table.insert(cmd, 4, "-d") - table.insert(cmd, 5, "int,cpu_reset") - end - - local shell_cmd = string.format("%s 2>%s/qemu-stderr-%s.log", table.concat(cmd, " "), workspace_folder, paths.build_type) - - vim.cmd("botright vsplit") - vim.cmd("enew") + vim.cmd("botright vsplit | enew") qemu_bufnr = vim.api.nvim_get_current_buf() - - vim.api.nvim_buf_set_name(qemu_bufnr, "TeachOS QEMU") + vim.api.nvim_buf_set_name(qemu_bufnr, "TeachOS QEMU (" .. paths.build_type .. ")") vim.opt_local.number = false vim.opt_local.relativenumber = false vim.opt_local.signcolumn = "no" - qemu_job_id = vim.fn.termopen({ "bash", "-c", shell_cmd }, { - on_exit = function() - qemu_job_id = nil - end + qemu_job_id = vim.fn.termopen(shell_cmd, { + on_exit = function() qemu_job_id = nil end }) vim.cmd("wincmd p") |
