Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
1a6d368c
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1a6d368c
编写于
6月 03, 2016
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Define IRichLanguageConfiguration clearly (do not generate it through Monarch)
上级
e036c0e7
变更
30
隐藏空白更改
内联
并排
Showing
30 changed file
with
577 addition
and
44 deletion
+577
-44
src/vs/editor/browser/standalone/standaloneEditor.ts
src/vs/editor/browser/standalone/standaloneEditor.ts
+1
-3
src/vs/editor/browser/standalone/standaloneLanguages.ts
src/vs/editor/browser/standalone/standaloneLanguages.ts
+10
-4
src/vs/editor/common/services/modeService.ts
src/vs/editor/common/services/modeService.ts
+1
-3
src/vs/editor/common/services/modeServiceImpl.ts
src/vs/editor/common/services/modeServiceImpl.ts
+3
-5
src/vs/editor/standalone-languages/bat.ts
src/vs/editor/standalone-languages/bat.ts
+19
-1
src/vs/editor/standalone-languages/coffee.ts
src/vs/editor/standalone-languages/coffee.ts
+21
-1
src/vs/editor/standalone-languages/cpp.ts
src/vs/editor/standalone-languages/cpp.ts
+19
-1
src/vs/editor/standalone-languages/csharp.ts
src/vs/editor/standalone-languages/csharp.ts
+21
-1
src/vs/editor/standalone-languages/dockerfile.ts
src/vs/editor/standalone-languages/dockerfile.ts
+21
-1
src/vs/editor/standalone-languages/fsharp.ts
src/vs/editor/standalone-languages/fsharp.ts
+19
-1
src/vs/editor/standalone-languages/go.ts
src/vs/editor/standalone-languages/go.ts
+19
-1
src/vs/editor/standalone-languages/ini.ts
src/vs/editor/standalone-languages/ini.ts
+21
-1
src/vs/editor/standalone-languages/jade.ts
src/vs/editor/standalone-languages/jade.ts
+20
-1
src/vs/editor/standalone-languages/java.ts
src/vs/editor/standalone-languages/java.ts
+23
-1
src/vs/editor/standalone-languages/lua.ts
src/vs/editor/standalone-languages/lua.ts
+20
-1
src/vs/editor/standalone-languages/objective-c.ts
src/vs/editor/standalone-languages/objective-c.ts
+21
-1
src/vs/editor/standalone-languages/powershell.ts
src/vs/editor/standalone-languages/powershell.ts
+20
-1
src/vs/editor/standalone-languages/python.ts
src/vs/editor/standalone-languages/python.ts
+20
-1
src/vs/editor/standalone-languages/r.ts
src/vs/editor/standalone-languages/r.ts
+20
-1
src/vs/editor/standalone-languages/ruby.ts
src/vs/editor/standalone-languages/ruby.ts
+20
-1
src/vs/editor/standalone-languages/sql.ts
src/vs/editor/standalone-languages/sql.ts
+19
-1
src/vs/editor/standalone-languages/swift.ts
src/vs/editor/standalone-languages/swift.ts
+21
-1
src/vs/editor/standalone-languages/types.ts
src/vs/editor/standalone-languages/types.ts
+65
-0
src/vs/editor/standalone-languages/vb.ts
src/vs/editor/standalone-languages/vb.ts
+47
-1
src/vs/editor/standalone-languages/xml.ts
src/vs/editor/standalone-languages/xml.ts
+17
-1
src/vs/editor/test/common/mocks/mockModeService.ts
src/vs/editor/test/common/mocks/mockModeService.ts
+1
-1
src/vs/languages/less/common/less.ts
src/vs/languages/less/common/less.ts
+21
-2
src/vs/languages/markdown/common/markdown.ts
src/vs/languages/markdown/common/markdown.ts
+11
-2
src/vs/languages/sass/common/sass.ts
src/vs/languages/sass/common/sass.ts
+21
-2
src/vs/workbench/parts/output/common/outputMode.ts
src/vs/workbench/parts/output/common/outputMode.ts
+15
-2
未找到文件。
src/vs/editor/browser/standalone/standaloneEditor.ts
浏览文件 @
1a6d368c
...
...
@@ -215,8 +215,6 @@ export function createCustomMode(language:ILanguage): TPromise<modes.IMode> {
startup
.
initStaticServicesIfNecessary
();
let
staticPlatformServices
=
ensureStaticPlatformServices
(
null
);
let
modeService
=
staticPlatformServices
.
modeService
;
let
modelService
=
staticPlatformServices
.
modelService
;
let
editorWorkerService
=
staticPlatformServices
.
editorWorkerService
;
let
modeId
=
language
.
name
;
let
name
=
language
.
name
;
...
...
@@ -230,7 +228,7 @@ export function createCustomMode(language:ILanguage): TPromise<modes.IMode> {
if
(
mode
.
getId
()
!==
modeId
)
{
return
;
}
modeService
.
registerMonarchDefinition
(
mode
lService
,
editorWorkerService
,
mode
Id
,
language
);
modeService
.
registerMonarchDefinition
(
modeId
,
language
);
disposable
.
dispose
();
});
...
...
src/vs/editor/browser/standalone/standaloneLanguages.ts
浏览文件 @
1a6d368c
...
...
@@ -23,6 +23,8 @@ import {Position} from 'vs/editor/common/core/position';
import
{
Range
}
from
'
vs/editor/common/core/range
'
;
import
{
CancellationToken
}
from
'
vs/base/common/cancellation
'
;
import
{
toThenable
}
from
'
vs/base/common/async
'
;
import
{
compile
}
from
'
vs/editor/common/modes/monarch/monarchCompile
'
;
import
{
createTokenizationSupport
}
from
'
vs/editor/common/modes/monarch/monarchLexer
'
;
export
function
register
(
language
:
ILanguageExtensionPoint
):
void
{
ModesRegistry
.
registerLanguage
(
language
);
...
...
@@ -295,7 +297,7 @@ export function registerMonarchStandaloneLanguage(language:ILanguageExtensionPoi
ModesRegistry
.
registerLanguage
(
language
);
ExtensionsRegistry
.
registerOneTimeActivationEventListener
(
'
onLanguage:
'
+
language
.
id
,
()
=>
{
require
([
defModule
],
(
value
:{
language
:
ILanguage
})
=>
{
require
([
defModule
],
(
value
:{
language
:
ILanguage
;
conf
:
IRichLanguageConfiguration
})
=>
{
if
(
!
value
.
language
)
{
console
.
error
(
'
Expected
'
+
defModule
+
'
to export a `language`
'
);
return
;
...
...
@@ -304,10 +306,14 @@ export function registerMonarchStandaloneLanguage(language:ILanguageExtensionPoi
startup
.
initStaticServicesIfNecessary
();
let
staticPlatformServices
=
ensureStaticPlatformServices
(
null
);
let
modeService
=
staticPlatformServices
.
modeService
;
let
modelService
=
staticPlatformServices
.
modelService
;
let
editorWorkerService
=
staticPlatformServices
.
editorWorkerService
;
modeService
.
registerMonarchDefinition
(
modelService
,
editorWorkerService
,
language
.
id
,
value
.
language
);
let
lexer
=
compile
(
value
.
language
);
modeService
.
registerTokenizationSupport
(
language
.
id
,
(
mode
)
=>
{
return
createTokenizationSupport
(
modeService
,
mode
,
lexer
);
});
modeService
.
registerRichEditSupport
(
language
.
id
,
value
.
conf
);
},
(
err
)
=>
{
console
.
error
(
'
Cannot find module
'
+
defModule
,
err
);
});
...
...
src/vs/editor/common/services/modeService.ts
浏览文件 @
1a6d368c
...
...
@@ -11,8 +11,6 @@ import {ServiceIdentifier, createDecorator} from 'vs/platform/instantiation/comm
import
*
as
modes
from
'
vs/editor/common/modes
'
;
import
{
ILanguage
}
from
'
vs/editor/common/modes/monarch/monarchTypes
'
;
import
{
IRichLanguageConfiguration
}
from
'
vs/editor/common/modes/supports/richEditSupport
'
;
import
{
IEditorWorkerService
}
from
'
vs/editor/common/services/editorWorkerService
'
;
import
{
IModelService
}
from
'
vs/editor/common/services/modelService
'
;
export
var
IModeService
=
createDecorator
<
IModeService
>
(
'
modeService
'
);
...
...
@@ -76,5 +74,5 @@ export interface IModeService {
registerRichEditSupport
(
modeId
:
string
,
support
:
IRichLanguageConfiguration
):
IDisposable
;
registerTokenizationSupport
(
modeId
:
string
,
callback
:
(
mode
:
modes
.
IMode
)
=>
modes
.
ITokenizationSupport
):
IDisposable
;
registerTokenizationSupport2
(
modeId
:
string
,
support
:
modes
.
TokensProvider
):
IDisposable
;
registerMonarchDefinition
(
mode
lService
:
IModelService
,
editorWorkerService
:
IEditorWorkerService
,
mode
Id
:
string
,
language
:
ILanguage
):
IDisposable
;
registerMonarchDefinition
(
modeId
:
string
,
language
:
ILanguage
):
IDisposable
;
}
src/vs/editor/common/services/modeServiceImpl.ts
浏览文件 @
1a6d368c
...
...
@@ -26,10 +26,8 @@ import {createRichEditSupport} from 'vs/editor/common/modes/monarch/monarchDefin
import
{
createTokenizationSupport
}
from
'
vs/editor/common/modes/monarch/monarchLexer
'
;
import
{
ILanguage
}
from
'
vs/editor/common/modes/monarch/monarchTypes
'
;
import
{
IRichLanguageConfiguration
,
RichEditSupport
}
from
'
vs/editor/common/modes/supports/richEditSupport
'
;
import
{
IEditorWorkerService
}
from
'
vs/editor/common/services/editorWorkerService
'
;
import
{
LanguagesRegistry
}
from
'
vs/editor/common/services/languagesRegistry
'
;
import
{
ILanguageExtensionPoint
,
IValidLanguageExtensionPoint
,
IModeLookupResult
,
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
import
{
IModelService
}
from
'
vs/editor/common/services/modelService
'
;
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
AbstractState
}
from
'
vs/editor/common/modes/abstractState
'
;
import
{
Token
}
from
'
vs/editor/common/modes/supports
'
;
...
...
@@ -438,7 +436,7 @@ export class ModeServiceImpl implements IModeService {
);
}
public
registerMonarchDefinition
(
mode
lService
:
IModelService
,
editorWorkerService
:
IEditorWorkerService
,
mode
Id
:
string
,
language
:
ILanguage
):
IDisposable
{
public
registerMonarchDefinition
(
modeId
:
string
,
language
:
ILanguage
):
IDisposable
{
var
lexer
=
compile
(
objects
.
clone
(
language
));
return
this
.
doRegisterMonarchDefinition
(
modeId
,
lexer
);
}
...
...
@@ -649,7 +647,7 @@ export class MainThreadModeServiceImpl extends ModeServiceImpl {
return
super
.
_createMode
(
modeId
);
}
public
registerMonarchDefinition
(
mode
lService
:
IModelService
,
editorWorkerService
:
IEditorWorkerService
,
mode
Id
:
string
,
language
:
ILanguage
):
IDisposable
{
public
registerMonarchDefinition
(
modeId
:
string
,
language
:
ILanguage
):
IDisposable
{
this
.
_getModeServiceWorkerHelper
().
registerMonarchDefinition
(
modeId
,
language
);
var
lexer
=
compile
(
objects
.
clone
(
language
));
return
super
.
doRegisterMonarchDefinition
(
modeId
,
lexer
);
...
...
@@ -691,6 +689,6 @@ export class ModeServiceWorkerHelper {
}
public
registerMonarchDefinition
(
modeId
:
string
,
language
:
ILanguage
):
void
{
this
.
_modeService
.
registerMonarchDefinition
(
null
,
null
,
modeId
,
language
);
this
.
_modeService
.
registerMonarchDefinition
(
modeId
,
language
);
}
}
src/vs/editor/standalone-languages/bat.ts
浏览文件 @
1a6d368c
...
...
@@ -5,7 +5,25 @@
'
use strict
'
;
import
{
ILanguage
}
from
'
./types
'
;
import
{
ILanguage
,
IRichLanguageConfiguration
}
from
'
./types
'
;
export
var
conf
:
IRichLanguageConfiguration
=
{
comments
:
{
blockComment
:
[
'
/*
'
,
'
*/
'
],
lineComment
:
'
REM
'
},
brackets
:
[[
'
{
'
,
'
}
'
],
[
'
[
'
,
'
]
'
],
[
'
(
'
,
'
)
'
]],
autoClosingPairs
:
[
{
open
:
'
"
'
,
close
:
'
"
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
{
'
,
close
:
'
}
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
[
'
,
close
:
'
]
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
(
'
,
close
:
'
)
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
],
__electricCharacterSupport
:
{
caseInsensitive
:
false
,
embeddedElectricCharacters
:
[]
}
};
export
var
language
=
<
ILanguage
>
{
displayName
:
'
Batch
'
,
...
...
src/vs/editor/standalone-languages/coffee.ts
浏览文件 @
1a6d368c
...
...
@@ -5,7 +5,27 @@
'
use strict
'
;
import
{
ILanguage
}
from
'
./types
'
;
import
{
ILanguage
,
IRichLanguageConfiguration
}
from
'
./types
'
;
export
var
conf
:
IRichLanguageConfiguration
=
{
wordPattern
:
/
(
-
?\d
*
\.\d\w
*
)
|
([^\`\~\!\@\#
%
\^\&\*\(\)\=\$\-\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]
+
)
/g
,
comments
:
{
blockComment
:
[
'
###
'
,
'
###
'
],
lineComment
:
'
#
'
},
brackets
:
[[
'
{
'
,
'
}
'
],
[
'
[
'
,
'
]
'
],
[
'
(
'
,
'
)
'
]],
autoClosingPairs
:
[
{
open
:
'
"
'
,
close
:
'
"
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
\'
'
,
close
:
'
\'
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
{
'
,
close
:
'
}
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
[
'
,
close
:
'
]
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
(
'
,
close
:
'
)
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
],
__electricCharacterSupport
:
{
caseInsensitive
:
false
,
embeddedElectricCharacters
:
[]
}
};
export
var
language
=
<
ILanguage
>
{
displayName
:
'
CoffeeScript
'
,
...
...
src/vs/editor/standalone-languages/cpp.ts
浏览文件 @
1a6d368c
...
...
@@ -5,7 +5,25 @@
'
use strict
'
;
import
{
ILanguage
}
from
'
./types
'
;
import
{
ILanguage
,
IRichLanguageConfiguration
}
from
'
./types
'
;
export
var
conf
:
IRichLanguageConfiguration
=
{
comments
:
{
lineComment
:
'
//
'
,
blockComment
:
[
'
/*
'
,
'
*/
'
],
},
brackets
:
[[
'
{
'
,
'
}
'
],
[
'
[
'
,
'
]
'
],
[
'
(
'
,
'
)
'
],
[
'
<
'
,
'
>
'
]],
autoClosingPairs
:
[
{
open
:
'
"
'
,
close
:
'
"
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
{
'
,
close
:
'
}
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
[
'
,
close
:
'
]
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
(
'
,
close
:
'
)
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
],
__electricCharacterSupport
:
{
caseInsensitive
:
false
,
embeddedElectricCharacters
:
[]
}
};
export
var
language
=
<
ILanguage
>
{
displayName
:
'
C++
'
,
...
...
src/vs/editor/standalone-languages/csharp.ts
浏览文件 @
1a6d368c
...
...
@@ -5,7 +5,27 @@
'
use strict
'
;
import
{
ILanguage
}
from
'
./types
'
;
import
{
ILanguage
,
IRichLanguageConfiguration
}
from
'
./types
'
;
export
var
conf
:
IRichLanguageConfiguration
=
{
wordPattern
:
/
(
-
?\d
*
\.\d\w
*
)
|
([^\`\~\!\#\$\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]
+
)
/g
,
comments
:
{
lineComment
:
'
//
'
,
blockComment
:
[
'
/*
'
,
'
*/
'
],
},
brackets
:
[[
'
{
'
,
'
}
'
],
[
'
[
'
,
'
]
'
],
[
'
(
'
,
'
)
'
],
[
'
<
'
,
'
>
'
]],
autoClosingPairs
:
[
{
open
:
'
"
'
,
close
:
'
"
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
\'
'
,
close
:
'
\'
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
{
'
,
close
:
'
}
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
[
'
,
close
:
'
]
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
(
'
,
close
:
'
)
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
],
__electricCharacterSupport
:
{
caseInsensitive
:
false
,
embeddedElectricCharacters
:
[]
}
};
export
var
language
=
<
ILanguage
>
{
displayName
:
''
,
...
...
src/vs/editor/standalone-languages/dockerfile.ts
浏览文件 @
1a6d368c
...
...
@@ -5,7 +5,27 @@
'
use strict
'
;
import
{
ILanguage
}
from
'
./types
'
;
import
{
ILanguage
,
IRichLanguageConfiguration
}
from
'
./types
'
;
export
var
conf
:
IRichLanguageConfiguration
=
{
comments
:
{
lineComment
:
'
//
'
,
blockComment
:
[
'
/*
'
,
'
*/
'
],
},
brackets
:
[[
'
{
'
,
'
}
'
],
[
'
[
'
,
'
]
'
],
[
'
(
'
,
'
)
'
],
[
'
<
'
,
'
>
'
]],
autoClosingPairs
:
[
{
open
:
'
"
'
,
close
:
'
"
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
\'
'
,
close
:
'
\'
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
{
'
,
close
:
'
}
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
[
'
,
close
:
'
]
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
(
'
,
close
:
'
)
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
<
'
,
close
:
'
>
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
],
__electricCharacterSupport
:
{
caseInsensitive
:
false
,
embeddedElectricCharacters
:
[]
}
};
export
var
language
=
<
ILanguage
>
{
displayName
:
'
Dockerfile
'
,
...
...
src/vs/editor/standalone-languages/fsharp.ts
浏览文件 @
1a6d368c
...
...
@@ -5,7 +5,25 @@
'
use strict
'
;
import
{
ILanguage
}
from
'
./types
'
;
import
{
ILanguage
,
IRichLanguageConfiguration
}
from
'
./types
'
;
export
var
conf
:
IRichLanguageConfiguration
=
{
comments
:
{
lineComment
:
'
//
'
,
blockComment
:
[
'
(*
'
,
'
*)
'
],
},
brackets
:
[[
'
{
'
,
'
}
'
],
[
'
[
'
,
'
]
'
],
[
'
(
'
,
'
)
'
],
[
'
<
'
,
'
>
'
]],
autoClosingPairs
:
[
{
open
:
'
{
'
,
close
:
'
}
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
[
'
,
close
:
'
]
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
(
'
,
close
:
'
)
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
"
'
,
close
:
'
"
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
}
],
__electricCharacterSupport
:
{
caseInsensitive
:
false
,
embeddedElectricCharacters
:
[]
}
};
export
var
language
=
<
ILanguage
>
{
displayName
:
'
F#
'
,
...
...
src/vs/editor/standalone-languages/go.ts
浏览文件 @
1a6d368c
...
...
@@ -5,7 +5,25 @@
'
use strict
'
;
import
{
ILanguage
}
from
'
./types
'
;
import
{
ILanguage
,
IRichLanguageConfiguration
}
from
'
./types
'
;
export
var
conf
:
IRichLanguageConfiguration
=
{
comments
:
{
lineComment
:
'
//
'
,
blockComment
:
[
'
/*
'
,
'
*/
'
],
},
brackets
:
[[
'
{
'
,
'
}
'
],
[
'
[
'
,
'
]
'
],
[
'
(
'
,
'
)
'
],
[
'
<
'
,
'
>
'
]],
autoClosingPairs
:
[
{
open
:
'
{
'
,
close
:
'
}
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
[
'
,
close
:
'
]
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
(
'
,
close
:
'
)
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
"
'
,
close
:
'
"
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
}
],
__electricCharacterSupport
:
{
caseInsensitive
:
false
,
embeddedElectricCharacters
:
[]
}
};
export
var
language
=
<
ILanguage
>
{
...
...
src/vs/editor/standalone-languages/ini.ts
浏览文件 @
1a6d368c
...
...
@@ -5,7 +5,27 @@
'
use strict
'
;
import
{
ILanguage
}
from
'
./types
'
;
import
{
ILanguage
,
IRichLanguageConfiguration
}
from
'
./types
'
;
export
var
conf
:
IRichLanguageConfiguration
=
{
comments
:
{
lineComment
:
'
#
'
,
blockComment
:
[
'
#
'
,
'
'
],
},
brackets
:
[[
'
{
'
,
'
}
'
],
[
'
[
'
,
'
]
'
],
[
'
(
'
,
'
)
'
],
[
'
<
'
,
'
>
'
]],
autoClosingPairs
:
[
{
open
:
'
"
'
,
close
:
'
"
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
\'
'
,
close
:
'
\'
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
{
'
,
close
:
'
}
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
[
'
,
close
:
'
]
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
(
'
,
close
:
'
)
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
<
'
,
close
:
'
>
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
],
__electricCharacterSupport
:
{
caseInsensitive
:
false
,
embeddedElectricCharacters
:
[]
}
};
export
var
language
=
<
ILanguage
>
{
displayName
:
'
Ini
'
,
...
...
src/vs/editor/standalone-languages/jade.ts
浏览文件 @
1a6d368c
...
...
@@ -5,7 +5,26 @@
'
use strict
'
;
import
{
ILanguage
}
from
'
./types
'
;
import
{
ILanguage
,
IRichLanguageConfiguration
}
from
'
./types
'
;
export
var
conf
:
IRichLanguageConfiguration
=
{
comments
:
{
lineComment
:
'
//
'
,
blockComment
:
[
'
/*
'
,
'
*/
'
],
},
brackets
:
[[
'
{
'
,
'
}
'
],
[
'
[
'
,
'
]
'
],
[
'
(
'
,
'
)
'
]],
autoClosingPairs
:
[
{
open
:
'
"
'
,
close
:
'
"
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
\'
'
,
close
:
'
\'
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
{
'
,
close
:
'
}
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
[
'
,
close
:
'
]
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
(
'
,
close
:
'
)
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
],
__electricCharacterSupport
:
{
caseInsensitive
:
true
,
embeddedElectricCharacters
:
[]
}
};
export
var
language
=
<
ILanguage
>
{
displayName
:
'
Jade
'
,
...
...
src/vs/editor/standalone-languages/java.ts
浏览文件 @
1a6d368c
...
...
@@ -5,7 +5,29 @@
'
use strict
'
;
import
{
ILanguage
}
from
'
./types
'
;
import
{
ILanguage
,
IRichLanguageConfiguration
}
from
'
./types
'
;
export
var
conf
:
IRichLanguageConfiguration
=
{
// the default separators except `@$`
wordPattern
:
/
(
-
?\d
*
\.\d\w
*
)
|
([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]
+
)
/g
,
comments
:
{
lineComment
:
'
//
'
,
blockComment
:
[
'
/*
'
,
'
*/
'
],
},
brackets
:
[[
'
{
'
,
'
}
'
],
[
'
[
'
,
'
]
'
],
[
'
(
'
,
'
)
'
],
[
'
<
'
,
'
>
'
]],
autoClosingPairs
:
[
{
open
:
'
"
'
,
close
:
'
"
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
\'
'
,
close
:
'
\'
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
{
'
,
close
:
'
}
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
[
'
,
close
:
'
]
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
(
'
,
close
:
'
)
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
<
'
,
close
:
'
>
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
],
__electricCharacterSupport
:
{
caseInsensitive
:
false
,
embeddedElectricCharacters
:
[]
}
};
export
var
language
=
<
ILanguage
>
{
displayName
:
'
Java
'
,
...
...
src/vs/editor/standalone-languages/lua.ts
浏览文件 @
1a6d368c
...
...
@@ -5,7 +5,26 @@
'
use strict
'
;
import
{
ILanguage
}
from
'
./types
'
;
import
{
ILanguage
,
IRichLanguageConfiguration
}
from
'
./types
'
;
export
var
conf
:
IRichLanguageConfiguration
=
{
comments
:
{
lineComment
:
'
--
'
,
blockComment
:
[
'
--[[
'
,
'
]]
'
],
},
brackets
:
[[
'
{
'
,
'
}
'
],
[
'
[
'
,
'
]
'
],
[
'
(
'
,
'
)
'
]],
autoClosingPairs
:
[
{
open
:
'
"
'
,
close
:
'
"
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
\'
'
,
close
:
'
\'
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
{
'
,
close
:
'
}
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
[
'
,
close
:
'
]
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
(
'
,
close
:
'
)
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
],
__electricCharacterSupport
:
{
caseInsensitive
:
false
,
embeddedElectricCharacters
:
[]
}
};
export
var
language
=
<
ILanguage
>
{
displayName
:
'
Lua
'
,
...
...
src/vs/editor/standalone-languages/objective-c.ts
浏览文件 @
1a6d368c
...
...
@@ -5,7 +5,27 @@
'
use strict
'
;
import
{
ILanguage
}
from
'
./types
'
;
import
{
ILanguage
,
IRichLanguageConfiguration
}
from
'
./types
'
;
export
var
conf
:
IRichLanguageConfiguration
=
{
comments
:
{
lineComment
:
'
//
'
,
blockComment
:
[
'
/*
'
,
'
*/
'
],
},
brackets
:
[[
'
{
'
,
'
}
'
],
[
'
[
'
,
'
]
'
],
[
'
(
'
,
'
)
'
],
[
'
<
'
,
'
>
'
]],
autoClosingPairs
:
[
{
open
:
'
"
'
,
close
:
'
"
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
\'
'
,
close
:
'
\'
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
{
'
,
close
:
'
}
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
[
'
,
close
:
'
]
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
(
'
,
close
:
'
)
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
<
'
,
close
:
'
>
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
],
__electricCharacterSupport
:
{
caseInsensitive
:
false
,
embeddedElectricCharacters
:
[]
}
};
export
var
language
=
<
ILanguage
>
{
displayName
:
'
Objective-C
'
,
...
...
src/vs/editor/standalone-languages/powershell.ts
浏览文件 @
1a6d368c
...
...
@@ -5,7 +5,26 @@
'
use strict
'
;
import
{
ILanguage
}
from
'
./types
'
;
import
{
ILanguage
,
IRichLanguageConfiguration
}
from
'
./types
'
;
export
var
conf
:
IRichLanguageConfiguration
=
{
// the default separators except `$-`
wordPattern
:
/
(
-
?\d
*
\.\d\w
*
)
|
([^\`\~\!\@\#
%
\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]
+
)
/g
,
comments
:
{
lineComment
:
'
#
'
,
blockComment
:
[
'
<#
'
,
'
#>
'
],
},
brackets
:
[[
'
{
'
,
'
}
'
],
[
'
[
'
,
'
]
'
],
[
'
(
'
,
'
)
'
]],
autoClosingPairs
:
[
{
open
:
'
{
'
,
close
:
'
}
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
[
'
,
close
:
'
]
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
(
'
,
close
:
'
)
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
],
__electricCharacterSupport
:
{
caseInsensitive
:
true
,
embeddedElectricCharacters
:
[]
}
};
export
var
language
=
<
ILanguage
>
{
displayName
:
'
PowerShell
'
,
...
...
src/vs/editor/standalone-languages/python.ts
浏览文件 @
1a6d368c
...
...
@@ -5,7 +5,26 @@
'
use strict
'
;
import
{
ILanguage
}
from
'
./types
'
;
import
{
ILanguage
,
IRichLanguageConfiguration
}
from
'
./types
'
;
export
var
conf
:
IRichLanguageConfiguration
=
{
comments
:
{
lineComment
:
'
#
'
,
blockComment
:
[
'
\'\'\'
'
,
'
\'\'\'
'
],
},
brackets
:
[[
'
{
'
,
'
}
'
],
[
'
[
'
,
'
]
'
],
[
'
(
'
,
'
)
'
]],
autoClosingPairs
:
[
{
open
:
'
"
'
,
close
:
'
"
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
\'
'
,
close
:
'
\'
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
{
'
,
close
:
'
}
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
[
'
,
close
:
'
]
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
(
'
,
close
:
'
)
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
],
__electricCharacterSupport
:
{
caseInsensitive
:
false
,
embeddedElectricCharacters
:
[]
}
};
export
var
language
=
<
ILanguage
>
{
displayName
:
''
,
...
...
src/vs/editor/standalone-languages/r.ts
浏览文件 @
1a6d368c
...
...
@@ -5,7 +5,26 @@
'
use strict
'
;
import
{
ILanguage
}
from
'
./types
'
;
import
{
ILanguage
,
IRichLanguageConfiguration
}
from
'
./types
'
;
export
var
conf
:
IRichLanguageConfiguration
=
{
comments
:
{
lineComment
:
'
#
'
,
blockComment
:
[
''
,
''
],
},
brackets
:
[[
'
{
'
,
'
}
'
],
[
'
[
'
,
'
]
'
],
[
'
(
'
,
'
)
'
]],
autoClosingPairs
:
[
{
open
:
'
"
'
,
close
:
'
"
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
\'
'
,
close
:
'
\'
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
{
'
,
close
:
'
}
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
[
'
,
close
:
'
]
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
(
'
,
close
:
'
)
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
],
__electricCharacterSupport
:
{
caseInsensitive
:
false
,
embeddedElectricCharacters
:
[]
}
};
export
var
language
=
<
ILanguage
>
{
displayName
:
'
R
'
,
...
...
src/vs/editor/standalone-languages/ruby.ts
浏览文件 @
1a6d368c
...
...
@@ -5,7 +5,26 @@
'
use strict
'
;
import
{
ILanguage
}
from
'
./types
'
;
import
{
ILanguage
,
IRichLanguageConfiguration
}
from
'
./types
'
;
export
var
conf
:
IRichLanguageConfiguration
=
{
comments
:
{
lineComment
:
'
#
'
,
blockComment
:
[
'
=begin
'
,
'
=end
'
],
},
brackets
:
[[
'
(
'
,
'
)
'
],[
'
{
'
,
'
}
'
],
[
'
[
'
,
'
]
'
]],
autoClosingPairs
:
[
{
open
:
'
"
'
,
close
:
'
"
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
\'
'
,
close
:
'
\'
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
(
'
,
close
:
'
)
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
{
'
,
close
:
'
}
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
[
'
,
close
:
'
]
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
],
__electricCharacterSupport
:
{
caseInsensitive
:
false
,
embeddedElectricCharacters
:
[
'
d
'
]
}
};
/*
* Ruby language definition
...
...
src/vs/editor/standalone-languages/sql.ts
浏览文件 @
1a6d368c
...
...
@@ -5,7 +5,25 @@
'
use strict
'
;
import
{
ILanguage
}
from
'
./types
'
;
import
{
ILanguage
,
IRichLanguageConfiguration
}
from
'
./types
'
;
export
var
conf
:
IRichLanguageConfiguration
=
{
comments
:
{
lineComment
:
'
--
'
,
blockComment
:
[
'
/*
'
,
'
*/
'
],
},
brackets
:
[[
'
[
'
,
'
]
'
],[
'
(
'
,
'
)
'
]],
autoClosingPairs
:
[
{
open
:
'
"
'
,
close
:
'
"
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
\'
'
,
close
:
'
\'
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
[
'
,
close
:
'
]
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
(
'
,
close
:
'
)
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
],
__electricCharacterSupport
:
{
caseInsensitive
:
true
,
embeddedElectricCharacters
:
[]
}
};
export
var
language
=
<
ILanguage
>
{
displayName
:
'
SQL
'
,
...
...
src/vs/editor/standalone-languages/swift.ts
浏览文件 @
1a6d368c
...
...
@@ -4,7 +4,27 @@
'
use strict
'
;
import
{
ILanguage
}
from
'
./types
'
;
import
{
ILanguage
,
IRichLanguageConfiguration
}
from
'
./types
'
;
export
var
conf
:
IRichLanguageConfiguration
=
{
comments
:
{
lineComment
:
'
//
'
,
blockComment
:
[
'
/*
'
,
'
*/
'
],
},
brackets
:
[[
'
{
'
,
'
}
'
],[
'
[
'
,
'
]
'
],[
'
(
'
,
'
)
'
],[
'
<
'
,
'
>
'
]],
autoClosingPairs
:
[
{
open
:
'
"
'
,
close
:
'
"
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
\'
'
,
close
:
'
\'
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
{
'
,
close
:
'
}
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
[
'
,
close
:
'
]
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
(
'
,
close
:
'
)
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
<
'
,
close
:
'
>
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
],
__electricCharacterSupport
:
{
caseInsensitive
:
false
,
embeddedElectricCharacters
:
[]
}
};
export
var
language
=
<
ILanguage
>
{
displayName
:
'
Swift
'
,
...
...
src/vs/editor/standalone-languages/types.ts
浏览文件 @
1a6d368c
...
...
@@ -77,3 +77,68 @@ export interface ILanguageBracket {
// tokenType?: string; // The type of the token. Matches from 'open' or 'close' will be expanded, e.g. 'keyword.$1'.
// // Only used to auto-(un)indent a closing bracket.
// }
export
type
CharacterPair
=
[
string
,
string
];
export
interface
CommentRule
{
lineComment
?:
string
;
blockComment
?:
CharacterPair
;
}
export
interface
IIndentationRules
{
decreaseIndentPattern
:
RegExp
;
increaseIndentPattern
:
RegExp
;
indentNextLinePattern
?:
RegExp
;
unIndentedLinePattern
?:
RegExp
;
}
export
interface
IOnEnterRegExpRules
{
beforeText
:
RegExp
;
afterText
?:
RegExp
;
action
:
IEnterAction
;
}
export
interface
IEnterAction
{
indentAction
:
IndentAction
;
appendText
?:
string
;
removeText
?:
number
;
}
export
enum
IndentAction
{
None
,
Indent
,
IndentOutdent
,
Outdent
}
export
interface
IAutoClosingPair
{
open
:
string
;
close
:
string
;
}
export
interface
IAutoClosingPairConditional
extends
IAutoClosingPair
{
notIn
?:
string
[];
}
export
interface
IDocComment
{
scope
:
string
;
// What tokens should be used to detect a doc comment (e.g. 'comment.documentation').
open
:
string
;
// The string that starts a doc comment (e.g. '/**')
lineStart
:
string
;
// The string that appears at the start of each line, except the first and last (e.g. ' * ').
close
?:
string
;
// The string that appears on the last line and closes the doc comment (e.g. ' */').
}
export
interface
IBracketElectricCharacterContribution
{
docComment
?:
IDocComment
;
caseInsensitive
?:
boolean
;
embeddedElectricCharacters
?:
string
[];
}
export
interface
IRichLanguageConfiguration
{
comments
?:
CommentRule
;
brackets
?:
CharacterPair
[];
wordPattern
?:
RegExp
;
indentationRules
?:
IIndentationRules
;
onEnterRules
?:
IOnEnterRegExpRules
[];
autoClosingPairs
?:
IAutoClosingPairConditional
[];
surroundingPairs
?:
IAutoClosingPair
[];
__electricCharacterSupport
?:
IBracketElectricCharacterContribution
;
}
src/vs/editor/standalone-languages/vb.ts
浏览文件 @
1a6d368c
...
...
@@ -5,7 +5,53 @@
'
use strict
'
;
import
{
ILanguage
}
from
'
./types
'
;
import
{
ILanguage
,
IRichLanguageConfiguration
}
from
'
./types
'
;
export
var
conf
:
IRichLanguageConfiguration
=
{
comments
:
{
lineComment
:
'
\'
'
,
blockComment
:
[
'
/*
'
,
'
*/
'
],
},
brackets
:
[
[
'
{
'
,
'
}
'
],[
'
[
'
,
'
]
'
],[
'
(
'
,
'
)
'
],[
'
<
'
,
'
>
'
],
[
'
addhandler
'
,
'
end addhandler
'
],
[
'
class
'
,
'
end class
'
],
[
'
enum
'
,
'
end enum
'
],
[
'
event
'
,
'
end event
'
],
[
'
function
'
,
'
end function
'
],
[
'
get
'
,
'
end get
'
],
[
'
if
'
,
'
end if
'
],
[
'
interface
'
,
'
end interface
'
],
[
'
module
'
,
'
end module
'
],
[
'
namespace
'
,
'
end namespace
'
],
[
'
operator
'
,
'
end operator
'
],
[
'
property
'
,
'
end property
'
],
[
'
raiseevent
'
,
'
end raiseevent
'
],
[
'
removehandler
'
,
'
end removehandler
'
],
[
'
select
'
,
'
end select
'
],
[
'
set
'
,
'
end set
'
],
[
'
structure
'
,
'
end structure
'
],
[
'
sub
'
,
'
end sub
'
],
[
'
synclock
'
,
'
end synclock
'
],
[
'
try
'
,
'
end try
'
],
[
'
while
'
,
'
end while
'
],
[
'
with
'
,
'
end with
'
],
[
'
using
'
,
'
end using
'
],
[
'
do
'
,
'
loop
'
],
[
'
for
'
,
'
next
'
]
],
autoClosingPairs
:
[
{
open
:
'
{
'
,
close
:
'
}
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
[
'
,
close
:
'
]
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
(
'
,
close
:
'
)
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
"
'
,
close
:
'
"
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
<
'
,
close
:
'
>
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
],
__electricCharacterSupport
:
{
caseInsensitive
:
true
,
embeddedElectricCharacters
:
[]
}
};
export
var
language
=
<
ILanguage
>
{
displayName
:
'
VB
'
,
...
...
src/vs/editor/standalone-languages/xml.ts
浏览文件 @
1a6d368c
...
...
@@ -5,7 +5,23 @@
'
use strict
'
;
import
{
ILanguage
}
from
'
./types
'
;
import
{
ILanguage
,
IRichLanguageConfiguration
}
from
'
./types
'
;
export
var
conf
:
IRichLanguageConfiguration
=
{
comments
:
{
lineComment
:
''
,
blockComment
:
[
'
<!--
'
,
'
-->
'
],
},
brackets
:
[[
'
{
'
,
'
}
'
],[
'
[
'
,
'
]
'
],[
'
(
'
,
'
)
'
],[
'
<
'
,
'
>
'
]],
autoClosingPairs
:
[
{
open
:
'
\'
'
,
close
:
'
\'
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
"
'
,
close
:
'
"
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
],
__electricCharacterSupport
:
{
caseInsensitive
:
true
,
embeddedElectricCharacters
:
[]
}
};
export
var
language
=
<
ILanguage
>
{
displayName
:
'
XML
'
,
...
...
src/vs/editor/test/common/mocks/mockModeService.ts
浏览文件 @
1a6d368c
...
...
@@ -92,7 +92,7 @@ export class MockModeService implements IModeService {
registerTokenizationSupport2
(
modeId
:
string
,
support
:
modes
.
TokensProvider
):
IDisposable
{
throw
new
Error
(
'
Not implemented
'
);
}
registerMonarchDefinition
(
mode
lService
:
IModelService
,
editorWorkerService
:
IEditorWorkerService
,
mode
Id
:
string
,
language
:
ILanguage
):
IDisposable
{
registerMonarchDefinition
(
modeId
:
string
,
language
:
ILanguage
):
IDisposable
{
throw
new
Error
(
'
Not implemented
'
);
}
}
src/vs/languages/less/common/less.ts
浏览文件 @
1a6d368c
...
...
@@ -20,7 +20,6 @@ import {IThreadService, ThreadAffinity} from 'vs/platform/thread/common/thread';
import
{
IModelService
}
from
'
vs/editor/common/services/modelService
'
;
import
{
IEditorWorkerService
}
from
'
vs/editor/common/services/editorWorkerService
'
;
import
{
wireCancellationToken
}
from
'
vs/base/common/async
'
;
import
{
createRichEditSupport
}
from
'
vs/editor/common/modes/monarch/monarchDefinition
'
;
import
{
createTokenizationSupport
}
from
'
vs/editor/common/modes/monarch/monarchLexer
'
;
import
{
RichEditSupport
}
from
'
vs/editor/common/modes/supports/richEditSupport
'
;
...
...
@@ -241,7 +240,27 @@ export class LESSMode extends AbstractMode {
this
.
tokenizationSupport
=
createTokenizationSupport
(
modeService
,
this
,
lexer
);
this
.
richEditSupport
=
new
RichEditSupport
(
this
.
getId
(),
null
,
createRichEditSupport
(
lexer
));
this
.
richEditSupport
=
new
RichEditSupport
(
this
.
getId
(),
null
,
{
// TODO@Martin: This definition does not work with umlauts for example
wordPattern
:
/
(
#
?
-
?\d
*
\.\d\w
*%
?)
|
([
@#!.:
]?[\w
-?
]
+%
?)
|
[
@#!.
]
/g
,
comments
:
{
blockComment
:
[
'
/*
'
,
'
*/
'
],
lineComment
:
'
//
'
},
brackets
:
[[
'
{
'
,
'
}
'
],
[
'
[
'
,
'
]
'
],
[
'
(
'
,
'
)
'
],
[
'
<
'
,
'
>
'
]],
autoClosingPairs
:
[
{
open
:
'
"
'
,
close
:
'
"
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
\'
'
,
close
:
'
\'
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
{
'
,
close
:
'
}
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
[
'
,
close
:
'
]
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
(
'
,
close
:
'
)
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
<
'
,
close
:
'
>
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
],
__electricCharacterSupport
:
{
caseInsensitive
:
false
,
embeddedElectricCharacters
:
[]
}
});
}
public
creationDone
():
void
{
...
...
src/vs/languages/markdown/common/markdown.ts
浏览文件 @
1a6d368c
...
...
@@ -19,7 +19,6 @@ import {IThreadService} from 'vs/platform/thread/common/thread';
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
IEditorWorkerService
}
from
'
vs/editor/common/services/editorWorkerService
'
;
import
{
AbstractMode
,
ModeWorkerManager
}
from
'
vs/editor/common/modes/abstractMode
'
;
import
{
createRichEditSupport
}
from
'
vs/editor/common/modes/monarch/monarchDefinition
'
;
import
{
createTokenizationSupport
}
from
'
vs/editor/common/modes/monarch/monarchLexer
'
;
import
{
RichEditSupport
}
from
'
vs/editor/common/modes/supports/richEditSupport
'
;
import
{
wireCancellationToken
}
from
'
vs/base/common/async
'
;
...
...
@@ -233,7 +232,17 @@ export class MarkdownMode extends AbstractMode implements Modes.IEmitOutputSuppo
this
.
tokenizationSupport
=
createTokenizationSupport
(
modeService
,
this
,
lexer
);
this
.
richEditSupport
=
new
RichEditSupport
(
this
.
getId
(),
null
,
createRichEditSupport
(
lexer
));
this
.
richEditSupport
=
new
RichEditSupport
(
this
.
getId
(),
null
,
{
comments
:
{
blockComment
:
[
'
<!--
'
,
'
-->
'
,]
},
brackets
:
[[
'
{
'
,
'
}
'
],
[
'
[
'
,
'
]
'
],
[
'
(
'
,
'
)
'
],
[
'
<
'
,
'
>
'
]],
autoClosingPairs
:
[],
__electricCharacterSupport
:
{
caseInsensitive
:
false
,
embeddedElectricCharacters
:
[]
}
});
Modes
.
SuggestRegistry
.
register
(
this
.
getId
(),
{
triggerCharacters
:
[],
...
...
src/vs/languages/sass/common/sass.ts
浏览文件 @
1a6d368c
...
...
@@ -20,7 +20,6 @@ import {IThreadService, ThreadAffinity} from 'vs/platform/thread/common/thread';
import
{
IModelService
}
from
'
vs/editor/common/services/modelService
'
;
import
{
IEditorWorkerService
}
from
'
vs/editor/common/services/editorWorkerService
'
;
import
{
wireCancellationToken
}
from
'
vs/base/common/async
'
;
import
{
createRichEditSupport
}
from
'
vs/editor/common/modes/monarch/monarchDefinition
'
;
import
{
createTokenizationSupport
}
from
'
vs/editor/common/modes/monarch/monarchLexer
'
;
import
{
RichEditSupport
}
from
'
vs/editor/common/modes/supports/richEditSupport
'
;
...
...
@@ -342,7 +341,27 @@ export class SASSMode extends AbstractMode {
this
.
tokenizationSupport
=
createTokenizationSupport
(
modeService
,
this
,
lexer
);
this
.
richEditSupport
=
new
RichEditSupport
(
this
.
getId
(),
null
,
createRichEditSupport
(
lexer
));
this
.
richEditSupport
=
new
RichEditSupport
(
this
.
getId
(),
null
,
{
// TODO@Martin: This definition does not work with umlauts for example
wordPattern
:
/
(
#
?
-
?\d
*
\.\d\w
*%
?)
|
([
@#!.:
]?[\w
-?
]
+%
?)
|
[
@#!.
]
/g
,
comments
:
{
blockComment
:
[
'
/*
'
,
'
*/
'
],
lineComment
:
'
//
'
},
brackets
:
[[
'
{
'
,
'
}
'
],
[
'
[
'
,
'
]
'
],
[
'
(
'
,
'
)
'
],
[
'
<
'
,
'
>
'
]],
autoClosingPairs
:
[
{
open
:
'
"
'
,
close
:
'
"
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
\'
'
,
close
:
'
\'
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
{
'
,
close
:
'
}
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
[
'
,
close
:
'
]
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
(
'
,
close
:
'
)
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
<
'
,
close
:
'
>
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
],
__electricCharacterSupport
:
{
caseInsensitive
:
false
,
embeddedElectricCharacters
:
[]
}
});
}
public
creationDone
():
void
{
...
...
src/vs/workbench/parts/output/common/outputMode.ts
浏览文件 @
1a6d368c
...
...
@@ -17,7 +17,6 @@ import URI from 'vs/base/common/uri';
import
*
as
modes
from
'
vs/editor/common/modes
'
;
import
{
IEditorWorkerService
}
from
'
vs/editor/common/services/editorWorkerService
'
;
import
{
AbstractMode
,
ModeWorkerManager
}
from
'
vs/editor/common/modes/abstractMode
'
;
import
{
createRichEditSupport
}
from
'
vs/editor/common/modes/monarch/monarchDefinition
'
;
import
{
createTokenizationSupport
}
from
'
vs/editor/common/modes/monarch/monarchLexer
'
;
import
{
RichEditSupport
}
from
'
vs/editor/common/modes/supports/richEditSupport
'
;
import
{
wireCancellationToken
}
from
'
vs/base/common/async
'
;
...
...
@@ -66,7 +65,21 @@ export class OutputMode extends AbstractMode {
this
.
tokenizationSupport
=
createTokenizationSupport
(
modeService
,
this
,
lexer
);
this
.
richEditSupport
=
new
RichEditSupport
(
this
.
getId
(),
null
,
createRichEditSupport
(
lexer
));
this
.
richEditSupport
=
new
RichEditSupport
(
this
.
getId
(),
null
,
{
brackets
:
[[
'
{
'
,
'
}
'
],
[
'
[
'
,
'
]
'
],
[
'
(
'
,
'
)
'
],
[
'
<
'
,
'
>
'
]],
autoClosingPairs
:
[
{
open
:
'
"
'
,
close
:
'
"
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
\'
'
,
close
:
'
\'
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
{
'
,
close
:
'
}
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
[
'
,
close
:
'
]
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
(
'
,
close
:
'
)
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
{
open
:
'
<
'
,
close
:
'
>
'
,
notIn
:
[
'
string
'
,
'
comment
'
]
},
],
__electricCharacterSupport
:
{
caseInsensitive
:
true
,
embeddedElectricCharacters
:
[]
}
});
modes
.
LinkProviderRegistry
.
register
(
this
.
getId
(),
{
provideLinks
:
(
model
,
token
):
Thenable
<
modes
.
ILink
[]
>
=>
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录