Syrup

approvedunreviewed

by tinnyterr

Run and highlight Syrup circuit code blocks, with circuit diagrams.

↓ 31 downloadsUpdated 14d agoGPL-3.0

Syrup on Obsidian

This plugin provides syntax highlighting and execution of the syrup and ask languages. Specifically for the CS103 and CS106 classes at Strathclyde University.

LanguageSyntax highlightingExecutionHidden Code
SyrupSupported fully, using syrupSupported, using syrup-computeSupported, using syrup-compute-add or the inverse syrup-add-compute
AskSupported, using askUnsupported at this timeAlso unsupported at this time

Install

  1. Download main.js, manifest.json and styles.css from the latest release.
  2. Put them in <your vault>/.obsidian/plugins/syrup/ (create the folder if it isn't there).
  3. In Obsidian, go to Settings → Community plugins, turn off Restricted mode if it's on, and enable Syrup.

To check a release came from this repo's build, run gh attestation verify main.js --repo TinnyTerr/syrup-obsidian.

Use

Fence a block with one of these languages:

```syrup
-- highlighted only
```

```syrup-compute
-- highlighted, and the output is shown below
```

```syrup-add
-- highlighted, and fed to the note's shared file, no output
```

```syrup-compute-add
-- as syrup-compute, and fed to the shared file
```

```ask
-- highlighted only
```

Blocks in a note run in order and share one file, so a syrup-compute block can use anything defined in the -add blocks above it. Wrap a block in %% ... %% to hide it while still feeding the shared file.

Syrup

Currently, the js implementation of syrup found here is compiled in the release step of this plugin, and its source cannot be found here. However, its development, however faithful to the language, is still incomplete, and therefore any results from its response to code should be at least taken with a grain of salt.

Ask

Ask has no js implementation, and it will be worked on once syrup is complete. This also means I have no timeline for when this will be complete, and will be added in due course.

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.