Git Product home page Git Product logo

vscode-raycast's Introduction

Raycast for VSCode

This is NOT an official tool by Raycast company!!

The extension should help you to develop Raycast extensions by providing

  • Commands for common tasks
  • Debugging
  • Auto-Completion
  • Snippets

and more

Features

  • ✅ Run lint process

  • ✅ Run fix-lint process

  • ✅ Run build process

  • ✅ Run develop mode

  • ✅ Run migration (also available in the tree-view)

  • ✅ Login

  • ✅ Publish extensions

  • Attach Debugger command

    Attach a nodejs debugger to the running Raycast node process.

    ⚠️ Make sure that Raycast is running and you have started a non native extension at least once, otherwise the node process does not run ⚠️

  • ✅ Add preference (default and data are not support for now)

  • ✅ Add command

  • ✅ Add command argument

  • ✅ Open Command File

  • ✅ Image Asset filename via dropdown into active text editor

  • ✅ Image Asset auto completion for

    • icons in .tsx files (source: and icon= are supported)
    • icons in package.json ("icon": is supported)
  • ✅ Builtin code snippet - just type raycast in a .tsx file

  • ✅ Open Documentation

  • ✅ Search in Documentation

  • ✅ Raycast Tree-view for easy navigation

  • ✅ Auto Completion for script directives

  • ✅ Open the Extension Issues Dashboard

  • ✅ Add Swift support with one command

Requirements

You need to install the same requirements which are mention on https://developers.raycast.com.

URI Handler Support

🚧 Experimental

You can run a command inside VSCode from outside of VSCode via custom URI handler. The URI handler can run commands with the following schema vscode://tonka3000.raycast/runcommand?cmd=<cmdid>. cmdid needs to be replaced by the internal command id of the specific VSCode command which you wanna trigger.

E.g. you can run the command Terminal: Create New Terminal when you use it's internal ID workbench.action.terminal.new. The full command would look like vscode://tonka3000.raycast/runcommand?cmd=workbench.action.terminal.new.

To run this example from the MacOS terminal you need to enter the following line into your terminal

open "vscode://tonka3000.raycast/runcommand?cmd=workbench.action.terminal.new"

⚠️ Arguments for commands are right now not supported.

Limitations

Some commands of VSCode can not be run in a specific context, which is a limitation of VSCode itself. This can lead to errors.

Troubleshooting

If you have problems with the extension just file a issue on GitHub. It's mostly a good idea to attach the log output of this extension to the issue. You can active the logger by adding "raycast.loglevel": "debug" to your settings.json file. Just copy the content of the Raycast output pane into your GitHub issue.

Contributions

Pull Requests are welcome :-D

License

MIT

vscode-raycast's People

Contributors

pernielsentikaer avatar tonka3000 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vscode-raycast's Issues

All commands result in error: command not found

Summary

Steps to reproduce

Install the extension on Vscode and run any command (I'm using "Raycast: Start Development mode"). It'll error. My setup:

Version: 1.74.2
Commit: e8a3071ea4344d9d48ef8a4df2c097372b0c5161
Date: 2022-12-20T10:32:21.587Z (1 wk ago)
Electron: 19.1.8
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Darwin arm64 22.2.0
Sandboxed: Yes

What is the current bug behavior?

What is the expected correct behavior?

Relevant logs and/or screenshots

image

Possible fixes

No way to attach the debugger

Summary

No way to attach the debugger

Steps to reproduce

I can't attach the debugger to the process. I start by "Start Development Mode" and than "Attach the Debugger". I created the

        {
            "name": "Attach by Process ID",
            "processId": "${command:PickProcess}",
            "request": "attach",
            "skipFiles": [
                "<node_internals>/**"
            ],
            "type": "node"
        }
    ]

launch.json however there is no process to choose from.

Show information when there is a newer raycast API is available on npm

Problem to solve

Make it easy to see the possibility to upgrade to a higher raycast API.

Proposal

Make it easy to see the possibility to upgrade to a higher raycast API version by comparing the local (workspace) installed version with the one on npm.com. This can be shown in the treeview when there is a higher version. Clicking on the item trigger the migration command.

Further details

Links / references

npm registry API

Add React DevTools support

Problem to solve

Activate React DevTools directly from VSCode.

Proposal

Add command to have a simple way to activate React DevTools directly from VSCode

Further details

Links / references

Add command to paste a filename from the assets folder into the active file

Problem to solve

Often it is required to add filenames from the assets folder in into the activate tsx file. Remember all the files is very unproductive and often it is copy paste or typing.

Proposal

Use a command to display the file from the assets folder (like in the Add Command command) to paste the content into the active selection.

Further details

Links / references

Directive completion for script commands

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.

Add new project scaffolding

Problem to solve

Add a command to simply create a brand new extension in a given directoy.

Proposal

The command could also guide the user through the process via Q&A prompts.

Further details

Links / references

Add command to add prefrences

Problem to solve

Add command to add preferences.

Proposal

Add command to add preferences to package.json

Further details

Links / references

Open-command-via-URL-handler seems to currently be broken

Summary

The docs instruct one to run this command:

$ open "vscode://tonka3000.raycast/runcommand?cmd=openInTerminal"

That does indeed launch VScode; but has no other effect as far as I can see.

I tried using the newer command-name for 'create a new terminal',

$ open "vscode://tonka3000.raycast/runcommand?cmd=workbench.action.terminal.new"

... with no further luck. (=

Add command to add Raycast command

Problem to solve

Add a VSCode command which adds a given Raycast command and add it to package.json

Proposal

Add VSCode command which adds a given Raycast command to package.json

Further details

Maybe the command should show all existing commands in the command palette.

Links / references

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.