Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
81f58337
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
81f58337
编写于
6月 11, 2018
作者:
习
习古
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixed:generator method of class autocomplete causes star(*) to be added to next line
上级
8f8ed32e
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
32 addition
and
8 deletion
+32
-8
extensions/typescript-language-features/src/features/languageConfiguration.ts
...t-language-features/src/features/languageConfiguration.ts
+1
-0
src/vs/editor/common/modes/languageConfiguration.ts
src/vs/editor/common/modes/languageConfiguration.ts
+4
-0
src/vs/editor/common/modes/supports/onEnter.ts
src/vs/editor/common/modes/supports/onEnter.ts
+16
-8
src/vs/monaco.d.ts
src/vs/monaco.d.ts
+4
-0
src/vs/vscode.d.ts
src/vs/vscode.d.ts
+4
-0
src/vs/workbench/api/electron-browser/mainThreadLanguageFeatures.ts
...kbench/api/electron-browser/mainThreadLanguageFeatures.ts
+1
-0
src/vs/workbench/api/node/extHost.protocol.ts
src/vs/workbench/api/node/extHost.protocol.ts
+1
-0
src/vs/workbench/api/node/extHostLanguageFeatures.ts
src/vs/workbench/api/node/extHostLanguageFeatures.ts
+1
-0
未找到文件。
extensions/typescript-language-features/src/features/languageConfiguration.ts
浏览文件 @
81f58337
...
...
@@ -33,6 +33,7 @@ const jsTsLanguageConfiguration: vscode.LanguageConfiguration = {
},
{
// e.g. * ...|
beforeText
:
/^
(\t
|
[
])
*
[
]\*([
]([^\*]
|
\*(?!\/))
*
)?
$/
,
oneLineAboveText
:
/^
(\s
*
(\/\*\*
|
\*))
.*/
,
action
:
{
indentAction
:
vscode
.
IndentAction
.
None
,
appendText
:
'
*
'
}
},
{
// e.g. */|
...
...
src/vs/editor/common/modes/languageConfiguration.ts
浏览文件 @
81f58337
...
...
@@ -139,6 +139,10 @@ export interface OnEnterRule {
* This rule will only execute if the text after the cursor matches this regular expression.
*/
afterText
?:
RegExp
;
/**
* This rule will only execute if the text above the this line matches this regular expression.
*/
oneLineAboveText
?:
RegExp
;
/**
* The action to execute.
*/
...
...
src/vs/editor/common/modes/supports/onEnter.ts
浏览文件 @
81f58337
...
...
@@ -48,17 +48,25 @@ export class OnEnterSupport {
// (1): `regExpRules`
for
(
let
i
=
0
,
len
=
this
.
_regExpRules
.
length
;
i
<
len
;
i
++
)
{
let
rule
=
this
.
_regExpRules
[
i
];
if
(
rule
.
beforeText
.
test
(
beforeEnterText
))
{
if
(
rule
.
afterText
)
{
if
(
rule
.
afterText
.
test
(
afterEnterText
))
{
return
rule
.
action
;
}
}
else
{
return
rule
.
action
;
}
const
regResult
=
[{
reg
:
rule
.
beforeText
,
text
:
beforeEnterText
},
{
reg
:
rule
.
afterText
,
text
:
afterEnterText
},
{
reg
:
rule
.
oneLineAboveText
,
text
:
oneLineAboveText
}].
every
((
obj
):
boolean
=>
{
return
obj
.
reg
?
obj
.
reg
.
test
(
obj
.
text
)
:
true
;
});
if
(
regResult
)
{
return
rule
.
action
;
}
}
// (2): Special indent-outdent
if
(
beforeEnterText
.
length
>
0
&&
afterEnterText
.
length
>
0
)
{
for
(
let
i
=
0
,
len
=
this
.
_brackets
.
length
;
i
<
len
;
i
++
)
{
...
...
src/vs/monaco.d.ts
浏览文件 @
81f58337
...
...
@@ -4497,6 +4497,10 @@ declare namespace monaco.languages {
* This rule will only execute if the text after the cursor matches this regular expression.
*/
afterText
?:
RegExp
;
/**
* This rule will only execute if the text above the this line matches this regular expression.
*/
oneLineAboveText
?:
RegExp
;
/**
* The action to execute.
*/
...
...
src/vs/vscode.d.ts
浏览文件 @
81f58337
...
...
@@ -3578,6 +3578,10 @@ declare module 'vscode' {
* This rule will only execute if the text after the cursor matches this regular expression.
*/
afterText
?:
RegExp
;
/**
* This rule will only execute if the text above the this line matches this regular expression.
*/
oneLineAboveText
?:
RegExp
;
/**
* The action to execute.
*/
...
...
src/vs/workbench/api/electron-browser/mainThreadLanguageFeatures.ts
浏览文件 @
81f58337
...
...
@@ -394,6 +394,7 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha
return
{
beforeText
:
MainThreadLanguageFeatures
.
_reviveRegExp
(
onEnterRule
.
beforeText
),
afterText
:
MainThreadLanguageFeatures
.
_reviveRegExp
(
onEnterRule
.
afterText
),
oneLineAboveText
:
MainThreadLanguageFeatures
.
_reviveRegExp
(
onEnterRule
.
oneLineAboveText
),
action
:
onEnterRule
.
action
};
}
...
...
src/vs/workbench/api/node/extHost.protocol.ts
浏览文件 @
81f58337
...
...
@@ -235,6 +235,7 @@ export interface ISerializedIndentationRule {
export
interface
ISerializedOnEnterRule
{
beforeText
:
ISerializedRegExp
;
afterText
?:
ISerializedRegExp
;
oneLineAboveText
?:
ISerializedRegExp
;
action
:
EnterAction
;
}
export
interface
ISerializedLanguageConfiguration
{
...
...
src/vs/workbench/api/node/extHostLanguageFeatures.ts
浏览文件 @
81f58337
...
...
@@ -1216,6 +1216,7 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape {
return
{
beforeText
:
ExtHostLanguageFeatures
.
_serializeRegExp
(
onEnterRule
.
beforeText
),
afterText
:
ExtHostLanguageFeatures
.
_serializeRegExp
(
onEnterRule
.
afterText
),
oneLineAboveText
:
ExtHostLanguageFeatures
.
_serializeRegExp
(
onEnterRule
.
oneLineAboveText
),
action
:
onEnterRule
.
action
};
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录