Skip to content

Commit

Permalink
release(1.0.1): version 1.0.1 (#16)
Browse files Browse the repository at this point in the history
* doc(readme): tell how to install via the CLI

* feat(server): add simple completion support

* chore(readme): split readme and changelogs

* chore(licence): update licence

* chore(package): update ackage.json files

* chore(licence): more licence cleaning

* release(0.0.3): version 0.0.3 (#8)

* release(0.0.3): version 0.0.3

* release(date): set release date

* fix(packaging): correctly package server-side libs

* release(1.0.0): version 1.0.0 (#10)

* Release/0.0.3 (#7)

* doc(readme): tell how to install via the CLI

* feat(server): add simple completion support

* chore(readme): split readme and changelogs

* chore(licence): update licence

* chore(package): update ackage.json files

* chore(licence): more licence cleaning

* release(0.0.3): version 0.0.3

* release(date): set release date

* release(1.0.0): version 1.0.0

* chore(licence): update licences

* chore(readme): reread, fix links, improve formatting (#11)

* feat(snippets): real alternate choices in snippets (#13)

* feat(snippets): link words with “_” when needed; indentation

* doc(package): update instructions according to what I experienced

* chore(changelog): added section and item

* feat(snippets): real alternate choices in snippets

* feat(npm): updated scripts and related doc (#14)

* feat(npm): updated scripts and related doc

* feat(prerequisites): add vsce to the project's dependencies and update doc

* release(1.0.1): version 1.0.1

* release(1.0.1): update changelog
  • Loading branch information
alacambre-yseop committed May 31, 2018
1 parent 59c8528 commit 80765e2
Show file tree
Hide file tree
Showing 13 changed files with 621 additions and 88 deletions.
60 changes: 37 additions & 23 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,45 +1,58 @@
:vsc: VS{nbsp}Code

# README

## This is the README for the "vscode-yseopml" project
## This is the README for the “vscode-yseopml” project

This folder contains the {vsc}{nbsp}extension that runs a YML (Yseop Markup Language) language server.

This folder contains the VS code extension that runs a YML (Yseop Markup Language) language server.
The extension observes all “yml”{nbsp}documents (documents from all editors associated to the YML{nbsp}language –{nbsp}kao{nbsp}files, yclass{nbsp}files, etc.) and uses the server to provide validation and completion suggestions.

The extension observes all 'yml' documents (documents from all editors associated to YML language – kao files, yclass files, etc.) and uses the server to provide validation and completion proposals.
The code for the extension is in the `client`{nbsp}directory. It uses the `vscode-languageclient`{nbsp}node module to launch the language server.

The code for the extension is in the 'client' folder. It uses the 'vscode-languageclient' node module to launch the language server.
The language server is located in the `server`{nbsp}directory.

The language server is located in the 'server' folder.

## How to run locally

* `npm install` to initialize the extension and the server
* `npm run compile` to compile the extension and the server
* open this folder in VS Code. In the Debug viewlet, run “Launch Client” from drop-down to launch the extension and attach to the extension.
* open `test.kao` which is in the `client/test` folder.
* to debug the server use the 'Attach to Server' launch config.
* set breakpoints in the client or the server.
. Run `npm install` to initialize the extension and the server.
. Run `npm run compile` to compile the extension and the server.
. Open this folder in {vsc}. In the “Debug” viewlet, run “Launch Client” from drop-down to launch the extension and attach to the extension.
. Open `test.kao` which is in the `client/test` folder.
. To debug the server, use the “Attach to Server” launch config.
. Set breakpoints in the client or the server.


## How to generate antlr4 files

* if not already the case, install `ANTLR tool` as explained [here](http://www.antlr.org/download.html) and [here](https://github.com/antlr/antlr4/blob/master/doc/getting-started.md)
* modify `YmlToBdl.g4` grammar file
* `npm run antlr4ts` to generate tokens, lexer and parser files
. If you did not already, install `ANTLR tool` as explained http://www.antlr.org/download.html[here] and https://github.com/antlr/antlr4/blob/master/doc/getting-started.md[here].
. Edit the `YmlToBdl.g4` grammar file.
. Run `npm run antlr4ts` to generate tokens, lexer and parser files.

## How to update Syntax Coloring

In order to update the syntax coloring, you must modify the file `yml.tmLanguage.json` accordingly to the [TextMate Manual](http://manual.macromates.com/en/language_grammars#language_grammars).
## How to update Syntax Highlighting

In order to update the syntax highlighting, you must edit `yml.tmLanguage.json` according to the http://manual.macromates.com/en/language_grammars#language_grammars[TextMate Manual].

The format available in this manual is a little bit different than the one we are using (json). However it is easy to understand how to change it to fit our needs.


## Package the extension

Do the following in your terminal:
Run the following command in your terminal:

```[bash]
npm run package
```

You should now have a new file with `.vsix` file extension in the `client` directory. This is the packaged extension to provide for installation.
It should end with a line like:

```
Created: /PATH/TO/vscode-yseopml/client/vscode-yseopml-X.X.X.vsix
```

This `.vsix`{nbsp}file in the `client`{nbsp}directory is the packaged extension that can be provided to {vsc} to install the extension.


## Install the extension

Expand All @@ -49,10 +62,11 @@ You should now have a new file with `.vsix` file extension in the `client` direc
code --install-extension EXTENSION_FILE.vsix
```


### Via the GUI

- Open the vscode command console with `ctrl + shift + P`
- Search `Install Extension from VSIX`
- Select the extension and validate
- Reload vscode
- Open client/test/test.kao to validate the installation
. Open the {vsc}{nbsp}command console with `Ctrl + Shift + P`.
. Type “vsix” to search for the command “Install Extension from VSIX”.
. Select the extension file and validate.
. Reload {vsc}.
. Open `client/test/test.kao` to check that the extension is working properly.
4 changes: 4 additions & 0 deletions client/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release Notes

## 1.0.1 (2018-05-31)

- Cleaner code snippets

## 1.0.0 (2018-05-24)

- Fix KB class attribute completion
Expand Down
2 changes: 1 addition & 1 deletion client/out/src/extension.js

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

2 changes: 1 addition & 1 deletion client/package-lock.json

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

2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-yseopml",
"displayName": "YML (Yseop Markup Language) support extension",
"description": "Yseop Markup Language support extension − coloring and code folding for YML",
"version": "1.0.0",
"version": "1.0.1",
"author": "Yseop",
"license": "MIT",
"publisher": "Yseop",
Expand Down
8 changes: 4 additions & 4 deletions client/server/package-lock.json

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

8 changes: 4 additions & 4 deletions client/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-yseopml",
"displayName": "YML (Yseop Markup Language) support extension",
"description": "Implementation of YML language server in node.",
"version": "1.0.0",
"version": "1.0.1",
"author": "Yseop",
"publisher": "Yseop",
"license": "MIT",
Expand All @@ -14,12 +14,12 @@
"url": "https://github.com/yseop/vscode-yseopml"
},
"dependencies": {
"vscode-languageserver": "^3.4.2",
"antlr4ts": "^0.4.1-alpha.0",
"@types/mocha": "^2.2.42",
"@types/node": "^6.0.88",
"antlr4ts": "^0.4.1-alpha.0",
"antlr4ts-cli": "^0.4.0-alpha.4",
"typescript": "^2.5.2"
"typescript": "^2.8.4",
"vscode-languageserver": "^3.4.2"
},
"scripts": {
"installServer": "installServerIntoExtension ../client ./package.json ./tsconfig.json",
Expand Down
2 changes: 1 addition & 1 deletion client/server/server.js

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

84 changes: 42 additions & 42 deletions client/snippets/snippets.json
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
{
"Granule": {
"prefix": "granule",
"body": [
"\\(",
"\t$0",
"\\)"
],
"description": "Text Granule"
},
"Field": {
"prefix": "field",
"body": [
"field ${1:attribute name}",
"--> ${2:option name} ${3:option value}"
],
"description": "Yml Class attribute"
},
"Instance": {
"prefix": "instance",
"body": [
"${1:instance type} ${2:instance name}",
"--> ${3:option name} ${4:option value}",
"$0",
";"
],
"description": "Object Instance"
},
"Textualization Attribute": {
"prefix": "textu",
"body": [
"--> dsl -> Textualization",
"\t--> language ${1:LANG_fr or LANG_en}",
"\t--> root \"${2:root string}\"",
"\t--> number ${3:SINGULAR or PLURAL}",
"\t--> gender ${4:FEMININE or MASCULINE}",
"\t--> hasDeterminer ${5:true or false}",
";",
"$0"
],
"description": "Textualization Attribute"
}
{
"Granule": {
"prefix": "granule",
"body": [
"\\(",
"\t$0",
"\\)"
],
"description": "Text granule"
},
"Field": {
"prefix": "field",
"body": [
"field ${1:attribute_name}",
"\t--> ${2:option_name} ${3:option_value}"
],
"description": "Yml class attribute"
},
"Instance": {
"prefix": "instance",
"body": [
"${1:instance_type} ${2:instance_name}",
"\t--> ${3:option_name} ${4:option_value}",
"\t$0",
";"
],
"description": "Object instance"
},
"Textualization Attribute": {
"prefix": "textu",
"body": [
"--> dsl -> Textualization",
"\t--> language ${1|LANG_fr,LANG_en|}",
"\t--> root \"${2:root_string}\"",
"\t--> number ${3|SINGULAR,PLURAL|}",
"\t--> gender ${4|FEMININE,MASCULINE|}",
"\t--> hasDeterminer ${5|true,false|}",
";",
"$0"
],
"description": "Textualization attribute"
}
}

0 comments on commit 80765e2

Please sign in to comment.