From c7d942ecaaa6fe1c97b8a6f38eebd5c1983f825c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93lafur=20P=C3=A1ll=20Geirsson?= Date: Mon, 16 Apr 2018 13:10:57 +0200 Subject: [PATCH] Remove snippets. I found the snippets to be distracting, especially because the suggestions appear in positions where the resulting code is invalid. Snippets should belong in separate vscode packages with the category "snippets". That is how it's done for TypeScript: https://marketplace.visualstudio.com/search?term=typescript&target=VSCode&category=Snippets&sortBy=Relevance Note that a snippet plugin can be located in the same github repo as the syntax. --- package.json | 6 ------ snippets/scala.json | 31 ------------------------------- 2 files changed, 37 deletions(-) delete mode 100644 snippets/scala.json diff --git a/package.json b/package.json index 2dc3827..58e4a3f 100644 --- a/package.json +++ b/package.json @@ -32,12 +32,6 @@ "configuration": "./language-configuration.json" } ], - "snippets": [ - { - "language": "scala", - "path": "./snippets/scala.json" - } - ], "grammars": [ { "language": "scala", diff --git a/snippets/scala.json b/snippets/scala.json deleted file mode 100644 index 62e97af..0000000 --- a/snippets/scala.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - ".source.scala": { - "main": { - "prefix": "def main", - "body": "def main(args: Array[String]): Unit = {\n\t${1:expr}\n}", - "description": "Snippet for if expression" - }, - - "match": { - "prefix": "match", - "body": "match {\n\tcase ${1:pattern} => ${2:doSomething} \n}", - "description": "Snippet for else branch" - }, - - "try catch": { - "prefix": "try", - "body": "try {\n\t${1:expression}\n} catch {\n\tcase ex: ${2:ExeptionClass} => ${3:doSomething} \n}", - "description": "Snippet for try/catch expression" - }, - - "class": { "prefix": "class", "body": "class ", "description": "class keyword" }, - "trait": { "prefix": "trait", "body": "trait ", "description": "trait keyword" }, - "object": { "prefix": "object", "body": "object ", "description": "object keyword" }, - "extends": { "prefix": "extends", "body": "extends ", "description": "extends keyword" }, - "override": { "prefix": "override", "body": "override ", "description": "override keyword" }, - "private": { "prefix": "private", "body": "private ", "description": "private keyword" }, - "protected": { "prefix": "protected", "body": "protected ", "description": "protected keyword" }, - "catch": { "prefix": "catch", "body": "catch ", "description": "catch keyword" }, - "finally": { "prefix": "finally", "body": "finally ", "description": "finally keyword" } - } -}