• This repository has been archived on 25/Oct/2023
  • Stars
    star
    109
  • Rank 317,103 (Top 7 %)
  • Language
    Clojure
  • License
    MIT License
  • Created over 11 years ago
  • Updated almost 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Leiningen plugin that generates a searchable cheatsheet for your Clojure project and dependencies ๐Ÿ˜‹

lein-instant-cheatsheet

Clojars Project

Dependencies Status Circle CI License

Instant Cheatsheet instantly creates a cheatsheet for your project and its dependecies.

  1. Add lein-instant-cheatsheet to your Leiningen :plugins
  2. Start the webserver with lein instant-cheatsheet

Instant Cheatsheet spins up a Ring server at localhost:13370 and automatically reloads documentation whenever a Clojure file in your project changes.

Screenshot

Instant Cheatsheet has a few features that might just make it your go-to Clojure reference:

Symbol Filtering

Instant Cheatsheet has a built-in filter bar at the top to search for matching symbols. A list of matching symbols and their namespaces appears on the left side of the screen; documentation for those symbols appear on the right. You can also see documentation in a tooltip by hovering over symbols on the left, and you can see source code (if available) by hovering over the source links on the right. You can also search for examples from ClojureDocs by clicking the examples link.

Filtering Based on GET Params

Instant Cheatsheet will automatically use the GET parameter q as an initial value for the filter bar. That means a request like http://localhost:13370/#?q=print will automatically search for symbols containing print.

Markdown Support

Like Marginalia, Instant Cheatsheet parses docstrs as Markdown. Add examples, links, and more to your documentation!

Instant Cheatsheet also understands :emoji: names ร  la GitHub or Slack. Emoji names like :yum: will automatically be replaced with emoji images like ๐Ÿ˜‹.

Emacs Keybinding

You can create an Emacs function to search Instant Cheatsheet, and even bind it to a keyboard shortcut:

(defun instant-cheatsheet-search (search-term)
  "Open a browser window and search Instant Clojure Cheatsheet for SEARCH-TERM."
  (interactive (list (read-string "Search Instant Clojure Cheatsheet for: "
                                  (when (symbol-at-point)
                                    (let ((s (copy-sequence (symbol-name (symbol-at-point)))))
                                      (set-text-properties 0 (length s) nil s)
                                      s)))))
  (browse-url (concat "http://localhost:13370/#?q=" (url-hexify-string search-term))))

