Alive: The Average Lisp VSCode EnvironmentAn attempt to create a Common Lisp extension for VSCode. It's still a work in progress, though getting better. The name is partly a self-deprecating take on SLIME's name, but also reflects the goal of the project which is to reach Minimum Viable Product status. For VSCode language extensions, there is a lot that is expected for the bare minimum, including formatting, code completion, syntax highlighting, etc. Being a Lisp environment, having REPL integration is required. Without that, it's not viable. Features
Extension SettingsThis extension contributes the following settings:
Syntax highlighting is done using semantic tokens. This is mainly to avoid regex hell. The following symantic tokens are added:
SnippetsREPL IntegrationCurrently, a swank server must be running on the local machine using port 4005. System SkeletonDisassembleJump To DefinitionIn order for jump to definition to work, the files need to be loaded into the REPL using the Load File (Alt+Shift+L) command, ASDF, or whatever else works. InspectorThe inspector will ask for a form to inspect, defaulting to the current token or current selection. Inspector Commands
Hover TextWill provide documentation from the REPL for the symbol under the cursor. Note that the inline result feature uses a hover to display results, so those results will display if they have not been cleared by editing the document or using the Clear Inline Results command (Alt+Shift+C). CommandsSelect S-Expression (Alt+Shift+Up)Selects the surrounding top level expression for the current cursor position. Attach To REPLConnect to a swank server. Will prompt for the a host:port string to connect to. Detach From REPLDisconnect from the swank server. Send To REPL (Alt+Shift+Enter)Sends selected text to the REPL. If nothing is selected, sends the top level form at the cursor position. Debug Abort (Alt+Ctrl+A)Tells the currently visible debugger to send the abort restart. Nth Restart (Alt+Ctrl+{N})Tells the currently visible debugger to send the nth restart. For example, alt+ctrl+0 sends restart 0, alt+ctrl+2 sends restart 2, etc. Load File (Alt+Shift+L)Load the current file into the REPL. If alive.remoteWorkspace is set, the path to the file is translated to be relative to the remote directory. This may or may not work well. Inline Evaluation (Alt+Shift+E)Evaluate the enclosing form, showing the result inline. If there is a selection, evaluates the selected code. Clear Inline Results (Alt+Shift+C)Clear the inline results. REPL History (Alt+Shift+R)Expressions that are evaluated from the REPL window are added to the history. This command opens a quick pick selector with the history. The most recently used item is at the top, i.e. similar behavior to the Run Tasks command. System SkeletonIf the current directory is empty, creates an ASDF system skeleton. Macro ExpandExpand the macro at the current cursor position. Uses macroexpand-1. Macro Expand AllExpand the macro at the current cursor position. Uses macroexpand. DisassembleDisassemble the current top level form. Assumes the form is defining a function, or something similar, and uses the second element as the name. LicenseUnless otherwise noted, all files are in the Public Domain. Release NotesNo actual releases, yet. |