open-rpc / editor-extensions-vscode

Provides auto-completion, validation, and previewing for OpenRPC documents in Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=OPEN-RPC.OPEN-RPC
12 stars 9 forks source link

add snippet for empty openrpc document #61

Closed shanejonas closed 5 years ago

shanejonas commented 5 years ago

You can add snippets to vscode like this:

snippet

here is the snippet code:


{
    "OpenRPC Initial Empty Document": {
        "scope": "json",
        "prefix": "emptyOpenRPCDocument",
        "body": [
            "{",
            "\t\"openrpc\": \"1.0.0\",",
            "\t\"info\": {",
            "\t\t\"title\": \"$1\",",
            "\t\t\"version\": \"1.0.0\"",
            "\t},",
            "\t\"methods\": [$2]",
            "}"
        ],
        "description": "Empty OpenRPC Document to start from"
    }
}

just need to figure out a way to get it into the extension

shanejonas commented 5 years ago

currently you can add it yourself by opening the command pallet (cmd + shift + p) then configure global snippets, create a new one, and paste in above code

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.