diff --git a/vscode-sbt-scala/.vscode/launch.json b/vscode-sbt-scala/.vscode/launch.json deleted file mode 100644 index 5201e0897..000000000 --- a/vscode-sbt-scala/.vscode/launch.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "version": "0.2.0", - // List of configurations. Add new configurations or edit existing ones. - "configurations": [ - { - "name": "Launch Client", - "type": "extensionHost", - "request": "launch", - "runtimeExecutable": "${execPath}", - "args": [ - "--extensionDevelopmentPath=${workspaceRoot}/client" - ], - "stopOnEntry": false, - "sourceMaps": true, - "outFiles": [ - "${workspaceRoot}/client/out/**/*.js" - ] - // "preLaunchTask": "Client Watch" - }, - { - "name": "Attach to Server", - "type": "node", - "request": "attach", - "port": 6009, - "sourceMaps": true, - "outFiles": [ - "${workspaceRoot}/client/server/**/*.js" - ], - "protocol": "legacy" - // "preLaunchTask": "Server Watch" - } - ] -} \ No newline at end of file diff --git a/vscode-sbt-scala/.vscode/settings.json b/vscode-sbt-scala/.vscode/settings.json deleted file mode 100644 index ed40daef9..000000000 --- a/vscode-sbt-scala/.vscode/settings.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "files.exclude": { - "out": false // set this to true to hide the "out" folder with the compiled JS files - }, - "search.exclude": { - "out": true // set this to false to include "out" folder in search results - }, - "typescript.tsdk": "./node_modules/typescript/lib", - "typescript.tsc.autoDetect": "off" -} \ No newline at end of file diff --git a/vscode-sbt-scala/.vscode/tasks.json b/vscode-sbt-scala/.vscode/tasks.json deleted file mode 100644 index 51026cd2d..000000000 --- a/vscode-sbt-scala/.vscode/tasks.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "version": "2.0.0", - "tasks": [ - { - "taskName": "compile", - "dependsOn": [ - "compile:client", - "compile:server" - ], - "problemMatcher": [] - }, - { - "label": "compile:client", - "type": "npm", - "script": "compile:client", - "group": "build", - "presentation": { - "panel": "dedicated", - "reveal": "never" - }, - "problemMatcher": [ - "$tsc" - ] - }, - { - "label": "compile:server", - "type": "npm", - "script": "compile:server", - "group": "build", - "presentation": { - "panel": "dedicated", - "reveal": "never" - }, - "problemMatcher": [ - "$tsc" - ] - }, - { - "taskName": "watch", - "dependsOn": [ - "watch:client", - "watch:server" - ], - "group": { - "kind": "build", - "isDefault": true - }, - "problemMatcher": [] - }, - { - "label": "watch:client", - "type": "npm", - "script": "watch:client", - "isBackground": true, - "group": "build", - "presentation": { - "panel": "dedicated", - "reveal": "never" - }, - "problemMatcher": [ - "$tsc-watch" - ] - }, - { - "label": "watch:server", - "type": "npm", - "script": "watch:server", - "isBackground": true, - "group": "build", - "presentation": { - "panel": "dedicated", - "reveal": "never" - }, - "problemMatcher": [ - "$tsc-watch" - ] - } - ] -} \ No newline at end of file diff --git a/vscode-sbt-scala/client/.vscodeignore b/vscode-sbt-scala/client/.vscodeignore deleted file mode 100644 index 93e28ff2f..000000000 --- a/vscode-sbt-scala/client/.vscodeignore +++ /dev/null @@ -1,9 +0,0 @@ -.vscode/** -typings/** -out/test/** -test/** -src/** -**/*.map -.gitignore -tsconfig.json -vsc-extension-quickstart.md diff --git a/vscode-sbt-scala/client/README.md b/vscode-sbt-scala/client/README.md deleted file mode 100644 index 01de59573..000000000 --- a/vscode-sbt-scala/client/README.md +++ /dev/null @@ -1,9 +0,0 @@ -Scala language support using sbt -================================ - -This is an experimental Scala language support using sbt as the language server. - -To try this, use sbt 1.1.0-RC1 or above. - -- Saving `*.scala` will trigger `compile` task. -- Jump to definition support for class names. diff --git a/vscode-sbt-scala/client/images/sbt-logo-bgwhite-455x262.png b/vscode-sbt-scala/client/images/sbt-logo-bgwhite-455x262.png deleted file mode 100644 index cce326960..000000000 Binary files a/vscode-sbt-scala/client/images/sbt-logo-bgwhite-455x262.png and /dev/null differ diff --git a/vscode-sbt-scala/client/images/sbt-logo.svg b/vscode-sbt-scala/client/images/sbt-logo.svg deleted file mode 100644 index d028d0540..000000000 --- a/vscode-sbt-scala/client/images/sbt-logo.svg +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - diff --git a/vscode-sbt-scala/client/language-configuration.json b/vscode-sbt-scala/client/language-configuration.json deleted file mode 100644 index aa2571000..000000000 --- a/vscode-sbt-scala/client/language-configuration.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "comments": { - // symbol used for single line comment. Remove this entry if your language does not support line comments - "lineComment": "//", - // symbols used for start and end a block comment. Remove this entry if your language does not support block comments - "blockComment": [ "/*", "*/" ] - }, - // symbols used as brackets - "brackets": [ - ["{", "}"], - ["[", "]"], - ["(", ")"] - ], - // symbols that are auto closed when typing - "autoClosingPairs": [ - ["{", "}"], - ["[", "]"], - ["(", ")"], - ["\"", "\""], - ["'", "'"] - ], - // symbols that that can be used to surround a selection - "surroundingPairs": [ - ["{", "}"], - ["[", "]"], - ["(", ")"], - ["\"", "\""], - ["'", "'"] - ] -} \ No newline at end of file diff --git a/vscode-sbt-scala/client/package-lock.json b/vscode-sbt-scala/client/package-lock.json deleted file mode 100644 index 75dc4fb56..000000000 --- a/vscode-sbt-scala/client/package-lock.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "vscode-sbt-scala", - "version": "0.2.4", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@types/vscode": { - "version": "1.34.0", - "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.34.0.tgz", - "integrity": "sha512-t81rGr6aFw8TMap7UJdikC5ilOtL0yNr/pkovyyTy31fZ4XJehrxLMRh8nJuoOF3+g4rG9ljmtQo7tm6wyoaYA==", - "dev": true - }, - "semver": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", - "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" - }, - "vscode-jsonrpc": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-4.0.0.tgz", - "integrity": "sha512-perEnXQdQOJMTDFNv+UF3h1Y0z4iSiaN9jIlb0OqIYgosPCZGYh/MCUlkFtV2668PL69lRDO32hmvL2yiidUYg==" - }, - "vscode-languageclient": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-5.2.1.tgz", - "integrity": "sha512-7jrS/9WnV0ruqPamN1nE7qCxn0phkH5LjSgSp9h6qoJGoeAKzwKz/PF6M+iGA/aklx4GLZg1prddhEPQtuXI1Q==", - "requires": { - "semver": "^5.5.0", - "vscode-languageserver-protocol": "3.14.1" - } - }, - "vscode-languageserver-protocol": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.14.1.tgz", - "integrity": "sha512-IL66BLb2g20uIKog5Y2dQ0IiigW0XKrvmWiOvc0yXw80z3tMEzEnHjaGAb3ENuU7MnQqgnYJ1Cl2l9RvNgDi4g==", - "requires": { - "vscode-jsonrpc": "^4.0.0", - "vscode-languageserver-types": "3.14.0" - } - }, - "vscode-languageserver-types": { - "version": "3.14.0", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.14.0.tgz", - "integrity": "sha512-lTmS6AlAlMHOvPQemVwo3CezxBp0sNB95KNPkqp3Nxd5VFEnuG1ByM0zlRWos0zjO3ZWtkvhal0COgiV1xIA4A==" - } - } -} diff --git a/vscode-sbt-scala/client/package.json b/vscode-sbt-scala/client/package.json deleted file mode 100644 index 15736ae67..000000000 --- a/vscode-sbt-scala/client/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "vscode-sbt-scala", - "displayName": "Scala (sbt)", - "version": "0.2.4", - "author": "Lightbend, Inc.", - "license": "BSD-3-Clause", - "publisher": "lightbend", - "repository": { - "type": "git", - "url": "https://github.com/sbt/sbt" - }, - "description": "Scala language support using sbt", - "icon": "images/sbt-logo-bgwhite-455x262.png", - "engines": { - "vscode": "^1.23.0" - }, - "categories": [ - "Languages" - ], - "contributes": { - "languages": [ - { - "id": "scala", - "aliases": [ - "Scala", - "scala" - ], - "extensions": [ - ".scala", - ".sbt" - ], - "configuration": "./language-configuration.json" - } - ], - "grammars": [ - { - "language": "scala", - "scopeName": "source.scala", - "path": "./syntaxes/Scala.tmLanguage" - } - ] - }, - "activationEvents": [ - "workspaceContains:build.sbt" - ], - "main": "./out/src/extension", - "scripts": {}, - "dependencies": { - "vscode-languageclient": "^5.2.1" - }, - "devDependencies": { - "@types/vscode": "^1.32.0" - } -} diff --git a/vscode-sbt-scala/client/src/extension.ts b/vscode-sbt-scala/client/src/extension.ts deleted file mode 100644 index 4ccebed75..000000000 --- a/vscode-sbt-scala/client/src/extension.ts +++ /dev/null @@ -1,129 +0,0 @@ -'use strict'; - -import * as path from 'path'; -import * as url from 'url'; -import * as net from 'net'; -let fs = require('fs'), - os = require('os'); -import * as vscode from 'vscode'; -import { ExtensionContext, workspace } from 'vscode'; // workspace, -import { - LanguageClient, - LanguageClientOptions, - RevealOutputChannelOn, - ServerOptions, - TransportKind -} from 'vscode-languageclient'; - -let terminal: vscode.Terminal = null; - -function delay(ms: number) { - return new Promise(resolve => setTimeout(resolve, ms)); -} - -export async function deactivate() { - if (terminal != null) { - terminal.sendText("exit"); - await delay(1000); - terminal.dispose(); - } -} - -export async function activate(context: ExtensionContext) { - // Start sbt - terminal = vscode.window.createTerminal(`sbt`); - terminal.show(); - terminal.sendText("sbt"); - // Wait for sbt server to start - let retries = 60; - while (retries > 0) { - retries--; - await delay(1000); - if (isServerUp()) { - break; - } - } - - // The server is implemented in node - let serverModule = context.asAbsolutePath(path.join('server', 'server.js')); - // The debug options for the server - // let debugOptions = { execArgv: ["--nolazy", "--debug=6009"] }; - - // If the extension is launched in debug mode then the debug server options are used - // Otherwise the run options are used - let serverOptions: ServerOptions = { - run : { module: serverModule, transport: TransportKind.stdio }, - debug: { module: serverModule, transport: TransportKind.stdio } - } - - // Options to control the language client - let clientOptions: LanguageClientOptions = { - documentSelector: [{ language: 'scala', scheme: 'file' }, { language: 'java', scheme: 'file' }], - revealOutputChannelOn: RevealOutputChannelOn.Never, - initializationOptions: () => { - return discoverToken(); - } - } - - // Don't start VS Code connection until sbt server is confirmed to be up and running. - function isServerUp(): boolean { - let isFileThere = fs.existsSync(path.join(workspace.rootPath, 'project', 'target', 'active.json')); - if (!isFileThere) { - return false; - } else { - let skt = new net.Socket(); - try { - connectSocket(skt); - } catch(e) { - return false; - } - skt.end(); - return true; - } - } - - function connectSocket(socket: net.Socket):  net.Socket { - let u = discoverUrl(); - // let socket = net.Socket(); - if (u.protocol == 'tcp:') { - socket.connect(+u.port, '127.0.0.1'); - } else if (u.protocol == 'local:' && os.platform() == 'win32') { - let pipePath = '\\\\.\\pipe\\' + u.hostname; - socket.connect(pipePath); - } else if (u.protocol == 'local:') { - socket.connect(u.path); - } else { - throw 'Unknown protocol ' + u.protocol; - } - return socket; - } - - // the port file is hardcoded to a particular location relative to the build. - function discoverUrl(): url.Url { - let pf = path.join(process.cwd(), 'project', 'target', 'active.json'); - let portfile = JSON.parse(fs.readFileSync(pf)); - return url.parse(portfile.uri); - } - - // the port file is hardcoded to a particular location relative to the build. - function discoverToken(): any { - let pf = path.join(workspace.rootPath, 'project', 'target', 'active.json'); - let portfile = JSON.parse(fs.readFileSync(pf)); - - // if tokenfilepath exists, return the token. - if (portfile.hasOwnProperty('tokenfilePath')) { - let tf = portfile.tokenfilePath; - let tokenfile = JSON.parse(fs.readFileSync(tf)); - return { - token: tokenfile.token - }; - } else { - return {}; - } - } - - // Create the language client and start the client. - let disposable = new LanguageClient('lspSbtScala', 'sbt Scala Language Server', serverOptions, clientOptions).start(); - - context.subscriptions.push(disposable); -} diff --git a/vscode-sbt-scala/client/syntaxes/Scala.tmLanguage b/vscode-sbt-scala/client/syntaxes/Scala.tmLanguage deleted file mode 100644 index aee49eaf0..000000000 --- a/vscode-sbt-scala/client/syntaxes/Scala.tmLanguage +++ /dev/null @@ -1,1262 +0,0 @@ - - - - - fileTypes - - scala - - firstLineMatch - ^#!/.*\b\w*scala\b - foldingStartMarker - /\*\*|\{\s*$ - foldingStopMarker - \*\*/|^\s*\} - keyEquivalent - ^~S - name - Scala - patterns - - - include - #code - - - repository - - block-comments - - begin - /\* - end - \*/ - name - comment.block.scala - patterns - - - include - #block-comments - - - match - (?x) - (?! /\*) - (?! \*/) - - - - - char-literal - - begin - ' - beginCaptures - - 0 - - name - punctuation.definition.character.begin.scala - - - end - ' - endCaptures - - 0 - - name - punctuation.definition.character.end.scala - - - name - constant.character.literal.scala - patterns - - - match - \\(?:[btnfr\\"']|[0-7]{1,3}|u[0-9A-Fa-f]{4}) - name - constant.character.escape.scala - - - match - \\. - name - invalid.illegal.unrecognized-character-escape.scala - - - match - [^']{2,} - name - invalid.illegal.character-literal-too-long - - - match - (?<!')[^'] - name - invalid.illegal.character-literal-too-long - - - - code - - patterns - - - include - #script-header - - - include - #storage-modifiers - - - include - #declarations - - - include - #inheritance - - - include - #imports - - - include - #comments - - - include - #strings - - - include - #initialization - - - include - #xml-literal - - - include - #keywords - - - include - #constants - - - include - #scala-symbol - - - include - #special-identifier - - - include - #char-literal - - - include - #empty-parentheses - - - include - #parameter-list - - - include - #qualifiedClassName - - - include - #meta-brackets - - - include - #meta-bounds - - - include - #meta-colons - - - - comments - - patterns - - - captures - - 0 - - name - punctuation.definition.comment.scala - - - match - /\*\*/ - name - comment.block.empty.scala - - - begin - ^\s*(/\*\*)(?!/) - beginCaptures - - 1 - - name - punctuation.definition.comment.scala - - - end - \*/ - endCaptures - - 0 - - name - punctuation.definition.comment.scala - - - name - comment.block.documentation.scala - patterns - - - captures - - 1 - - name - keyword.other.documentation.scaladoc.scala - - 2 - - name - variable.parameter.scala - - - match - (@param)\s+(\S+) - - - captures - - 1 - - name - keyword.other.documentation.scaladoc.scala - - 2 - - name - entity.name.class - - - match - (@(?:tparam|throws))\s+(\S+) - - - match - @(return|see|note|example|usecase|author|version|since|todo|deprecated|migration|define|inheritdoc)\b - name - keyword.other.documentation.scaladoc.scala - - - captures - - 1 - - name - punctuation.definition.documentation.link.scala - - 2 - - name - entity.other.documentation.link.scala - - 3 - - name - punctuation.definition.documentation.link.scala - - - match - (\[\[)([^\]]+)(\]\]) - - - - - begin - /\* - captures - - 0 - - name - punctuation.definition.comment.scala - - - end - \*/ - name - comment.block.scala - - - begin - (^[ \t]+)?(?=//) - beginCaptures - - 1 - - name - punctuation.whitespace.comment.leading.scala - - - end - (?!\G) - patterns - - - begin - // - beginCaptures - - 0 - - name - punctuation.definition.comment.scala - - - end - \n - name - comment.line.double-slash.scala - - - - - - constants - - patterns - - - match - \b(false|null|true|Nil|None)\b - name - constant.language.scala - - - match - \b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.[0-9]+)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?|[0-9]+)([LlFfDd]|UL|ul)?\b - name - constant.numeric.scala - - - match - \b(this|super|self)\b - name - variable.language.scala - - - match - \b(Unit|Boolean|Byte|Char|Short|Int|Float|Long|Double)\b - name - storage.type.primitive.scala - - - match - \b(String|Symbol)\b - name - storage.type.scala - - - - declarations - - patterns - - - captures - - 1 - - name - keyword.declaration.scala - - 2 - - name - entity.name.function.declaration - - - match - (?x) - \b(def)\s+ - (`[^`]+`|[_$a-zA-Z][_$a-zA-Z0-9]*(?:_[^\t .,;()\[\]{}'"`\w])(?=[(\t ])|[_$a-zA-Z][_$a-zA-Z0-9]*|[-?~><^+*%:!#|/@\\]+) - - - captures - - 1 - - name - keyword.declaration.scala - - 2 - - name - keyword.declaration.scala - - 3 - - name - entity.name.class.declaration - - - match - (case)?\b(class|trait|object)\s+([^\s\{\(\[]+) - - - captures - - 1 - - name - keyword.declaration.scala - - 2 - - name - entity.name.type.declaration - - - match - \b(type)\s+(`[^`]+`|[_$a-zA-Z][_$a-zA-Z0-9]*(?:_[^\s])(?=[\t ])|[_$a-zA-Z][_$a-zA-Z0-9]*|[-?~><^+*%:!#|/@\\]+) - - - captures - - 1 - - name - keyword.declaration.stable.scala - - 2 - - name - constant.other.declaration.scala - - - match - \b(val)\s+(?:([A-Z][_a-zA-Z0-9]*))\b - - - captures - - 1 - - name - keyword.declaration.stable.scala - - 2 - - name - keyword.declaration.volatile.scala - - 3 - - name - variable.other.declaration.scala - - - match - \b(?:(val)|(var))\s+(?:(`[^`]+`|[_$a-zA-Z][_$a-zA-Z0-9]*(?:_[^\t .,;()\[\]{}'"`\w])(?=[\t ])|[_$a-zA-Z][_$a-zA-Z0-9]*|[-?~><^+*%:!#|/@\\]+)|(?=\()) - - - captures - - 1 - - name - keyword.other.scoping.scala - - 2 - - name - keyword.declaration.scala - - 3 - - name - entity.name.class.declaration - - - match - \b(package)\s+(object)\s+([^\s\{\(\[]+) - - - begin - \b(package)\s+ - beginCaptures - - 1 - - name - keyword.other.import.scala - - - end - (?<=[\n;]) - name - meta.package.scala - patterns - - - include - #comments - - - match - (`[^`]+`|[_$a-zA-Z][_$a-zA-Z0-9]*) - name - entity.name.package.scala - - - match - \. - name - punctuation.definition.package - - - - - - empty-parentheses - - captures - - 1 - - name - meta.bracket.scala - - - match - (\(\)) - name - meta.parentheses.scala - - imports - - begin - \b(import)\s+ - beginCaptures - - 1 - - name - keyword.other.import.scala - - - end - (?<=[\n;]) - name - meta.import.scala - patterns - - - include - #comments - - - match - (`[^`]+`|[_$a-zA-Z][_$a-zA-Z0-9]*) - name - entity.name.import.scala - - - match - \. - name - punctuation.definition.import - - - begin - { - beginCaptures - - 0 - - name - meta.bracket.scala - - - end - } - endCaptures - - 0 - - name - meta.bracket.scala - - - name - meta.import.selector.scala - patterns - - - captures - - 1 - - name - entity.name.import.renamed-from.scala - - 2 - - name - keyword.other.arrow.scala - - 3 - - name - entity.name.import.renamed-to.scala - - - match - (?x) \s* - (`[^`]+`|[_$a-zA-Z][_$a-zA-Z0-9]*) \s* - (=>) \s* - (`[^`]+`|[_$a-zA-Z][_$a-zA-Z0-9]*) \s* - - - - match - ([^\s.,}]+) - name - entity.name.import.scala - - - - - - inheritance - - patterns - - - captures - - 1 - - name - keyword.declaration.scala - - 2 - - name - entity.other.inherited-class.scala - - - match - (extends|with)\s+([^\s\{\(\[\]]+) - - - - initialization - - captures - - 1 - - name - keyword.declaration.scala - - 2 - - name - entity.name.class - - - match - \b(new)\s+([^\s,\{\}\(\)\[\]]+) - - keywords - - patterns - - - match - \b(return|throw)\b - name - keyword.control.flow.jump.scala - - - match - \b(classOf|isInstanceOf|asInstanceOf)\b - name - support.function.type-of.scala - - - match - \b(else|if|do|while|for|yield|match|case)\b - name - keyword.control.flow.scala - - - match - \b(catch|finally|try)\b - name - keyword.control.exception.scala - - - match - (==?|!=|<=|>=|<>|<|>) - name - keyword.operator.comparison.scala - - - match - (\-|\+|\*|/(?![/*])|%|~) - name - keyword.operator.arithmetic.scala - - - match - (!|&&|\|\|) - name - keyword.operator.logical.scala - - - match - (<-|←|->|→|=>|⇒|\?|\:+|@|\|)+ - name - keyword.operator.scala - - - - meta-bounds - - comment - For themes: Matching view bounds - match - <%|=:=|<:<|<%<|>:|<: - name - meta.bounds.scala - - meta-brackets - - comment - For themes: Brackets look nice when colored. - patterns - - - comment - The punctuation.section.*.begin is needed for return snippet in source bundle - match - \{ - name - punctuation.section.block.begin.scala - - - comment - The punctuation.section.*.end is needed for return snippet in source bundle - match - \} - name - punctuation.section.block.end.scala - - - match - {|}|\(|\)|\[|\] - name - meta.bracket.scala - - - - meta-colons - - comment - For themes: Matching type colons - patterns - - - match - (?<!:):(?!:) - name - meta.colon.scala - - - - parameter-list - - patterns - - - captures - - 1 - - name - variable.parameter.scala - - 2 - - name - meta.colon.scala - - - comment - We do not match param names that start with a Capitol letter - match - (?<=[^\._$a-zA-Z0-9])(`[^`]+`|[_$a-z][_$a-zA-Z0-9]*(?:_[^\s])(?=[\t ])|[_$a-z][_$a-zA-Z0-9]*|[-?~><^+*%:!#|/@\\]+)\s*(:)\s+ - - - - qualifiedClassName - - captures - - 1 - - name - entity.name.class - - - match - (\b([A-Z][\w]*)) - - scala-symbol - - match - '\w+(?=[^'\w]|$) - name - constant.other.symbol.scala - - script-header - - captures - - 1 - - name - string.unquoted.shebang.scala - - - match - ^#!(.*)$ - name - comment.block.shebang.scala - - special-identifier - - comment - - Match special scala style identifiers that can end with and underscore and - a a not letter such as blank_?. This way the symbol will not be colored - differently. - - match - \b[_$a-zA-Z][_$a-zA-Z0-9]*(?:_[^\t .,;()\[\]{}'"`\w]) - - storage-modifiers - - patterns - - - match - \b(private\[\S+\]|protected\[\S+\]|private|protected)\b - name - storage.modifier.access - - - match - \b(synchronized|@volatile|abstract|final|lazy|sealed|implicit|override|@transient|@native)\b - name - storage.modifier.other - - - - strings - - patterns - - - begin - """ - beginCaptures - - 0 - - name - punctuation.definition.string.begin.scala - - - end - """(?!") - endCaptures - - 0 - - name - punctuation.definition.string.end.scala - - - name - string.quoted.triple.scala - patterns - - - match - \\\\|\\u[0-9A-Fa-f]{4} - name - constant.character.escape.scala - - - - - begin - " - beginCaptures - - 0 - - name - punctuation.definition.string.begin.scala - - - end - " - endCaptures - - 0 - - name - punctuation.definition.string.end.scala - - - name - string.quoted.double.scala - patterns - - - match - \\(?:[btnfr\\"']|[0-7]{1,3}|u[0-9A-Fa-f]{4}) - name - constant.character.escape.scala - - - match - \\. - name - invalid.illegal.unrecognized-string-escape.scala - - - - - - xml-doublequotedString - - begin - " - beginCaptures - - 0 - - name - punctuation.definition.string.begin.xml - - - end - " - endCaptures - - 0 - - name - punctuation.definition.string.end.xml - - - name - string.quoted.double.xml - patterns - - - include - #xml-entity - - - - xml-embedded-content - - patterns - - - begin - { - captures - - 0 - - name - meta.bracket.scala - - - end - } - name - meta.source.embedded.scala - patterns - - - include - #code - - - - - captures - - 1 - - name - entity.other.attribute-name.namespace.xml - - 2 - - name - entity.other.attribute-name.xml - - 3 - - name - punctuation.separator.namespace.xml - - 4 - - name - entity.other.attribute-name.localname.xml - - - match - (?:([-_a-zA-Z0-9]+)((:)))?([_a-zA-Z-]+)= - - - include - #xml-doublequotedString - - - include - #xml-singlequotedString - - - - xml-entity - - captures - - 1 - - name - punctuation.definition.constant.xml - - 3 - - name - punctuation.definition.constant.xml - - - match - (&)([:a-zA-Z_][:a-zA-Z0-9_.-]*|#[0-9]+|#x[0-9a-fA-F]+)(;) - name - constant.character.entity.xml - - xml-literal - - patterns - - - begin - (<)((?:([_a-zA-Z0-9][_a-zA-Z0-9]*)((:)))?([_a-zA-Z0-9][-_a-zA-Z0-9:]*))(?=(\s[^>]*)?></\2>) - beginCaptures - - 1 - - name - punctuation.definition.tag.xml - - 3 - - name - entity.name.tag.namespace.xml - - 4 - - name - entity.name.tag.xml - - 5 - - name - punctuation.separator.namespace.xml - - 6 - - name - entity.name.tag.localname.xml - - - comment - We do not allow a tag name to start with a - since this would - likely conflict with the <- operator. This is not very common - for tag names anyway. Also code such as -- if (val <val2 || val> val3) - will falsly be recognized as an xml tag. The solution is to put a - space on either side of the comparison operator - end - (>(<))/(?:([-_a-zA-Z0-9]+)((:)))?([-_a-zA-Z0-9:]*[_a-zA-Z0-9])(>) - endCaptures - - 1 - - name - punctuation.definition.tag.xml - - 2 - - name - meta.scope.between-tag-pair.xml - - 3 - - name - entity.name.tag.namespace.xml - - 4 - - name - entity.name.tag.xml - - 5 - - name - punctuation.separator.namespace.xml - - 6 - - name - entity.name.tag.localname.xml - - 7 - - name - punctuation.definition.tag.xml - - - name - meta.tag.no-content.xml - patterns - - - include - #xml-embedded-content - - - - - begin - (</?)(?:([_a-zA-Z0-9][-_a-zA-Z0-9]*)((:)))?([_a-zA-Z0-9][-_a-zA-Z0-9:]*)(?=[^>]*?>) - captures - - 1 - - name - punctuation.definition.tag.xml - - 2 - - name - entity.name.tag.namespace.xml - - 3 - - name - entity.name.tag.xml - - 4 - - name - punctuation.separator.namespace.xml - - 5 - - name - entity.name.tag.localname.xml - - - end - (/?>) - name - meta.tag.xml - patterns - - - include - #xml-embedded-content - - - - - include - #xml-entity - - - - xml-singlequotedString - - begin - ' - beginCaptures - - 0 - - name - punctuation.definition.string.begin.xml - - - end - ' - endCaptures - - 0 - - name - punctuation.definition.string.end.xml - - - name - string.quoted.single.xml - patterns - - - include - #xml-entity - - - - - scopeName - source.scala - uuid - 158C0929-299A-40C8-8D89-316BE0C446E8 - - diff --git a/vscode-sbt-scala/client/tsconfig.json b/vscode-sbt-scala/client/tsconfig.json deleted file mode 100644 index c10ad282c..000000000 --- a/vscode-sbt-scala/client/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "compilerOptions": { - "noUnusedLocals": true, - "noUnusedParameters": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "target": "es6", - "module": "commonjs", - "moduleResolution": "node", - "rootDir": ".", - "outDir": "out", - "lib": [ "es2016" ], - "sourceMap": true - }, - "exclude": [ - "node_modules", - "server" - ] -} \ No newline at end of file diff --git a/vscode-sbt-scala/package-lock.json b/vscode-sbt-scala/package-lock.json deleted file mode 100644 index f0c985121..000000000 --- a/vscode-sbt-scala/package-lock.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "vscode-sbt-scala", - "version": "0.0.1", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@types/mocha": { - "version": "2.2.48", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-2.2.48.tgz", - "integrity": "sha512-nlK/iyETgafGli8Zh9zJVCTicvU3iajSkRwOh3Hhiva598CMqNJ4NcVCGMTGKpGpTYj/9R8RLzS9NAykSSCqGw==", - "dev": true - }, - "@types/node": { - "version": "7.0.69", - "resolved": "https://registry.npmjs.org/@types/node/-/node-7.0.69.tgz", - "integrity": "sha512-S5NC8HV6HnRipg8nC0j30TPl7ktXjRTKqgyINLNe8K/64UJUI8Lq0sRopXC0hProsV2F5ibj8IqPkl1xpGggrw==", - "dev": true - }, - "typescript": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz", - "integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==", - "dev": true - } - } -} diff --git a/vscode-sbt-scala/package.json b/vscode-sbt-scala/package.json deleted file mode 100644 index ded6ee6d6..000000000 --- a/vscode-sbt-scala/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "vscode-sbt-scala", - "displayName": "Scala (sbt)", - "version": "0.0.1", - "author": "Lightbend, Inc.", - "license": "BSD-3-Clause", - "publisher": "lightbend", - "description": "Scala language support for Visual Studio Code using sbt", - "repository": { - "type": "git", - "url": "https://github.com/sbt/sbt" - }, - "scripts": { - "postinstall": "cd server && npm install && cd ../client && npm install && cd ..", - "compile": "tsc -p client/tsconfig.json && cd server && npm run installServer && cd .. && tsc -p server/tsconfig.json", - "compile:client": "tsc -p client/tsconfig.json", - "watch:client": "tsc -w -p client/tsconfig.json", - "compile:server": "cd server && npm run installServer && cd .. && tsc -p server/tsconfig.json", - "watch:server": "cd server && npm run installServer && cd .. && tsc -w -p server/tsconfig.json" - }, - "devDependencies": { - "@types/mocha": "^2.2.48", - "@types/node": "^7.0.69", - "typescript": "^2.9.2" - } -} diff --git a/vscode-sbt-scala/server/package-lock.json b/vscode-sbt-scala/server/package-lock.json deleted file mode 100644 index bfe7026f9..000000000 --- a/vscode-sbt-scala/server/package-lock.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "vscode-sbt-scala", - "version": "0.0.1", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "vscode-jsonrpc": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-4.0.0.tgz", - "integrity": "sha512-perEnXQdQOJMTDFNv+UF3h1Y0z4iSiaN9jIlb0OqIYgosPCZGYh/MCUlkFtV2668PL69lRDO32hmvL2yiidUYg==" - }, - "vscode-languageserver": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-5.2.1.tgz", - "integrity": "sha512-GuayqdKZqAwwaCUjDvMTAVRPJOp/SLON3mJ07eGsx/Iq9HjRymhKWztX41rISqDKhHVVyFM+IywICyZDla6U3A==", - "requires": { - "vscode-languageserver-protocol": "3.14.1", - "vscode-uri": "^1.0.6" - } - }, - "vscode-languageserver-protocol": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.14.1.tgz", - "integrity": "sha512-IL66BLb2g20uIKog5Y2dQ0IiigW0XKrvmWiOvc0yXw80z3tMEzEnHjaGAb3ENuU7MnQqgnYJ1Cl2l9RvNgDi4g==", - "requires": { - "vscode-jsonrpc": "^4.0.0", - "vscode-languageserver-types": "3.14.0" - } - }, - "vscode-languageserver-types": { - "version": "3.14.0", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.14.0.tgz", - "integrity": "sha512-lTmS6AlAlMHOvPQemVwo3CezxBp0sNB95KNPkqp3Nxd5VFEnuG1ByM0zlRWos0zjO3ZWtkvhal0COgiV1xIA4A==" - }, - "vscode-uri": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-1.0.6.tgz", - "integrity": "sha512-sLI2L0uGov3wKVb9EB+vIQBl9tVP90nqRvxSoJ35vI3NjxE8jfsE5DSOhWgSunHSZmKS4OCi2jrtfxK7uyp2ww==" - } - } -} diff --git a/vscode-sbt-scala/server/package.json b/vscode-sbt-scala/server/package.json deleted file mode 100644 index d37750e03..000000000 --- a/vscode-sbt-scala/server/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "vscode-sbt-scala", - "displayName": "Scala (sbt)", - "version": "0.0.1", - "author": "Lightbend, Inc.", - "license": "BSD-3-Clause", - "publisher": "lightbend", - "description": "Relay server to sbt server.", - "repository": { - "type": "git", - "url": "https://github.com/sbt/sbt" - }, - "engines": { - "node": "*" - }, - "dependencies": { - "vscode-languageserver": "^5.2.1" - }, - "scripts": { - "installServer": "installServerIntoExtension ../client ./package.json ./tsconfig.json", - "compile": "installServerIntoExtension ../client ./package.json ./tsconfig.json && tsc -p .", - "watch": "installServerIntoExtension ../client ./package.json ./tsconfig.json && tsc -w -p ." - } -} diff --git a/vscode-sbt-scala/server/src/server.ts b/vscode-sbt-scala/server/src/server.ts deleted file mode 100644 index 8404c7b74..000000000 --- a/vscode-sbt-scala/server/src/server.ts +++ /dev/null @@ -1,48 +0,0 @@ -'use strict'; - -import * as path from 'path'; -import * as url from 'url'; -import * as net from 'net'; -let fs = require('fs'), - os = require('os'), - stdin = process.stdin, - stdout = process.stdout; - -let socket = new net.Socket(); -socket.on('data', (chunk: any) => { - // send it back to stdout - stdout.write(chunk); -}).on('end', () => { - stdin.pause(); -}); -connectSocket(socket); - -stdin.resume(); -stdin.on('data', (chunk: any) => { - socket.write(chunk); -}).on('end', () => { - socket.end(); -}); - -function connectSocket(socket: net.Socket): net.Socket { - let u = discoverUrl(); - // let socket = net.Socket(); - if (u.protocol == 'tcp:') { - socket.connect(+u.port, '127.0.0.1'); - } else if (u.protocol == 'local:' && os.platform() == 'win32') { - let pipePath = '\\\\.\\pipe\\' + u.hostname; - socket.connect(pipePath); - } else if (u.protocol == 'local:') { - socket.connect(u.path); - } else { - throw 'Unknown protocol ' + u.protocol; - } - return socket; -} - -// the port file is hardcoded to a particular location relative to the build. -function discoverUrl(): url.Url { - let pf = path.join(process.cwd(), 'project', 'target', 'active.json'); - let portfile = JSON.parse(fs.readFileSync(pf)); - return url.parse(portfile.uri); -} diff --git a/vscode-sbt-scala/server/tsconfig.json b/vscode-sbt-scala/server/tsconfig.json deleted file mode 100644 index 1ae7a021a..000000000 --- a/vscode-sbt-scala/server/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "compilerOptions": { - "noUnusedLocals": true, - "noUnusedParameters": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "target": "es6", - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "lib" : [ "es2016" ], - "outDir": "../client/server" - }, - "exclude": [ - "node_modules" - ] -} \ No newline at end of file