Skip to content

Commit

Permalink
tools: add clangd support
Browse files Browse the repository at this point in the history
  • Loading branch information
supperthomas committed Dec 11, 2024
1 parent 4125582 commit 587ec4c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tools/vsc.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,13 @@ def GenerateCFiles(env):
if path['path'] != '.':
path['name'] = 'rtthread/' + '/'.join([p for p in path['path'].split('\\') if p != '..'])
json_obj['folders'] = path_list
if os.path.exists('compile_commands.json'):
json_obj['settings'] = {
"clangd.arguments": [
"--compile-commands-dir=.",
"--header-insertion=never"
]
}
vsc_space_file.write(json.dumps(json_obj, ensure_ascii=False, indent=4))
vsc_space_file.close()
return
Expand Down

0 comments on commit 587ec4c

Please sign in to comment.