Skip to content

Commit d4b0387

Browse files
committed
Suppress 'anon_bitfield_qualifiers' errors
Those errors are present in the CMSIS-Atmel package, and makes the language server produce other bogus errors as a consquence of parse failure of header files. See arduino/arduino-ide#307 See arduino/arduino-ide#112
1 parent c132863 commit d4b0387

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Diff for: ls/ls.go

+8
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,14 @@ func NewINOLanguageServer(stdin io.Reader, stdout io.Writer, config *Config) *IN
136136
ls.buildSketchRoot = ls.buildPath.Join("sketch")
137137
}
138138

139+
clangdConf := ls.buildSketchRoot.Join(".clangd")
140+
if err := clangdConf.WriteFile([]byte(`
141+
Diagnostics:
142+
Suppress: [anon_bitfield_qualifiers]
143+
`)); err != nil {
144+
logger.Logf("Error writing clangd configuration: %s", err)
145+
}
146+
139147
logger.Logf("Initial board configuration: %s", ls.config.Fqbn)
140148
logger.Logf("Language server build path: %s", ls.buildPath)
141149
logger.Logf("Language server build sketch root: %s", ls.buildSketchRoot)

0 commit comments

Comments
 (0)