Skip to content

Commit

Permalink
format ts and json files
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed Dec 30, 2016
1 parent ee1898b commit fcbdfc9
Show file tree
Hide file tree
Showing 33 changed files with 923 additions and 924 deletions.
8 changes: 5 additions & 3 deletions .vscode/settings.json
@@ -1,9 +1,11 @@
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"**/out": false // set this to true to hide the "out" folder with the compiled JS files
},
"search.exclude": {
"**/out": true
}
}
},
"editor.formatOnSave": true,
"editor.useTabStops": true,
"editor.tabSize": 4
}
32 changes: 16 additions & 16 deletions contentprovider-sample/locations-syntax.json
@@ -1,18 +1,18 @@
{
"name": "Locations",
"scopeName": "source.locations",
"patterns": [
{
"name": "comment.line.file",
"match": "file:.*$"
},
{
"name": "keyword.locations",
"match": " \\d+:"
},
{
"name": "keyword.control.locations",
"match": " \\d+"
}
]
"name": "Locations",
"scopeName": "source.locations",
"patterns": [
{
"name": "comment.line.file",
"match": "file:.*$"
},
{
"name": "keyword.locations",
"match": " \\d+:"
},
{
"name": "keyword.control.locations",
"match": " \\d+"
}
]
}
136 changes: 68 additions & 68 deletions contentprovider-sample/package.json
@@ -1,70 +1,70 @@
{
"name": "references-plusplus",
"displayName": "References++",
"description": "Show the results of 'Find References' as formatted text in an editor",
"version": "0.0.5",
"publisher": "jrieken",
"repository": {
"type": "git",
"url": "https://github.com/Microsoft/vscode-extension-samples"
},
"bugs": {
"url": "https://github.com/Microsoft/vscode-extension-samples/issues"
},
"engines": {
"vscode": "^1.4.0"
},
"categories": [
"Other"
],
"activationEvents": [
"onCommand:editor.printReferences"
],
"main": "./out/extension",
"contributes": {
"commands": [
{
"command": "editor.printReferences",
"title": "Show All References"
}
],
"menus": {
"editor/context": [
{
"command": "editor.printReferences",
"when": "editorHasReferenceProvider",
"group": "navigation@1.31"
}
]
},
"languages": [
{
"id": "locations",
"aliases": [
"Locations"
],
"extensions": [
".locations"
]
}
],
"grammars": [
{
"language": "locations",
"path": "./locations-syntax.json",
"scopeName": "source.locations"
}
]
},
"scripts": {
"vscode:prepublish": "node ./node_modules/vscode/bin/compile",
"compile": "node ./node_modules/vscode/bin/compile -watch -p ./",
"postinstall": "node ./node_modules/vscode/bin/install"
},
"devDependencies": {
"tslint": "^3.8.1",
"typescript": "^1.8.5",
"vscode": "^1.0.0",
"@types/node": "^6.0.40"
}
"name": "references-plusplus",
"displayName": "References++",
"description": "Show the results of 'Find References' as formatted text in an editor",
"version": "0.0.5",
"publisher": "jrieken",
"repository": {
"type": "git",
"url": "https://github.com/Microsoft/vscode-extension-samples"
},
"bugs": {
"url": "https://github.com/Microsoft/vscode-extension-samples/issues"
},
"engines": {
"vscode": "^1.4.0"
},
"categories": [
"Other"
],
"activationEvents": [
"onCommand:editor.printReferences"
],
"main": "./out/extension",
"contributes": {
"commands": [
{
"command": "editor.printReferences",
"title": "Show All References"
}
],
"menus": {
"editor/context": [
{
"command": "editor.printReferences",
"when": "editorHasReferenceProvider",
"group": "navigation@1.31"
}
]
},
"languages": [
{
"id": "locations",
"aliases": [
"Locations"
],
"extensions": [
".locations"
]
}
],
"grammars": [
{
"language": "locations",
"path": "./locations-syntax.json",
"scopeName": "source.locations"
}
]
},
"scripts": {
"vscode:prepublish": "node ./node_modules/vscode/bin/compile",
"compile": "node ./node_modules/vscode/bin/compile -watch -p ./",
"postinstall": "node ./node_modules/vscode/bin/install"
},
"devDependencies": {
"tslint": "^3.8.1",
"typescript": "^2.1.4",
"vscode": "^1.0.0",
"@types/node": "^6.0.40"
}
}
36 changes: 18 additions & 18 deletions contentprovider-sample/src/extension.ts
Expand Up @@ -8,25 +8,25 @@ import ContentProvider, { encodeLocation } from './provider';

export function activate(context: ExtensionContext) {

const provider = new ContentProvider();
const provider = new ContentProvider();

// register content provider for scheme `references`
// register document link provider for scheme `references`
const providerRegistrations = Disposable.from(
workspace.registerTextDocumentContentProvider(ContentProvider.scheme, provider),
languages.registerDocumentLinkProvider({ scheme: ContentProvider.scheme }, provider)
);
// register content provider for scheme `references`
// register document link provider for scheme `references`
const providerRegistrations = Disposable.from(
workspace.registerTextDocumentContentProvider(ContentProvider.scheme, provider),
languages.registerDocumentLinkProvider({ scheme: ContentProvider.scheme }, provider)
);

// register command that crafts an uri with the `references` scheme,
// open the dynamic document, and shows it in the next editor
const commandRegistration = commands.registerTextEditorCommand('editor.printReferences', editor => {
const uri = encodeLocation(editor.document.uri, editor.selection.active);
return workspace.openTextDocument(uri).then(doc => window.showTextDocument(doc, editor.viewColumn + 1));
});
// register command that crafts an uri with the `references` scheme,
// open the dynamic document, and shows it in the next editor
const commandRegistration = commands.registerTextEditorCommand('editor.printReferences', editor => {
const uri = encodeLocation(editor.document.uri, editor.selection.active);
return workspace.openTextDocument(uri).then(doc => window.showTextDocument(doc, editor.viewColumn + 1));
});

context.subscriptions.push(
provider,
commandRegistration,
providerRegistrations
);
context.subscriptions.push(
provider,
commandRegistration,
providerRegistrations
);
}

0 comments on commit fcbdfc9

Please sign in to comment.