Skip to content

Commit

Permalink
feat: add autocompletion of contracts and syntax highlighting (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
puria authored Oct 9, 2024
1 parent e9a72e4 commit de4ad7b
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
"@types/node": "^20.14.8",
"ansi-to-html": "^0.7.2",
"codemirror": "^6.0.1",
"codemirror-lang-slangroom": "^1.3.0",
"effect": "^3.5.7",
"fuse.js": "^7.0.0",
"has-ansi": "^6.0.0",
Expand Down
40 changes: 40 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
executeSlangroomContract,
loadSlangroom,
} from './utils/slangroom';
import { Slangroom } from "codemirror-lang-slangroom"

import hasAnsi from 'has-ansi';
import Convert from 'ansi-to-html';
Expand Down Expand Up @@ -175,7 +176,7 @@ export class DyneSlangroomEditor {
<dyne-code-editor
name={EditorId.CONTRACT}
content={this.contract}
config={{ extensions: this.keyboardExtension }}
config={{ extensions: [this.keyboardExtension, Slangroom()] }}
></dyne-code-editor>
</Section>

Expand Down

0 comments on commit de4ad7b

Please sign in to comment.