| Paste number 358678: | Emacs Clojure section |
| Pasted by: | ProfessorSexyTime |
| When: | 3 weeks, 20 hours ago |
| Share: | Tweet this! | http://paste.lisp.org/+7ORA |
| Channel: | None |
| Paste contents: |
(add-to-list 'auto-mode-alist '("\\.boot\\'" . clojure-mode ))
(add-to-list 'magic-mode-alist '(". * boot" . clojure-mode))
(use-package cider
:ensure t
:commands 'clojure-mode
:init
(add-hook 'clojure-mode-hook #'cider-mode)
(add-hook 'cider-repl-mode-hook #'company-mode)
(add-hook 'cider-mode-hook #'company-mode)
(add-hook 'cider-repl-mode-hook #'cider-company-enable-fuzzy-completion)
(add-hook 'cider-mode-hook #'cider-company-enable-fuzzy-completion)
(defun cider-completion--parse-candidate-map (candidate-map)
"Get \"candidate\" from candidate-map.
Put the type and ns properties on the candidate"
(let ((candidate (nrepl-dict-get candidate-map "candidate"))
(type (nrepl-dict-get candidate-map "type"))
(ns (nrepl-dict-get candidate-map "ns")))
(put-text-property 0 1 'type type candidate)
(put-text-property 0 1 'ns ns candidate)
candidate))
:config
(setq cider-completion-annotations-alist '(("class" "c")
("field" "fi")
("function" "f")
("import" "i")
("keyword" "k")
("local" "l")
("macro" "m")
("method" "me")
("namespace" "n")
("protocol" "p")
("protocol-function" "pf")
("record" "r")
("special-form" "s")
("static-field" "sf")
("static-method" "sm")
("type" "t")
("var" "v")))
(cider-completion--parse-candidate-map cider-completion-annotations-alist)
(setq cider-completion-annotations-include-ns 'always))
(use-package clj-refactor
:ensure t
:commands 'clojure-mode
:init
(add-hook 'clojure-mode-hook 'clj-refactor-mode)
(add-hook 'clj-refactor-mode-hook #'yas-minor-mode))
This paste has no annotations.