VSCode插件开发全攻略系列文章配套demo。
sxei / vscode-plugin-demo Goto Github PK
View Code? Open in Web Editor NEWVSCode插件开发全攻略配套demo
VSCode插件开发全攻略配套demo
VSCode插件开发全攻略系列文章配套demo。
the error message shows that
'获取工程根路径异常!'
vscode:1.31
windows 7 sp1 professional
perhaps issue:
src/util.js
if (workspaceFolders.length == 1 && workspaceFolders[0] === vscode.workspace.rootPath) {
"vscode.workspace.rootPath" is deprecated.
Hi, I maintain VS Code's Webview API
Our telemetry suggests that your extension uses webviews and may be loading resources in these webviews using hardcoded vscode-resource:
URIs. These URIs have some important limitations and don't work properly when VS Code is run in a browser. We are also making changes in the desktop version of VS Code that may cause these URIs to not work properly in future versions of VS Code.
While we are making our best effort to continue support existing webview extensions that use vscode-resource:
URIs on desktop versions of VS Code, we will not able to fully support all uses cases.
To ensure that your extension continues to work in as many environments as possible—including on web and remotely—please:
Switch to use the Webview.asWebviewUri
function for loading resources.
Switch to use the Webview.cspSource
property in content security policies.
These APIs shipped around 2 years ago so they should be available in all modern versions of VS Code. You can find additional information about the issue here: microsoft/vscode#97962
Let me know if you have any questions about this change
问一下,如何记录打开一个Tag的时间,网上看了很多文章但是很少有人提及,求助,感谢!
开发扩展时,如果说想要点击选取文件按钮,打开当前文件目录,如何处理呢?
extension.sayHello2 ->extension.sayHello
webview页面无法获取properties值
我不知道我这个思路是否可行,如果可行
我写的vscode插件,影响了别的插件的代码提示怎么处理呢
您的博客无法访问啦,可以修复一下吗
博主有DAP相关的介绍吗
如题,跪求大哥帮帮我了 @sxei
就是自动提示那个功能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)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.