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: expose auto-completion & syntax tokenization for monaco editor #90

Merged
merged 10 commits into from
Dec 2, 2022

Conversation

rhamzeh
Copy link
Member

@rhamzeh rhamzeh commented Nov 4, 2022

Description

  • Initial Monarch tokenizer work
  • Expose Schema 1.0 Completions
  • Expose Schema 1.1 Completions
  • Add Schema 1.1 Prism Definitions
  • Fix language definition tokenizers

(In a separate PR)

  • Add Schema 1.0 Prism Definitions
  • Add Monarch tokenizer tests
  • Add Schema 1.0 Graph Builder
  • Add Schema 1.1 Graph Builder
  • Add Resolution Tree Graph Builder
  • Fix colors

Currently not working:

  • In Prism: Detecting type and relation names

Workaround that will need to be resolved:

  • In Monaco: Detecting tupleset

Screen Shot 2022-12-02 at 11 17 59 AM

Screen Shot 2022-12-02 at 11 18 17 AM

Screen Shot 2022-12-02 at 12 12 13 PM

Note: Snyk had to be disabled because it does not yet support package-lock.json v3

References

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

@rhamzeh rhamzeh requested a review from a team as a code owner November 4, 2022 20:12
@rhamzeh rhamzeh marked this pull request as draft November 4, 2022 20:12
@rhamzeh rhamzeh added this to the v0.0.8 milestone Nov 4, 2022
# Conflicts:
#	src/transformer/api-to-friendly.ts
@rhamzeh rhamzeh force-pushed the feat/add-auto-completion branch 2 times, most recently from 8e9c870 to d30f627 Compare November 30, 2022 17:36
@rhamzeh
Copy link
Member Author

rhamzeh commented Nov 30, 2022

Note: Colors are broken on this version, the tokens mostly work, but have quite a few glitches.

Screen Shot 2022-11-30 at 12 37 19 PM

Screen Shot 2022-11-30 at 12 37 38 PM

@rhamzeh rhamzeh force-pushed the feat/add-auto-completion branch 2 times, most recently from 487121f to ed4540c Compare November 30, 2022 17:43
@rhamzeh rhamzeh force-pushed the feat/add-auto-completion branch from ed4540c to 8b194fc Compare November 30, 2022 17:46
src/monaco-extensions/language-definition.ts Outdated Show resolved Hide resolved
src/monaco-extensions/language-definition.ts Outdated Show resolved Hide resolved
src/monaco-extensions/providers/code-actions.ts Outdated Show resolved Hide resolved
@rhamzeh rhamzeh force-pushed the feat/add-auto-completion branch from 9cc6bd5 to b954469 Compare December 1, 2022 12:48
@rhamzeh rhamzeh force-pushed the feat/add-auto-completion branch from b954469 to 7d25a7d Compare December 1, 2022 12:56
@rhamzeh rhamzeh force-pushed the feat/add-auto-completion branch from c0b1591 to 969373d Compare December 2, 2022 17:15
@rhamzeh rhamzeh marked this pull request as ready for review December 2, 2022 17:20
@rhamzeh rhamzeh force-pushed the feat/add-auto-completion branch from b99a7a4 to 1938d1e Compare December 2, 2022 17:26
@rhamzeh rhamzeh force-pushed the feat/add-auto-completion branch from 1938d1e to 2e121b4 Compare December 2, 2022 17:27
rhamzeh added a commit that referenced this pull request Dec 2, 2022
changes:
- feat(editor-support): expose auto-completion for monaco (#90)
- feat(editor-support): expose syntax highlighting and tokenization for monaco and prism (#90)
- chore(deps): bump dev dependencies
@rhamzeh rhamzeh mentioned this pull request Dec 2, 2022
4 tasks
@rhamzeh rhamzeh changed the title feat: expose auto-completion for monaco editor feat: expose auto-completion & syntax tokenization for monaco editor Dec 2, 2022
adriantam
adriantam previously approved these changes Dec 2, 2022
@rhamzeh rhamzeh merged commit d6dd52c into main Dec 2, 2022
@rhamzeh rhamzeh deleted the feat/add-auto-completion branch December 2, 2022 19:15
rhamzeh added a commit that referenced this pull request Dec 2, 2022
changes:
- feat(editor-support): expose auto-completion for monaco (#90)
- feat(editor-support): expose syntax highlighting and tokenization for monaco and prism (#90)
- chore(deps): bump dev dependencies
rhamzeh added a commit that referenced this pull request Dec 2, 2022
changes:
- feat(editor-support): expose auto-completion for monaco (#90)
- feat(editor-support): expose syntax highlighting and tokenization for monaco and prism (#90)
- chore(deps): bump dev dependencies
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.

[Request] Expose code auto-complete suggestions Add documentation hints to markers
2 participants