diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2026-04-09 15:57:22 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2026-04-09 15:57:22 +0200 |
| commit | 65fe71d4c2cc4fa7b09a83671dccb5d4483f0524 (patch) | |
| tree | 7c859371a0efeda3e8a4cdb150afe3f4595a0b32 | |
| parent | f6bea6a5f1939f3261392633f6caca186befd555 (diff) | |
| download | teachos-65fe71d4c2cc4fa7b09a83671dccb5d4483f0524.tar.xz teachos-65fe71d4c2cc4fa7b09a83671dccb5d4483f0524.zip | |
ide: update neovim configuration
| -rw-r--r-- | .nvim.lua | 19 |
1 files changed, 15 insertions, 4 deletions
@@ -1,5 +1,7 @@ vim.opt.exrc = false vim.g.autoformat = true +vim.g.load_doxygen_syntax = true +vim.opt.fixeol = false local workspace_folder = vim.fn.getcwd() @@ -23,6 +25,16 @@ default_clangd_config.cmd = { vim.lsp.config("clangd", default_clangd_config) +vim.filetype.add({ + pattern = { + [".*/include/kstd/.*"] = function(path, _) + if not path:match("%.[^/]+$") then + return "cpp" + end + end + } +}) + -- Debugging local dap = require("dap") local qemu_job_id = nil @@ -76,8 +88,8 @@ dap.adapters.teachos_qemu_mi = function(callback, config) local paths = resolve_build_paths(artifact_path) config.setupCommands = { { description = "Enable pretty-printing for gdb", text = "-enable-pretty-printing" }, - { description = "Load code", text = string.format("-file-exec-file %s", paths.elf) }, - { description = "Load symbols", text = string.format("-file-exec-and-symbols %s", paths.sym) }, + { description = "Load code", text = string.format("-file-exec-file %s", paths.elf) }, + { description = "Load symbols", text = string.format("-file-exec-and-symbols %s", paths.sym) }, } config.program = paths.sym @@ -108,7 +120,7 @@ dap.listeners.after.disconnect["teachos_qemu_teardown"] = teardown_qemu require("cmake-tools").setup({ cmake_compile_commands_options = { - action = "soft_link", + action = "copy", target = string.format("%s/build", workspace_folder), }, cmake_dap_configuration = { @@ -126,7 +138,6 @@ require("cmake-tools").setup({ vim.api.nvim_create_user_command("TeachOSRun", function() local cmake = safe_require("cmake-tools") if not cmake then return end - local is_ready, target = pcall(cmake.get_launch_target_path) if is_ready and target then launch_qemu(target, false) |
