Ha! Figured it out! There is an additional setting that needs to be set, the
value_prefix_pattern. So the complete setup for making snd work with neovim,
using the conjure plugin, is now this:
vim.g['conjure#client#scheme#stdio#command'] = "snd"
vim.g['conjure#client#scheme#stdio#prompt_pattern'] = "\n>"
vim.g['conjure#client#scheme#stdio#value_prefix_pattern'] = false
I'm unreasonably excited about this. One of the main things that has held me
back from learning snd properly is the ability to use my favorite editor. Next
stop is to figure out how to get auto-complete working... I suspect this will
be much less straightforward.
Best,
Kenneth
--
Roosna & Flak - Contemporary Dance & Music
Web: roosnaflak.com
Code: {github,gitlab}.com/kflak
Mastodon: @[email protected]
On 13 Jun 2023 16:14, Kenneth Flak wrote:
>I suppose I need to get the prompt right in order for this to work. Doing
>something like
>
>cat test.scm | snd swarm_norm.wav
>
>where test.scm consists of
>
>(scale-channel 2.0)
>
>works as expected. So if I could only get conjure to send the correct prompt,
>then everything should be fine, I suppose? Looking at the s7 documentation it
>seems as though the prompt might be "\n> ", so I tried setting
>
>vim.g['conjure#client#scheme#stdio#prompt_pattern'] = "\n> "
>
>Which had precizely zero effect...
>
>Best,
>Kenneth
>
>--
>Roosna & Flak - Contemporary Dance & Music
>Web: roosnaflak.com
>Code: {github,gitlab}.com/kflak
>Mastodon: @[email protected]
>On 13 Jun 2023 10:12, Kenneth Flak wrote:
>>
>>Hi Christos,
>>
>>Well spotted!
>>
>>Unfortunately correcting the error still doesn't result in anything showing
>>up in the snd listener when I evaluate an expression in the .scm buffer. Of
>>course, it's very possible that something's being sent, I just don't see the
>>result? Or should the listener always mirror whatever input is received
>>through stdin?
>>
>>K
>>--
>>Roosna & Flak - Contemporary Dance & Music
>>Web: roosnaflak.com
>>Code: {github,gitlab}.com/kflak
>>Mastodon: @[email protected]
>>On 13 Jun 2023 11:40, Christos Vagias wrote:
>>>There's a typo in "stdio" in the prompt pattern line. The docs AFAIU say that
>>>conjure will wait for the configured regexp till it can send more commands,
>>>so
>>>a misconfiguration there could explain the hanging/not sending commands
>>>
>>>On Tue, 13 Jun 2023, 08:00 Kenneth Flak, <[email protected]> wrote:
>>>
>>> Hi,
>>>
>>> I am trying to get the neovim plugin conjure (https://github.com/Olical/
>>> conjure/wiki/Quick-start:-Scheme-(stdio)) to talk to snd. So far I am
>>> succesfully opening snd whenever I open a .scm file, but I can't get the
>>> communication going between the two. Has anybody tried anything similar,
>>> or
>>> do you spot something in this that would make it possible? As far as I
>>> understand snd listens to stdin, so it _should_ be doable... At the
>>> moment
>>> I am running these lua commands on startup:
>>>
>>> vim.g['conjure#client#scheme#stdio#command'] = "snd"
>>> vim.g['conjure#client#scheme#stiod#prompt_pattern'] = "> $?"
>>>
>>> Any help is much appreciated!
>>>
>>> Best,
>>> Kenneth
>>>
>>> --
>>> Roosna & Flak - Contemporary Dance & Music
>>> Web: roosnaflak.com
>>> Code: {github,gitlab}.com/kflak
>>> Mastodon: @[email protected]
>>>
>>>
>>> _______________________________________________
>>> Cmdist mailing list
>>> [email protected]
>>> https://cm-mail.stanford.edu/mailman/listinfo/cmdist
>>>
_______________________________________________
Cmdist mailing list
[email protected]
https://cm-mail.stanford.edu/mailman/listinfo/cmdist