-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.clangd
More file actions
187 lines (164 loc) · 5.83 KB
/
Copy path.clangd
File metadata and controls
187 lines (164 loc) · 5.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
# clangd Configuration for JumperlOS
#
# This file configures clangd to work with the PlatformIO-generated compile_commands.json
#
# To generate/update the compile commands database, run:
# pio run -t compiledb
#
# This should be run after:
# - First clone of the repository
# - Adding new libraries or dependencies
# - Changing PlatformIO configuration
#
# The compile_commands.json file contains all include paths and defines,
# so this .clangd file only needs to specify additional settings.
CompileFlags:
# Use the compilation database generated by PlatformIO
CompilationDatabase: .
Add:
# Suppress specific warnings that are noisy but not critical
- "-Wno-backslash-newline-escape"
- "-Wno-macro-redefined"
- "-Wno-unknown-pragmas"
# Enable unused warnings to highlight dead code
# - "-Wunused"
# - "-Wunused-function"
# - "-Wunused-variable"
# - "-Wunused-parameter"
# - "-Wunused-but-set-variable"
# - "-Wunused-private-field"
# - "-Wunused-member-function"
# - "-Wunneeded-internal-declaration"
# # System include paths from ARM GCC
# - "-I/Users/kevinsanto/.platformio/packages/toolchain-rp2040-earlephilhower/lib/gcc/arm-none-eabi/14.2.0/include"
# - "-I/Users/kevinsanto/.platformio/packages/toolchain-rp2040-earlephilhower/lib/gcc/arm-none-eabi/14.2.0/include-fixed"
# - "-I/Users/kevinsanto/.platformio/packages/toolchain-rp2040-earlephilhower/arm-none-eabi/include"
# # Project includes
# - "-Iinclude"
# - "-Ilib/JDI_MIP_Display"
# - "-Isrc/"
# - "-Iboards/jumperless_v5"
# - "-Ilib"
# - "-Isrc/*"
# # Library dependencies
# - "-I.pio/libdeps/jumperless_v5/INA219/src"
# - "-I.pio/libdeps/jumperless_v5/Adafruit NeoPixel/src"
# - "-I.pio/libdeps/jumperless_v5/Adafruit MCP4725/src"
# - "-I.pio/libdeps/jumperless_v5/Adafruit BusIO/src"
# - "-I.pio/libdeps/jumperless_v5/Adafruit SSD1306"
# - "-I.pio/libdeps/jumperless_v5/Adafruit MCP4728/src"
# - "-I.pio/libdeps/jumperless_v5/U8g2/src"
# - "-I.pio/libdeps/jumperless_v5/PNGdec/src"
# - "-I.pio/libdeps/jumperless_v5/SafeString/src"
# - "-I.pio/libdeps/jumperless_v5/ArduinoJson/src"
# - "-I.pio/libdeps/jumperless_v5/Arduino_JSON/src"
# - "-I.pio/libdeps/jumperless_v5/logic-analyzer/src"
# - "-I.pio/libdeps/jumperless_v5/JDI_MIP_Display"
# # MicroPython includes
# - "-Ilib/micropython"
# - "-Ilib/micropython/port"
# - "-Ilib/micropython/micropython_embed"
# - "-Ilib/micropython/micropython_embed/py"
# - "-Ilib/micropython/micropython_embed/extmod"
# - "-Ilib/micropython/micropython_embed/shared"
# - "-Ilib/micropython/micropython_embed/port"
# - "-Ilib/micropython/micropython_embed/genhdr"
# # Arduino Core includes (framework-specific)
# - "-I/Users/kevinsanto/.platformio/packages/framework-arduinopico/cores/rp2040"
# - "-I/Users/kevinsanto/.platformio/packages/framework-arduinopico/variants/rpipico"
# - "-I/Users/kevinsanto/.platformio/packages/framework-arduinopico/libraries"
# # lwIP includes (for networking)
# - "-I/Users/kevinsanto/.platformio/packages/framework-arduinopico/pico-sdk/lib/"
# - "-I/Users/kevinsanto/.platformio/packages/framework-arduinopico/pico-sdk/src/rp2_common/pico_lwip/include"
# Pico SDK macros for clangd parsing
- "-D__not_in_flash_func(x)=x"
- "-D__not_in_flash(x)=x"
# Arduino preprocessor defines
- "-DARDUINO=10607"
- "-DARDUINO_RASPBERRY_PI_PICO"
- "-DBOARD_NAME=\"jumperless_v5\""
- "-DPICO_RP2350A=0"
- "-DF_CPU=150000000L"
- "-DUSE_TINYUSB"
- "-DCFG_TUSB_CONFIG_FILE=\"custom_tusb_config.h\""
# # MicroPython preprocessor defines
# - "-DMICROPY_ENABLE_COMPILER=1"
# - "-DMICROPY_ENABLE_GC=1"
# - "-DMICROPY_PY_GC=1"
# - "-DMICROPY_CONFIG_ROM_LEVEL=2"
# - "-DMICROPY_FLOAT_IMPL=1"
# - "-DMICROPY_PY_BUILTINS_FLOAT=1"
# - "-DMICROPY_PY_IO=1"
# - "-DMICROPY_PY_SYS=1"
# - "-DMICROPY_HELPER_REPL=1"
# - "-DMICROPY_REPL_AUTO_INDENT=1"
# - "-DMICROPY_PY_BUILTINS_COMPILE=1"
# - "-DMICROPY_PY_BUILTINS_EVAL_EXEC=1"
# - "-DMICROPY_PY_ARRAY=1"
# - "-DMICROPY_PY_COLLECTIONS=1"
# - "-DMICROPY_PY_STRUCT=1"
# - "-DMICROPY_PY_MATH=1"
# - "-DMICROPY_ERROR_REPORTING=2"
# - "-DMICROPY_ENABLE_SOURCE_LINE=1"
# # Suppress specific warnings
# - "-Wno-backslash-newline-escape"
# - "-Wno-macro-redefined"
# # C++ standard and settings (only for C++ files)
# - "-fno-rtti"
# - "-fno-exceptions"
CompilationDatabase: .
---
# C file specific settings
If:
PathMatch: .*\.c$
CompileFlags:
Add:
- "-std=c99"
Remove:
- "-std=c++11"
- "-std=c++17"
---
# C++ file specific settings
If:
PathMatch: .*\.(cpp|cc|cxx|c\+\+)$
CompileFlags:
Add:
- "-std=c++11"
---
# Diagnostics configuration
Diagnostics:
ClangTidy:
# Add:
# # Enable unused code detection
# - readability-redundant-declaration
# - readability-delete-null-pointer
# - misc-unused-parameters
# - misc-unused-using-decls
# - readability-redundant-function-ptr-dereference
# - readability-redundant-smartptr-get
# - misc-redundant-expression
Remove:
- misc-definitions-in-headers
- readability-identifier-length
- modernize-use-trailing-return-type
UnusedIncludes: None
# # Make sure all diagnostics are shown
# Severity:
# Unused: Warning
# Suppress some Arduino/embedded-specific warnings
Suppress:
- "pp_file_not_found"
---
# Code formatting settings
Format:
BasedOnStyle: LLVM
ColumnLimit: 0
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AlwaysBreakTemplateDeclarations: Yes
BreakBeforeBraces: Attach
IndentWidth: 2
TabWidth: 2
UseTab: Never
Unused: Yes