aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2026-04-09 15:57:22 +0200
committerFelix Morgner <felix.morgner@ost.ch>2026-04-09 15:57:22 +0200
commit65fe71d4c2cc4fa7b09a83671dccb5d4483f0524 (patch)
tree7c859371a0efeda3e8a4cdb150afe3f4595a0b32
parentf6bea6a5f1939f3261392633f6caca186befd555 (diff)
downloadteachos-65fe71d4c2cc4fa7b09a83671dccb5d4483f0524.tar.xz
teachos-65fe71d4c2cc4fa7b09a83671dccb5d4483f0524.zip
ide: update neovim configuration
-rw-r--r--.nvim.lua19
1 files changed, 15 insertions, 4 deletions
diff --git a/.nvim.lua b/.nvim.lua
index e8205cb..ad007bb 100644
--- a/.nvim.lua
+++ b/.nvim.lua
@@ -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)