Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added support for completions in monaco editor. #432

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ShreyBana
Copy link
Collaborator

@ShreyBana ShreyBana commented Feb 25, 2025

  • Monaco input type now accepts a vector of json values to be used for completions.
  • Added JS-FFI(via wasm-bindgen) to create a monaco completions object. This is required as we have to call another JS-FFI to register this object, and that FFI itself accepts a foreign JS type, so needed to write the constructor in JS.
  • Completions get registered on render & cleaned up on de-render.

tmp FEP15rxtNz

@ShreyBana ShreyBana added enhancement New feature or request UI things relating to the UI labels Feb 25, 2025
@ShreyBana ShreyBana requested a review from a team as a code owner February 25, 2025 11:35
Comment on lines 65 to 70
if let Some(idp) = set_monaco_suggestions(language.to_string().as_str(), &suggestions)
{
on_cleanup(move || idp.dispose());
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

most likely its not formatted

- Monaco input type now accepts a vector of json values to be used for
  completions.
- Added JS-FFI(via wasm-bindgen) to create monaco completions object.
  This is required as we have to call another JS-FFI to register this
  object, and that FFI itself accepts a foreign JS type, so needed to
  write the constructor in JS.
- Completions get registered on render & cleaned up on
  de-render.
@ShreyBana ShreyBana force-pushed the feat/ui/in-enum-completion branch from 205f2a3 to bd3f00d Compare February 25, 2025 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request UI things relating to the UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants