includePath support for non-local paths `ssh://` in particular

未关闭
#2,268 9 条评论 19 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
32/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
cpp, typescript

调研方向

在 code-workspace 中使用 SSH FS workspace,并在 c_cpp_properties.json 中使用 ssh://repo/ 条目重现该故障。首先跟踪 includePath 如何用于 IntelliSense,以及如何处理由 FileSystemProvider 支持的路径;当 IntelliSense 能像解析本地文件一样解析远程路径中的文件时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

Feature Request Language Service network drive

Type: LanguageService
----- Input information below -----

Please review existing issues and our documentation at https://github.com/Microsoft/vscode-cpptools/tree/master/Documentation prior to filing an issue.

Describe the bug

  • OS and Version: Windows 7 Enterprise
  • VS Code Version: 1.25.1
  • C/C++ Extension Version: 0.17.6
  • Other extensions you installed (and if the issue persists after disabling them): SSH FS 1.9.2

IntelliSense fails to parse files provided by extensions that implement FileSystemProvider. In my case: SSH-FS https://github.com/SchoofsKelvin/vscode-sshfs/issues/27

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

Expected behavior
IntelliSense should work as it does for local files

User Settings:

"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"
        }
    ]

code-workspace

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

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
}
主要语言
TypeScript
星标
6.2k
派生
1.7k
平均合并
14 小时 46 分钟
30 天内合并 PR
61

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/vscode-cpptools 的其他 Issue

查看 microsoft/vscode-cpptools 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。