mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 10:25:42 +01:00
Format sample code
This commit is contained in:
parent
c620a60f78
commit
65473735f8
2 changed files with 39 additions and 34 deletions
|
|
@ -49,7 +49,8 @@ var commandId = editor.addCommand(0, function() {
|
|||
|
||||
monaco.languages.registerCodeLensProvider('json', {
|
||||
provideCodeLenses: function (model, token) {
|
||||
return [
|
||||
return {
|
||||
lenses: [
|
||||
{
|
||||
range: {
|
||||
startLineNumber: 1,
|
||||
|
|
@ -63,13 +64,15 @@ monaco.languages.registerCodeLensProvider('json', {
|
|||
title: "First Line"
|
||||
}
|
||||
}
|
||||
];
|
||||
]
|
||||
};
|
||||
},
|
||||
resolveCodeLens: function (model, codeLens, token) {
|
||||
return codeLens;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/*----------------------------------------SAMPLE JS END*/
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,8 @@ var commandId = editor.addCommand(0, function() {
|
|||
|
||||
monaco.languages.registerCodeLensProvider('json', {
|
||||
provideCodeLenses: function (model, token) {
|
||||
return {lenses: [
|
||||
return {
|
||||
lenses: [
|
||||
{
|
||||
range: {
|
||||
startLineNumber: 1,
|
||||
|
|
@ -25,7 +26,8 @@ monaco.languages.registerCodeLensProvider('json', {
|
|||
title: "First Line"
|
||||
}
|
||||
}
|
||||
]};
|
||||
]
|
||||
};
|
||||
},
|
||||
resolveCodeLens: function (model, codeLens, token) {
|
||||
return codeLens;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue