Helm-SLY: Customize connection/buffer display formatting.
parent
a07348b511
commit
b884f0d613
|
@ -76,6 +76,17 @@ If REFRESH is non-nil, rebuild the environment."
|
|||
(define-key sly-mrepl-mode-map (kbd "C-c C-x c") 'helm-sly-list-connections)))
|
||||
|
||||
(when (require 'helm-sly nil :noerror)
|
||||
(defun ambrevar/helm-sly-format-connection (connection buffer)
|
||||
(let ((fstring "%s%2s %s"))
|
||||
(format fstring
|
||||
(if (eq sly-default-connection connection)
|
||||
"*"
|
||||
" ")
|
||||
(helm-sly-connection-number connection)
|
||||
(replace-regexp-in-string
|
||||
"*$" ""
|
||||
(replace-regexp-in-string "*sly-mrepl for " "" (buffer-name buffer))))))
|
||||
(setq helm-sly-connection-formatter #'ambrevar/helm-sly-format-connection)
|
||||
(global-helm-sly-mode)
|
||||
(add-to-list 'helm-source-names-using-follow "Lisp xrefs"))
|
||||
|
||||
|
|
Loading…
Reference in New Issue