tonka3000 / vscode-raycast

Raycast tools for VSCode
https://marketplace.visualstudio.com/items?itemName=tonka3000.raycast
MIT License
16 stars 2 forks source link

Directive completion for script commands #12

Closed pomdtr closed 2 years ago

pomdtr commented 2 years ago

It would be cool to add some validation / completions for the @raycast directives in script commands.

Not sure how to achieve this though, since the scripts commands can be written in any language.

pomdtr commented 2 years ago

Global snippets might do the trick:

{
    "raycast.schemaVersion": {
        "prefix": "@raycast.schemaVersion",
        "body": "$LINE_COMMENT @raycast.schemaVersion 1"
    },
    "raycast.mode": {
        "prefix": "@raycast.mode",
        "body": "$LINE_COMMENT @raycast.mode ${1|silent,compact,inline,fullOutput|}"
    },
    "raycast.argument": {
        "prefix": "@raycast.argument",
        "body": "$LINE_COMMENT @raycast.argument${1|1,2,3|} { \"type\": \"text\", \"placeholder\": \"${3:Placeholder}\", \"optional\": ${4|true,false|} }"
    },
}
tonka3000 commented 2 years ago

Hi @pomdtr ,

Great idea. I've added all the snippet in #14.

example:

https://user-images.githubusercontent.com/3163807/181909244-20c120ea-9dd0-4dfb-9e31-18ee08590a61.mp4

I could add this to all files, but that would make much sense (e.g. css). I've added it now for

This are all languages which are used in the scripts-commands repo.

I've excluded plaintext for now, because $LINE_COMMENT is not set in the language.

Greetings Michael

pomdtr commented 2 years ago

Looks good !