We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
就是自动提示那个功能util.js里面第26行代码, let workspaceFolders = vscode.workspace.workspaceFolders.map(item => item.uri.path) 获取到的Windows下路径不对,Mac下面是一样的 Windows下是这样的 item.uri.path="/d:/AW/awIDE/vscode_plugin" item.uri.fsPath="d:\AW\awIDE\vscode_plugin"
Mac下是这样的 item.uri.path=/Users/chenghan/work-codes/vscode-plugin/myself-demo item.uri.fsPath=/Users/chenghan/work-codes/vscode-plugin/myself-demo
Windows下 const currentFile = (document.uri ? document.uri : document).fsPath; 的值是 "d:\AW\awIDE\vscode_plugin\fengzitest\src\test.js" 所以在第37行 currentFile.indexOf(folder)进行匹配的时候 返回-1 正确用法应该是 let workspaceFolders = vscode.workspace.workspaceFolders.map(item => item.uri.path)改为 let workspaceFolders = vscode.workspace.workspaceFolders.map(item => item.uri.fsPath)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
就是自动提示那个功能util.js里面第26行代码,
let workspaceFolders = vscode.workspace.workspaceFolders.map(item => item.uri.path)
获取到的Windows下路径不对,Mac下面是一样的
Windows下是这样的
item.uri.path="/d:/AW/awIDE/vscode_plugin"
item.uri.fsPath="d:\AW\awIDE\vscode_plugin"
Mac下是这样的
item.uri.path=/Users/chenghan/work-codes/vscode-plugin/myself-demo
item.uri.fsPath=/Users/chenghan/work-codes/vscode-plugin/myself-demo
Windows下 const currentFile = (document.uri ? document.uri : document).fsPath; 的值是
"d:\AW\awIDE\vscode_plugin\fengzitest\src\test.js"
所以在第37行 currentFile.indexOf(folder)进行匹配的时候 返回-1 正确用法应该是
let workspaceFolders = vscode.workspace.workspaceFolders.map(item => item.uri.path)改为
let workspaceFolders = vscode.workspace.workspaceFolders.map(item => item.uri.fsPath)
The text was updated successfully, but these errors were encountered: