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

Autocompletion for YAML #15

Open
TiboStr opened this issue Aug 5, 2022 · 1 comment
Open

Autocompletion for YAML #15

TiboStr opened this issue Aug 5, 2022 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed large-effort Will be a large effort to fix

Comments

@TiboStr
Copy link
Collaborator

TiboStr commented Aug 5, 2022

Maybe https://medium.com/@joshuaavalon/intellisense-for-json-and-yaml-in-vs-code-f626fc733426

@bjdmeest bjdmeest added enhancement New feature or request important Should get priority large-effort Will be a large effort to fix labels Aug 5, 2022
@TiboStr TiboStr added the help wanted Extra attention is needed label Aug 9, 2022
@TiboStr
Copy link
Collaborator Author

TiboStr commented Aug 9, 2022

I can't seem to make it work.

For JSON it was not so hard. I just based on this code: https://microsoft.github.io/monaco-editor/playground.html#extending-language-services-configure-json-defaults, and looked at the @monaco-editor/react docs to make it work in React.

YAML is a lot harder. There is a monaco-yaml plugin. The only problem is that it does not work with @monaco-editor/react (https://github.com/remcohaszing/monaco-yaml#does-this-work-with-monaco-editorloader-or-monaco-editorreact). Besides that, it should work with create-react-app (https://github.com/remcohaszing/monaco-yaml#does-monaco-yaml-work-with-create-react-app).

I didn't find any good examples online. E.g. on CodeSandbox, I didn't find any good examples.

I think the only good resource is this: remcohaszing/monaco-yaml#92. But unfortunately the little code given in that issue didn't work for me. I ended up with two editors (because useEffect was triggered twice for some reason) and in neither of them did the backspace work correctly. There was no autocompletion whatsoever.

@bjdmeest bjdmeest removed the important Should get priority label Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed large-effort Will be a large effort to fix
Projects
None yet
Development

No branches or pull requests

2 participants