Connect development tools
Set up a language server
- Install a language server that you trust. Autolith runs it with your privileges.
Create
lsp.sexpbesideinit.lisp. For C and C++, you can start with this example for clangd:(: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)))- 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:
(asdf:load-system "autolith/structural")
(setf autolith:*structural-program* "/path/to/ast-grep")- Ask Autolith to find calls to a function or another pattern in your code.
- Describe the change and ask to see a preview of the edits.
- 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:
(asdf:load-system "autolith/debug")
(setf autolith:*debug-adapter-program* "/path/to/debug-adapter"
autolith:*debug-adapter-arguments* nil)- Ask Autolith to launch the program under the debugger or attach to a running process. Approve the debugger command if you trust it.
- Ask Autolith to set a breakpoint at a line or function, then run to the breakpoint.
- Ask to see the call stack or the value of a variable before you step through the code.
- Ask Autolith to end the debug session when you are done.
Connect an MCP server
- Create
mcp.sexpbesideinit.lisp. Follow the MCP setup examples for your transport. - Run
(mcp :refresh)after editing the file. Use(mcp)to inspect the connection.