SLIME hints #3b – lexical completions, also: a correction

Development Consulting Articles


New code!

As I noted in yesterday’s post, slime-complete-symbol normally doesn’t complete locally bound “variables” (that is, function arguments and let bindings).

I’ve created a SLIME extension that does a pretty rough scan of the current top-level form and adds all the matching symbols in the form into the list of suggested completions. If you want to check it out, slime-complete-locals is available on github.

A correction

Also, if you missed the update on yesterday’s post, make sure you add the right forms to smart-tab-completion-functions-alist – the key in that alist should be the MAJOR mode. So using slime-mode (like I did yesterday) will not work. It must be clojure-mode or whatever the major mode for your lisp editing is.