obsidian-execute-code icon indicating copy to clipboard operation
obsidian-execute-code copied to clipboard

Common Lisp support

Open xTriixrx opened this issue 2 years ago • 1 comments

I would like to document and run CL snippets within Obsidian that I could execute with testable outputs. I currently have a workaround to make this work but at the cost of a shell configuration. Essentially, I am overloading the Shell execute to use sbcl (a CL interpreter/compiler) to run the following hacked code block:

```run-bash (print "Hello World!") (defvar x 1) (print (+ x 2)) ```

I have my shell path set as the sbcl path: (/usr/bin/sbcl) I have passed "--script" as my shell argument (this is passed to sbcl for running a script) And I have changed the shell file extension to .clisp

It would be nice to have a separate Common Lisp option providing these capabilities so that I can also run other shell scripts within my Obsidian notes without having to change my CL shell configuration.

A compliant solution would look like the following:

```run-lisp (print "Hello World!") (defvar x 1) (print (+ x 2)) ```

With the appropriate configuration options available within the plugin settings.

xTriixrx avatar Apr 30 '23 23:04 xTriixrx

if anyone is interested in adding this, this PR makes a great reference for adding a new language https://github.com/twibiral/obsidian-execute-code/pull/193/files#diff-f2a4304d75490ee308ba20fc72fedeeadda5cee948e3fa1ead4b363e63a13025

hannesdelbeke avatar Jun 21 '23 08:06 hannesdelbeke