From 3027e4c819814aac93ef1f993bde04acf3ee3f54 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Mon, 15 Jun 2026 16:47:39 +0200 Subject: ide: update neovim config --- .lazy.lua | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 65 insertions(+), 2 deletions(-) (limited to '.lazy.lua') diff --git a/.lazy.lua b/.lazy.lua index 1c2df6e0..76e8eb30 100644 --- a/.lazy.lua +++ b/.lazy.lua @@ -1,4 +1,61 @@ +local workspace_folder = vim.fn.getcwd() + return { + { + "neovim/nvim-lspconfig", + opts = { + servers = { + clangd = { + cmd = { + "clangd", + "--background-index", + "--clang-tidy", + "--compile-commands-dir=" .. workspace_folder .. "/build", + "--completion-style=detailed", + "--header-insertion=iwyu", + "--query-driver=**/x86_64-pc-elf-g++" + }, + }, + }, + }, + }, + { + "lucaSartore/fastspell.nvim", + config = function() + local fastspell = require("fastspell") + + fastspell.setup({ + cspell_json_file_path = workspace_folder .. "/cspell.json", + }) + + vim.api.nvim_create_autocmd({ "TextChanged", "TextChangedI", "BufEnter", "WinScrolled" }, { + callback = function(_) + local first_line = vim.fn.line('w0') - 1 + local last_line = vim.fn.line('w$') + fastspell.sendSpellCheckRequest(first_line, last_line) + end, + }) + end + }, + { + "Civitasv/cmake-tools.nvim", + opts = { + cmake_compile_commands_options = { + action = "copy", + target = workspace_folder .. "/build", + }, + cmake_dap_configuration = { + name = "(gdb) QEMU MI Attach", + type = "teachos_qemu_mi", + request = "launch", + MIMode = "gdb", + cwd = workspace_folder, + miDebuggerServerAddress = "localhost:1234", + miDebuggerPath = "x86_64-pc-elf-gdb", + stopAtEntry = true, + }, + }, + }, { "nvim-neo-tree/neo-tree.nvim", opts = { @@ -8,6 +65,12 @@ return { hide_gitignored = true, }, }, - } - } + nesting_rules = { + ['cpp_under_hpp'] = { + pattern = "(.*).hpp", + files = { "%1.cpp", "%1.test.cpp", "%1.tests.cpp", "%1.S" } + }, + }, + }, + }, } -- cgit v1.2.3