Skip to content

Commit

Permalink
VSCode fixes: .gitignore & clangd (flipperdevices#3790)
Browse files Browse the repository at this point in the history
* vscode: fine-tuned .gitignore to allow extra untracked files in .vscode folder
* vscode: temporary disabled toolchain-provided clangd
* Update sublime project to match vscode config

Co-authored-by: Aleksandr Kutuzov <[email protected]>
  • Loading branch information
hedger and skotopes authored Jul 16, 2024
1 parent 03221e9 commit 3191996
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 16 deletions.
22 changes: 13 additions & 9 deletions .sublime-project
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,20 @@
}
],
"settings": {
"LSP": {
"clangd": {
"initializationOptions": {
"clangd.compile-commands-dir": "build/latest",
"clangd.header-insertion": "never",
"clangd.query-driver": "**",
"clangd.clang-tidy": true,
},
"LSP": {
"clangd": {
"enabled": true,
"initializationOptions": {
// Use with toolchain version 39+
// Set `"binary": "custom",` option in LSP-clangd config to use toolchain clangd
// "custom_command": ["toolchain/current/bin/clangd"],

"clangd.compile-commands-dir": "build/latest",
"clangd.header-insertion": "never",
"clangd.query-driver": "**/arm-none-eabi-*",
"clangd.clang-tidy": true,
},
},
},
},
},
}
8 changes: 3 additions & 5 deletions .vscode/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/c_cpp_properties.json
/extensions.json
/launch.json
/settings.json
/tasks.json
*
!example/
!ReadMe.md
2 changes: 1 addition & 1 deletion .vscode/example/settings.json.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"SConstruct": "python",
"*.fam": "python"
},
"clangd.path": "${workspaceFolder}/toolchain/current/bin/clangd@FBT_PLATFORM_EXECUTABLE_EXT@",
// "clangd.path": "${workspaceFolder}/toolchain/current/bin/clangd@FBT_PLATFORM_EXECUTABLE_EXT@",
"clangd.arguments": [
"--query-driver=**/arm-none-eabi-*",
"--compile-commands-dir=${workspaceFolder}/build/latest",
Expand Down
2 changes: 1 addition & 1 deletion scripts/ufbt/project_template/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
},
"clangd.path": "@UFBT_TOOLCHAIN_CLANGD@",
// "clangd.path": "@UFBT_TOOLCHAIN_CLANGD@",
"clangd.arguments": [
"--query-driver=**/arm-none-eabi-*",
"--compile-commands-dir=${workspaceFolder}/.vscode",
Expand Down

0 comments on commit 3191996

Please sign in to comment.