Commit 5f6e4079 authored by David Sveningsson's avatar David Sveningsson
Browse files

emacs: tide hydra

parent 0b53cd52
......@@ -33,7 +33,7 @@
(load "~/.dotfiles/global/skeletons.el")
; keybindings
(global-set-key (kbd "<f1>") (lambda () (interactive) (manual-entry (current-word)))) ;show manpage
;;(global-set-key (kbd "<f1>") (lambda () (interactive) (manual-entry (current-word)))) ;show manpage
(global-set-key (kbd "<f2>") 'hippie-expand); complete
(global-set-key (kbd "<f5>") 'vc-diff)
(global-set-key (kbd "C-<f5>") 'vc-print-log)
......
......@@ -217,8 +217,10 @@ Tabs and ribbons for the mode line.
:ensure t)
#+END_SRC
** Cua
#+BEGIN_SRC emacs-lisp
; Activate CUA by default (without C-z as it interferes with suspend)
; Activate CUA for rectangle support only
(setq cua-enable-cua-keys 'nil)
(setq cua-remap-control-z 'nil)
(setq cua-auto-tabify-rectangles nil)
(cua-mode 1)
......@@ -332,6 +334,9 @@ _j_ump _l_ist ^^ _q_uit
#+BEGIN_SRC emacs-lisp
(use-package tide
:ensure t
:bind
("C-c t" . ext/hydra-tide/body)
("<f1>" . tide-documentation-at-point)
:init
(defun ext/setup-tide-mode ()
(message "Loading ext/setup-tide-mode...")
......@@ -343,6 +348,23 @@ _j_ump _l_ist ^^ _q_uit
(eldoc-mode +1)
(tide-hl-identifier-mode +1)
(company-mode +1))
(defhydra ext/hydra-tide
(:hint nil :exit t)
"
^~tide~
_f_ix rename _s_ymbol _l_ist references _p_rettier _R_estart server
_r_efactor _R_ename file _o_rganize imports _q_uit _V_erify setup
"
("f" tide-fix)
("s" tide-rename-symbol)
("R" tide-rename-file)
("l" tide-references)
("r" tide-refactor)
("o" tide-organize-imports)
("p" prettier-js)
("R" tide-restart-server)
("V" tide-verify-setup)
("q" nil))
:hook
((typescript-mode js2-mode) . 'ext/setup-tide-mode))
#+END_SRC
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment