Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 5.67 KB | None | 0 0
  1. (require 'package) ;; You might already have this line
  2. (add-to-list 'package-archives
  3.          '("melpa" . "https://melpa.org/packages/") t)
  4. (package-initialize) ;; You might already have this line
  5.  
  6. (require 'iso-transl)
  7.  
  8. ;; Local emacs path
  9. (add-to-list 'load-path "~/.emacs.d/lisp")
  10.  
  11. (customize-set-variable 'tramp-default-method "ssh")
  12.  
  13. (setq-default exec-path-from-shell-check-startup-files nil)
  14.  
  15. (custom-set-variables
  16.  ;; custom-set-variables was added by Custom.
  17.  ;; If you edit it by hand, you could mess it up, so be careful.
  18.  ;; Your init file should contain only one such instance.
  19.  ;; If there is more than one, they won't work right.
  20.  '(custom-enabled-themes (quote (wombat)))
  21.  '(display-line-numbers (quote relative))
  22.  '(display-line-numbers-type (quote relative))
  23.  '(global-display-line-numbers-mode nil)
  24.  '(package-selected-packages
  25.    (quote
  26.     (## rust-mode evil-indent-plus evil-multiedit powerline-evil evil-tutor evil-magit evil haskell-emacs-text haskell-emacs-base spice-mode typescript-mode flymake-hlint company-cabal company-rtags flycheck-hdevtools hindent bison-mode lex hlint-refactor ws-butler magit-svn magit-filenotify magit intero flycheck-rust company-ghci company-auctex company-ghc flycheck-haskell smart-tabs-mode haskell-mode yaml-mode markdown-preview-eww markdown-toc markdown-mode+ markdown-preview-mode markdown-mode neotree gitignore-mode go-snippets go-stacktracer go-eldoc go-gopath zeitgeist graphviz-dot-mode flyspell-lazy dropbox go-guru company-go flycheck-gometalinter go-mode sr-speedbar ggtags cmake-ide git flycheck-clangcheck company-irony-c-headers company-bibtex auto-complete-c-headers company-c-headers auto-complete-clang irony-eldoc flyspell-correct flycheck-irony exec-path-from-shell company-irony balsa)))
  27.  '(safe-local-variable-values (quote ((TeX-master . "volume") (TeX-master . paper))))
  28.  '(tramp-default-method "ssh" nil (tramp)))
  29. (custom-set-faces
  30.  ;; custom-set-faces was added by Custom.
  31.  ;; If you edit it by hand, you could mess it up, so be careful.
  32.  ;; Your init file should contain only one such instance.
  33.  ;; If there is more than one, they won't work right.
  34.  )
  35.  
  36. ;; Evil Mode Configuration
  37. (require 'evil)
  38. (require 'evil-magit)
  39. (evil-mode 1)
  40. (setq evil-search-module 'evil-search)
  41.  
  42. ;; Visual Configuration
  43. (require 'powerline)
  44. (require 'powerline-evil)
  45. (powerline-center-evil-theme)
  46.  
  47. (setq inhibit-startup-screen t)
  48.  
  49. (tool-bar-mode -1)
  50.  
  51. ;; Make transparent
  52. (set-frame-parameter (selected-frame) 'alpha 95)
  53. (add-to-list 'default-frame-alist '(alpha . 95))
  54.  
  55. ;; Set tab to 2 spaces for confort
  56. (setq-default default-tab-width 2)
  57. (setq-default indent-tabs-mode nil)
  58.  
  59. (setq-default javascript-indent-level 2)
  60. (setq-default typescript-indent-level 2)
  61.  
  62. ;; Use command key as Meta
  63. (setq-default mac-option-key-is-meta nil
  64.           mac-command-key-is-meta t
  65.           mac-command-modifier 'meta
  66.           mac-option-modifier 'none)
  67.  
  68. (exec-path-from-shell-initialize)
  69. (exec-path-from-shell-copy-env "GOPATH")
  70.  
  71. (setq-default TeX-master nil)
  72. (add-hook 'LaTeX-mode-hook 'visual-line-mode)
  73. (add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)
  74. (add-hook 'LaTeX-mode-hook 'turn-on-reftex)
  75.  
  76. ;; Flyspell
  77. (autoload 'flyspell-mode "flyspell" "On-the-fly spelling checker." t)
  78.  
  79. ;; the default flyspell behaviour
  80. (put 'LeTex-mode 'flyspell-mode-predicate 'tex-mode-flyspell-verify)
  81.  
  82. (add-hook 'LaTeX-mode-hook 'flyspell-mode)
  83.  
  84. (add-hook 'c++-mode-hook 'irony-mode)
  85. (add-hook 'c-mode-hook 'irony-mode)
  86. (add-hook 'objc-mode-hook 'irony-mode)
  87.  
  88. ;; replace the `completion-at-point' and `complete-symbol' bindings in
  89. ;; irony-mode's buffers by irony-mode's function
  90. (defun my-irony-mode-hook ()
  91.   (define-key irony-mode-map [remap completion-at-point]
  92.     'irony-completion-at-point-async)
  93.   (define-key irony-mode-map [remap complete-symbol]
  94.     'irony-completion-at-point-async))
  95. (add-hook 'irony-mode-hook 'my-irony-mode-hook)
  96. (add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options)
  97.  
  98. (eval-after-load 'flycheck
  99.   '(add-hook 'flycheck-mode-hook #'flycheck-irony-setup))
  100.  
  101. (add-hook 'irony-mode-hook 'company-irony-setup-begin-commands)
  102. (require 'company-irony-c-headers)
  103. (eval-after-load 'company
  104.   '(add-to-list
  105.     'company-backends '(company-irony-c-headers company-irony company-go company-ghc)))
  106.  
  107. ;; Enables Flycheck Globally
  108. (add-hook 'after-init-hook 'global-flycheck-mode)
  109. (add-hook 'after-init-hook 'global-company-mode)
  110.  
  111. (setq-default ispell-list-command "--list")
  112.  
  113. (add-hook 'before-save-hook #'gofmt-before-save)
  114.  
  115. (cmake-ide-setup)
  116.  
  117. (add-hook 'go-mode-hook 'flyspell-prog-mode)
  118.  
  119. (add-hook 'markdown-mode-hook 'flyspell-mode)
  120.  
  121. (require 'reftex)
  122. (setq-default TeX-master nil)
  123. (add-hook 'LaTeX-mode-hook 'TeX-PDF-mode) ;turn on pdf-mode.  AUCTeX
  124.                                         ;will call pdflatex to
  125.                                         ;compile instead of latex.
  126. (add-hook 'LaTeX-mode-hook 'LaTeX-math-mode) ;turn on math-mode by
  127.                                         ;default
  128. (add-hook 'LaTeX-mode-hook 'reftex-mode) ;turn on REFTeX mode by
  129.                                         ;default
  130. (add-hook 'LaTeX-mode-hook 'flyspell-mode) ;turn on flyspell mode by
  131.                                         ;default
  132.  
  133. (setq reftex-plug-into-AUCTeX t)
  134. (setq-default TeX-auto-save t)
  135. (setq-default TeX-save-query nil)
  136. (setq-default TeX-parse-self t)
  137. (put 'upcase-region 'disabled nil)
  138.  
  139. (intero-global-mode)
  140. (add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
  141. (add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)
  142. (add-hook 'haskell-mode-hook 'flymake-hlint-load)
  143. (add-hook 'haskell-mode-hook 'hlint-refactor-mode)
  144. (setq-default haskell-stylish-on-save t)
  145.  
  146.  
  147. (provide '.emacs)
  148. ;;; .emacs ends here
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement