slint/vscode_extension
2021-04-09 15:23:38 +02:00
..
.vscode Generate the vscode extension with the wizard 2020-12-23 15:15:53 +01:00
src Make it easier to build a local package 2021-04-09 10:51:12 +02:00
.eslintrc.json Generate the vscode extension with the wizard 2020-12-23 15:15:53 +01:00
.gitignore Add .gitignore 2021-04-09 15:23:38 +02:00
package.json Make it easier to build a local package 2021-04-09 10:51:12 +02:00
README.md Make it easier to build a local package 2021-04-09 10:51:12 +02:00
sixtyfps.tmLanguage.json Rename "signal" to "callback" 2020-12-18 09:51:01 +01:00
tsconfig.json Generate the vscode extension with the wizard 2020-12-23 15:15:53 +01:00
vsc-extension-quickstart.md Generate the vscode extension with the wizard 2020-12-23 15:15:53 +01:00

sixtyfps-vscode README

Extension for VSCode which include syntax coloration and a way to start the LSP server

Features

  • Syntax highlighting
  • Diagnostics from .60 files
  • Live Preview of a .60 file
  • Completion of properties
  • Jump to definition (currently, only definition of Component)

Setup

  1. Build the LSP
cargo build --bin sixtyfps-lsp
  1. run npm install in the vscode directory
cd vscode_extension
npm install

How to debug the LSP

At the moment you need to load this directory in VS code and then start debugging (Run -> Start Debugging). That will "debug" the vs code extension and create a new VS code window. The LSP server binary will be started if previously built You can see the output in the output pane "SixtyFPS LSP" (that's the drop-down that usually shows "Tasks").

How to build the extension package

To create a .vsix package for local installation:

  1. Follow the setup steps above to build the lsp binary and install npm dependencies.

  2. Create a .vsix package (needs vsce installed)

npm run local-package
  1. Install the .vsix file with
code --install-extension sixtyfps-vscode-*.vsix
  1. Reload your VS code windows

Note that the resulting .vsix package contains your locally built debug LSP server. It is not suitable for distribution.