Lambda Symbolics

Connect development tools

Set up a language server

  1. Install a language server that you trust. Autolith runs it with your privileges.
  2. Create lsp.sexp beside init.lisp. For C and C++, you can start with this example for clangd:

    Common Lisp
    (:version 1
     :servers ((:name "clangd"
                :command "clangd"
                :arguments ("--background-index")
                :extensions (".c" ".h")
                :language-id "c"
                :root-markers ("compile_commands.json" ".git")
                :timeout-seconds 30)))
  3. Ask Autolith to check that the language server is running. After editing the configuration, ask Autolith to restart the server.

Try asking where a function is defined, where it is used, or why the language server reports an error in a file. If you ask for a rename, review the proposed edits before approving them.

Make structural edits

Install ast-grep and put this in init.lisp with the path to the executable:

Common Lisp
(asdf:load-system "autolith/structural")
(setf autolith:*structural-program* "/path/to/ast-grep")
  1. Ask Autolith to find calls to a function or another pattern in your code.
  2. Describe the change and ask to see a preview of the edits.
  3. Review the preview before you ask Autolith to apply the edits.

Connect a debugger

Install a debug adapter for the language you use. Add the following to init.lisp and set the path to the adapter:

Common Lisp
(asdf:load-system "autolith/debug")
(setf autolith:*debug-adapter-program* "/path/to/debug-adapter"
      autolith:*debug-adapter-arguments* nil)
  1. Ask Autolith to launch the program under the debugger or attach to a running process. Approve the debugger command if you trust it.
  2. Ask Autolith to set a breakpoint at a line or function, then run to the breakpoint.
  3. Ask to see the call stack or the value of a variable before you step through the code.
  4. Ask Autolith to end the debug session when you are done.

Connect an MCP server

  1. Create mcp.sexp beside init.lisp. Follow the MCP setup examples for your transport.
  2. Run (mcp :refresh) after editing the file. Use (mcp) to inspect the connection.