javascript stuff
This commit is contained in:
parent
c4e74d2121
commit
351d0dbc69
8 changed files with 1277 additions and 19 deletions
|
|
@ -255,6 +255,9 @@
|
|||
(when (memq window-system '(mac ns))
|
||||
(exec-path-from-shell-initialize))
|
||||
|
||||
;; Company mode everywhere. What could go wrong?
|
||||
(global-company-mode)
|
||||
|
||||
;; =================================================================
|
||||
;; Text mode configuration.
|
||||
;; =================================================================
|
||||
|
|
@ -514,9 +517,6 @@
|
|||
(add-to-list 'auto-mode-alist '("\\.cool$" . csharp-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.cs$" . csharp-mode))
|
||||
|
||||
(eval-after-load
|
||||
'company
|
||||
'(add-to-list 'company-backends 'company-omnisharp))
|
||||
|
||||
;; =================================================================
|
||||
;; "XML" Support
|
||||
|
|
@ -579,13 +579,6 @@
|
|||
;; Flycheck
|
||||
;; =================================================================
|
||||
(require 'flycheck)
|
||||
;; disable jshint since we prefer eslint checking
|
||||
(setq-default flycheck-disabled-checkers
|
||||
(append flycheck-disabled-checkers
|
||||
'(javascript-jshint)))
|
||||
|
||||
;; use eslint with web-mode for jsx files
|
||||
(flycheck-add-mode 'javascript-eslint 'web-mode)
|
||||
|
||||
;; customize flycheck temp file prefix
|
||||
(setq-default flycheck-temp-prefix ".flycheck")
|
||||
|
|
@ -625,17 +618,34 @@
|
|||
;; =================================================================
|
||||
(autoload 'python-mode "python-mode" "Python editing mode." t)
|
||||
|
||||
(setq auto-mode-alist
|
||||
(cons '("\\.py$" . python-mode) auto-mode-alist))
|
||||
(setq interpreter-mode-alist
|
||||
(cons '("python" . python-mode) interpreter-mode-alist))
|
||||
(add-to-list 'auto-mode-alist '("\\.py$" . python-mode))
|
||||
(add-to-list 'interpreter-mode-alist '("python" . python-mode))
|
||||
|
||||
;; =================================================================
|
||||
;; JavaScript Support
|
||||
;; =================================================================
|
||||
(autoload 'js2-mode "js2-mode" nil t)
|
||||
(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.jsx$" . web-mode))
|
||||
(require 'rjsx-mode)
|
||||
(require 'prettier-js)
|
||||
(require 'flycheck-flow)
|
||||
(require 'flow-minor-mode)
|
||||
|
||||
;; disable jshint since we prefer eslint checking
|
||||
(setq-default flycheck-disabled-checkers
|
||||
(append flycheck-disabled-checkers
|
||||
'(javascript-jshint)))
|
||||
(flycheck-add-next-checker 'javascript-eslint 'javascript-flow)
|
||||
|
||||
(add-to-list 'auto-mode-alist '("\\.js$" . rjsx-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.jsx$" . rjsx-mode))
|
||||
|
||||
(defun my-js-mode-hook ()
|
||||
"My custom javascript mode hook."
|
||||
(add-node-modules-path)
|
||||
(flow-minor-enable-automatically)
|
||||
(prettier-js-mode))
|
||||
|
||||
(add-hook 'rjsx-mode-hook #'my-js-mode-hook)
|
||||
|
||||
|
||||
;; =================================================================
|
||||
;; Ruby Mode
|
||||
|
|
|
|||
|
|
@ -14,6 +14,11 @@
|
|||
'(comint-input-ignoredups t)
|
||||
'(comint-prompt-read-only t)
|
||||
'(comint-scroll-to-bottom-on-input t)
|
||||
'(company-backends
|
||||
(quote
|
||||
(company-bbdb company-nxml company-css company-eclim company-semantic company-clang company-xcode company-cmake company-capf company-files
|
||||
(company-dabbrev-code company-gtags company-etags company-keywords)
|
||||
company-oddmuse company-dabbrev company-flow)))
|
||||
'(css-indent-offset 2)
|
||||
'(debug-on-error nil)
|
||||
'(fast-lock-cache-directories (quote ("~/flc-cache")))
|
||||
|
|
@ -46,7 +51,7 @@
|
|||
((sequence "TODO" "|" "DONE" "ABANDONED" "DEFERRED"))))
|
||||
'(package-selected-packages
|
||||
(quote
|
||||
(company omnisharp geiser cider clojure-mode graphviz-dot-mode multi-term xterm-color thrift markdown-mode tuareg merlin ag use-package flycheck dockerfile-mode js2-mode web-mode zencoding-mode tss switch-window python-mode paredit magit lua-mode go-mode go-autocomplete exec-path-from-shell csharp-mode color-theme-solarized color-theme-monokai auto-complete auto-complete-nxml flymake flyspell json-mode popup ruby-mode)))
|
||||
(mocha add-node-modules-path rjsx-mode xref-js2 js2-refactor company omnisharp geiser cider clojure-mode graphviz-dot-mode multi-term xterm-color thrift markdown-mode tuareg merlin ag use-package flycheck dockerfile-mode js2-mode web-mode zencoding-mode tss switch-window python-mode paredit magit lua-mode go-mode go-autocomplete exec-path-from-shell csharp-mode color-theme-solarized color-theme-monokai auto-complete auto-complete-nxml flymake flyspell json-mode popup ruby-mode)))
|
||||
'(reb-re-syntax (quote string))
|
||||
'(rmail-mail-new-frame t)
|
||||
'(safe-local-variable-values
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
(
|
||||
(:id "sha1:24c7a1e6369fef1e50de1deb1a9e5bbc68f80c8b" :fingerprint "sha1:26:26:88:6a:58:94:85:2f:98:ce:97:a0:0d:93:75:63:0a:9e:44:b5" :host "orgmode.org:443" :conditions (:insecure :unknown-ca :invalid))
|
||||
(:id "sha1:60f141fb7e2767fbc9d5f309850c9db8bfaadb86" :fingerprint "sha1:f3:eb:c5:20:3c:f3:c8:79:46:3b:2d:d4:b7:c2:12:09:54:0e:d9:3b" :host "github-production-release-asset-2e65be.s3.amazonaws.com:443" :conditions (:insecure :unknown-ca :invalid))
|
||||
(:id "sha1:379522f41fcdf5d279b33c30780e7512c9348430" :fingerprint "sha1:d4:ee:9d:2a:67:12:b3:61:4c:27:2d:15:8b:04:fc:c8:ca:08:a0:b6" :host "github.com:443" :conditions (:insecure :unknown-ca :invalid))
|
||||
(:id "sha1:24c7a1e6369fef1e50de1deb1a9e5bbc68f80c8b" :fingerprint "sha1:fe:3b:22:d5:9b:33:20:74:3c:0d:7e:d2:7d:71:41:5d:84:e7:ca:82" :host "orgmode.org:443" :conditions (:insecure :unknown-ca :invalid))
|
||||
(:id "sha1:85457c729378cc93c732b6a3941c8e4f9c2e60f3" :fingerprint "sha1:ab:a6:d7:6a:b3:d3:63:fa:19:0d:65:41:60:23:6e:ef:d3:2a:46:dc" :host "marmalade-repo.org:443" :conditions (:unknown-ca :invalid))
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue