Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C/C++ intellisense not working with ssh-fs folders added to workspace #27

Closed
jdwieber opened this issue Jul 13, 2018 · 4 comments
Closed

Comments

@jdwieber
Copy link

Hello,
The ssh-fs works well for mounting remote directories, navigating directory structures (including symlinks, thanks for that!), and editing files. However, intellisense fails to parse the files in these "mounted" directories. I originally filed a bug with vscode, however, they say the issue is with the extension. See microsoft/vscode#54189
Is there something wrong with the way I'm specifying the folder in c_cpp_properties.json (see below)?

Thank you for your assistance with this.

Cheers!

  • VSCode Version: 1.25.1
  • OS Version: Windows 7 Enterprise
  • SSH-FS Version: 1.9.2

Steps to Reproduce:

  1. install vscode-cpptools
  2. install vscode-sshfs
  3. configure a remote directory in user settings
  4. configure c_cpp_properties.js includePath to use the ssh FileSystemProvider

My sshfs config:

"sshfs.configs": [
        {
            "name": "home",
            "label": "jwieber",
            "root": "/home/jwieber",
            "host": "my.host.domain",
            "port": 1234,
            "username": "jwieber",
            "agent": "C:\\cygwin64\\bin\\ssh-agent.exe",
            "privateKeyPath": "C:\\Users\\jwieber\\.ssh\\id_rsa.ppk"
        },
        {
            "name": "repo",
            "root": "/path/to/my/repo",
            "host": "my.host.domain",
            "port": 1234,
            "username": "jwieber",
            "agent": "C:\\cygwin64\\bin\\ssh-agent.exe",
            "privateKeyPath": "C:\\Users\\jwieber\\.ssh\\id_rsa.ppk"
        }
    ]

My code-workspace

{
	"folders": [		
		{
			"path": "./fdmdbsvc"
		},
		{
			"uri": "ssh://home/",
			"name": "SSH FS - home"
		},
		{
			"uri": "ssh://repo/",
			"name": "SSH FS - repo"
		}
	],
	"settings": {
		"files.associations": {
			"*.ipp": "cpp"
		}
	}
}

How I add it to c_cpp_properties.json

{
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}",
                "ssh://repo/"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "compilerPath": "C:\\cygwin64\\bin\\gcc.exe",
            "intelliSenseMode": "clang-x64"
             "cStandard": "c11",
            "cppStandard": "c++17"
        }
    ],
    "version": 4
}
@SchoofsKelvin
Copy link
Owner

It's similar to the issue you've already seen, namely microsoft/vscode#51700. The extension providing the intellisense, syntax coloring, ... has to add support for FileSystemProvider-based files. Right now, VSCode hasn't released an API (similar to microsoft/vscode#48034) to even allow extensions to access such files, but it seems they'll be adding one soon.

I'll close this issue for now, as it isn't something I (or maintainers of other extensions) can fix right now.

@kumar-akshay324
Copy link

Any updates on this feature?

@SchoofsKelvin
Copy link
Owner

Any updates on this feature?

Doesn't seem like it: microsoft/vscode-cpptools#2268

Mind that I can't do anything about other extensions (like those providing C++ intellisense) not being able to use remote filesystems. The only solution, besides waiting for them to add support, is to use VS Code's Remote SSH instead, where VS Code (and all extensions) run on the server itself.

@kumar-akshay324
Copy link

Yeah. I started using remote SSH. It does not work as good SSHFS unfortunately and consumes a lot of memory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants