From 53787872b205b9bb4eeaa8cf64cf34bcc4249b13 Mon Sep 17 00:00:00 2001 From: scawful Date: Fri, 26 Sep 2025 13:14:04 -0400 Subject: [PATCH] Add .clangd configuration and update CMakePresets.json for compile commands - Introduced a new .clangd file to specify compile flags, inlay hints, hover options, and diagnostics settings for improved code analysis and development experience. - Updated CMakePresets.json to enable export of compile commands, enhancing integration with IDEs and tools that rely on compilation information. --- .clangd | 33 +++++++++++++++++++++++++++++++++ CMakePresets.json | 3 ++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 .clangd diff --git a/.clangd b/.clangd new file mode 100644 index 00000000..e7906d4d --- /dev/null +++ b/.clangd @@ -0,0 +1,33 @@ +CompileFlags: + Add: + - -std=c++23 + - -Wall + - -Wextra + - -DYAZE_ENABLE_NFD=1 + - -DYAZE_ENABLE_IMGUI_TEST_ENGINE=1 + - -DYAZE_LIB_PNG=1 + Remove: + - -mllvm + - -xclang + +Index: + Background: Build + StandardLibrary: Yes + +InlayHints: + Enabled: Yes + ParameterNames: Yes + DeducedTypes: Yes + +Hover: + ShowAKA: Yes + +Diagnostics: + ClangTidy: + Add: + - readability-* + - modernize-* + - performance-* + Remove: + - modernize-use-trailing-return-type + - readability-braces-around-statements diff --git a/CMakePresets.json b/CMakePresets.json index fd871271..9b88994f 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -29,7 +29,8 @@ "cacheVariables": { "CMAKE_BUILD_TYPE": "Debug", "CMAKE_CXX_FLAGS_DEBUG": "-g -O0 -DDEBUG", - "CMAKE_C_FLAGS_DEBUG": "-g -O0 -DDEBUG" + "CMAKE_C_FLAGS_DEBUG": "-g -O0 -DDEBUG", + "CMAKE_EXPORT_COMPILE_COMMANDS": "ON" } }, {