mirror of https://github.com/sbt/sbt.git
Remove vscode-sbt-scala extension
Content has been archived here: https://github.com/sbt/vscode-sbt-scala
This commit is contained in:
parent
72bfb3f45a
commit
aeeee2f624
|
|
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -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"
|
||||
}
|
||||
|
|
@ -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"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
.vscode/**
|
||||
typings/**
|
||||
out/test/**
|
||||
test/**
|
||||
src/**
|
||||
**/*.map
|
||||
.gitignore
|
||||
tsconfig.json
|
||||
vsc-extension-quickstart.md
|
||||
|
|
@ -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.
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 7.7 KiB |
|
|
@ -1,26 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="257.333px" height="147.833px" viewBox="0 0 257.333 147.833" enable-background="new 0 0 257.333 147.833"
|
||||
xml:space="preserve">
|
||||
<g id="guidelines" display="none">
|
||||
<line display="inline" fill="none" stroke="#FF2D00" x1="160.833" y1="21.833" x2="126.958" y2="159.208"/>
|
||||
<line display="inline" fill="none" stroke="#FF2D00" x1="181.25" y1="28.875" x2="147.375" y2="166.25"/>
|
||||
</g>
|
||||
<g id="Layer_3">
|
||||
<path fill="#380D09" d="M17.417,106.458l-13.25,12c0,0,6.5,8.125,15.125,13s13.381,4.508,23.065,4.379
|
||||
c9.31,0,18.81-1.754,26.435-8.504s9.066-8.6,9.033-17.112c-0.016-3.994-1.075-12.813-5.908-18.513
|
||||
c-5.466-6.445-14.781-9.566-14.781-9.566s-28.53-7.155-25.594-17.059c1.232-4.156,7.818-5.726,14.292-4.583
|
||||
c8.192,1.444,16.474,6.371,16.474,6.371l11.577-11.33c0,0-5.274-6.198-13.468-10.208c-6.064-2.967-14.428-4.059-19.783-4.078
|
||||
c-12.592-0.047-28.335,11.197-30.217,22.828c-1.375,8.5,1.383,15.676,7.625,21.125c7.875,6.875,13.478,7.771,13.478,7.771
|
||||
s25.123,6.469,25.123,14.286s-6.101,10.692-15.851,10.817S17.417,106.458,17.417,106.458z"/>
|
||||
<path fill="#380D09" d="M198.508,45.484l0.2,18.199h10.4l0.1,53.9c0,0,1.801,6.2,6.5,10.8c6.065,5.937,12.4,7.454,12.4,7.454
|
||||
h20.399l0.101-18.554l-11-0.1c0,0-2.401,0.101-5.1-2.5c-2.801-2.7-2.7-6.2-2.7-6.2l0.2-44.9h20l0.1-18.2l-20-0.1l-0.2-35.2h-20.8
|
||||
l0.2,35.4H198.508z"/>
|
||||
<path fill="#380D09" d="M156.667,49.833c-12.529-2.767-25.25-1.375-33.375,3.375l10.625-43.125l-21.188-5.188L82.604,126.333
|
||||
l21,6.062L106.5,120.5c6.167,11.666,13.194,17.279,26.667,20.333c25,5.667,47.312-11.762,53.334-38.667
|
||||
C191.667,79.083,175.917,54.083,156.667,49.833z M162.756,117.094l-30.152,8.302l-22.49-22.776l7.666-31.077l30.155-8.302
|
||||
l22.487,22.776L162.756,117.094z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.0 KiB |
|
|
@ -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": [
|
||||
["{", "}"],
|
||||
["[", "]"],
|
||||
["(", ")"],
|
||||
["\"", "\""],
|
||||
["'", "'"]
|
||||
]
|
||||
}
|
||||
|
|
@ -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=="
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
@ -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);
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -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"
|
||||
]
|
||||
}
|
||||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
@ -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=="
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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 ."
|
||||
}
|
||||
}
|
||||
|
|
@ -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);
|
||||
}
|
||||
|
|
@ -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"
|
||||
]
|
||||
}
|
||||
Loading…
Reference in New Issue