Back to sly
This commit is contained in:
41
init.el
41
init.el
@ -901,20 +901,37 @@ COMMAND and COMINT are like `compile'."
|
||||
;; yuck (config language for eww)
|
||||
(use-package yuck-mode)
|
||||
|
||||
;; slime
|
||||
(use-package slime
|
||||
:defer nil
|
||||
;; sly
|
||||
(use-package sly
|
||||
:hook (lisp-mode . my/-lisp-mode-autoconnect-sly)
|
||||
:bind (:map sly-mode-map
|
||||
("C-c e" . my/sly-show-notes-at-point))
|
||||
:autoload sly-connected-p
|
||||
:init
|
||||
(setq inferior-lisp-program "sbcl")
|
||||
(defun my/-lisp-mode-autoconnect-sly ()
|
||||
(unless (sly-connected-p)
|
||||
(sly)))
|
||||
(defun my/sly-notes-at-point (pos &optional buffer)
|
||||
"Returns the sly notes at POS in BUFFER.
|
||||
If BUFFER is nil, the current buffer is used."
|
||||
(with-current-buffer (or buffer (current-buffer))
|
||||
(cl-loop for overlay in (overlays-at pos)
|
||||
for note = (overlay-get overlay 'sly-note)
|
||||
when note
|
||||
collect note)))
|
||||
(defun my/sly-show-notes-at-point ()
|
||||
"Show all sly notes at point in a floating window."
|
||||
(interactive)
|
||||
(my/floating-tooltip " *sly-note-posframe*"
|
||||
(with-output-to-string
|
||||
(dolist (note (my/sly-notes-at-point (point)))
|
||||
(when-let (msg (plist-get note :message))
|
||||
(princ "·")
|
||||
(princ msg)
|
||||
(terpri))))))
|
||||
(setq inferior-lisp-program "/usr/bin/sbcl")
|
||||
:config
|
||||
(slime-setup '(slime-fancy-inspector inferior-slime slime-references
|
||||
slime-xref-browser slime-mdot-fu slime-sprof slime-fancy)))
|
||||
(use-package slime-capf
|
||||
:ensure nil
|
||||
:after slime
|
||||
:config
|
||||
(advice-add 'slime--completion-at-point :override
|
||||
'slime-capf-complete-at-point))
|
||||
(sly-symbol-completion-mode -1))
|
||||
|
||||
;; pdf-tools
|
||||
(use-package pdf-tools
|
||||
|
Reference in New Issue
Block a user