Skip to content
This repository has been archived by the owner on Jan 27, 2025. It is now read-only.

Commit

Permalink
Merge pull request #33 from metafacture/25-extension-installation
Browse files Browse the repository at this point in the history
Installation of vsc fix extension
  • Loading branch information
katauber authored Dec 4, 2020
2 parents e1117dc + 360dee2 commit 2507a3f
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ out/
node_modules/
xtext-server/
package-lock.json

*.vsix
25 changes: 20 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ Run the tests (in `org.metafacture.fix/src/test/java`) and checks (`.editorconfi

## Extension

The project `org.metafacture.fix.vsc` provides an extension for Visual Studio Code for `fix` via the language server protocol (LSP). In the current state the extension supports auto completion, simple syntax highlighting and auto closing brackets and quotes. This project was created using this [tutorial](https://www.typefox.io/blog/building-a-vs-code-extension-with-xtext-and-the-language-server-protocol) and the corresponding [example](https://github.com/TypeFox/languageserver-example).
The project `org.metafacture.fix.vsc` provides an extension for Visual Studio Code / Codium for `fix` via the language server protocol (LSP). In the current state the extension supports auto completion, simple syntax highlighting and auto closing brackets and quotes. This project was created using this [tutorial](https://www.typefox.io/blog/building-a-vs-code-extension-with-xtext-and-the-language-server-protocol) and the corresponding [example](https://github.com/TypeFox/languageserver-example).

Start extension (in development mode, starting a second code/codium instance):

Build extension:

1. Install Visual Studio Code / alternative: VS Codium
2. Install Node.js (including npm)
Expand All @@ -49,9 +50,23 @@ Unix: `./gradlew installServer`
Windows: `.\gradlew.bat installServer`
4. In org.metafacture.fix.vsc execute (tip: if you use windows, install cygwin to execute npm commands):
`npm install`
5. Open org.metafacture.fix.vsc in Visual Studio Code
6. Launch vscode extension by pressing F5 (opens new window of Visual Studio Code)
7. Open new file (file-ending .fix) or open existing fix-file (see sample below)

To start the extension in development mode (starting a second code/codium instance), follow A. To create an vsix file to install the extension permanently follow B.

A) Run in dev mode:
1. Open org.metafacture.fix.vsc in Visual Studio Code / Codium
2. Launch vscode extension by pressing F5 (opens new window of Visual Studio Code)
3. Open new file (file-ending .fix) or open existing fix-file (see sample below)

B) Install vsix file:
1. Install vsce: `npm install -g vsce`
2. In org.metafacture.fix.vsc execute: `vsce package`
vsce will create a vsix file in the vsc directory which can be used for installation:
3. Open VS Code / Codium
4. Click 'Extensions' section
5. Click menu bar and choose 'Install from VSIX...'



## Web Server

Expand Down
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ editorconfig {
'**/.*',
'gradlew*',
'**/out',
'**/node_modules'
'**/node_modules',
'**/*.vsix'
]
}

Expand Down
8 changes: 6 additions & 2 deletions org.metafacture.fix.vsc/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "fix",
"displayName": "fix",
"description": "Fix Language Support (Xtext Language Server for Fix)",
"description": "Language Support for Metafacture Fix (Xtext Language Server for Metafacture Fix). For more information, visit https://metafacture.org",
"version": "0.0.1",
"publisher": "katauber",
"publisher": "metafacture",
"engines": {
"vscode": "^1.18.0"
},
Expand Down Expand Up @@ -47,5 +47,9 @@
},
"dependencies": {
"vscode-languageclient": "^3.0.3"
},
"repository": {
"type": "git",
"url": "https://github.com/metafacture/metafacture-fix.git"
}
}

0 comments on commit 2507a3f

Please sign in to comment.