diff --git a/README.md b/README.md index 0e0cca6..3feca45 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,8 @@ -# Scala Syntax +# Scala Syntax and Snippets +Visual Studio Code extensions that provide Scala syntax and snippets. -[VS Code plugin](https://marketplace.visualstudio.com/items?itemName=nicolasstucki.scala) +Refer to the READMEs in the respective directories: -## Features +- [Scala Syntax](/syntax) +- [Scala Snippets](/snippets) -Extension providing Scala syntax and code snippets. - -## Requirements - -No requirements. - -## Based on -* Plugin: https://github.com/daltonjorge/vscode-scala -* Template: https://github.com/sellmerfud/scala.tmbundle (https://github.com/mads-hartmann/scala.tmbundle) - -## License -[MIT](LICENSE) - ------------------------------------------------------------------------------------------------------------ diff --git a/snippets/.vscode/launch.json b/snippets/.vscode/launch.json new file mode 100644 index 0000000..5901239 --- /dev/null +++ b/snippets/.vscode/launch.json @@ -0,0 +1,13 @@ +// A launch configuration that launches the extension inside a new window +{ + "version": "0.1.0", + "configurations": [ + { + "name": "Launch Extension", + "type": "extensionHost", + "request": "launch", + "runtimeExecutable": "${execPath}", + "args": ["--extensionDevelopmentPath=${workspaceRoot}" ] + } + ] +} diff --git a/snippets/README.md b/snippets/README.md new file mode 100644 index 0000000..89f7abf --- /dev/null +++ b/snippets/README.md @@ -0,0 +1,16 @@ +# Scala Snippets + +[VS Code plugin](https://marketplace.visualstudio.com/items?itemName=scala-lang.scala-snippets) + +## Features + +Extension providing Scala code snippets. + +## Requirements + +- [Scala Syntax](https://marketplace.visualstudio.com/items?itemName=scala-lang.scala) + +## License +[MIT](LICENSE) + +----------------------------------------------------------------------------------------------------------- diff --git a/images/smooth-spiral.png b/snippets/images/smooth-spiral.png similarity index 100% rename from images/smooth-spiral.png rename to snippets/images/smooth-spiral.png diff --git a/snippets/package.json b/snippets/package.json new file mode 100644 index 0000000..6096737 --- /dev/null +++ b/snippets/package.json @@ -0,0 +1,31 @@ +{ + "name": "scala", + "displayName": "Scala Snippets", + "description": "Scala Snippets", + "version": "0.1.0", + "publisher": "scala-lang", + "license": "SEE LICENSE IN LICENSE.md", + "engines": { + "vscode": "^1.5.0" + }, + "homepage": "https://github.com/scala/vscode-scala-syntax/blob/master/snippets/README.md", + "repository": { + "type": "git", + "url": "https://github.com/scala/vscode-scala-syntax.git" + }, + "icon": "images/smooth-spiral.png", + "categories": [ + "Snippets" + ], + "contributes": { + "snippets": [ + { + "language": "scala", + "path": "./snippets.json" + } + ] + }, + "extensionDependencies": [ + "scala-lang.scala" + ] +} diff --git a/snippets/scala.json b/snippets/snippets.json similarity index 100% rename from snippets/scala.json rename to snippets/snippets.json diff --git a/snippets/vsc-extension-quickstart.md b/snippets/vsc-extension-quickstart.md new file mode 100644 index 0000000..627bcc1 --- /dev/null +++ b/snippets/vsc-extension-quickstart.md @@ -0,0 +1,24 @@ +# Welcome to your VS Code Extension + +## What's in the folder +* This folder contains all of the files necessary for your extension +* `package.json` - this is the manifest file in which you declare your language support and define +the location of the grammar file that has been copied into you extension. +* `snippets.json` - this is the file defining the snippets + +## Get up and running straight away +* press `F5` to open a new window with your extension loaded +* create a new file with a file name suffix matching your language +* verify that syntax highlight works and that the language configuration settings are working + +## Make changes +* you can relaunch the extension from the debug toolbar after making changes to the files listed above +* you can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes + +## Add more language features +* To add features such as intellisense, hovers and validators check out the VS Code extenders documentation at +https://code.visualstudio.com/docs + +## Install your extension +* To start using your extension with Visual Studio Code copy it into the /.vscode/extensions folder and restart Code. +* To share your extension with the world, read on https://code.visualstudio.com/docs about publishing an extension. diff --git a/.vscode/launch.json b/syntax/.vscode/launch.json similarity index 100% rename from .vscode/launch.json rename to syntax/.vscode/launch.json diff --git a/syntax/README.md b/syntax/README.md new file mode 100644 index 0000000..c60b14a --- /dev/null +++ b/syntax/README.md @@ -0,0 +1,20 @@ +# Scala Syntax + +[VS Code plugin](https://marketplace.visualstudio.com/items?itemName=scala-lang.scala) + +## Features + +Extension providing Scala syntax. + +## Requirements + +No requirements. + +## Based on +* Plugin: https://github.com/daltonjorge/vscode-scala +* Template: https://github.com/sellmerfud/scala.tmbundle (https://github.com/mads-hartmann/scala.tmbundle) + +## License +[MIT](LICENSE) + +----------------------------------------------------------------------------------------------------------- diff --git a/syntax/images/smooth-spiral.png b/syntax/images/smooth-spiral.png new file mode 100644 index 0000000..39f5c60 Binary files /dev/null and b/syntax/images/smooth-spiral.png differ diff --git a/language-configuration.json b/syntax/language-configuration.json similarity index 100% rename from language-configuration.json rename to syntax/language-configuration.json diff --git a/package.json b/syntax/package.json similarity index 87% rename from package.json rename to syntax/package.json index 0cfebf4..da73395 100644 --- a/package.json +++ b/syntax/package.json @@ -8,7 +8,7 @@ "engines": { "vscode": "^1.5.0" }, - "homepage": "https://github.com/scala/vscode-scala-syntax/blob/master/README.md", + "homepage": "https://github.com/scala/vscode-scala-syntax/blob/master/syntax/README.md", "repository": { "type": "git", "url": "https://github.com/scala/vscode-scala-syntax.git" @@ -33,12 +33,6 @@ "configuration": "./language-configuration.json" } ], - "snippets": [ - { - "language": "scala", - "path": "./snippets/scala.json" - } - ], "grammars": [ { "language": "scala", diff --git a/syntaxes/Scala.tmLanguage b/syntax/syntaxes/Scala.tmLanguage similarity index 100% rename from syntaxes/Scala.tmLanguage rename to syntax/syntaxes/Scala.tmLanguage diff --git a/vsc-extension-quickstart.md b/syntax/vsc-extension-quickstart.md similarity index 96% rename from vsc-extension-quickstart.md rename to syntax/vsc-extension-quickstart.md index 5c03c0b..dd64a90 100644 --- a/vsc-extension-quickstart.md +++ b/syntax/vsc-extension-quickstart.md @@ -24,4 +24,4 @@ https://code.visualstudio.com/docs ## Install your extension * To start using your extension with Visual Studio Code copy it into the /.vscode/extensions folder and restart Code. -* To share your extension with the world, read on https://code.visualstudio.com/docs about publishing an extension. \ No newline at end of file +* To share your extension with the world, read on https://code.visualstudio.com/docs about publishing an extension.