-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
08e00bd
commit 4b31f21
Showing
8 changed files
with
1,479 additions
and
1,380 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
const esbuild = require('esbuild'); | ||
|
||
const production = process.argv.includes('--production'); | ||
const watch = process.argv.includes('--watch'); | ||
|
||
async function main() { | ||
const ctx = await esbuild.context({ | ||
entryPoints: ['client/src/extension.ts'], | ||
bundle: true, | ||
format: 'cjs', | ||
minify: production, | ||
sourcemap: !production, | ||
sourcesContent: false, | ||
platform: 'node', | ||
outfile: 'dist/extension.js', | ||
external: ['vscode'], | ||
logLevel: 'silent', | ||
plugins: [ | ||
/* add to the end of plugins array */ | ||
esbuildProblemMatcherPlugin | ||
] | ||
}); | ||
if (watch) { | ||
await ctx.watch(); | ||
} else { | ||
await ctx.rebuild(); | ||
await ctx.dispose(); | ||
} | ||
} | ||
|
||
/** | ||
* @type {import('esbuild').Plugin} | ||
*/ | ||
const esbuildProblemMatcherPlugin = { | ||
name: 'esbuild-problem-matcher', | ||
|
||
setup(build) { | ||
build.onStart(() => { | ||
console.log('[watch] build started'); | ||
}); | ||
build.onEnd(result => { | ||
result.errors.forEach(({ text, location }) => { | ||
console.error(`✘ [ERROR] ${text}`); | ||
console.error(` ${location.file}:${location.line}:${location.column}:`); | ||
}); | ||
console.log('[watch] build finished'); | ||
}); | ||
} | ||
}; | ||
|
||
main().catch(e => { | ||
console.error(e); | ||
process.exit(1); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,89 +1,84 @@ | ||
{ | ||
"name": "nrs-language-server", | ||
"description": "nano rust language server", | ||
"license": "MIT", | ||
"version": "1.5.0", | ||
"categories": [], | ||
"keywords": [ | ||
"language-server", | ||
"tower-lsp" | ||
], | ||
"repository": { | ||
"url": "https://github.com/IWANABETHATGUY/tower-lsp-boilerplate" | ||
}, | ||
"engines": { | ||
"vscode": "^1.66.0" | ||
}, | ||
"enabledApiProposals": [], | ||
"activationEvents": [ | ||
"onLanguage:nrs" | ||
], | ||
"main": "./dist/extension.js", | ||
"contributes": { | ||
"languages": [ | ||
{ | ||
"id": "nrs", | ||
"extensions": [ | ||
".nrs" | ||
] | ||
} | ||
], | ||
"configuration": { | ||
"type": "object", | ||
"title": "nrs-language-server", | ||
"properties": { | ||
"nrs-language-server.trace.server": { | ||
"type": "string", | ||
"scope": "window", | ||
"enum": [ | ||
"off", | ||
"messages", | ||
"verbose" | ||
], | ||
"enumDescriptions": [ | ||
"No traces", | ||
"Error only", | ||
"Full log" | ||
], | ||
"default": "off", | ||
"description": "Traces the communication between VS Code and the language server." | ||
} | ||
} | ||
} | ||
}, | ||
"scripts": { | ||
"postinstall": "cd client && pnpm i", | ||
"test-compile": "tsc -p ./", | ||
"compile": "cross-env NODE_ENV=production tsc -b", | ||
"watch": "rm -rf dist && tsc -b -w", | ||
"lint": "eslint src --ext ts", | ||
"pretest": "npm run compile && npm run lint", | ||
"test": "node ./out/test/runTest.js", | ||
"build": "webpack --config webpack.config.js", | ||
"package": "vsce package --no-dependencies", | ||
"publish": "vsce publish --no-dependencies" | ||
}, | ||
"devDependencies": { | ||
"@types/glob": "^7.1.3", | ||
"@types/mocha": "^8.0.0", | ||
"@types/node": "^12.12.0", | ||
"@typescript-eslint/eslint-plugin": "^3.8.0", | ||
"@typescript-eslint/parser": "^3.8.0", | ||
"@vscode/vsce": "^3.2.1", | ||
"cross-env": "^7.0.2", | ||
"electron-rebuild": "^1.11.0", | ||
"eslint": "^7.6.0", | ||
"glob": "^7.1.7", | ||
"mocha": "^8.0.1", | ||
"ts-loader": "^9.5.1", | ||
"typescript": "5.4.5", | ||
"vscode-test": "^1.4.0", | ||
"vscode-uri": "^3.0.2", | ||
"webpack": "^5.82.1", | ||
"webpack-cli": "^5.1.4" | ||
}, | ||
"dependencies": { | ||
"vscode-languageclient": "9.0.1" | ||
}, | ||
"packageManager": "[email protected]" | ||
"name": "nrs-language-server", | ||
"description": "nano rust language server", | ||
"license": "MIT", | ||
"version": "1.5.0", | ||
"categories": [], | ||
"keywords": [ | ||
"language-server", | ||
"tower-lsp" | ||
], | ||
"repository": { | ||
"url": "https://github.com/IWANABETHATGUY/tower-lsp-boilerplate" | ||
}, | ||
"engines": { | ||
"vscode": "^1.66.0" | ||
}, | ||
"enabledApiProposals": [], | ||
"activationEvents": [ | ||
"onLanguage:nrs" | ||
], | ||
"main": "./dist/extension.js", | ||
"contributes": { | ||
"languages": [ | ||
{ | ||
"id": "nrs", | ||
"extensions": [ | ||
".nrs" | ||
] | ||
} | ||
], | ||
"configuration": { | ||
"type": "object", | ||
"title": "nrs-language-server", | ||
"properties": { | ||
"nrs-language-server.trace.server": { | ||
"type": "string", | ||
"scope": "window", | ||
"enum": [ | ||
"off", | ||
"messages", | ||
"verbose" | ||
], | ||
"enumDescriptions": [ | ||
"No traces", | ||
"Error only", | ||
"Full log" | ||
], | ||
"default": "off", | ||
"description": "Traces the communication between VS Code and the language server." | ||
} | ||
} | ||
} | ||
}, | ||
"scripts": { | ||
"postinstall": "cd client && pnpm i", | ||
"compile": "npm run check-types && node esbuild.js --production", | ||
"check-types": "tsc --noEmit", | ||
"watch": "npm-run-all -p watch:*", | ||
"watch:esbuild": "node esbuild.js --watch", | ||
"watch:tsc": "tsc --noEmit --watch --project tsconfig.json", | ||
"package": "vsce package --no-dependencies" | ||
}, | ||
"devDependencies": { | ||
"@types/glob": "8.1.0", | ||
"@types/mocha": "10.0.10", | ||
"@types/node": "22.10.2", | ||
"@typescript-eslint/eslint-plugin": "^3.8.0", | ||
"@typescript-eslint/parser": "^3.8.0", | ||
"@vscode/vsce": "^3.2.1", | ||
"cross-env": "^7.0.2", | ||
"esbuild": "^0.24.2", | ||
"eslint": "9.17.0", | ||
"glob": "11.0.0", | ||
"mocha": "11.0.2", | ||
"npm-run-all": "^4.1.5", | ||
"ts-loader": "^9.5.1", | ||
"typescript": "5.4.5", | ||
"vscode-test": "^1.4.0", | ||
"vscode-uri": "^3.0.2" | ||
}, | ||
"dependencies": { | ||
}, | ||
"packageManager": "[email protected]" | ||
} |
Oops, something went wrong.