All Projects → neil-lindquist → SLIMA

neil-lindquist / SLIMA

Licence: MIT License
Superior Lisp Interactive Mode for Atom

Programming Languages

coffeescript
4710 projects
Less
1899 projects

Labels

Projects that are alternatives of or similar to SLIMA

Hydrogen
Run code interactively, inspect data, and plot. All the power of Jupyter kernels, inside your favorite text editor.
Stars: ✭ 3,763 (+6277.97%)
Mutual labels:  atom, repl
Atom Chlorine
An Atom plugin to integrate with Socket-REPL over Clojure, ClojureScript, ClojureCLR, Joker, Babashka, Clojerl, Lumo and Plank
Stars: ✭ 155 (+162.71%)
Mutual labels:  atom, repl
magic-console
Interactive programming for Atom
Stars: ✭ 13 (-77.97%)
Mutual labels:  atom, repl
mastofeed
ActivityPub feed => iframe embed. https://www.mastofeed.com
Stars: ✭ 55 (-6.78%)
Mutual labels:  atom
atom-ember-snippets
Ember.js ES6 snippets for Atom
Stars: ✭ 37 (-37.29%)
Mutual labels:  atom
CircuitPython-online-IDE
CircuitPython online IDE
Stars: ✭ 15 (-74.58%)
Mutual labels:  repl
slyblime
Interactive Lisp IDE with REPL, Inspector, Debugger and more for Sublime Text 4.
Stars: ✭ 35 (-40.68%)
Mutual labels:  repl
solid-playground
Quickly discover what the solid compiler will generate from your JSX template
Stars: ✭ 45 (-23.73%)
Mutual labels:  repl
uptime-bot
A Discord uptime bot which keeps repl.it links up forever!!
Stars: ✭ 14 (-76.27%)
Mutual labels:  repl
re-mote
Re-mote operations using SSH and Re-gent
Stars: ✭ 61 (+3.39%)
Mutual labels:  repl
atom-autocomplete-ansible
Ansible Playbook autocomplete for Atom
Stars: ✭ 24 (-59.32%)
Mutual labels:  atom
InteractiveCodeSearch.jl
Interactively search Julia code from terminal
Stars: ✭ 74 (+25.42%)
Mutual labels:  repl
atom-yii2
Atom package for working with Yii Framework 2
Stars: ✭ 22 (-62.71%)
Mutual labels:  atom
rethinkdb.nim
RethinkDB driver for Nim
Stars: ✭ 35 (-40.68%)
Mutual labels:  repl
save-workspace-atom-plugin
If you work with few projects same time this plugin give you the opportunity to change your workspace faster. Save your workspace, all your opened tabs, cursor position, etc. for each task you are working with.
Stars: ✭ 24 (-59.32%)
Mutual labels:  atom
30-seconds-of-code-texteditorsnippets
Files to import the 30-seconds-of-code snippets into VSCode, Atom and Sublime.
Stars: ✭ 35 (-40.68%)
Mutual labels:  atom
autocomplete-elixir
Intelligent Elixir autocompletion provider for Atom autocomplete-plus
Stars: ✭ 41 (-30.51%)
Mutual labels:  atom
feeds-to-pocket
Sends entries from RSS and Atom feeds to Pocket (https://getpocket.com)
Stars: ✭ 24 (-59.32%)
Mutual labels:  atom
verssion
RSS feeds of stable release versions, as found in Wikipedia.
Stars: ✭ 15 (-74.58%)
Mutual labels:  atom
KittyTerminalImages.jl
A package that allows Julia to display images in the kitty terminal editor
Stars: ✭ 57 (-3.39%)
Mutual labels:  repl

SLIMA package

Dependancy Status Linter Status

The Superior Lisp Interactive Mode for Atom. This package allows you to interactively develop Common Lisp code, helping turn Atom into a full-featured Lisp IDE. SLIMA uses the same Swank backend as Emacs's SLIME to control the Lisp process. This is a fork of atom-slime.

screenshot

Current features of this package:

  • Read-eval-print-loop (REPL) for interactive Lisp development
  • Integrated debugger
  • Jumping to a method definition
  • Autocomplete suggestions based on your code
  • "Compile this function"
  • "Compile this file"
  • Function method argument order documentation
  • Integrated profiler
  • Interactive object inspection

Future features:

  • "Who calls this function" command
  • Stepping debugger

Documentation for SLIMA's features can be found in the project wiki.

Note: This package is still in active development! Contributions and bug reports are welcome.

Guide to setting up Atom as your main Lisp editor!

By following these instructions, you can use Atom very effectively as your Lisp editor.

  1. Install this SLIMA package from Atom. Additionally, it is recommended to install the language-lisp package (syntax highlighting) and either the lisp-paredit or parinfer package or both (parenthesis editing).

  2. Install a Common Lisp if you don't already have one (such as SBCL).

  3. Download the source code for SLIME, which exists in a separate repository. Place it somewhere safe (you'll need it's location in the following step). Note that if you've used Emacs before, you may already have SLIME somewhere on your computer. Otherwise, you can download it from the Github Repository. Additionally, SLIMA doesn't work with versions of SLIME older than v2.23.

  4. After installing the slima package, go to its package preferences page within Atom. Under the "Lisp Process" field, enter the executable for your lisp (ex. sbcl. Note that on some platforms you may need the full pathname, such as /usr/bin/sbcl). Under the "SLIME Path" field, enter the path where you have SLIME on your computer from the above step. Detailed information is available in the SLIMA wiki.

  5. (Optional) Consider adding the following to your Atom keymap file. This will allow the tab key to trigger automatic, correct indentation of your Lisp code (unless there's an autocomplete menu active).

'atom-text-editor[data-grammar~="lisp"]:not(.autocomplete-active)':
    'tab': 'lisp-paredit:indent'
  1. (Optional) In Atom's autocomplete-plus package, consider changing the "Keymap For Confirming A Suggestion" option from "tab and enter" to just "tab". This makes autocomplete more amenable when using the REPL, so that pressing enter will complete your command rather than triggering autocomplete.

  2. (Optional) In Atom's bracket-matcher package, consider unchecking the "Autocomplete Brackets" option. Both the lisp-paredit and parinfer packages above will take care of autocompleting parenthesis when you're editing a lisp file. Unchecking this option will prevent single quotes from being autocompleted in pairs, allowing you to define lisp symbols easier (for example, (setf x 'some-symbol)).

All done! Futher information on configuring the lisp process can be found in the project wiki.

How to Edit Lisp code with Atom

Once you've followed the above steps, you should have:

  • Syntax highlighting if you open a file ending in .lisp
  • Proper lisp indentation when you hit tab

To start a REPL (an interactive terminal where you can interact with Lisp live), run the Slime: Start command from the command pallete. A REPL should then pop up. Note that if this is your first time using slima, or you've updated your lisp process, you may get some warning messages about not being able to connect. This is normal; wait a minute or so, then run slime:connect. (This happens because your lisp is compiling the swank server and isn't ready before this package times out).

With the REPL, you can type commands, see results, switch packages, and more. It's a great way to write Lisp code! A debugger will come up if an error occurs. You can also use the up & down arrows to scroll up through your past commands. Type Ctrl+C to interrupt lisp (if it's in an infinite loop, for example). The result value of evaluated expressions can be inspected by placing the cursor there and pressing Ctrl+I.

If you've compiled your lisp code, placing the cursor over a method will cause a documentation string to appear at the bottom of the atom window, showing you the function arguments and their order.

If you want to jump to where a certain method is defined, go to it and press alt + . (Mac: ctrl + cmd + .)or use the Slime: Goto Definition function in Atom. A little pop up window will come up and ask you which method you'd like to go to (since methods could be overloaded). Use the keyboard to go up and down, and press enter to jump to the definition you choose.

To compile a single toplevel form in a Lisp file, place the cursor somewhere in that form and press alt+c (Mac: ctrl + cmd + c). The form should glow momentarily to indicate it's compiling, and from then on you can use it in the REPL. To compile an entire buffer, place the cursor anywhere in that file and press alt+k (Mac: ctrl + cmd + k). The entire file will glow for a moment to indicate compilation. Lastly, an individual form can be compiled using alt+e (Mac: ctrl+cmd+e).

To use the integrated profiler, run Slime: Profile. You should see a menu appear at the bottom of Atom, where you can select what you'd like to profile. For example, click "Function" and type the function name at the dialog to begin profiling. You may then click "Report" to print a report to the REPL with profiling information.

How it works

This package makes use of the superb work from the SLIME project. SLIME started as a way to integrate Lisp with Emacs, a popular text editor for Lisp. It works by starting what is known as a Swank server, which is code that runs in Lisp. Emacs then runs separately and connects to the Swank server. It's able to make remote procedure calls to the swank server to compile functions, lookup function definitions from your live code, and much more thanks to the fact that Lisp is such a dynamic language.

This package uses the Swank server from the SLIME project unchanged. This package allows Atom to speak the same protocol as Emacs for controlling the Swank server and integrating Lisp into the editor.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].