diff --git a/.sublime-project b/.sublime-project index 5d751aaf6..da2ef41a1 100644 --- a/.sublime-project +++ b/.sublime-project @@ -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, + }, }, - }, + }, }, } diff --git a/.vscode/.gitignore b/.vscode/.gitignore index 481efcdef..bd4df47d6 100644 --- a/.vscode/.gitignore +++ b/.vscode/.gitignore @@ -1,5 +1,3 @@ -/c_cpp_properties.json -/extensions.json -/launch.json -/settings.json -/tasks.json +* +!example/ +!ReadMe.md diff --git a/.vscode/example/settings.json.tmpl b/.vscode/example/settings.json.tmpl index 5e5b5dcf4..5e0da6897 100644 --- a/.vscode/example/settings.json.tmpl +++ b/.vscode/example/settings.json.tmpl @@ -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", diff --git a/scripts/ufbt/project_template/.vscode/settings.json b/scripts/ufbt/project_template/.vscode/settings.json index d304752a9..b93ad82f1 100644 --- a/scripts/ufbt/project_template/.vscode/settings.json +++ b/scripts/ufbt/project_template/.vscode/settings.json @@ -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",