Add google-this plugin
This commit is contained in:
parent
c28bb1519d
commit
d2c6f0ca71
|
@ -22,5 +22,21 @@
|
|||
(setq-local ,(if IS-MAC 'dash-at-point-docset 'zeal-at-point-docset)
|
||||
,docset)))
|
||||
|
||||
(use-package google-this
|
||||
:commands (google-this-search
|
||||
google-this-lucky-and-insert-url
|
||||
google-this-lucky-search
|
||||
google-this-string
|
||||
google-this-line
|
||||
google-this-ray
|
||||
google-this-word
|
||||
google-this-symbol
|
||||
google-this-region
|
||||
google-this
|
||||
google-this-noconfirm
|
||||
google-this-error
|
||||
google-this-cpp-reference
|
||||
google-this-forecast))
|
||||
|
||||
(provide 'core-docs)
|
||||
;;; core-docs.el ends here
|
||||
|
|
|
@ -12,5 +12,20 @@
|
|||
(setq query (thing-at-point 'symbol)))
|
||||
(doom-docs-lookup query bang)))
|
||||
|
||||
;;;###autoload (autoload 'doom:google-search "defuns-docs" nil t)
|
||||
(evil-define-command doom:google-search (&optional bang search)
|
||||
"Opens a browser and performs the entered google search. If BANG, use 'I'm
|
||||
feeling lucky'."
|
||||
(interactive "<!><a>")
|
||||
(if search
|
||||
(google-this-parse-and-search-string
|
||||
search nil
|
||||
(if bang (google-this-lucky-search-url)))
|
||||
(cond ((eq major-mode 'c++-mode)
|
||||
(google-this-cpp-reference))
|
||||
((evil-visual-state-p)
|
||||
(google-this-region nil))
|
||||
(t (google-this-symbol nil)))))
|
||||
|
||||
(provide 'defuns-docs)
|
||||
;;; defuns-docs.el ends here
|
||||
|
|
Loading…
Reference in New Issue
Block a user