Skip to content

Conversation

@tuesmiddt
Copy link
Contributor

  • Enable autocompletion prompt
  • Prompt names in scope including built-ins and external libraries
  • Display documentation where possible

TODO:

  • Disable prompt when declaring function parameters.

Copy link
Member

@martin-henz martin-henz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great feature. Cutting across so many files, right now, due to the somewhat bloated cadet-frontend.

@martin-henz martin-henz merged commit 788f1a9 into source-academy:sa_2021 Apr 7, 2020
score: 1000 // Prioritize suggestions from code
}));

const builtinSuggestions = Documentation.builtins[context.chapter] || [];
Copy link
Contributor

@jonchan51 jonchan51 Apr 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, was looking at the frontend and realised that the variants aren't supported yet.
image
I took a look and suggest something along the lines of the above. Not sure if there are any consequences of doing that right now though, and whether other variants are able to do something like this.
The inserted code in the screenshot works for Source 3 Concurrent at least, but breaks for Non-Det.

btzy pushed a commit that referenced this pull request May 2, 2020
* Add autocompletion and documentation display (#2)

Add autocompletion and documentation display for builtins

* Integrate code autocompletion

* Bump js-slang version, handle editor prepend

* Comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants