Vscode-cpptools: [Objective-C] support for Objective-C file navigation

Created on 19 Sep 2018  路  6Comments  路  Source: microsoft/vscode-cpptools

Type: LanguageService

I tried to use this cpptools with the config below to help to navigate between header and source files in my Objective-C project, but it fails to navigate. I wonder if this tools can provide Objective-C navigation. Or maybe my configuration is wrong?

My configuration in my workspace .vs_code folder:
c_cpp_properties.json

{
    "configurations": [
        {
            "name": "Mac",
            "includePath": [
                "${workspaceFolder}/**",
                "${workspaceFolder}/Classes/QQStory/TBService/TBStoryService/**"
            ],
            "defines": [],
            "macFrameworkPath": [
                "/System/Library/Frameworks",
                "/Library/Frameworks"
            ],
            "compilerPath": "/usr/bin/clang",
            "cStandard": "c11",
            "cppStandard": "c++17",
            "intelliSenseMode": "clang-x64",
            "browse": {
                "path": [
                    "${workspaceRoot}"
                ],
                "limitSymbolsToIncludedHeaders": true,
                "databaseFilename": ""
            }
        }
    ],
    "version": 4
}
  • OS and Version: MacOS 10.13.6
  • VS Code Version: 1.27.2
  • C/C++ Extension Version: 0.18.1
Feature Request Language Service

Most helpful comment

Objc support would be great ! +1

All 6 comments

Our C/C++ extension does not support Objective-C and we do not currently plan to, because it would involve too much work with too few users requesting/using it. You could try another VS Code extension that has Objective-C support (e.g. C/C++ Clang Command Adapter -- I haven't tried using Objective-C with that though).

@sean-mcmanus But it would be nice if VSCode simply supported resolving #import statements and some objc-awareness, not real intelligence engine.

Because projects for Mac/iOS usually have mixed codebases in cpp, objc, objc++. And the worst part is that objc/objc++ use the same .h files for headers, so every objc header I open is being treated as cpp and vscode highlights a lot of Problems in it.

As a workaround, I set this on a per-project basis:
"files.associations": { "*.h": "objective-c" }

Objc support would be great ! +1

A few days until 2020, still no way to navigate OC source code using VSCode.

Why not support objective-c (objective-c++)?

Was this page helpful?
0 / 5 - 0 ratings