fredokun / cl-jupyter

An enhanced interactive Shell for Common Lisp (based on the Jupyter protocol)
BSD 2-Clause "Simplified" License
199 stars 29 forks source link

Tab completion and inspection #34

Closed bendudson closed 6 years ago

bendudson commented 6 years ago

This PR replaces PR #33, and includes both that inspect_request handling code and complete_request handling. These provide tab completion of symbols and keywords, and inspection of functions with Shift-Tab.

I put public domain code from SWANK into a separate file, completions.lisp. Unfortunately this part of the SWANK backend isn't in Conium on QuickLisp, but it's fairly small. The tab completion code therefore uses the same method as SLIME to find the completions. A list of possible completions is presented in the notebook, sorted with shortest at the top.

The code works with SBCL 1.4.2 on Debian with Jupyter 4.1.0. I think the basic functionality is there, but could of course be improved and should probably be tested on other systems.

fredokun commented 6 years ago

Sorry I'm a little bit late for the reply. Completion is something I really would like to support but I did not find enough time to start it, I'm glad you did! So before finding some dev. time I created a branch completion and merged your PR there. I suggest you base your further PR's directly on this branch so you can continue to update things if you want, and I know where to look at things. Hopefully this will be merged in master ASAP. Anyways thanks for contributing! (I close this PR because it's in the new branch).