Refactor CMake and VSCode settings; add Day 4 solution

- Updated .vscode/settings.json to enhance Clangd configuration and disable IntelliSense.
- Removed obsolete Clang-Format and Clang-Tidy tasks from .vscode/tasks.json.
- Modified CMakeLists.txt to enable compile commands export and adjusted target properties for Day 4.
- Added new CMakeLists.txt and main.cpp for Day 4 solution, implementing diagram parsing and movable paper counting logic.
- Included test_input and puzzle_input files for Day 4.
- Deleted the run-clang-tidy.sh script as it is no longer needed.
This commit is contained in:
Feiko Wielsma 2025-12-04 14:22:43 +00:00
parent e3098c6651
commit eac8571ea7
11 changed files with 605 additions and 54 deletions

View file

@ -1,9 +1,15 @@
{
"C_Cpp.intelliSenseEngine": "disabled",
"editor.defaultFormatter": "llvm-vs-code-extensions.vscode-clangd",
"editor.formatOnSave": true,
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools",
"cmake.configureOnOpen": false,
"cmake.generator": "Ninja",
"clangd.arguments": [
"--compile-commands-dir=build"
"--background-index",
"--compile-commands-dir=${workspaceFolder}/build",
"--header-insertion=iwyu",
"--clang-tidy",
"--completion-style=detailed"
]
}

16
.vscode/tasks.json vendored
View file

@ -12,22 +12,6 @@
"type": "shell",
"command": "cmake --build build -- -j",
"problemMatcher": []
},
{
"label": "Clang-Format: Format Workspace",
"type": "shell",
"command": "bash -lc \"find . -name \"*.cpp\" -o -name \"*.hpp\" -o -name \"*.h\" | xargs -r clang-format -i\"",
"problemMatcher": []
},
{
"label": "Clang-Tidy: Run",
"type": "shell",
"command": "./scripts/run-clang-tidy.sh",
"presentation": {
"reveal": "always",
"panel": "shared"
},
"problemMatcher": []
}
]
}