-
Notifications
You must be signed in to change notification settings - Fork 6
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
Fix embedding in new YAML grammar #28
Conversation
I haven't been able to replicate your nested test example. Is there anything specific that needs to be done? Here's my version of VS Code
|
VSCode temporarily reverted it in |
Hmm strange, even after installing your extension directly I haven't been able to reproduce it. Is there any difference between the grammar released by VS Code and your extension? Also I've noticed we seem to lose bracket pair colorization. Do you know why this might be? If this is the new grammar could you look to add this back at some point? It's nice to have someone looking to actively maintain the YAML grammar, so thanks. |
That is caused by 3 different issues
Could you send a screenshot of the code with nested:
test: | #js
console.log("hello world") |
Thanks, I've fixed this on my end in #29. I have downloaded the old version of VS code ( I'm interesting in you're following statement which sounds like it could potentially fix #13
Full version:
|
do you have another YAML extension installed? RedHats?
my extension does partially fix it |
Ah yeah, that could be it |
early September if they decide to re-add it how does it break with the old grammar? sorry didn't mean to close it |
Sorry, I just tested this and it doesn't. Merged now |
VSCode is adopting a new YAML grammar
microsoft/vscode#224978
Injecting into nested block maps doesn't work fully anymore
this is because the new grammar captures the prefixing whitespace, disallowing this injection to capture the newline
^
Workaround is to change
^
to(^|\\G)
https://github.com/harrydowning/yaml-embedded-languages/blob/c8478003b71af928fae1496b9600c32bab9fe18e/extension.js#L171