Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/typescript.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: VS Code extension (ESLint)
name: VS Code extension

on:
push:
Expand All @@ -16,8 +16,8 @@ on:
workflow_dispatch:

jobs:
eslint:
name: Lint on Node v${{ matrix.node }}
checks:
name: Check on Node v${{ matrix.node }}
runs-on: ubuntu-latest
timeout-minutes: 10

Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
env:
CI: true

- name: Run ESLint
run: npm run eslint-check
- name: Run checks
run: npm run check
env:
CI: true
6 changes: 4 additions & 2 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ src
docs
.gitignore
tsconfig.json
esbuild.js
esbuild.mjs
package-lock.json
.github
eslint.config.js
.idea
eslint.config.ts
*.ts
dist/**/*.map
19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,29 @@ SimplicityHL is a high-level language for writing Simplicity smart contracts. Si

## Features

- Syntax highlighting for .simf and .wit files
- Basic language configuration (brackets, comments)
- Syntax highlighting and snippets for `.simf` and `.wit` files
- Compiler diagnostics, completion, hover, signature help, symbols, references, and go to definition
- Opt-in imports and enums support in the language server and direct compiler commands

The extension installs or connects to the [SimplicityHL language server](https://github.com/BlockstreamResearch/simplicityhl-lsp), which provides language intelligence:

Also, you can install the [SimplicityHL language server](https://github.com/distributed-lab/simplicityhl-lsp), which enables several features:
- Error diagnostics
![diagnostics](https://github.com/user-attachments/assets/54315645-464b-40c3-bb72-c6e8c4bc0ad5)

- Completion of user-defined functions and jets
- Completion of user-defined functions, imported items, built-ins, and jets
![completion](https://github.com/user-attachments/assets/bbc2b9de-c286-4d31-b47e-ac95885f8916)

## Experimental features

Open Settings and search for `SimplicityHL: Experimental Features`. `Imports` and `Enums` are independent checkboxes and both are disabled by default.

Import and module syntax requires `simplicityhl.experimentalFeatures.imports`. Enum syntax requires `simplicityhl.experimentalFeatures.enums`. The extension sends these choices to the LSP and adds the matching `-Z` flags to its direct `simc` commands and tasks.

The enum switch requires `simplicityhl-lsp` and `simc` 0.7.0 or newer.

The language server owns `Simplex.toml` discovery and imported-file analysis. The extension does not duplicate that resolver. Direct `simc` commands currently add feature flags only; they do not translate Simplex dependencies into `--dep` arguments. Use the project build tooling or invoke `simc` with the required dependency mappings for projects with external imports.

For local extension development, `simplicityhl.server.path` can point to a locally built `simplicityhl-lsp` binary.

### Development

Expand Down
6 changes: 5 additions & 1 deletion docs/development.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Extension installation from source code

Install Node.js (v14 or later recommended).
Install Node.js 20.19 or later (Node.js 22 LTS is recommended).

### Local Installation

Expand All @@ -26,6 +26,10 @@ Install Node.js (v14 or later recommended).
- Select "Install from VSIX..."
- Navigate to and select the `.vsix` file you created

To test a local language-server build, set `simplicityhl.server.path` to its absolute executable path.
Enable `simplicityhl.experimentalFeatures.imports` or `simplicityhl.experimentalFeatures.enums` as needed.
Open a project at its Simplex root so the language server can discover its manifest.

### Alternative Installation Method

You can also install the extension directly from the source code:
Expand Down
4 changes: 2 additions & 2 deletions esbuild.js → esbuild.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const esbuildProblemMatcherPlugin = {
},
};

main().catch((e) => {
console.error(e);
main().catch((error) => {
console.error(error);
process.exit(1);
});
2 changes: 1 addition & 1 deletion eslint.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default defineConfig(
},
},
{
files: ["**/*.js"],
files: ["**/*.{js,mjs}"],
languageOptions: {
globals: {
...globals.node,
Expand Down
Loading
Loading