This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/layers/+tools/dash/funcs.el

26 lines
833 B
EmacsLisp
Raw Normal View History

2016-06-20 07:13:20 +00:00
;;; funcs.el --- Dash Layer functions File for Spacemacs
;;
;; Copyright (c) 2012-2017 Sylvain Benner & Contributors
2016-06-20 07:13:20 +00:00
;;
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(defun dash//activate-package-docsets (path)
"Add dash docsets from specified PATH."
(if (not (string-blank-p path))
(setq helm-dash-docsets-path path))
(setq helm-dash-common-docsets (helm-dash-installed-docsets))
2016-06-20 07:13:20 +00:00
(message (format "activated %d docsets from: %s"
(length helm-dash-common-docsets) path)))
2017-05-19 01:49:18 +00:00
(defun counsel-dash-at-point ()
"Counsel dash with selected point"
(interactive)
(counsel-dash
(if (use-region-p)
(buffer-substring-no-properties (region-beginning) (region-end))
(substring-no-properties (or (thing-at-point 'symbol) "")))))