(dolist (keymap (list clojure-mode-map cider-repl-mode-map))
  (define-key keymap (kbd "<f12> i") #'instant-cheatsheet-search))

Hitting <f12> i will prompt you for a search term and open a new browser tab with that term as the initial filter text.

Changelog

  • 2.2.2 (December 4th, 2017)
    • Fix issues determining project source paths when using with Java 9.
  • 2.2.1 (Februrary 26th, 2016)
    • Slight tweaks to CSS for emoji.
  • 2.2.0 (Februrary 26th, 2016)
    • Added support for replacing GitHub-style named :emoji: with the equivalent characters via js-emoji.
  • 2.1.5 (February 23rd, 2016)
    • Fix issue where some project symbols wouldn't appear in cheatsheet.
  • 2.1.4 (April 14th, 2015)
    • Fix issue where cheatsheet would appear empty on launch. (#1)
    • Fix conflicts if target project had resources named app.js. (#2)
  • 2.1.3 (April 1st, 2015)
    • Fix issue where instant-cheatsheet would fail to launch in projects that did not have a :main class defined
  • 2.1.1 (March 31st, 2015)
    • Fix overflowing left-hand symbols list
    • Add custom source reader that works in cases clojure.repl/source-fn does not
    • Strip docstrings from source
  • 2.1.0 (March 30th, 2015)
    • Automatically reload documentation from files that have changed since last API call
  • 2.0.0 (March 13th, 2015)
  • 1.5.0 (Feb 4th, 2015)
  • 1.0.0 (April 5th, 2013)

About

Instant Cheatsheet is inspired by other excellent Clojure cheatsheets like this one.

Instant Cheatsheet was built with Hiccup, Bootstrap, and AngularJS.

More Repositories

1

methodical

Functional and flexible multimethods for Clojure. Nondestructive multimethod construction, CLOS-style aux methods and method combinations, partial-default dispatch, easy next-method invocation, helpful debugging tools, and more.
Clojure
290
star
2

nesasm

NESasm -- NES 6502 assembler, version 3.1 ๐ŸŽฎ
C
259
star
3

toucan2

Successor library to Toucan with a modern and more-extensible API, more consistent behavior, and support for different backends including non-JDBC databases and non-HoneySQL queries. Currently in active beta.
Clojure
72
star
4

NAMenu

Dead simple SpringBoard-like grid menu for iOS with landscape support
Objective-C
46
star
5

humane-are

Drop-in replacement for clojure.test/are with better error output and better arg validation
Clojure
32
star
6

emacs-unicode-troll-stopper

Stop Unicode trolls from messing with your code.
Emacs Lisp
22
star
7

django-rest-params

Function decorator for Django REST Framework for specifying and constraining API parameters
Python
18
star
8

whitespace-linter

Fast multithreaded and customizable linter that checks files for trailing whitespace, tabs, files that don't end in newlines, files that end in blank lines, Unicode characters that look maddeningly similar to ASCII ones, and invisible Unicode characters.
Clojure
18
star
9

crow-security

Crow Middleware for Configuring HTTP Security Headers
C++
10
star
10

lein-docstring-checker

Leiningen Plugin that lints your Clojure project and checks that every public var is documented
Clojure
10
star
11

lein-check-namespace-decls

Clojure linter that checks that namespace declarations are cleaned the way `clj-refactor` would clean them. Leiningen/deps.edn plugin.
Clojure
9
star
12

sqlhoney

Clojure SQL Parser and Formatter/Pretty Printer. Parse a SQL String to Honey SQL [work in progress]
Clojure
8
star
13

hello_world_x86_64_asm_os_x

Hello, World in x86_64 assembly (NASM) on OS X
Assembly
5
star
14

moneysql

Experiemental Reimplementation of HoneySQL
Clojure
5
star
15

.emacs.d

My new Emacs config. Keeps getting bigger
Emacs Lisp
4
star
16

external-fn

Small Clojure lib to define functions whose implementations will be provided elsewhere
Clojure
4
star
17

core-logic-utils

A bunch of core.logic util fns I've written over the years
Clojure
3
star
18

java-finch

JVM Version Manager written in Babashka
Clojure
3
star
19

pretty

A standard protocol for making custom types in Clojure pretty print in the REPL and elsewhere.
Clojure
3
star
20

clojure-library-template

Template for creating a Clojure library project, including tests, linters, CircleCI & badges
Clojure
3
star
21

clj-kondo-hook-map-bug-repro

This repro is to demonstrate how to reproduce https://github.com/clj-kondo/clj-kondo/issues/1773. Do not star it, only a crazy person would do that.
Clojure
2
star
22

form-encode

Clojure library to correctly handle nested maps/arrays when encoding query string/form params
Clojure
1
star
23

common-lisp-book-notes

Example code as I follow along while reading various CL books
Common Lisp
1
star
24

minimal-emacs-clojure-repl-setup

Emacs init.d containing the bare minimum to use the cider REPL and have it be useful
Emacs Lisp
1
star
25

99-lisp-problems-

Solutions to the 99 Lisp Problems
Common Lisp
1
star
26

old-emacs-dir

My *old* .emacs.d. 3000+ lines of Emacs Lisp ๐Ÿ˜ฑ
Emacs Lisp
1
star
27

rest-client

Badass Mac (Cocoa) REST Client written in Objective-C++
Objective-C
1
star
28

BirdKit

iOS Classes and Categories Used Throughout LuckyBird's Apps
Objective-C
1
star
29

mozilla-ignite-demo

LuckyBird's Public Transit Tools for the SF Muni, for the Mozilla Ignite Challenge
Clojure
1
star