Skip to content
This repository has been archived by the owner on Nov 12, 2022. It is now read-only.

Monaco Editor 'intellisense' #28

Open
3 tasks
theZiggurat opened this issue Feb 13, 2022 · 0 comments
Open
3 tasks

Monaco Editor 'intellisense' #28

theZiggurat opened this issue Feb 13, 2022 · 0 comments
Labels
enhancement New feature or request epic an issue/feature broad in scope or long in duration
Milestone

Comments

@theZiggurat
Copy link
Owner

Current Implementation

The spec is scraped off wgsl docs with a python script. It is then converted to a JavaScript object containing the necessary data to show up in Monaco as a completion suggestion. Here is an example of a completion suggestion:

{
    "detail": "abs(e: T) -> T where: T is f32 or vecN<f32>",
    "documentation": "Returns the absolute value of e (e.g. e with a positive sign bit). Component-wise when T is a vector.\n (GLSLstd450Fabs)",
    "label": "abs",
    "insertText": "abs(${1})",
    "insertTextRules": 4,
  },

This should be automated in the future so any changes to the spec are reflected within the application. The intellisense system should also support variables generated by the user or site.

Enhancements

  • Provide completions for built-in shader types and keywords.
  • Provide completions for user created variables and structs. For instance, if the user creates a uniform called c, c should appear in completion suggestions.
  • Provide completions for gputoy provided uniforms.
@theZiggurat theZiggurat added enhancement New feature or request epic an issue/feature broad in scope or long in duration labels Feb 13, 2022
@theZiggurat theZiggurat added this to the Beta milestone Feb 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request epic an issue/feature broad in scope or long in duration
Projects
None yet
Development

No branches or pull requests

1 participant