Updated everything to work with latest vscode

restored lang server stdout
added hard-coded link provider
This commit is contained in:
Noah Santschi-Cooney 2019-08-10 23:38:21 +01:00
parent c4ad024d3d
commit 156d76e7de
No known key found for this signature in database
GPG key ID: 3B22282472C8AE48
17 changed files with 492 additions and 1610 deletions

18
.vscode/launch.json vendored
View file

@ -7,20 +7,26 @@
"request": "launch",
"name": "Launch Client",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceRoot}" ],
"stopOnEntry": false,
"sourceMaps": true,
"args": ["--extensionDevelopmentPath=${workspaceRoot}"],
"outFiles": ["${workspaceRoot}/client/out/**/*.js"],
"preLaunchTask": "watch",
"preLaunchTask": {
"type": "npm",
"script": "watch"
}
},
{
"type": "node",
"request": "attach",
"name": "Attach to Server",
"protocol": "inspector",
"port": 6009,
"sourceMaps": true,
"restart": true,
"outFiles": ["${workspaceRoot}/server/out/**/*.js"]
},
],
"compounds": [
{
"name": "Client + Server",
"configurations": ["Launch Client", "Attach to Server"]
}
]
}

95
.vscode/tasks.json vendored
View file

@ -16,72 +16,37 @@
"focus": false,
"panel": "shared"
},
"problemMatcher": [
/* "problemMatcher": [
"$tslint5"
]
] */
},
{
"type": "npm",
"script": "compile",
"problemMatcher": [
"$tsc"
]
},
{
"type": "npm",
"script": "compile:client",
"problemMatcher": [
"$tsc"
]
},
{
"type": "npm",
"script": "compile:server",
"problemMatcher": [
"$tsc"
]
},
{
"type": "npm",
"script": "watch:client",
"isBackground": true,
"presentation": {
"echo": false,
"reveal": "never",
"focus": false,
"panel": "shared"
},
"problemMatcher": [
"$tsc-watch"
]
},
{
"type": "npm",
"script": "watch:server",
"isBackground": true,
"presentation": {
"echo": false,
"reveal": "never",
"focus": false,
"panel": "shared"
},
"problemMatcher": [
"$tsc-watch"
]
},
{
"label": "watch",
"isBackground": true,
"presentation": {
"echo": false,
"reveal": "never",
"focus": false,
"panel": "shared"
},
"dependsOn": [
"npm: watch:server",
"npm: watch:client"
]
}
]
"type": "npm",
"script": "compile",
"group": "build",
"presentation": {
"panel": "dedicated",
"reveal": "never"
},
"problemMatcher": [
"$tsc"
]
},
{
"type": "npm",
"script": "watch",
"isBackground": true,
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"panel": "dedicated",
"reveal": "never"
},
"problemMatcher": [
"$tsc-watch"
]
}
]
}

View file

@ -5,7 +5,6 @@
[![license](https://img.shields.io/github/license/Strum355/vscode-mc-shader.svg)](https://github.com/Strum355/vscode-mc-shader)
[![Issues](https://img.shields.io/github/issues-raw/Strum355/vscode-mc-shader.svg)](https://github.com/Strum355/vscode-mc-shader/issues)
[![Maintainability](https://api.codeclimate.com/v1/badges/c2c813cb0a42a8aad483/maintainability)](https://codeclimate.com/github/Strum355/vscode-mc-shader/maintainability)
[![Waffle.io - Columns and their card count](https://badge.waffle.io/Strum355/vscode-mc-shader.png?columns=all)](https://waffle.io/Strum355/vscode-mc-shader)
<!-- It doesnt seem to like these :<
[![CI](https://ci.netsoc.co/api/badges/Strum355/vscode-mc-shader/status.svg?branch=master)](https://ci.netsoc.co/Strum355/vscode-mc-shader)

1616
client/package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -10,16 +10,18 @@
"url": "https://github.com/Strum355/vscode-mc-shader"
},
"engines": {
"vscode": "^1.23.0"
"vscode": "^1.37.0"
},
"scripts": {
"update-vscode": "node ./node_modules/vscode/bin/install",
"postinstall": "node ./node_modules/vscode/bin/install",
"update-vscode": "vscode-install",
"postinstall": "vscode-install",
"lint": "tslint -c ../tslint.json 'src/**/*.ts'",
"compile": "tsc -p ./"
},
"dependencies": {
"vscode": "^1.1.18",
"vscode-languageclient": "^4.1.4"
"vscode-languageclient": "^4.4.2"
},
"devDependencies": {
"vscode": "^1.1.36"
}
}

View file

@ -1,6 +1,6 @@
import * as path from 'path'
import * as vscode from 'vscode'
import * as vscodeLang from 'vscode-languageclient'
import * as path from 'path'
export async function activate(context: vscode.ExtensionContext) {
const serverModule = context.asAbsolutePath(path.join('server', 'out', 'server.js'))

180
package-lock.json generated
View file

@ -1,19 +1,33 @@
{
"name": "vscode-mc-shader",
"version": "0.8.5",
"version": "0.9.5",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@types/node": {
"version": "10.9.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.9.2.tgz",
"integrity": "sha512-pwZnkVyCGJ3LsQ0/3flQK5lCFao4esIzwUVzzk5NvL9vnkEyDhNf4fhHzUMHvyr56gNZywWTS2MR0euabMSz4A==",
"dev": true
"@babel/code-frame": {
"version": "7.5.5",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz",
"integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==",
"dev": true,
"requires": {
"@babel/highlight": "^7.0.0"
}
},
"ansi-regex": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
"@babel/highlight": {
"version": "7.5.0",
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz",
"integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==",
"dev": true,
"requires": {
"chalk": "^2.0.0",
"esutils": "^2.0.2",
"js-tokens": "^4.0.0"
}
},
"@types/node": {
"version": "10.14.15",
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.15.tgz",
"integrity": "sha512-CBR5avlLcu0YCILJiDIXeU2pTw7UK/NIxfC63m7d7CVamho1qDEzXKkOtEauQRPMy6MI8mLozth+JJkas7HY6g==",
"dev": true
},
"ansi-styles": {
@ -34,44 +48,6 @@
"sprintf-js": "~1.0.2"
}
},
"babel-code-frame": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz",
"integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=",
"dev": true,
"requires": {
"chalk": "^1.1.3",
"esutils": "^2.0.2",
"js-tokens": "^3.0.2"
},
"dependencies": {
"ansi-styles": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
"dev": true
},
"chalk": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"dev": true,
"requires": {
"ansi-styles": "^2.2.1",
"escape-string-regexp": "^1.0.2",
"has-ansi": "^2.0.0",
"strip-ansi": "^3.0.0",
"supports-color": "^2.0.0"
}
},
"supports-color": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
"dev": true
}
}
},
"balanced-match": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
@ -194,9 +170,9 @@
"dev": true
},
"esutils": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
"integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=",
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
"integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
"dev": true
},
"fs.realpath": {
@ -206,9 +182,9 @@
"dev": true
},
"glob": {
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
"integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
"version": "7.1.4",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz",
"integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
@ -225,15 +201,6 @@
"integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=",
"dev": true
},
"has-ansi": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
"integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
"dev": true,
"requires": {
"ansi-regex": "^2.0.0"
}
},
"has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
@ -257,9 +224,9 @@
}
},
"inherits": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
"dev": true
},
"is-arrayish": {
@ -278,15 +245,15 @@
}
},
"js-tokens": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
"integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=",
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
"dev": true
},
"js-yaml": {
"version": "3.12.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz",
"integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==",
"version": "3.13.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
"integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
"dev": true,
"requires": {
"argparse": "^1.0.7",
@ -312,9 +279,9 @@
}
},
"lodash": {
"version": "4.17.10",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz",
"integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==",
"version": "4.17.15",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
"dev": true
},
"minimatch": {
@ -326,6 +293,21 @@
"brace-expansion": "^1.1.7"
}
},
"minimist": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
"dev": true
},
"mkdirp": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
"dev": true,
"requires": {
"minimist": "0.0.8"
}
},
"normalize-package-data": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz",
@ -396,12 +378,12 @@
}
},
"resolve": {
"version": "1.8.1",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz",
"integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==",
"version": "1.12.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz",
"integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==",
"dev": true,
"requires": {
"path-parse": "^1.0.5"
"path-parse": "^1.0.6"
}
},
"rx": {
@ -460,15 +442,6 @@
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
"dev": true
},
"strip-ansi": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"dev": true,
"requires": {
"ansi-regex": "^2.0.0"
}
},
"strip-bom": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
@ -499,35 +472,36 @@
"dev": true
},
"tslib": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==",
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz",
"integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==",
"dev": true
},
"tslint": {
"version": "5.11.0",
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.11.0.tgz",
"integrity": "sha1-mPMMAurjzecAYgHkwzywi0hYHu0=",
"version": "5.18.0",
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.18.0.tgz",
"integrity": "sha512-Q3kXkuDEijQ37nXZZLKErssQVnwCV/+23gFEMROi8IlbaBG6tXqLPQJ5Wjcyt/yHPKBC+hD5SzuGaMora+ZS6w==",
"dev": true,
"requires": {
"babel-code-frame": "^6.22.0",
"@babel/code-frame": "^7.0.0",
"builtin-modules": "^1.1.1",
"chalk": "^2.3.0",
"commander": "^2.12.1",
"diff": "^3.2.0",
"glob": "^7.1.1",
"js-yaml": "^3.7.0",
"js-yaml": "^3.13.1",
"minimatch": "^3.0.4",
"mkdirp": "^0.5.1",
"resolve": "^1.3.2",
"semver": "^5.3.0",
"tslib": "^1.8.0",
"tsutils": "^2.27.2"
"tsutils": "^2.29.0"
},
"dependencies": {
"commander": {
"version": "2.17.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.17.0.tgz",
"integrity": "sha512-477o1hdVORiFlZxw8wgsXYCef3lh0zl/OV0FTftqiDxJSWw6dPQ2ipS4k20J2qBcsmsmLKSyr2iFrf9e3JGi4w==",
"version": "2.20.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz",
"integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==",
"dev": true
}
}
@ -542,9 +516,9 @@
}
},
"typescript": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.0.1.tgz",
"integrity": "sha512-zQIMOmC+372pC/CCVLqnQ0zSBiY7HHodU7mpQdjiZddek4GMj31I3dUJ7gAs9o65X7mnRma6OokOkc6f9jjfBg==",
"version": "3.5.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.3.tgz",
"integrity": "sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g==",
"dev": true
},
"validate-npm-package-license": {

View file

@ -11,7 +11,7 @@
"url": "https://github.com/Strum355/vscode-mc-shader"
},
"engines": {
"vscode": "^1.23.0"
"vscode": "^1.37.0"
},
"categories": [
"Linters",
@ -61,19 +61,16 @@
},
"scripts": {
"vscode:prepublish": "cd client && npm run update-vscode && cd .. && npm run compile",
"postinstall": "cd server && npm install && cd ../client && npm install && cd ..",
"compile": "npm run compile:client && npm run compile:server",
"compile:client": "tsc -p ./client/tsconfig.json",
"compile:server": "tsc -p ./server/tsconfig.json",
"watch:client": "tsc -w -p ./client/tsconfig.json",
"watch:server": "tsc -w -p ./server/tsconfig.json",
"compile": "tsc -b",
"watch": "tsc -b -w",
"postinstall": "cd client && npm install && cd ../server && npm install && cd ..",
"lint": "tslint -c tslint.json 'server/src/**/*.ts' && tslint -c tslint.json 'client/src/**/*.ts'",
"fix": "tslint -c tslint.json --fix server/src/**/*.ts && tslint -c tslint.json --fix client/src/**/*.ts"
},
"devDependencies": {
"@types/node": "^10.9.2",
"@types/node": "^10.14.15",
"concurrently": "^3.6.1",
"tslint": "^5.11.0",
"typescript": "^3.0.1"
"tslint": "^5.18.0",
"typescript": "^3.5.3"
}
}

View file

@ -5,14 +5,14 @@
"requires": true,
"dependencies": {
"@types/node": {
"version": "10.5.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.2.tgz",
"integrity": "sha512-m9zXmifkZsMHZBOyxZWilMwmTlpC8x5Ty360JKTiXvlXZfBWYpsg9ZZvP/Ye+iZUh+Q+MxDLjItVTWIsfwz+8Q=="
"version": "12.7.1",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.7.1.tgz",
"integrity": "sha512-aK9jxMypeSrhiYofWWBf/T7O+KwaiAHzM4sveCdWPn71lzUSMimRnKzhXDKfKwV1kWoBo2P1aGgaIYGLf9/ljw=="
},
"@types/node-fetch": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.1.2.tgz",
"integrity": "sha512-XroxUzLpKuL+CVkQqXlffRkEPi4Gh3Oui/mWyS7ztKiyqVxiU+h3imCW5I2NQmde5jK+3q++36/Q96cyRWsweg==",
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.0.tgz",
"integrity": "sha512-TLFRywthBgL68auWj+ziWu+vnmmcHCDFC/sqCOQf1xTz4hRq8cu79z8CtHU9lncExGBsB8fXA4TiLDLt6xvMzw==",
"requires": {
"@types/node": "*"
}
@ -61,9 +61,9 @@
}
},
"node-fetch": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.2.0.tgz",
"integrity": "sha512-OayFWziIxiHY8bCUyLX6sTpDH8Jsbp4FfYd1j1f7vZyfgkcOnAyM4oQR16f8a0s7Gl/viMGRey8eScYk4V4EZA=="
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz",
"integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA=="
},
"source-map": {
"version": "0.5.6",
@ -115,9 +115,9 @@
"integrity": "sha1-cXuPIgzAu3tE5AUUwisui7xw2Lk="
},
"typescript-logging": {
"version": "0.6.2",
"resolved": "https://registry.npmjs.org/typescript-logging/-/typescript-logging-0.6.2.tgz",
"integrity": "sha512-znbrZh0bjXH2QJrKz/EOiX/FXG6U8E38qLXZPlScP0oVQr+NOxAUfyIrLPZqeoq1Ebseyo66mYAvvp9xgCvlSg==",
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/typescript-logging/-/typescript-logging-0.6.3.tgz",
"integrity": "sha512-0zDqwjZ7KCvRobh3tXRel4IYU95iqThlsKxPeqxUmDBmhXO695LrTHvwgg9CjAPVqftSvL8ZPRcSAPT3i5DkLQ==",
"requires": {
"stacktrace-js": "1.3.1"
}

View file

@ -12,16 +12,13 @@
"node": "*"
},
"dependencies": {
"@types/node-fetch": "^2.1.2",
"node-fetch": "^2.2.0",
"typescript-logging": "^0.6.2",
"@types/node-fetch": "^2.5.0",
"node-fetch": "^2.6.0",
"typescript-logging": "^0.6.3",
"unzip-stream": "^0.3.0",
"vscode-languageserver": "^4.4.2"
},
"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 .",
"lint": "tslint -c ../tslint.json 'src/**/*.ts'"
}
}

View file

@ -0,0 +1,8 @@
import * as vsclang from 'vscode-languageserver'
import { linkLog } from './logging'
import { formatURI } from './utils'
export function getDocumentLinks(file: string): vsclang.DocumentLink[] {
linkLog.debug(() => formatURI(file) + ' ' + file)
return [vsclang.DocumentLink.create(vsclang.Range.create(8, 0, 8, 32), 'file:///home/noah/.minecraft/shaderpacks/robobo1221Shaders-7.9.01/shaders/lib/utilities.glsl')]
}

View file

@ -1,14 +1,14 @@
import { execSync } from 'child_process';
import { readFileSync, statSync } from 'fs';
import { platform } from 'os';
import * as path from 'path';
import { Diagnostic, DiagnosticSeverity, Range } from 'vscode-languageserver';
import { Comment } from './comment';
import { conf } from './config';
import { Graph } from './graph';
import { linterLog } from './logging';
import { connection } from './server';
import { formatURI, getDocumentContents, trimPath } from './utils';
import { execSync } from 'child_process'
import { readFileSync, statSync } from 'fs'
import { platform } from 'os'
import * as path from 'path'
import { Diagnostic, DiagnosticSeverity, Range } from 'vscode-languageserver'
import { Comment } from './comment'
import { conf } from './config'
import { Graph } from './graph'
import { linterLog } from './logging'
import { connection } from './server'
import { formatURI, getDocumentContents, trimPath } from './utils'
const reDiag = /^(ERROR|WARNING): ([^?<>*|"]+?):(\d+): (?:'.*?' : )?(.+)\r?/
const reVersion = /#version [\d]{3}/

View file

@ -1,7 +1,8 @@
import { CategoryServiceFactory, CategoryConfiguration, LogLevel, Category } from 'typescript-logging'
import { Category, CategoryConfiguration, CategoryServiceFactory, LogLevel } from 'typescript-logging'
CategoryServiceFactory.setDefaultConfiguration(new CategoryConfiguration(LogLevel.Debug))
export const linterLog = new Category('linter')
export const completionLog = new Category('completion')
export const serverLog = new Category('server')
export const serverLog = new Category('server')
export const linkLog = new Category('links')

View file

@ -1,24 +1,29 @@
import { dirname } from 'path'
import * as vsclang from 'vscode-languageserver'
import * as vsclangproto from 'vscode-languageserver-protocol'
import { completions } from './completionProvider'
import { preprocess, ext, includeGraph } from './linter'
import { extname, dirname } from 'path'
import { conf, glslangReady, onConfigChange } from './config'
import { getDocumentLinks } from './linksProvider'
import { includeGraph, preprocess } from './linter'
import { formatURI, getDocumentContents, postError } from './utils'
const reVersion = /#version [\d]{3}/
export let connection: vsclang.IConnection
connection = vsclang.createConnection(new vsclang.IPCMessageReader(process), new vsclang.IPCMessageWriter(process))
export let connection = vsclang.createConnection(vsclang.ProposedFeatures.all)
import { onConfigChange, conf, glslangReady } from './config'
import { formatURI, postError, getDocumentContents } from './utils'
console.log = connection.console.log.bind(connection.console)
console.error = connection.console.error.bind(connection.console)
export const documents = new vsclang.TextDocuments()
documents.listen(connection)
connection.onInitialize((params): vsclang.InitializeResult => (
connection.onInitialize((params) => (
{
capabilities: {
textDocumentSync: documents.syncKind,
documentLinkProvider: {
resolveProvider: true,
},
completionProvider: {
resolveProvider: true
},
@ -79,6 +84,8 @@ function lintBubbleDown(uri: string) {
})
}
connection.onDocumentLinks((params: vsclang.DocumentLinkParams) => getDocumentLinks(params.textDocument.uri))
connection.onDidChangeConfiguration(onConfigChange)
connection.onCompletion((textDocumentPosition: vsclang.TextDocumentPositionParams) => completions)

View file

@ -1,7 +1,7 @@
import { readFileSync } from 'fs';
import { conf } from './config';
import { serverLog } from './logging';
import { connection, documents } from './server';
import { readFileSync } from 'fs'
import { conf } from './config'
import { serverLog } from './logging'
import { connection, documents } from './server'
export function postError(e: Error) {
connection.window.showErrorMessage(e.message)

44
server/tslint.json Normal file
View file

@ -0,0 +1,44 @@
{
"defaultSeverity": "warning",
"extends": ["tslint:recommended"],
"rules": {
"quotemark": [true, "single"],
"comment-format": false,
"semicolon": [true, "never"],
"no-conditional-assignment": false,
"ordered-imports": false,
"object-literal-sort-keys": false,
"no-string-literal": false,
"array-type": false,
"interface-name": false,
"indent": [true, "spaces", 2],
"triple-equals": false,
"arrow-parens": false,
"max-classes-per-file": false,
"no-console": false,
"object-literal-key-quotes": false,
"object-literal-shorthand": {
"severity": "warning"
},
"eofline": false,
"member-ordering": false,
"interface-over-type-literal": false,
"trailing-comma": false,
"no-namespace": false,
"no-var-requires": false,
"max-line-length": {
"severity": "warning",
"options": [170]
},
"radix": false,
"no-empty": false,
"prefer-const": {
"severity": "warning"
},
"curly": [true, "ignore-same-line"],
"whitespace": false,
"no-trailing-whitespace": {
"severity": "warning"
}
}
}

20
tsconfig.json Normal file
View file

@ -0,0 +1,20 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"outDir": "out",
"rootDir": "src",
"sourceMap": true
},
"include": [
"src"
],
"exclude": [
"node_modules",
".vscode-test"
],
"references": [
{ "path": "./client" },
{ "path": "./server" }
]
}