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": { "files.exclude": {
"**/out": false // set this to true to hide the "out" folder with the compiled JS files "**/out": false // set this to true to hide the "out" folder with the compiled JS files
}, },
"search.exclude": { "search.exclude": {
"**/out": true "**/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", "name": "Locations",
"scopeName": "source.locations", "scopeName": "source.locations",
"patterns": [ "patterns": [
{ {
"name": "comment.line.file", "name": "comment.line.file",
"match": "file:.*$" "match": "file:.*$"
}, },
{ {
"name": "keyword.locations", "name": "keyword.locations",
"match": " \\d+:" "match": " \\d+:"
}, },
{ {
"name": "keyword.control.locations", "name": "keyword.control.locations",
"match": " \\d+" "match": " \\d+"
} }
] ]
} }
136 changes: 68 additions & 68 deletions contentprovider-sample/package.json
@@ -1,70 +1,70 @@
{ {
"name": "references-plusplus", "name": "references-plusplus",
"displayName": "References++", "displayName": "References++",
"description": "Show the results of 'Find References' as formatted text in an editor", "description": "Show the results of 'Find References' as formatted text in an editor",
"version": "0.0.5", "version": "0.0.5",
"publisher": "jrieken", "publisher": "jrieken",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/Microsoft/vscode-extension-samples" "url": "https://github.com/Microsoft/vscode-extension-samples"
}, },
"bugs": { "bugs": {
"url": "https://github.com/Microsoft/vscode-extension-samples/issues" "url": "https://github.com/Microsoft/vscode-extension-samples/issues"
}, },
"engines": { "engines": {
"vscode": "^1.4.0" "vscode": "^1.4.0"
}, },
"categories": [ "categories": [
"Other" "Other"
], ],
"activationEvents": [ "activationEvents": [
"onCommand:editor.printReferences" "onCommand:editor.printReferences"
], ],
"main": "./out/extension", "main": "./out/extension",
"contributes": { "contributes": {
"commands": [ "commands": [
{ {
"command": "editor.printReferences", "command": "editor.printReferences",
"title": "Show All References" "title": "Show All References"
} }
], ],
"menus": { "menus": {
"editor/context": [ "editor/context": [
{ {
"command": "editor.printReferences", "command": "editor.printReferences",
"when": "editorHasReferenceProvider", "when": "editorHasReferenceProvider",
"group": "navigation@1.31" "group": "navigation@1.31"
} }
] ]
}, },
"languages": [ "languages": [
{ {
"id": "locations", "id": "locations",
"aliases": [ "aliases": [
"Locations" "Locations"
], ],
"extensions": [ "extensions": [
".locations" ".locations"
] ]
} }
], ],
"grammars": [ "grammars": [
{ {
"language": "locations", "language": "locations",
"path": "./locations-syntax.json", "path": "./locations-syntax.json",
"scopeName": "source.locations" "scopeName": "source.locations"
} }
] ]
}, },
"scripts": { "scripts": {
"vscode:prepublish": "node ./node_modules/vscode/bin/compile", "vscode:prepublish": "node ./node_modules/vscode/bin/compile",
"compile": "node ./node_modules/vscode/bin/compile -watch -p ./", "compile": "node ./node_modules/vscode/bin/compile -watch -p ./",
"postinstall": "node ./node_modules/vscode/bin/install" "postinstall": "node ./node_modules/vscode/bin/install"
}, },
"devDependencies": { "devDependencies": {
"tslint": "^3.8.1", "tslint": "^3.8.1",
"typescript": "^1.8.5", "typescript": "^2.1.4",
"vscode": "^1.0.0", "vscode": "^1.0.0",
"@types/node": "^6.0.40" "@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) { export function activate(context: ExtensionContext) {


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


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


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


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

0 comments on commit fcbdfc9

Please sign in to comment.