Skip to content

Commit 2578d17

Browse files
committed
Update version (v0.1.0)
1 parent 60e1a04 commit 2578d17

File tree

6 files changed

+153
-21
lines changed

6 files changed

+153
-21
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
*.vsix
2+
node_modules

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
# Erg language support for Visual Studio Code
22

3-
__Warning__: The plugin is in a very early stage. Very few functions are available.
4-
5-
The initial version is a small part fork of https://github.com/julia-vscode/julia-vscode (has started to rewritten)
3+
This extension provides syntax highlighting and basic supports (diagnostics & code completion) for the [Erg](https://github.com/erg-lang/erg) programming language.

TODO.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
- [x] Highlighting basic syntax
44
- [x] Highlighting build functions & types
55
- [ ] Highlighting builtin procedures
6-
- [ ] Display compiler checks
7-
- [ ] Code completion
6+
- [x] Display compiler checks
7+
- [x] Code completion (basic)
88
- [ ] Hovering
99
- [ ] Jump to definition
1010
- [ ] Find references

extension.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
"use strict";
2+
const vscode = require("vscode");
3+
const languageclient = require("vscode-languageclient");
4+
5+
let client;
6+
7+
function activate(context) {
8+
try {
9+
const serverOptions = {
10+
command: "els",
11+
args: []
12+
};
13+
const clientOptions = {
14+
documentSelector: [
15+
{
16+
scheme: "file",
17+
language: "erg",
18+
}
19+
],
20+
};
21+
client = new languageclient.LanguageClient("els", serverOptions, clientOptions);
22+
context.subscriptions.push(client.start());
23+
} catch (e) {
24+
vscode.window.showErrorMessage("failed to start els.");
25+
}
26+
}
27+
28+
function deactivate() {
29+
if (client) return client.stop();
30+
}
31+
32+
module.exports = { activate, deactivate }

package-lock.json

Lines changed: 85 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,45 @@
33
"displayName": "vscode-erg",
44
"description": "Erg language support for Visual Studio Code",
55
"publisher": "erg-lang",
6-
"version": "0.0.3",
6+
"version": "0.1.0",
77
"engines": {
88
"vscode": "^1.70.0"
99
},
1010
"categories": [
1111
"Programming Languages"
1212
],
1313
"icon": "images/icon.jpg",
14-
"repository": {
15-
"type": "git",
16-
"url": "https://github.com/erg-lang/vscode-erg.git"
17-
},
14+
"repository": {
15+
"type": "git",
16+
"url": "https://github.com/erg-lang/vscode-erg.git"
17+
},
18+
"main": "./extension.js",
19+
"activationEvents": [
20+
"onLanguage:erg"
21+
],
1822
"contributes": {
19-
"languages": [{
20-
"id": "erg",
21-
"aliases": ["Erg", "erg"],
22-
"extensions": [".er"],
23-
"configuration": "./language-configuration.json"
24-
}],
25-
"grammars": [{
26-
"language": "erg",
27-
"scopeName": "source.erg",
28-
"path": "./syntaxes/erg.tmLanguage.json"
29-
}]
23+
"languages": [
24+
{
25+
"id": "erg",
26+
"aliases": [
27+
"Erg",
28+
"erg"
29+
],
30+
"extensions": [
31+
".er"
32+
],
33+
"configuration": "./language-configuration.json"
34+
}
35+
],
36+
"grammars": [
37+
{
38+
"language": "erg",
39+
"scopeName": "source.erg",
40+
"path": "./syntaxes/erg.tmLanguage.json"
41+
}
42+
]
43+
},
44+
"dependencies": {
45+
"vscode-languageclient": "^7.0.0"
3046
}
3147
}

0 commit comments

Comments
 (0)