Skip to content

Instantly share code, notes, and snippets.

@strobe
Last active May 19, 2017 21:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save strobe/ea0995551a4f11890ca818079d0331ed to your computer and use it in GitHub Desktop.
Save strobe/ea0995551a4f11890ca818079d0331ed to your computer and use it in GitHub Desktop.
ensime ctags config for spacemacs
;; ensime - etags-select (see: http://ensime.org/editors/emacs/hacks/#tags
;; and for .ctags config https://gist.github.com/salomvary/3372e9cd40f5b09a928b)
(defun ensime-edit-definition-with-fallback ()
"Variant of `ensime-edit-definition' with ctags if ENSIME is not available."
(interactive)
(unless (and (ensime-connection-or-nil)
(ensime-edit-definition nil))
(projectile-find-tag)))
(defun ensime-settings ()
(bind-key "M-." 'ensime-edit-definition-with-fallback ensime-mode-map)
(bind-key "<s-mouse-1>" 'ensime-edit-definition-with-fallback ensime-mode-map))
(add-hook 'ensime-mode-hook 'ensime-settings)
;; ctags for non ensime modes
(global-set-key (kbd "M-.") 'projectile-find-tag)
(global-set-key (kbd "M-,") 'pop-tag-mark)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment