Quick start: Guile (socket) - Olical/conjure GitHub Wiki

Guile is designed to help programmers create flexible applications that can be extended by users or other programmers with plug-ins, modules, or scripts.

Prerequisites

  • Install the latest Neovim.

  • Ensure your Neovim supports the scheme or scheme.guile filetype. You may need to find a plugin for this! (suggestion).

  • Install the Conjure plugin.

  • Guile - version 2.0 minimum, 3.0 or later preferred.

Configure the Conjure Guile client

The default Scheme filetype client is conjure.client.mit-scheme.stdio, to use the Guile client, you must override the configuration.

let g:conjure#filetype#scheme = "conjure.client.guile.socket"

Conjure connects to a running Guile REPL through a domain socket file you must specify.

let g:conjure#client#guile#socket#pipename = "/path/to/socket/file"

Start a REPL

Start your Guile REPL by passing it a path to a domain socket file. This path must be the full pathname according to the [Guile Reference Manual](https://www.gnu.org/software/guile/manual/guile.html).

Here’s a script that starts a REPL and places the domain socket file in your current Git repository then cleans up after it exits.

#!/usr/bin/env bash

set -xe

SOCKET=$(git rev-parse --show-toplevel)/.guile-repl.socket
if [ -f $SOCKET ]; then rm $SOCKET; fi
guile --listen=$SOCKET
rm $SOCKET

Connecting to your REPL

Open up a .scm file of your choosing and use <localleader>cc or :ConjureConnect.

Using Conjure

If you’re unsure how to evaluate things with Conjure, please refer to :help conjure, :help conjure-client-guile-socket and :ConjureSchool (an interactive tutorial).

Per-project configuration

You can configure this using a plugin to manage per-project configuration. For example, you’d configure this with nvim-local-fennel by placing the following code in .lnvim.fnl.

(module my-project-name
  {require {nvim nvim-local-fennel.aniseed.nvim}})

(set nvim.g.conjure#client#guile#socket#pipename "guile-repl.socket")

Which would be the following in VimScript.

let g:conjure#client#guile#socket#pipename = "guile-repl.socket"

Connecting automatically

The Conjure Guile client will not connect automatically. You must use <localleader>cc or :ConjureConnect.

⚠️ **GitHub.com Fallback** ⚠️