Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
徽霖
Vscode
提交
76989b38
V
Vscode
项目概览
徽霖
/
Vscode
通知
9
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,发现更多精彩内容 >>
提交
76989b38
编写于
11月 27, 2017
作者:
M
Martin Aeschlimann
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixes for jsonc mode. Fixes #39199
上级
936f4f6a
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
18 addition
and
16 deletion
+18
-16
extensions/configuration-editing/package.json
extensions/configuration-editing/package.json
+1
-1
extensions/configuration-editing/src/extension.ts
extensions/configuration-editing/src/extension.ts
+2
-2
extensions/json/package.json
extensions/json/package.json
+1
-1
extensions/json/server/package.json
extensions/json/server/package.json
+1
-1
extensions/json/server/src/jsonServerMain.ts
extensions/json/server/src/jsonServerMain.ts
+1
-1
extensions/json/server/yarn.lock
extensions/json/server/yarn.lock
+3
-3
src/vs/base/common/jsonSchema.ts
src/vs/base/common/jsonSchema.ts
+1
-0
src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts
...parts/debug/electron-browser/debugConfigurationManager.ts
+1
-1
src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts
...rkbench/parts/preferences/browser/preferencesRenderers.ts
+1
-1
src/vs/workbench/parts/preferences/browser/preferencesService.ts
...workbench/parts/preferences/browser/preferencesService.ts
+3
-3
src/vs/workbench/parts/preferences/common/preferencesContribution.ts
...bench/parts/preferences/common/preferencesContribution.ts
+1
-1
src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.ts
.../parts/snippets/electron-browser/snippets.contribution.ts
+1
-0
src/vs/workbench/parts/themes/electron-browser/themes.contribution.ts
...ench/parts/themes/electron-browser/themes.contribution.ts
+1
-1
未找到文件。
extensions/configuration-editing/package.json
浏览文件 @
76989b38
...
...
@@ -10,7 +10,7 @@
"Other"
],
"activationEvents"
:
[
"onLanguage:json"
"onLanguage:json"
,
"onLanguage:jsonc"
],
"main"
:
"./out/extension"
,
"scripts"
:
{
...
...
extensions/configuration-editing/src/extension.ts
浏览文件 @
76989b38
...
...
@@ -60,7 +60,7 @@ function registerKeybindingsCompletions(): vscode.Disposable {
}
function
registerSettingsCompletions
():
vscode
.
Disposable
{
return
vscode
.
languages
.
registerCompletionItemProvider
({
language
:
'
json
'
,
pattern
:
'
**/settings.json
'
},
{
return
vscode
.
languages
.
registerCompletionItemProvider
({
language
:
'
json
c
'
,
pattern
:
'
**/settings.json
'
},
{
provideCompletionItems
(
document
,
position
,
token
)
{
return
new
SettingsDocument
(
document
).
provideCompletionItems
(
position
,
token
);
}
...
...
@@ -173,7 +173,7 @@ function updateLaunchJsonDecorations(editor: vscode.TextEditor | undefined): voi
editor
.
setDecorations
(
decoration
,
ranges
);
}
vscode
.
languages
.
registerDocumentSymbolProvider
({
pattern
:
'
**/launch.json
'
,
language
:
'
json
'
},
{
vscode
.
languages
.
registerDocumentSymbolProvider
({
pattern
:
'
**/launch.json
'
,
language
:
'
json
c
'
},
{
provideDocumentSymbols
(
document
:
vscode
.
TextDocument
,
token
:
vscode
.
CancellationToken
):
vscode
.
ProviderResult
<
vscode
.
SymbolInformation
[]
>
{
const
result
:
vscode
.
SymbolInformation
[]
=
[];
let
name
:
string
=
''
;
...
...
extensions/json/package.json
浏览文件 @
76989b38
...
...
@@ -56,7 +56,7 @@
"filenames"
:
[
"settings.json"
,
"launch.json"
,
"
debug
.json"
,
"
tasks
.json"
,
"keybindings.json"
],
"configuration"
:
"./language-configuration.json"
...
...
extensions/json/server/package.json
浏览文件 @
76989b38
...
...
@@ -10,7 +10,7 @@
"dependencies"
:
{
"jsonc-parser"
:
"^1.0.0"
,
"request-light"
:
"^0.2.1"
,
"vscode-json-languageservice"
:
"^3.0.
2
"
,
"vscode-json-languageservice"
:
"^3.0.
3
"
,
"vscode-languageserver"
:
"^3.5.0"
,
"vscode-nls"
:
"^2.0.2"
,
"vscode-uri"
:
"^1.0.1"
...
...
extensions/json/server/src/jsonServerMain.ts
浏览文件 @
76989b38
...
...
@@ -161,7 +161,7 @@ connection.onDidChangeConfiguration((change) => {
let
enableFormatter
=
settings
&&
settings
.
json
&&
settings
.
json
.
format
&&
settings
.
json
.
format
.
enable
;
if
(
enableFormatter
)
{
if
(
!
formatterRegistration
)
{
formatterRegistration
=
connection
.
client
.
register
(
DocumentRangeFormattingRequest
.
type
,
{
documentSelector
:
[{
language
:
'
json
'
}]
});
formatterRegistration
=
connection
.
client
.
register
(
DocumentRangeFormattingRequest
.
type
,
{
documentSelector
:
[{
language
:
'
json
'
}
,
{
language
:
'
jsonc
'
}
]
});
}
}
else
if
(
formatterRegistration
)
{
formatterRegistration
.
then
(
r
=>
r
.
dispose
());
...
...
extensions/json/server/yarn.lock
浏览文件 @
76989b38
...
...
@@ -52,9 +52,9 @@ request-light@^0.2.1:
https-proxy-agent "^0.3.5"
vscode-nls "^2.0.2"
vscode-json-languageservice@^3.0.
2
:
version "3.0.
2
"
resolved "https://registry.yarnpkg.com/vscode-json-languageservice/-/vscode-json-languageservice-3.0.
2.tgz#66762127f24d32709ea5f410c58080ed8059d1e2
"
vscode-json-languageservice@^3.0.
3
:
version "3.0.
3
"
resolved "https://registry.yarnpkg.com/vscode-json-languageservice/-/vscode-json-languageservice-3.0.
3.tgz#d865450a86dd3229bfac83a4245b38281e2dffb3
"
dependencies:
jsonc-parser "^1.0.0"
vscode-languageserver-types "^3.5.0"
...
...
src/vs/base/common/jsonSchema.ts
浏览文件 @
76989b38
...
...
@@ -55,6 +55,7 @@ export interface IJSONSchema {
markdownEnumDescriptions
?:
string
[];
// VSCode extension
markdownDescription
?:
string
;
// VSCode extension
doNotSuggest
?:
boolean
;
// VSCode extension
allowComments
?:
boolean
;
// VSCode extension
}
export
interface
IJSONSchemaMap
{
...
...
src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts
浏览文件 @
76989b38
...
...
@@ -379,7 +379,7 @@ export class ConfigurationManager implements IConfigurationManager {
public
canSetBreakpointsIn
(
model
:
IModel
):
boolean
{
const
modeId
=
model
?
model
.
getLanguageIdentifier
().
language
:
null
;
if
(
!
modeId
||
modeId
===
'
json
'
)
{
if
(
!
modeId
||
modeId
===
'
json
c
'
)
{
// do not allow breakpoints in our settings files
return
false
;
}
...
...
src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts
浏览文件 @
76989b38
...
...
@@ -606,7 +606,7 @@ export class FeedbackWidgetRenderer extends Disposable {
JSON
.
stringify
(
feedbackQuery
,
undefined
,
'
'
)
+
'
\n\n
'
+
actualResultNames
.
map
(
name
=>
`//
${
name
}
:
${
result
.
metadata
.
scoredResults
[
name
]}
`
).
join
(
'
\n
'
);
this
.
editorService
.
openEditor
({
contents
,
language
:
'
json
'
},
/*sideBySide=*/
true
).
then
(
feedbackEditor
=>
{
this
.
editorService
.
openEditor
({
contents
,
language
:
'
json
c
'
},
/*sideBySide=*/
true
).
then
(
feedbackEditor
=>
{
const
sendFeedbackWidget
=
this
.
_register
(
this
.
instantiationService
.
createInstance
(
FloatingClickWidget
,
feedbackEditor
.
getControl
(),
'
Send feedback
'
,
null
));
sendFeedbackWidget
.
render
();
...
...
src/vs/workbench/parts/preferences/browser/preferencesService.ts
浏览文件 @
76989b38
...
...
@@ -111,7 +111,7 @@ export class PreferencesService extends Disposable implements IPreferencesServic
if
(
this
.
isDefaultSettingsResource
(
uri
)
||
this
.
isDefaultResourceSettingsResource
(
uri
))
{
const
scope
=
this
.
isDefaultSettingsResource
(
uri
)
?
ConfigurationScope
.
WINDOW
:
ConfigurationScope
.
RESOURCE
;
const
mode
=
this
.
modeService
.
getOrCreateMode
(
'
json
'
);
const
mode
=
this
.
modeService
.
getOrCreateMode
(
'
json
c
'
);
const
model
=
this
.
_register
(
this
.
modelService
.
createModel
(
''
,
mode
,
uri
));
let
defaultSettings
:
DefaultSettings
;
...
...
@@ -139,14 +139,14 @@ export class PreferencesService extends Disposable implements IPreferencesServic
if
(
this
.
defaultSettingsRawResource
.
toString
()
===
uri
.
toString
())
{
let
defaultSettings
:
DefaultSettings
=
this
.
getDefaultSettings
(
ConfigurationScope
.
WINDOW
);
const
mode
=
this
.
modeService
.
getOrCreateMode
(
'
json
'
);
const
mode
=
this
.
modeService
.
getOrCreateMode
(
'
json
c
'
);
const
model
=
this
.
_register
(
this
.
modelService
.
createModel
(
defaultSettings
.
raw
,
mode
,
uri
));
return
TPromise
.
as
(
model
);
}
if
(
this
.
defaultKeybindingsResource
.
toString
()
===
uri
.
toString
())
{
const
defaultKeybindingsEditorModel
=
this
.
instantiationService
.
createInstance
(
DefaultKeybindingsEditorModel
,
uri
);
const
mode
=
this
.
modeService
.
getOrCreateMode
(
'
json
'
);
const
mode
=
this
.
modeService
.
getOrCreateMode
(
'
json
c
'
);
const
model
=
this
.
_register
(
this
.
modelService
.
createModel
(
defaultKeybindingsEditorModel
.
content
,
mode
,
uri
));
return
TPromise
.
as
(
model
);
}
...
...
src/vs/workbench/parts/preferences/common/preferencesContribution.ts
浏览文件 @
76989b38
...
...
@@ -125,7 +125,7 @@ export class PreferencesContribution implements IWorkbenchContribution {
let
schema
=
schemaRegistry
.
getSchemaContributions
().
schemas
[
uri
.
toString
()];
if
(
schema
)
{
const
modelContent
=
JSON
.
stringify
(
schema
);
const
mode
=
this
.
modeService
.
getOrCreateMode
(
'
json
'
);
const
mode
=
this
.
modeService
.
getOrCreateMode
(
'
json
c
'
);
const
model
=
this
.
modelService
.
createModel
(
modelContent
,
mode
,
uri
);
let
disposables
=
[];
...
...
src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.ts
浏览文件 @
76989b38
...
...
@@ -210,6 +210,7 @@ export class Snippet {
const
schemaId
=
'
vscode://schemas/snippets
'
;
const
schema
:
IJSONSchema
=
{
'
id
'
:
schemaId
,
'
allowComments
'
:
true
,
'
defaultSnippets
'
:
[{
'
label
'
:
nls
.
localize
(
'
snippetSchema.json.default
'
,
"
Empty snippet
"
),
'
body
'
:
{
'
${1:snippetName}
'
:
{
'
prefix
'
:
'
${2:prefix}
'
,
'
body
'
:
'
${3:snippet}
'
,
'
description
'
:
'
${4:description}
'
}
}
...
...
src/vs/workbench/parts/themes/electron-browser/themes.contribution.ts
浏览文件 @
76989b38
...
...
@@ -198,7 +198,7 @@ class GenerateColorThemeAction extends Action {
colors
:
resultingColors
,
tokenColors
:
theme
.
tokenColors
},
null
,
'
\t
'
);
return
this
.
editorService
.
openEditor
({
contents
,
language
:
'
json
'
});
return
this
.
editorService
.
openEditor
({
contents
,
language
:
'
json
c
'
});
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录