Skip to content

Commit 8c8beb7

Browse files
committed
project: initial commit
0 parents  commit 8c8beb7

File tree

8 files changed

+200
-0
lines changed

8 files changed

+200
-0
lines changed

.vscode/launch.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// A launch configuration that launches the extension inside a new window
2+
{
3+
"version": "0.1.0",
4+
"configurations": [
5+
{
6+
"name": "Launch Extension",
7+
"type": "extensionHost",
8+
"request": "launch",
9+
"runtimeExecutable": "${execPath}",
10+
"args": ["--extensionDevelopmentPath=${workspaceRoot}" ]
11+
}
12+
]
13+
}

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Change Log
2+
All notable changes to the "vscode-graphql" extension will be documented in this file.
3+
4+
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
5+
6+
## [Unreleased]
7+
- Initial release

README.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# vscode-graphql README
2+
3+
This is the README for your extension "vscode-graphql". After writing up a brief description, we recommend including the following sections.
4+
5+
## Features
6+
7+
Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file.
8+
9+
For example if there is an image subfolder under your extension project workspace:
10+
11+
\!\[feature X\]\(images/feature-x.png\)
12+
13+
> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow.
14+
15+
## Requirements
16+
17+
If you have any requirements or dependencies, add a section describing those and how to install and configure them.
18+
19+
## Extension Settings
20+
21+
Include if your extension adds any VS Code settings through the `contributes.configuration` extension point.
22+
23+
For example:
24+
25+
This extension contributes the following settings:
26+
27+
* `myExtension.enable`: enable/disable this extension
28+
* `myExtension.thing`: set to `blah` to do something
29+
30+
## Known Issues
31+
32+
Calling out known issues can help limit users opening duplicate issues against your extension.
33+
34+
## Release Notes
35+
36+
Users appreciate release notes as you update your extension.
37+
38+
### 1.0.0
39+
40+
Initial release of ...
41+
42+
### 1.0.1
43+
44+
Fixed issue #.
45+
46+
### 1.1.0
47+
48+
Added features X, Y, and Z.
49+
50+
-----------------------------------------------------------------------------------------------------------
51+
52+
## Working with Markdown
53+
54+
**Note:** You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:
55+
56+
* Split the editor (`Cmd+\` on OSX or `Ctrl+\` on Windows and Linux)
57+
* Toggle preview (`Shift+CMD+V` on OSX or `Shift+Ctrl+V` on Windows and Linux)
58+
* Press `Ctrl+Space` (Windows, Linux) or `Cmd+Space` (OSX) to see a list of Markdown snippets
59+
60+
### For more information
61+
62+
* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown)
63+
* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/)
64+
65+
**Enjoy!**

language-configuration.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"comments": {
3+
// symbol used for single line comment. Remove this entry if your language does not support line comments
4+
"lineComment": "//",
5+
// symbols used for start and end a block comment. Remove this entry if your language does not support block comments
6+
"blockComment": [ "/*", "*/" ]
7+
},
8+
// symbols used as brackets
9+
"brackets": [
10+
["{", "}"],
11+
["[", "]"],
12+
["(", ")"]
13+
],
14+
// symbols that are auto closed when typing
15+
"autoClosingPairs": [
16+
["{", "}"],
17+
["[", "]"],
18+
["(", ")"],
19+
["\"", "\""],
20+
["'", "'"]
21+
],
22+
// symbols that that can be used to surround a selection
23+
"surroundingPairs": [
24+
["{", "}"],
25+
["[", "]"],
26+
["(", ")"],
27+
["\"", "\""],
28+
["'", "'"]
29+
]
30+
}

package.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"name": "vscode-graphql",
3+
"displayName": "vscode-graphql",
4+
"description": "",
5+
"version": "0.0.1",
6+
"publisher": "idk",
7+
"engines": {
8+
"vscode": "^1.13.0"
9+
},
10+
"categories": [
11+
"Languages"
12+
],
13+
"contributes": {
14+
"languages": [{
15+
"id": "graphql",
16+
"aliases": ["GraphQL", "graphql"],
17+
"extensions": [".graphql"],
18+
"configuration": "./language-configuration.json"
19+
}],
20+
"grammars": [{
21+
"language": "graphql",
22+
"scopeName": "source.graphql",
23+
"path": "./syntaxes/graphql.tmLanguage.json"
24+
}]
25+
}
26+
}

syntaxes/graphql.tmLanguage.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
3+
"name": "GraphQL",
4+
"patterns": [
5+
{
6+
"include": "#keywords"
7+
},
8+
{
9+
"include": "#strings"
10+
}
11+
],
12+
"repository": {
13+
"keywords": {
14+
"patterns": [{
15+
"name": "keyword.control.graphql",
16+
"match": "\\b(if|while|for|return)\\b"
17+
}]
18+
},
19+
"strings": {
20+
"name": "string.quoted.double.graphql",
21+
"begin": "\"",
22+
"end": "\"",
23+
"patterns": [
24+
{
25+
"name": "constant.character.escape.graphql",
26+
"match": "\\\\."
27+
}
28+
]
29+
}
30+
},
31+
"scopeName": "source.graphql"
32+
}

test/example.graphql

Whitespace-only changes.

vsc-extension-quickstart.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Welcome to your VS Code Extension
2+
3+
## What's in the folder
4+
* This folder contains all of the files necessary for your extension
5+
* `package.json` - this is the manifest file in which you declare your language support and define
6+
the location of the grammar file that has been copied into you extension.
7+
* `syntaxes/graphql.tmLanguage.json` - this is the Text mate grammar file that is used for tokenization
8+
* `language-configuration.json` - this the language configuration, defining the tokens that are used for
9+
comments and brackets.
10+
11+
## Get up and running straight away
12+
* Make sure the language configuration settings in `language-configuration.json` are accurate
13+
* press `F5` to open a new window with your extension loaded
14+
* create a new file with a file name suffix matching your language
15+
* verify that syntax highlight works and that the language configuration settings are working
16+
17+
## Make changes
18+
* you can relaunch the extension from the debug toolbar after making changes to the files listed above
19+
* you can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes
20+
21+
## Add more language features
22+
* To add features such as intellisense, hovers and validators check out the VS Code extenders documentation at
23+
https://code.visualstudio.com/docs
24+
25+
## Install your extension
26+
* To start using your extension with Visual Studio Code copy it into the `<user home>/.vscode/extensions` folder and restart Code.
27+
* To share your extension with the world, read on https://code.visualstudio.com/docs about publishing an extension.

0 commit comments

Comments
 (0)