Skip to content
Snippets Groups Projects
Commit 169a3e63 authored by Emilio Cobos Álvarez's avatar Emilio Cobos Álvarez
Browse files

Bug 1829512 - Use .clangd rather than vscode-specific configuration to point...

Bug 1829512 - Use .clangd rather than vscode-specific configuration to point to the compilation database. r=andi

Differential Revision: https://phabricator.services.mozilla.com/D176230
parent d3cbada9
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,7 @@ ID
# User files that may appear at the root
/.clang-tidy
/.clangd
/.mozconfig*
/mozconfig*
/old-configure
......
......@@ -33,6 +33,7 @@ compile_commands\.json
# User files that may appear at the root
^\.clang-tidy
^\.clangd
^\.mozconfig
^mozconfig*
^\.moz-fast-forward
......
......@@ -299,11 +299,18 @@ def setup_clangd_rust_in_vscode(command_context):
with open(".clang-tidy", "w") as file:
yaml.dump(clang_tidy, file)
clangd_cfg = {
"CompileFlags": {
"CompilationDatabase": clangd_cc_path,
}
}
with open(".clangd", "w") as file:
yaml.dump(clangd_cfg, file)
return {
"clangd.path": clangd_path,
"clangd.arguments": [
"--compile-commands-dir",
clangd_cc_path,
"-j",
str(multiprocessing.cpu_count() // 2),
"--limit-results",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment