mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-23 02:35:38 +01:00
JAVASCRIPT
This commit is contained in:
parent
88d2e45b1f
commit
e996890bc2
1 changed files with 17 additions and 1 deletions
18
.emacs
18
.emacs
|
|
@ -2,7 +2,7 @@
|
|||
(setq package-list '(auctex expand-region gist magit magithub markdown-mode paredit projectile
|
||||
python sass-mode rainbow-mode scss-mode solarized-theme anything
|
||||
volatile-highlights evil evil-leader scala-mode2 sbt-mode flx-ido
|
||||
js2-mode js2-refactor tern tern-auto-complete))
|
||||
js2-mode js2-refactor tern tern-auto-complete yasnippet auto-complete))
|
||||
|
||||
; list the repositories containing them
|
||||
(setq package-archives '(("elpa" . "http://tromey.com/elpa/")
|
||||
|
|
@ -78,6 +78,22 @@
|
|||
(setq js2-highlight-level 3)
|
||||
(add-to-list 'auto-mode-alist '("\\.json$" . js-mode))
|
||||
|
||||
;;; yasnippet
|
||||
;;; should be loaded before auto complete so that they can work together
|
||||
(require 'yasnippet)
|
||||
(yas-global-mode 1)
|
||||
|
||||
;;; auto complete mod
|
||||
;;; should be loaded after yasnippet so that they can work together
|
||||
(require 'auto-complete-config)
|
||||
(add-to-list 'ac-dictionary-directories "~/.emacs.d/ac-dict")
|
||||
(ac-config-default)
|
||||
;;; set the trigger key so that it can work together with yasnippet on tab key,
|
||||
;;; if the word exists in yasnippet, pressing tab will cause yasnippet to
|
||||
;;; activate, otherwise, auto-complete will
|
||||
(ac-set-trigger-key "TAB")
|
||||
(ac-set-trigger-key "<tab>")
|
||||
|
||||
; Tern auto completion, install tern
|
||||
; sudo npm install -g tern
|
||||
(add-hook 'js-mode-hook (lambda () (tern-mode t)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue