Skip to content

LSP server+client for SCs, a semantic network DSL used in OSTIS project

License

Notifications You must be signed in to change notification settings

FallenChromium/WINK-vscode-extension

 
 

Repository files navigation

WINK-vscode-extension

VScode extension for SCs language support. Original project - vs-code-ostis

Features

  1. SCs highlighting
  2. SCs snippets
  3. Autocompletion (simple provider)
  4. Uploading SCs to sc-machine
  5. Window with Sc-web (also with uploaded SCs)

How to use

The description can be found in the original project. But there are some new features in this project. You should run ostis to get them. Important note: Use ctrl+shift+p to open the VScode command finder.

Upload active SCs to sc-machine and check it using sc-web

Open any file with the correct SCs code and open the command finder. Find the command "Save current SCs to the connected sc-machine" and click on it. Your SCs will be downloaded to the sc-machine and a new window with SCg will open in VScode.

drawing

Unload loaded SCs

Open the loaded(!!!) SCs. Find the command "Delete current SCs from the connected sc-machine" and click on it. Your SCs will be deleted from the sc-machine. But this function is not really needed, because when you load SCs again, it will automatically be deleted and loaded again. And it will also automatically close the sc-web window for deleted SCs.

drawing

Upload all SCs files from your project

Find the command "Save all scs files from the open project to sc-machine". You will then be able to find all your entities in sc-machine. You can use sc-web in VScode or in the browser.

Unload all loaded SCs from sc-machine

Find the command "Delete all SCs from the connected sc-machine". This will delete all previously downloaded SCs from the sc-machine.

For developers

How to configure and run

First of all, you need a vs-code with the latest updates (no older than May 2022 due to the project's use of the new tab API). After that, follow the steps:

  1. Install all dependencies
npm install
  1. Compile project (this step is required after any changes )
npm run compile
  1. Run the project using "Launch Extension" task in VSCode, or open file extension/src/extension.ts and click F5, use "VSCode Extension Development" as a debugger if the choice will be presented to you. After that, a new window with the activated plug-in should open immediately. You can find SCs test files in the tests/alcohol folder 🍺

How to debug

To debug the extension code, all you need to do is set breakpoints and run the extension.

To debug the LSP, you need to connect to the NodeJS process, as the LSP does not run on the same js engine as the extension. We are using debug port 6009 for our extension, the process on that port with a bigger process ID will likely be the LSP server.

ToDo full instruction) But you can check this repo https://github.com/microsoft/vscode-extension-samples

About

LSP server+client for SCs, a semantic network DSL used in OSTIS project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 56.8%
  • JavaScript 24.8%
  • TypeScript 15.1%
  • C++ 1.8%
  • ANTLR 0.9%
  • CMake 0.3%
  • Shell 0.3%