File tree 7 files changed +110
-0
lines changed
7 files changed +110
-0
lines changed Original file line number Diff line number Diff line change
1
+ // A launch configuration that launches the extension inside a new window
2
+ // Use IntelliSense to learn about possible attributes.
3
+ // Hover to view descriptions of existing attributes.
4
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
+ {
6
+ "version" : " 0.2.0" ,
7
+ "configurations" : [
8
+ {
9
+ "name" : " Extension" ,
10
+ "type" : " extensionHost" ,
11
+ "request" : " launch" ,
12
+ "runtimeExecutable" : " ${execPath}" ,
13
+ "args" : [
14
+ " --extensionDevelopmentPath=${workspaceFolder}"
15
+ ]
16
+ }
17
+ ]
18
+ }
Original file line number Diff line number Diff line change
1
+ .vscode /**
2
+ .vscode-test /**
3
+ .gitignore
Original file line number Diff line number Diff line change
1
+ # Change Log
2
+
3
+ All notable changes to the "pfsnippets" extension will be documented in this file.
4
+
5
+ Check [ Keep a Changelog] ( http://keepachangelog.com/ ) for recommendations on how to structure this file.
6
+
7
+ ## [ Unreleased]
8
+
9
+ - Initial release
Original file line number Diff line number Diff line change
1
+ # pf snippets
2
+
3
+ Followed this guide to create the extension:
4
+ https://blog.lftechnology.com/build-your-own-vs-code-snippet-extension-e8faa76eb9c6
5
+
6
+ ## What's in the folder
7
+
8
+ * This folder contains all of the files necessary for your extension.
9
+ * ` package.json ` - this is the manifest file that defines the location of the snippet file and specifies the language of the snippets.
10
+ * ` snippets/react.json ` - the file containing all react snippets.
11
+ * ` snippets/core.json ` - the file containing all core snippets.
12
+
13
+ ## Get up and running straight away
14
+
15
+ * Press ` F5 ` to open a new window with your extension loaded.
16
+ * Create a new file with a file name suffix matching your language.
17
+ * Verify that your snippets are proposed on intellisense.
18
+
19
+ ## Make changes
20
+
21
+ * You can relaunch the extension from the debug toolbar after making changes to the files listed above.
22
+ * You can also reload (` Ctrl+R ` or ` Cmd+R ` on Mac) the VS Code window with your extension to load your changes.
23
+
24
+ ## Install your extension
25
+
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.
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " patternfly-snippets" ,
3
+ "displayName" : " PatternFly Snippets" ,
4
+ "description" : " PatternFly code snippets" ,
5
+ "version" : " 0.0.1" ,
6
+ "engines" : {
7
+ "vscode" : " ^1.41.0"
8
+ },
9
+ "categories" : [
10
+ " Snippets"
11
+ ],
12
+ "contributes" : {
13
+ "snippets" : [
14
+ {
15
+ "language" : " html" ,
16
+ "path" : " ./snippets/core.json"
17
+ },
18
+ {
19
+ "language" : " javascript" ,
20
+ "path" : " ./snippets/react.json"
21
+ },
22
+ {
23
+ "language" : " javascriptreact" ,
24
+ "path" : " ./snippets/react.json"
25
+ },
26
+ {
27
+ "language" : " typescript" ,
28
+ "path" : " ./snippets/react.json"
29
+ },
30
+ {
31
+ "language" : " typescriptreact" ,
32
+ "path" : " ./snippets/react.json"
33
+ }
34
+ ]
35
+ }
36
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "CSS Snippet" : {
3
+ "prefix" : " !css" ,
4
+ "body" : [
5
+ " <link rel=\" stylesheet\" type=\" text/css\" media=\" screen\" href=\" ${1:dir}/patternfly.css\" />" ,
6
+ " <link rel=\" stylesheet\" type=\" text/css\" media=\" screen\" href=\" ${1:dir}/patternfly-addons.css\" />"
7
+ ],
8
+ "description" : " css files for PF"
9
+ },
10
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "React Bind Snippet" : {
3
+ "prefix" : " !bind" ,
4
+ "body" : " this.${foo} = this.${foo}.bind(this)" ,
5
+ "description" : " this binding for react"
6
+ }
7
+ }
You can’t perform that action at this time.
0 commit comments