Olive – Lisp VSCode Extension (Alternative to Alive)

AlexeyBrin1 pts0 comments

GitHub - kchanqvq/olive: Lisp VSCode Extension · GitHub

/" data-turbo-transient="true" />

Skip to content

Search or jump to...

Search code, repositories, users, issues, pull requests...

-->

Search

Clear

Search syntax tips

Provide feedback

--><br>We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Cancel

Submit feedback

Saved searches

Use saved searches to filter your results more quickly

-->

Name

Query

To see all available qualifiers, see our documentation.

Cancel

Create saved search

Sign in

/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up

Appearance settings

Resetting focus

You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

{{ message }}

kchanqvq

olive

Public

Notifications<br>You must be signed in to change notification settings

Fork

Star<br>17

master

BranchesTags

Go to file

CodeOpen more actions menu

Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit

History<br>61 Commits<br>61 Commits

demo

demo

patches

patches

resources

resources

src

src

syntaxes

syntaxes

.gitignore

.gitignore

.vscode-test.mjs

.vscode-test.mjs

LICENSE

LICENSE

NOTES.org

NOTES.org

README.md

README.md

language-configuration.json

language-configuration.json

package.json

package.json

tsconfig.json

tsconfig.json

View all files

Repository files navigation

OLIVE: Old-school LIsp Vscode Extension

You need to install a Common Lisp implementation. For new comers, SBCL is recommended. Other popular implementations include CCL and ECL. You need to configure olive.lispCommand for implementations other than SBCL. It is also recommended (but optional) to install Quicklisp package manager and configure the Ultralisp distribution.

REPL and Debugger

The REPL is in the bottom panel. Multi-line input works, Enter sends the input when it's completed (all parenthesis are balanced). Input history is accessed via Alt+Up/Down. The sync button on the top right of the panel attempt to set current package and directory according to the opened file in the editor. If a debugger pop up saying the package does not exist, you probably haven't load the file or system yet -- read further.

You will quite often have the debugger popped up. ABORT is bound to key A and CONTINUE is bound to key C, so you can press A to dismiss (abort) it. Number keys are also bound to restarts in order. Clicking the stack frames jump to the source, shows local variables, and some other useful actions.

Ctrl/Cmd+Shift+R starts a new Lisp process, or restarts it if one is already running. Clicking the "OLIVE" status bar item has the same effect. Use it in case the state of your Lisp image stops making sense. Be aware you need to load your files/systems into the freshly restarted process again to resume working on them.

OLIVE automatically starts a Lisp process when it is activated, this behavior can be disabled with the olive.autostart configuration. Note that many functionalities (accurate indentation, go to definition, hover...) rely on a running Lisp process.

Loading Files and Systems

The play button (also key F5) on the top right of the editor window compiles and loads the current file. This compiles with default settings, which has good performance and is already debuggable. More options are available in the drop down menu next to it: High debug settings (also key Shift+F5), if you hate some compiler optimizations (variable elimination, stack frame elision...); Load directly (also key Alt+F5), this one is equivalent to entering forms in the file into REPL one by one, generally more useful for scripting.

Shift+Enter evaluates the expression before it and display the result.

Ctrl/Cmd+Enter compiles the current top-level form (i.e. surrounding or before the cursor). This is particularly useful for defining functions one by one. Ctrl/Cmd+Shift+Enter compiles the current top-level form with high debug settings. Ctrl/Cmd+Alt+Enter evaluates the current top-level form without compiling. All these actions are accessible from right-click menu.

Most Lisp projects use the ASDF build system. Ctrl/Cmd+Shift+L tries to find a system definition (.asd) file under workspace root and load the system. This is handy for loading or reloading all Lisp files in your project and dependencies, after you wrote a working .asd file (tutorial).

Exploring functions and macros

Unlike many other programming systems, the full source code and reference information for all the libraries and often the Lisp implementation itself (if you compiled SBCL from source) are always available. You can expect F12 (Go To Definition) to demystify everything you see! Reference commands like Shift+F12 (Peek References) also work.

OLIVE also comes with a macro stepper (inspired by Emacs...

lisp olive file files json shift

Related Articles