Giter VIP home page Giter VIP logo

vs-code-extension-doc-zh's People

Contributors

awkj avatar careteenl avatar cbbfcd avatar ddzy avatar liiked avatar soulhat avatar think2011 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vs-code-extension-doc-zh's Issues

tab键冲突问题

我想开发一款插件,用户按下tab则提示,但是如果没有匹配到我的规则,会出现影响正常tab的功能,比如缩减,代码自动提示这些功能,我该如何解决呢?

插件开发的编译器问题?

开发插件的时候,可以往其中嵌入编译环境嘛?例如嵌入gcc的编译环境?

如果不能的话,可以在用户安装插件的同时,安装gcc的编译环境到用户电脑上嘛?

Docsify 页面切换太慢

问题如下

  1. 网页打开太慢(gitee和github的都是)
  2. clone下来本地docsify s docs 切换页面会没有反应
    其他
    根目录下的 .nojekyll 似乎没有用 可以删除了

可能的示例错误

模板字符串示例

◼️预备知识=>认识Typescript-变量和类型=>类型=>字符串中有这样一段说明:

Details

你还可以使用模版字符串,它可以定义多行文本和内嵌表达式。 这种字符串是被反引号包围( `),并且以${ expr }这种形式嵌入表达式

let name: string = `Gene`;
let age: number = 37;
let sentence: string = `Hello, my name is ${ name }.
I'll be ${ age + 1 } years old next month.`;

这与下面定义sentence的方式效果相同:

let sentence: string = "Hello, my name is " + name + ".\n\n" +
    "I'll be " + (age + 1) + " years old next month.";

而实际结果并不相同(似乎是因该段说明中的第二段代码中多加了一个换行符)。

以下为我的测试:

Test code
let aName: string = `Gene`;
let age: number = 37;
let sentence1: string = `Hello, my name is ${ aName }.
I'll be ${ age + 1 } years old next month.`;
console.log(sentence1);

let sentence2: string = "Hello, my name is " + aName + ".\n\n" +
    "I'll be " + (age + 1) + " years old next month.";
console.log(sentence2);
Output
Hello, my name is Gene.
I'll be 38 years old next month.
Hello, my name is Gene.

I'll be 38 years old next month.

测试更换渲染方案为vuepress

docsify貌似没有生成静态页面,在路由跳转中经常会出现找不到内容和延迟加载渲染的问题。
试着fork的一份用我熟悉的vuepress静态化方式改了一点,基本能解决这个问题。

https://github.com/Rackar/VS-Code-Extension-Doc-ZH

但是fork的版本无法使用github action来自动部署页面。所以又单独开了项目:
https://github.com/Rackar/vscode-ext-doccn

演示页面:
https://rackar.github.io/vscode-ext-doccn/extensibility-reference/activation-events.html#activationevents-onlanguage

由于navbar和sidebar目前都是自动提取的,章节和导航比较乱。
如果这套方案可以接受的话,以后逐步改善一下然后pr回来。

🎉 欢迎各位读者!!!

随着 VS Code 不断迭代和生态日益壮大,我们已经正式推出了 本文档的 1.0 版本。
你也可以随时从本项目的 README 入口进入中文版翻译。

初衷

本文档纯属个人兴趣爱好,维护文档的工作也是在日常工作中抽空去做的,如有任何建议请不吝赐教,当然如果你对本项目owner 和所在公司或者行业感兴趣,也欢迎邮件咨询 iaserrlin at 163.com。

纠错

承蒙大家的厚爱,随着中文文档内容的不断充实,目前 star 数量也在日益增长,我们也深知自己的能力和精力都非常有限,在翻译工作中难免有所疏忽,如果你对我们的翻译内容有更好的意见,或是找到了我们工作中的错误,请在issue 中指出我们的错误, 甚至为我们提供 PR。

原则和常见问题

  1. VS Code 已经提供了非常多的开发问题答疑渠道。
  2. 如果你有关于插件开发的具体细节和实现需要讨论,请进入我们的讨论区,本项目不开设任何相关讨论群(qq, 钉钉,微信等),请勿在此处发布或者宣传。具体的开发问题,可以参考 VS Code 官方提供的 Stack Overflow 中 VS Code 相关问题标签Gitter 频道VS Code Dev Slack 讨论区
  3. 目前我们的工作进度可通过 项目进度 查看。

翻译指南

由于原文档过于追求平白易懂,平添了许多反复解释和略显啰嗦的句子和语法,翻译者需要注意,本项目更追求易懂和流畅,不要求逐字翻译,与原文出入最低做到70%即可,但不可扭曲其原本的意思,任何翻译中的困难可在issue中探讨。

  • 及时更新术语表

  • 禁止机器翻译

  • 约定用法
    如Promise通常不做翻译,若有必要或遇到困难的词语,请使用“中文(English)”的方式来显示,如:异步请求(promise),在有参考资料后得出的翻译结果,需要在术语表释义后面注明词汇出现来源或释义链接。

  • 避免冗余

    By implementing a `WebviewPanelSerializer`, your webviews can be automatically restored
    when VS Code restarts. Serialization builds on `getState` and `setState`, and is only
    enabled if your extension registers a `WebviewPanelSerializer` for your webviews.

    后一句and is only enabled if your extension registers a WebviewPanelSerializer for your webviews再翻译出来显得多余,可以不翻译。

  • 平白易懂

    Consider using a helper library to construct your HTML strings, or at least
    ensure that all content from the user's workspace is properly sanitized.

    虽然这里HTML 字符串贴合HTML strings的表述,但是适当的加工则更有利于阅读,最终可考虑翻译为“尝试使用辅助库构建你的HTML模板,或者确保所有来自用户工作区的内容都通过了审查”。

  • 兼收并蓄

    在多人合作翻译中,个人风格可能与已提交翻译不匹配,但这种情况下不建议修改现有的翻译成果。

  • 术语翻译优先参考github的开源翻译项目

开发指引

本项目依赖nodejs,npm,docsify官方文档。另外对新手不太友好(萌新等级警告⚠️请勿轻易尝试)。

贡献代码

  • Markdown的格式要求,尽量避免使用*用于表示列表,而是使用-等其他符号
  • 贡献流程:fork/clone本项目,根据目前的项目进度和自己的兴趣,挑选进行中的翻译,在issue面板中创建一个help translate告知项目owner,通过后创建分支如“fix/chapter_testing_extensions”,修改文件,提交pr到“branch/docs”
  • 请在翻译中遵循翻译指南,否则本项目的owner可能会与你进行深度的讨论~
// 本地启动开发
npm i docsify-cli -g
docsify serve docs

关于 task 的问题

hello hello, 最近开发 vscode插件,有个问题非常困扰我,就是如何 监听到 一个 task 的成功或失败

一般我都是运行一系列 任务(task),如果其中一个失败了,后面就不应该运行了,但是我现在监听不到, 比如这样

vscode.tasks.executeTask(
  new vscode.Task(
    { type: 'try' },
    vscode.TaskScope.Workspace,
    'try',
    'ext',
    new vscode.ShellExecution('ll'),
  ),
)

vscode.tasks.onDidEndTask(console.log) // 这里面也看不出来是成功了 还是失败了。。

纠错

认识Typescript-类 -> 修饰符 -> static
中的代码演示
class Router {
static baseRoute = '/basePath';
calculateRoute(path: string) {
return this.baseRoute + this.commonPrefix + path; // 应该是 Router.baseRoute
}
constructor (public commonPrefix: number) { } // 应该是 string
}

let route1 = new Router('/api'); // 一级路径为/api
let route2 = new Router('/page'); // 一级路径为/page

console.log(route1.calculateRoute('/main'); // 最终路径/basePath/api/main 少了 )
console.log(route2.calculateRoute('/user'); // 最终路径/basePath/page/user 少了 )

如何把插件的源码嵌入VsCode源码中?

    公司在开发一款基于VsCode的IDE,在开发项目的时候,有一个这样的需求:我们已经获取到了某个插件的源码,并做了修改。然后希望把修改后的插件的源码嵌入到我们自己的vscode源码中,然后进行编译打包。以便最终得到的IDE就是默认安装了修改后插件的IDE。
    想问一下,如何把插件的源码嵌入VsCode源码中?

左边链接无效

文档打开后,左边链接点击无效。
是不是 VuePress 的问题。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.