Gitlens是vscode中的一个插件,它提供了很多有用的功能,例如copy remote file url
之前一直用的好好的,复制出来的链接也能用(之前用的是Github),可是今天在用这个功能的时候开始“报错”:no auto-detected or configured remote providers found
去人家的官网看了看,人家是这么说的:
GitLens provides rich integrations with many remote providers, including GitHub, GitHub Enterprise, GitLab, Bitbucket, Bitbucket Server, Azure DevOps. You can also define custom remote providers or remote providers with custom domains as well.
大概就是,人家内部支持了这些git仓库,但是别的仓库你也可以自己配置。
下面的就是我配置的gitee
"gitlens.remotes": [{
"domain": "gitee.com",
"type": "Custom",
"name": "My Company",
"protocol": "https",
"urls": {
"repository": "https://gitee.com/${repo}",
"branches": "https://gitee.com/${repo}/branches",
"branch": "https://gitee.com/${repo}/commits/${branch}",
"commit": "https://gitee.com/${repo}/commit/${id}",
"file": "https://gitee.com/${repo}?path=${file}${line}",
"fileInBranch": "https://gitee.com/${repo}/blob/${branch}/${file}${line}",
"fileInCommit": "https://gitee.com/${repo}/blob/${id}/${file}${line}",
"fileLine": "#L${line}",
"fileRange": "#L${start}-L${end}"
}
}]