(add-hook 'after-init-hook
`(lambda ()
(setq file-name-handler-alist file-name-handler-alist-old
- gc-cons-threshold 800000
- gc-cons-percentage 0.1)
- (garbage-collect)) t)
+ ;; 100 mb
+ gc-cons-threshold 100000000))
+ ;; taken from wiegley, dunno why the t is there.
+ t)
;; 2019-6-26, 1.26s
;; ; to profile init:
;; ; uncomment the following block
-;; (require 'benchmark-init)
-;; (add-hook 'after-init-hook 'benchmark-init/deactivate)
+ (require 'benchmark-init)
+ (add-hook 'after-init-hook 'benchmark-init/deactivate)
;; ; Then run:
;; ; emacs -f benchmark-init/show-durations-tabulated
;; ; emacs -f benchmark-init/show-durations-tree
;; keep our init.el clean, by moving customization elisp to it's own file
(setq custom-file "~/.emacs.d/custom.el")
-(load custom-file 'noerror)
+;; empty atm
+;;(load custom-file 'noerror)
;;; auto-complete
(ws-butler-global-mode)
-(require 'nginx-mode)
+;; disabled because i dont edit nginx files enough
+;; to have this loaded at startup
+;;(use-package nginx-mode)
;;The mode should automatically activate for files called nginx.conf and files under /etc/nginx - if not, you can add something like this to your init file:
;;(add-to-list 'auto-mode-alist '("/etc/nginx/sites-available/.*" . nginx-mode))
;;; misc general settings
+
+;; I tried to look for a function that would set this that is
+;; not part of the emacs interactive customize stuff, but didn't see one
+;; in the faces documentation.
+
+(custom-set-faces
+ ;; custom-set-faces was added by Custom.
+ ;; If you edit it by hand, you could mess it up, so be careful.
+ ;; Your init file should contain only one such instance.
+ ;; If there is more than one, they won't work right.
+ '(header-line ((t (:background "default" :foreground "default" :overline nil :underline nil))))
+ '(region ((t nil))))
+
+
;; from tramp manual, use the same ssh controlmaster. I was having problems with
;; tramp prompting me for a username and pass.
(customize-set-variable 'tramp-use-ssh-controlmaster-options nil)
;; this says do autofilling using newcomment.el. The "only" is a misnomer.
(set (make-local-variable 'comment-auto-fill-only-comments) t)
(column-number-mode t)
- (turn-on-smartparens-mode)
+ ;; trying without
+ ;; (turn-on-smartparens-mode)
;; prettify lambdas
(font-lock-add-keywords
(shell)))
(add-hook 'shell-mode-hook 'track-shell-directory/procfs)
-;;; smartparens
-;; the melpa git version had a catastrophic bug I reported.
-;; downgraded to marmalade version and everything is working fine.
-(require 'smartparens-config)
-(show-smartparens-global-mode t)
-
-
-(defun gp/sp/pair-on-newline-and-indent (id action context)
- "Open a new brace or bracket expression, with relevant newlines and indent. "
- (save-excursion
- (newline)
- (indent-according-to-mode))
- (indent-according-to-mode))
-
-;; when opening a pair, and then inserting a newline, push the closing pair to another newline
-(sp-pair "{" nil :post-handlers
- '(:add ((lambda (id action context)
- (gp/sp/pair-on-newline-and-indent id action context)) (kbd "RET"))))
-(sp-pair "[" nil :post-handlers
- '(:add ((lambda (id action context)
- (gp/sp/pair-on-newline-and-indent id action context)) (kbd "RET"))))
-
-
-;; in my version, this is not a pairing.
-;; not sure if it is in a future version since I reverted to marmalade
-;; Don't need c-comments in strings -- they frustrate filename globs
-;; (sp-pair "/*" nil :unless '(sp-in-string-p))
-
-;; Don't need quotes to pair next to words
-(sp-pair "\"" nil :unless '(sp-point-before-word-p sp-point-after-word-p))
-(sp-pair "'" nil :unless '(sp-point-before-word-p sp-point-after-word-p))
-
-
-;; todo, testout these mode specific settings from graphene.
-;; Ruby-specific pairs and handlers
-
-(eval-after-load "ruby"
- '(require 'smartparens-ruby))
-
-;; Markdown
-(sp-local-pair '(markdown-mode gfm-mode) "*" "*"
- :unless '(sp-in-string-p)
- :actions '(insert wrap))
-
-;; Except in HTML
-(sp-local-pair 'html-mode "\"" nil :unless '(:rem sp-point-after-word-p))
-
-
-
-
;;; spell correction
(setq
ispell-program-name "hunspell"
ispell-silently-savep t) ; don't prompt to save personal dictionary
-(require 'rw-hunspell)
+(use-package rw-hunspell
+ :defer t)
;; rw-hunspell sets up hunspell dictionary automagically.
(chirp)))
(use-package erc
+ :defer t
:init
(setq erc-fill-prefix ""
;; consider invisible frames to be unseen. seems like an obvious default
;; give us a shell to start instead of scratch
;;(setq initial-buffer-choice (lambda () (new-shell)))
+
+
+;;; smartparens
+;; the melpa git version had a catastrophic bug I reported.
+;; downgraded to marmalade version and everything is working fine.
+(require 'smartparens-config)
+
+(defun gp/sp/pair-on-newline-and-indent (id action context)
+ "Open a new brace or bracket expression, with relevant newlines and indent. "
+ (save-excursion
+ (newline)
+ (indent-according-to-mode))
+ (indent-according-to-mode))
+
+;; when opening a pair, and then inserting a newline, push the closing pair to another newline
+(sp-pair "{" nil :post-handlers
+ '(:add ((lambda (id action context)
+ (gp/sp/pair-on-newline-and-indent id action context)) (kbd "RET"))))
+(sp-pair "[" nil :post-handlers
+ '(:add ((lambda (id action context)
+ (gp/sp/pair-on-newline-and-indent id action context)) (kbd "RET"))))
+
+
+;; in my version, this is not a pairing.
+;; not sure if it is in a future version since I reverted to marmalade
+;; Don't need c-comments in strings -- they frustrate filename globs
+;; (sp-pair "/*" nil :unless '(sp-in-string-p))
+
+;; Don't need quotes to pair next to words
+(sp-pair "\"" nil :unless '(sp-point-before-word-p sp-point-after-word-p))
+(sp-pair "'" nil :unless '(sp-point-before-word-p sp-point-after-word-p))
+
+
+;; todo, testout these mode specific settings from graphene.
+;; Ruby-specific pairs and handlers
+
+(eval-after-load "ruby"
+ '(require 'smartparens-ruby))
+
+;; Markdown
+(sp-local-pair '(markdown-mode gfm-mode) "*" "*"
+ :unless '(sp-in-string-p)
+ :actions '(insert wrap))
+
+;; Except in HTML
+(sp-local-pair 'html-mode "\"" nil :unless '(:rem sp-point-after-word-p))