VScode extension for SCs language support. Original project - vs-code-ostis
- SCs highlighting
- SCs snippets
- Autocompletion (simple provider)
- Uploading SCs to sc-machine
- Window with Sc-web (also with uploaded SCs)
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.
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.
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.
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.
Find the command "Delete all SCs from the connected sc-machine". This will delete all previously downloaded SCs from the sc-machine.
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:
- Install all dependencies
npm install
- Compile project (this step is required after any changes )
npm run compile
- 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 🍺
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