Update my configuration files
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
("67e998c3c23fe24ed0fb92b9de75011b92f35d3e89344157ae0d544d50a63a72" default)))
|
||||
'(package-selected-packages
|
||||
(quote
|
||||
(counsel ivy-bibtex org-bullets paredit zenburn-theme slime rust-mode racket-mode polymode org lua-mode haskell-mode geiser ergoemacs-mode djvu auctex))))
|
||||
(ess-smart-underscore company-tern auto-complete markdown-mode xref-js2 js2-refactor js2-mode writeroom-mode weechat counsel ivy-bibtex org-bullets paredit zenburn-theme slime rust-mode racket-mode polymode org lua-mode haskell-mode geiser ergoemacs-mode djvu auctex))))
|
||||
(custom-set-faces
|
||||
;; custom-set-faces was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
|
||||
10
elisp/ess-setup.el
Normal file
10
elisp/ess-setup.el
Normal file
@@ -0,0 +1,10 @@
|
||||
;; better behavior inserting _
|
||||
(require ‘ess-smart-underscore)
|
||||
|
||||
;; enable code auto completion
|
||||
(require 'auto-complete-config)
|
||||
(ac-config-default)
|
||||
(setq ac-auto-start nil)
|
||||
(define-key ac-mode-map (kbd "<f2>") 'auto-complete)
|
||||
(define-key ac-completing-map [return] nil)
|
||||
(setq ac-quick-help-delay 0.1)
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
;; load my packages
|
||||
(require 'geiser)
|
||||
(require 'ess-site)
|
||||
|
||||
;; load my custom setups
|
||||
(load "~/.emacs.d/elisp/org-setup.el")
|
||||
@@ -14,3 +15,5 @@
|
||||
(load "~/.emacs.d/elisp/ivy-setup.el")
|
||||
;(load "~/.emacs.d/elisp/geiser-setup.el")
|
||||
(load "~/.emacs.d/elisp/keypad.el")
|
||||
(load "~/.emacs.d/elisp/javascript.el")
|
||||
;(load "~/.emacs.d/elisp/ess-setup.el")
|
||||
|
||||
32
elisp/javascript.el
Normal file
32
elisp/javascript.el
Normal file
@@ -0,0 +1,32 @@
|
||||
(require 'js2-mode)
|
||||
(add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode))
|
||||
|
||||
;; Better imenu
|
||||
(add-hook 'js2-mode-hook #'js2-imenu-extras-mode)
|
||||
|
||||
(require 'js2-refactor)
|
||||
(require 'xref-js2)
|
||||
|
||||
(add-hook 'js2-mode-hook #'js2-refactor-mode)
|
||||
(js2r-add-keybindings-with-prefix "C-c C-r")
|
||||
(define-key js2-mode-map (kbd "C-k") #'js2r-kill)
|
||||
|
||||
;; js-mode (which js2 is based on) binds "M-." which conflicts with xref, so
|
||||
;; unbind it.
|
||||
(define-key js-mode-map (kbd "M-.") nil)
|
||||
|
||||
(add-hook 'js2-mode-hook (lambda ()
|
||||
(add-hook 'xref-backend-functions #'xref-js2-xref-backend nil t)))
|
||||
|
||||
;; Code completion via tern
|
||||
(require 'company)
|
||||
(require 'company-tern)
|
||||
|
||||
(add-to-list 'company-backends 'company-tern)
|
||||
(add-hook 'js2-mode-hook (lambda ()
|
||||
(tern-mode)
|
||||
(company-mode)))
|
||||
|
||||
;; Disable completion keybindings, as we use xref-js2 instead
|
||||
(define-key tern-mode-keymap (kbd "M-.") nil)
|
||||
(define-key tern-mode-keymap (kbd "M-,") nil)
|
||||
@@ -29,15 +29,23 @@
|
||||
|
||||
("org" :components ("org-notes" "org-static"))))
|
||||
|
||||
;; preserve indentation on output
|
||||
(setq org-src-preserve-indentation t)
|
||||
|
||||
;; some config for org-babel
|
||||
(setq org-confirm-babel-evaluate nil
|
||||
org-src-fontify-natively t
|
||||
org-src-tab-acts-natively t)
|
||||
org-src-tab-acts-natively t
|
||||
org-hide-emphasis-markers t)
|
||||
|
||||
;;load languages babel
|
||||
;; use js2-mode instead of js-mode in org-mode
|
||||
(add-to-list 'org-src-lang-modes '("js" . js2))
|
||||
|
||||
;; load languages babel
|
||||
(org-babel-do-load-languages
|
||||
'org-babel-load-languages
|
||||
'((clojure . t)
|
||||
'((C . t)
|
||||
(js . t)
|
||||
(emacs-lisp . t)
|
||||
(haskell . t)
|
||||
(scheme . t)
|
||||
|
||||
@@ -2,5 +2,10 @@
|
||||
|
||||
;; C
|
||||
(add-to-list 'auto-mode-alist '("\\.nw$" . poly-noweb+c-mode))
|
||||
;;; MARKDOWN
|
||||
(add-to-list 'auto-mode-alist '("\\.md" . poly-markdown-mode))
|
||||
;;; R modes
|
||||
(add-to-list 'auto-mode-alist '("\\.Rmd" . poly-markdown+r-mode))
|
||||
(add-to-list 'polymode-mode-name-override-alist '(javascript . js2-mode))
|
||||
|
||||
(provide 'polymode-configuration)
|
||||
|
||||
Reference in New Issue
Block a user