Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ecda674

Browse filesBrowse 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 ecda674
Copy full SHA for ecda674

File tree

1 file changed

+9
-0
lines changed
Filter options

1 file changed

+9
-0
lines changed

‎ls/lsp_client_clangd.go

Copy file name to clipboardExpand all lines: ls/lsp_client_clangd.go
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,15 @@ type ClangdLSPClient struct {
2222
}
2323

2424
func NewClangdLSPClient(logger jsonrpc.FunctionLogger, dataFolder *paths.Path, ls *INOLanguageServer) *ClangdLSPClient {
25+
clangdConfFile := ls.buildPath.Join(".clangd")
26+
clangdConf := fmt.Sprintln("Diagnostics:")
27+
clangdConf += fmt.Sprintln(" Suppress: [anon_bitfield_qualifiers]")
28+
clangdConf += fmt.Sprintln("CompileFlags:")
29+
clangdConf += fmt.Sprintln(" Add: -ferror-limit=0")
30+
if err := clangdConfFile.WriteFile([]byte(clangdConf)); err != nil {
31+
logger.Logf("Error writing clangd configuration: %s", err)
32+
}
33+
2534
// Start clangd
2635
args := []string{
2736
ls.config.ClangdPath.String(),

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.