Advertisement
Guest User

Untitled

a guest
May 25th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.63 KB | None | 0 0
  1. ;; Added by Package.el. This must come before configurations of
  2. ;; installed packages. Don't delete this line. If you don't want it,
  3. ;; just comment it out by adding a semicolon to the start of the line.
  4. ;; You may delete these explanatory comments.
  5.  
  6. (require 'package)
  7. (let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
  8. (not (gnutls-available-p))))
  9. (proto (if no-ssl "http" "https")))
  10. ;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired
  11. (add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t)
  12. ;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t)
  13. (when (< emacs-major-version 24)
  14. ;; For important compatibility libraries like cl-lib
  15. (add-to-list 'package-archives '("gnu" . (concat proto "://elpa.gnu.org/packages/")))))
  16. (package-initialize)
  17.  
  18. (custom-set-variables
  19. ;; custom-set-variables was added by Custom.
  20. ;; If you edit it by hand, you could mess it up, so be careful.
  21. ;; Your init file should contain only one such instance.
  22. ;; If there is more than one, they won't work right.
  23. '(ansi-color-names-vector
  24. ["#242424" "#e5786d" "#95e454" "#cae682" "#8ac6f2" "#333366" "#ccaa8f" "#f6f3e8"])
  25. '(blink-cursor-mode t)
  26. '(custom-enabled-themes (quote (wombat)))
  27. '(display-battery-mode t)
  28. '(package-selected-packages (quote (company company-c-headers sr-speedbar use-package))))
  29.  
  30. (custom-set-faces
  31. ;; custom-set-faces was added by Custom.
  32. ;; If you edit it by hand, you could mess it up, so be careful.
  33. ;; Your init file should contain only one such instance.
  34. ;; If there is more than one, they won't work right.
  35. )
  36.  
  37. ;; Set python interpreter
  38. (setq python-shell-interpreter "/anaconda/bin/python")
  39.  
  40. ;; Load tuareg major mode
  41. (load "/Users/weixin/.opam/4.06.0/share/emacs/site-lisp/tuareg-site-file")
  42.  
  43. ;; Dired settings
  44. (when (string= system-type "darwin")
  45. (setq dired-use-ls-dired nil))
  46.  
  47. ;; Speedbar settings
  48. (setq speedbar-directory-unshown-regexp "^\\(CVS\\|RCS\\|SCCS\\|\\.\\.*$\\)\\'")
  49. (setq speedbar-show-unknown-files t)
  50. (setq sr-speedbar-right-side nil)
  51. (global-set-key (kbd "C-c d") 'sr-speedbar-toggle)
  52.  
  53. ;; Company settings
  54. (require 'company)
  55. (require 'cc-mode)
  56. (setq company-idle-delay 0)
  57. (setq company-minimum-prefix-length 3)
  58.  
  59. (setq company-backends (delete 'company-semantic company-backends))
  60. (add-to-list 'company-backends 'company-c-headers)
  61. (define-key c-mode-map [(tab)] 'company-complete)
  62. (define-key c++-mode-map [(tab)] 'company-complete)
  63. (add-hook 'after-init-hook (lambda()
  64. (global-company-mode)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement