Skip to content
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

Feature request: Run command that is result of evaluation #2683

Open
timothypratley opened this issue Dec 29, 2024 · 0 comments · May be fixed by #2684
Open

Feature request: Run command that is result of evaluation #2683

timothypratley opened this issue Dec 29, 2024 · 0 comments · May be fixed by #2684

Comments

@timothypratley
Copy link

A less intrusive version of #2679
Instead of checking every value evaluated,
Custom commands can optionally specify that their result should be interpreted as a command.

    {
        "name": "Eval Current Form as Command",
        "key": "a",
        "repl": "clj",
        "snippet": "$current-form",
        "command": []
    },

With this custom command, you can activate it with the following data:

 [:vscode.diff
 [:File "./notebooks/visualization_in_editors.clj"]
 [:Uri.parse "/Users/timothypratley/git/kindly-render/examples/basic/page.clj"]
 "diff title"
 {:viewColumn -2}]
[:simpleBrowser.api.open "https://calva.io/" {:viewColumn -2}]

Tools can make use of this when they supply resources/calva.exports/config.edn, see https://calva.io/custom-commands/#snippets-inside-deps

@timothypratley timothypratley linked a pull request Dec 29, 2024 that will close this issue
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant