Last active
December 15, 2015 01:19
-
-
Save mwolson/5179002 to your computer and use it in GitHub Desktop.
Attaching to a swank-js node.js server using SLIME and Emacs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Improved Javascript support | |
(add-to-list 'load-path (concat my-emacs-path "/elisp/js2-mode")) | |
(autoload 'js2-mode "js2-mode" nil t) | |
(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode)) | |
;; Node REPL using SLIME | |
(add-to-list 'load-path (concat my-emacs-path "/elisp/slime")) | |
(add-to-list 'load-path (concat my-emacs-path "/elisp/slime/contrib")) | |
(require 'slime) | |
(autoload 'slime-js-minor-mode "slime-js" nil t) | |
(add-hook 'js2-mode-hook | |
(lambda () | |
(slime-js-minor-mode 1))) | |
(slime-setup '(slime-repl slime-js)) | |
(setq slime-auto-connect 'always) | |
(setq slime-kill-without-query-p t) | |
(setq slime-protocol-version 'ignore) | |
(defun slime () | |
(interactive) | |
(let ((process (slime-connect "localhost" 4005))) | |
(setf (slime-connection-name process) "NODE"))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment