internal/document: improve attrs processing
Highlights:
- Remove serializing the
nameattribute if it was not present in the source. - Add spaces between
{ ... }.
I might need to introduce an identifier on the extension side that allows me to identify a cell (might just use xid). What do you think about excluding metadata keys starting with _ (eg _id) from serialization? Simplifies managing transient metadata
@sourishkrout of course, we can exclude internal/private attributes. I was thinking either of _ or runme.dev/*.
Let me know which way you want to go.
@sourishkrout of course, we can exclude internal/private attributes. I was thinking either of
_orrunme.dev/*.Let me know which way you want to go.
What do you think is cleaner? I'd like to avoid the metadata schema growing like weeds.
@sourishkrout if _ is unused by VS Code, we can use _ as it's shorter. If _ is already used and we want to have more control then runme.dev/*.
@sourishkrout if
_is unused by VS Code, we can use_as it's shorter. If_is already used and we want to have more control thenrunme.dev/*.
Worked through the requirement for a ephemeral metadata attributes and turns out I can get around it using the native vscode API. However, I think we should probably jut do both _ and runme.dev/* and choose depending on use-case which one is more appropriate.
Also, please go ahead and remove index entirely from the metadata. It's no longer required since the extension is relying exclusively on the API now.