Skip to content
Open
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
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,31 @@ The plugin implements intelligent two-way synchronization:

Note on Loop Prevention - Base64 content comparison prevents infinite update loops (and new lines issues).

## Auto-complete

Requires typescript-language-server eg through [lspconfig](https://github.com/neovim/nvim-lspconfig/blob/master/lsp/ts_ls.lua).

To get LSP suggestions you need to generate the `strudel-core.d.ts` file by running `npm run jsdoc-to-dts` in [this PR](https://codeberg.org/uzu/strudel/pulls/1542) on the strudel repo.

Set up your project folder as follows:

```
📁 strudel_tracks
- strudel-core.d.ts # this is the generated file
- tsconfig.json
📁 tracks
- track1.strudel.js # the file in which you get autocomplete
```
tsconfig.json:
```json
{
"compilerOptions": {
"allowJs": true,
},
"include": ["./strudel-core.d.ts", "tracks/*.js"]
}
```

## Troubleshooting

- Browser doesn't open - Ensure Node.js and npm are properly installed.
Expand Down
2 changes: 1 addition & 1 deletion docs/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
- [X] Two way sync cursor position between Neovim and Strudel editor (behind config flag)
- [ ] Don't depend on the `https://strudel.cc` website, host locally
- [ ] LSP and auto completion with the strudel API
- [ ] JS LSP integration
- [X] JS LSP integration
- [ ] Code formatter