loads of cahnges!

This commit is contained in:
Grant 2017-11-20 08:56:09 -07:00
parent e5b3ba4835
commit afa311540f
6 changed files with 102 additions and 17 deletions

View File

@ -15,6 +15,7 @@
(load-file "~/.emacs.d/super-emacs/interface.el") (load-file "~/.emacs.d/super-emacs/interface.el")
(load-file "~/.emacs.d/super-emacs/misc.el") (load-file "~/.emacs.d/super-emacs/misc.el")
(load-file "~/.emacs.d/super-emacs/key-bindings.el") (load-file "~/.emacs.d/super-emacs/key-bindings.el")
(load-file "~/.emacs.d/super-emacs/file-modes.el")
(custom-set-variables (custom-set-variables
;; custom-set-variables was added by Custom. ;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful. ;; If you edit it by hand, you could mess it up, so be careful.
@ -22,7 +23,7 @@
;; If there is more than one, they won't work right. ;; If there is more than one, they won't work right.
'(package-selected-packages '(package-selected-packages
(quote (quote
(helm-projectile projectile json-mode jinja2-mode company-terraform terraform-mode yaml-mode company racer rust-mode magit theme-looper myterminal-controls meta-presenter which-key dired-launch material-theme neotree undo-tree ztree buffer-move powerline ace-window ace-jump-mode multiple-cursors helm)))) (elpy importmagic py-autopep8 flycheck excorporate ivy nginx-mode helm-projectile projectile json-mode jinja2-mode company-terraform terraform-mode yaml-mode company racer rust-mode magit theme-looper myterminal-controls meta-presenter which-key dired-launch material-theme neotree undo-tree ztree buffer-move powerline ace-window ace-jump-mode multiple-cursors helm))))
(custom-set-faces (custom-set-faces
;; custom-set-faces was added by Custom. ;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful. ;; If you edit it by hand, you could mess it up, so be careful.

View File

@ -0,0 +1,2 @@
(setq auto-mode-alist (append '(("\\.sls$" . yaml-mode))
auto-mode-alist))

View File

@ -20,4 +20,4 @@
'(default ((t (:height 120))))) '(default ((t (:height 120)))))
;line numbers ;line numbers
(linum-mode) (global-linum-mode)

View File

@ -28,6 +28,7 @@
("s-=" . text-scale-increase) ("s-=" . text-scale-increase)
("C-c m" . magit-status) ("C-c m" . magit-status)
("C-c g" . helm-projectile-grep) ("C-c g" . helm-projectile-grep)
("C-c b" . helm-semantic-or-imenu)
)) ))
(defun super-emacs-apply-keyboard-bindings (pair) (defun super-emacs-apply-keyboard-bindings (pair)

View File

@ -6,20 +6,65 @@
(t (message "You're not editing a file!")))) (t (message "You're not editing a file!"))))
;Disable splash message, start *scratch* buffer by default ;Disable splash message, start *scratch* buffer by default
(setq initial-buffer-choice (setq initial-buffer-choice
t) t)
(setq initial-scratch-message (setq initial-scratch-message
"") "")
;Enforce spaces for indentation, instead of tabs ;Enforce spaces for indentation, instead of tabs
(setq-default indent-tabs-mode (setq-default indent-tabs-mode
nil) nil)
;Enable show-paren-mode ;Enable show-paren-mode
(show-paren-mode) (show-paren-mode)
;Enable whitespace mode
(global-whitespace-mode)
(setq whitespace-line-column 125)
;Enable winner-mode ;Enable winner-mode
(winner-mode t) (winner-mode t)
;Enable windmove ;Enable windmove
(windmove-default-keybindings) (windmove-default-keybindings)
;;keep search highlight
(setq lazy-highlight-cleanup nil)
;;cleanup buffers
(require 'midnight)
;;kill buffers if they were last disabled more than this seconds ago
(setq clean-buffer-list-delay-special 900)
(defvar clean-buffer-list-timer nil
"Stores clean-buffer-list timer if there is one. You can disable clean-buffer-list by (cancel-timer clean-buffer-list-timer).")
;; run clean-buffer-list every 2 hours
(setq clean-buffer-list-timer (run-at-time t 7200 'clean-buffer-list))
;; kill everything, clean-buffer-list is very intelligent at not killing
;; unsaved buffer.
(setq clean-buffer-list-kill-regexps '("^.*$"))
;; keep these buffer untouched
;; prevent append multiple times
(defvar clean-buffer-list-kill-never-buffer-names-init
clean-buffer-list-kill-never-buffer-names
"Init value for clean-buffer-list-kill-never-buffer-names")
(setq clean-buffer-list-kill-never-buffer-names
(append
'("*Messages*" "*cmd*" "*scratch*" "*w3m*" "*w3m-cache*" "*Inferior Octave*")
clean-buffer-list-kill-never-buffer-names-init))
;; prevent append multiple times
(defvar clean-buffer-list-kill-never-regexps-init
clean-buffer-list-kill-never-regexps
"Init value for clean-buffer-list-kill-never-regexps")
;; append to *-init instead of itself
(setq clean-buffer-list-kill-never-regexps
(append '("^\\*EMMS Playlist\\*.*$")
clean-buffer-list-kill-never-regexps-init))

View File

@ -26,10 +26,12 @@
json-mode json-mode
terraform-mode terraform-mode
company-terraform company-terraform
elpy
racer racer
company company
projectile projectile
helm-projectile helm-projectile
flycheck
)) ))
;Install required packages ;Install required packages
@ -53,18 +55,19 @@
(setq company-idle-delay 0) (setq company-idle-delay 0)
(setq company-minimum-prefix-length 2) (setq company-minimum-prefix-length 2)
(defvar company-mode-whitelist (global-company-mode)
'( ;; (defvar company-mode-whitelist
js-mode-hook ;; '(
python-mode-hook ;; js-mode-hook
rust-mode-hook ;; python-mode-hook
lisp-mode-hook ;; rust-mode-hook
terraform-mode-hook ;; lisp-mode-hook
)) ;; terraform-mode-hook
;; org-mode-hook
(mapc (lambda (h) ;; ))
(add-hook h #'company-mode)) ;; (mapc (lambda (h)
company-mode-whitelist) ;; (add-hook h #'company-mode))
;; company-mode-whitelist)
;Set up ace-jump-mode ;Set up ace-jump-mode
@ -104,3 +107,36 @@
(add-hook 'rust-mode-hook #'racer-mode) (add-hook 'rust-mode-hook #'racer-mode)
(add-hook 'rust-mode-hook #'eldoc-mode) (add-hook 'rust-mode-hook #'eldoc-mode)
(add-hook 'racer-mode-hook #'company-mode) (add-hook 'racer-mode-hook #'company-mode)
;Projectile
(add-hook 'projectile-mode-hook (lambda () (
(setq projectile-globally-ignored-files
(append '(
"#*#"
"*~"
".DS_Store"
"*.gz"
"*.pyc"
"*.jar"
"*.tar.gz"
"*.tgz"
"*.zip"
)
projectile-globally-ignored-files))
(setq projectile-globally-ignored-directories
(append '(
".git"
".svn"
)
projectile-globally-ignored-directories))
)))
;;elpy
;; (when (require 'flycheck nil t)
;; (setq elpy-default-minor-modes (delete 'flymake-mode elpy-default-minor-modes))
;; (add-to-list 'elpy-default-minor-modes 'flycheck-mode))
;;flycheck
(setq flycheck-flake8-maximum-line-length 125)