Skip to content

Commit

Permalink
Update version (v0.1.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
mtshiba committed Sep 23, 2022
1 parent 60e1a04 commit 2578d17
Show file tree
Hide file tree
Showing 6 changed files with 153 additions and 21 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*.vsix
node_modules
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Erg language support for Visual Studio Code

__Warning__: The plugin is in a very early stage. Very few functions are available.

The initial version is a small part fork of https://github.com/julia-vscode/julia-vscode (has started to rewritten)
This extension provides syntax highlighting and basic supports (diagnostics & code completion) for the [Erg](https://github.com/erg-lang/erg) programming language.
4 changes: 2 additions & 2 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
- [x] Highlighting basic syntax
- [x] Highlighting build functions & types
- [ ] Highlighting builtin procedures
- [ ] Display compiler checks
- [ ] Code completion
- [x] Display compiler checks
- [x] Code completion (basic)
- [ ] Hovering
- [ ] Jump to definition
- [ ] Find references
Expand Down
32 changes: 32 additions & 0 deletions extension.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
"use strict";
const vscode = require("vscode");
const languageclient = require("vscode-languageclient");

let client;

function activate(context) {
try {
const serverOptions = {
command: "els",
args: []
};
const clientOptions = {
documentSelector: [
{
scheme: "file",
language: "erg",
}
],
};
client = new languageclient.LanguageClient("els", serverOptions, clientOptions);
context.subscriptions.push(client.start());
} catch (e) {
vscode.window.showErrorMessage("failed to start els.");
}
}

function deactivate() {
if (client) return client.stop();
}

module.exports = { activate, deactivate }
85 changes: 85 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 32 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,45 @@
"displayName": "vscode-erg",
"description": "Erg language support for Visual Studio Code",
"publisher": "erg-lang",
"version": "0.0.3",
"version": "0.1.0",
"engines": {
"vscode": "^1.70.0"
},
"categories": [
"Programming Languages"
],
"icon": "images/icon.jpg",
"repository": {
"type": "git",
"url": "https://github.com/erg-lang/vscode-erg.git"
},
"repository": {
"type": "git",
"url": "https://github.com/erg-lang/vscode-erg.git"
},
"main": "./extension.js",
"activationEvents": [
"onLanguage:erg"
],
"contributes": {
"languages": [{
"id": "erg",
"aliases": ["Erg", "erg"],
"extensions": [".er"],
"configuration": "./language-configuration.json"
}],
"grammars": [{
"language": "erg",
"scopeName": "source.erg",
"path": "./syntaxes/erg.tmLanguage.json"
}]
"languages": [
{
"id": "erg",
"aliases": [
"Erg",
"erg"
],
"extensions": [
".er"
],
"configuration": "./language-configuration.json"
}
],
"grammars": [
{
"language": "erg",
"scopeName": "source.erg",
"path": "./syntaxes/erg.tmLanguage.json"
}
]
},
"dependencies": {
"vscode-languageclient": "^7.0.0"
}
}

0 comments on commit 2578d17

Please sign in to comment.