myinit.el (10402B)
1 2 (add-to-list 'auto-mode-alist '("\\.ipy\\'" . python-mode)) 3 4 '(use-package better-shell 5 :bind 6 ( 7 ("C-'" . better-shell-shell) 8 ("C-;" . better-shell-remote-open) 9 ) 10 ) 11 12 '(use-package bash-completion) 13 14 (setq column-number-mode t) 15 (setq display-battery-mode t) 16 (setq electric-indent-mode nil) 17 (setq indent-tabs-mode nil) 18 (setq semantic-mode t) 19 (setq show-paren-mode t) 20 (setq word-wrap t) 21 (setq inhibit-startup-message t) 22 23 (custom-set-faces 24 '(default ((t (:inherit nil :stipple 25 nil :background "white" :foreground "black" :inverse-video 26 nil :box nil :strike-through nil :overline nil :underline 27 nil :slant normal :weight normal :height 200 :width 28 normal :foundry "PfEd" :family "Inconsolata" )))) 29 '(aw-leading-char-face ((t (:inherit 30 ace-jump-face-foreground :height 3.0)))) 31 ) 32 33 (global-set-key (kbd "<f5>") 'revert-buffer) 34 35 (defalias 'list-buffers 'ibuffer-other-window 36 ) 37 38 (setq gnus-group-update-tool-bar t) 39 (setq menu-bar-mode nil) 40 (setq tool-bar-mode nil) 41 42 (setq word-wrap t) 43 (setq truncate-lines t) 44 45 (use-package semantic 46 :config 47 (semantic-mode 1) 48 ) 49 50 '(use-package multiple-cursors 51 :bind 52 ( 53 ("C-S-c C-S-c" . mc/edit-lines) 54 ("C->" . mc/mark-next-like-this) 55 ("C-<" . mc/mark-previous-like-this) 56 ("C-c C-<" . mc/mark-all-like-this) 57 )) 58 59 (use-package undo-tree 60 :config 61 (global-undo-tree-mode) 62 ) 63 64 (setq global-ede-mode t) 65 66 (setq ido-enable-flex-matching t) 67 (setq ido-everywhere t) 68 69 (ido-mode 1) 70 71 (use-package projectile 72 ) 73 74 (winner-mode 1) 75 (windmove-default-keybindings) 76 77 (use-package counsel 78 ) 79 80 (use-package swiper-helm 81 :config 82 (ivy-mode 1) 83 (setq ivy-use-virtual-buffers t) 84 85 :bind 86 ( 87 ("<f1> f" . counsel-describe-function) 88 ("<f1> l" . counsel-find-library) 89 ("<f1> v" . counsel-describe-variable) 90 ("<f2> i" . counsel-info-lookup-symbol) 91 ("<f2> u" . counsel-unicode-char) 92 ("<f6>" . ivy-resume) 93 ("C-S-o" . counsel-rhythmbox) 94 ("C-c C-r" . ivy-resume) 95 ("C-c g" . counsel-git) 96 ("C-c j" . counsel-git-grep) 97 ("C-c k" . counsel-ag) 98 ("C-r" . counsel-expression-history) 99 ("C-x C-f" . counsel-find-file) 100 ("C-x l" . counsel-locate) 101 ("C-s" . swiper) 102 ) 103 ) 104 105 (use-package ace-window 106 :init 107 (global-set-key [remap other-window] 'ace-window) 108 ) 109 110 (use-package tabbar 111 :config 112 (tabbar-mode 1) 113 ) 114 115 '(use-package evil 116 :config 117 (evil-mode 1) 118 (add-to-list 'evil-emacs-state-modes 'elfeed-show-mode) 119 (add-to-list 'evil-emacs-state-modes 'elfeed-search-mode) 120 ) 121 122 '(use-package evil-goggles 123 :config 124 (evil-goggles-mode) 125 ) 126 127 (use-package try 128 ) 129 130 (use-package which-key 131 :config (which-key-mode) 132 ) 133 134 (use-package helm 135 :bind 136 ( 137 ("C-x c f" . helm-multi-files) 138 ("M-x" . helm-M-x) 139 ) 140 ) 141 142 (use-package org 143 :requires ob-ditaa ob-ipython htmlize 144 145 :config 146 ;; Don't prompt me to confirm every time I want to evaluate a block. 147 (setq org-confirm-babel-evaluate nil) 148 149 (setq org-directory "~/foo/my-org-mode-notes") 150 (setq org-default-notes-file (concat org-directory "/main.org")) 151 (setq org-export-html-postamble nil) 152 (setq org-hide-leading-stars t) 153 (setq org-startup-folded 'overview) 154 (setq org-startup-indented t) 155 156 (add-to-list 'org-agenda-files "~/foo/my-org-mode-notes/") 157 (add-to-list 'org-agenda-files "~/mine/orgmode/") 158 (add-to-list 'org-agenda-files "~/mine/syncthing/sg3/shared/orgmode/") 159 (add-to-list 'org-agenda-files "~/mine/syncthing/sg3/shared/orgzly/") 160 161 (setq org-habit-following-days 30) 162 (setq org-habit-show-all-today t) 163 (setq org-habit-show-habits-only-for-today nil) 164 165 (add-to-list 'org-modules 'org-bbdb) 166 (add-to-list 'org-modules 'org-bibtex) 167 (add-to-list 'org-modules 'org-docview) 168 (add-to-list 'org-modules 'org-gnus) 169 (add-to-list 'org-modules 'org-habit) 170 (add-to-list 'org-modules 'org-info) 171 (add-to-list 'org-modules 'org-irc) 172 (add-to-list 'org-modules 'org-mhe) 173 (add-to-list 'org-modules 'org-rmail) 174 (add-to-list 'org-modules 'org-w3m) 175 176 (add-to-list 'org-babel-load-languages '(emacs-lisp . t)) 177 (add-to-list 'org-babel-load-languages '(ipython . t)) 178 (add-to-list 'org-babel-load-languages '(python . t)) 179 (add-to-list 'org-babel-load-languages '(ditaa . t)) 180 181 (setq org-ditaa-jar-path "/usr/share/ditaa/ditaa.jar") 182 183 184 (add-to-list 'org-babel-tangle-lang-exts '("haskell" . "hs")) 185 (add-to-list 'org-babel-tangle-lang-exts '("ipython" . "ipy")) 186 187 188 (defun org-babel-tangle-block () 189 (interactive) 190 (let ((current-prefix-arg '(4))) 191 (call-interactively 'org-babel-tangle)) 192 ) 193 194 (setq org-use-property-inheritance (list "STYLE")) 195 196 (defun yuvallanger-org-find-main-file () 197 (interactive) 198 (find-file "~/foo/my-org-mode-notes/main.org") 199 ) 200 201 :bind 202 ( 203 ("C-c a" . org-agenda) 204 ;; ("C-c b" . org-babel-tangle-block) 205 ("C-c b" . org-iswitchb) 206 ("C-c c" . org-capture) 207 ("C-c l" . org-store-link) 208 ("C-c o" . yuvallanger-org-find-main-file) 209 ) 210 ) 211 212 '(use-package org-ref 213 :config 214 ;; The following is from the README.org 215 ;; https://github.com/jkitchin/org-ref/blob/master/README.org 216 (setq reftex-default-bibliography '("~/ownCloud/bibliography/references.bib")) 217 (setq org-ref-bibliography-notes "~/ownCloud/bibliography/notes.org") 218 (setq org-ref-default-bibliography '("~/ownCloud/bibliography/references.bib")) 219 (setq org-ref-pdf-directory "~/ownCloud/bibliography/bibtex-pdfs/") 220 (setq bibtex-completion-bibliography "~/ownCloud/bibliography/references.bib") 221 (setq bibtex-completion-library-path "~/ownCloud/bibliography/bibtex-pdfs") 222 (setq bibtex-completion-notes-path "~/ownCloud/bibliography/helm-bibtex-notes") 223 ) 224 225 (use-package org-bullets 226 :config 227 (add-hook 'org-mode-hook 228 (lambda () (org-bullets-mode 1))) 229 ) 230 231 '(use-package org-caldav 232 :config 233 (setq org-caldav-url "https://owncloud.kaka.farm/remote.php/caldav/calendars/yuvallanger") 234 (setq org-caldav-calendar-id "org-mode") 235 (setq org-caldav-calendars '((:url "https://owncloud.kaka.farm/remote.php/caldav/calendars/yuvallanger" 236 :calendar-id "org-mode" 237 :files ("~/mine/orgmode/calendar.org") 238 :inbox "~/mine/orgmode/caldav-sync-calendar-inbox.org") 239 240 (:url "https://owncloud.kaka.farm/remote.php/dav/calendars/yuvallanger" 241 :calendar-id "org-mode" 242 :files ("~/mine/orgmode/tasks.org") 243 :inbox "~/mine/orgmode/caldav-sync-tasks-inbox.org")))) 244 245 (use-package orgnav 246 ) 247 248 (use-package flymake 249 :config 250 (setq flymake-start-syntax-check-on-find-file nil) 251 ) 252 253 (use-package geiser 254 ) 255 256 '(use-package racket-mode 257 ) 258 259 '(use-package arduino-mode 260 ) 261 262 (use-package lispy 263 :config 264 (add-hook 'lisp-mode-hook (lambda () (lispy-mode 1))) 265 (add-hook 'emacs-lisp-mode-hook (lambda () (lispy-mode 1))) 266 ) 267 268 (use-package smartparens 269 :config 270 (add-hook 'hy-mode-hook #'smartparens-strict-mode) 271 ) 272 273 (use-package rainbow-delimiters 274 :config 275 (add-hook 'prog-mode-hook #'rainbow-delimiters-mode) 276 ) 277 278 '(use-package kivy-mode 279 ) 280 281 '(use-package yasnippet 282 :config 283 (setq yas-snippet-dirs "~/foo/myasnippets") 284 (yas-reload-all) 285 (yas-global-mode 1) 286 ) 287 288 (use-package paredit 289 ) 290 291 '(use-package python-x 292 :config 293 (python-x-setup)) 294 295 (use-package pyvenv 296 :config 297 (pyvenv-mode) 298 (pyvenv-tracking-mode) 299 ;; Let's try commenting this out. 300 ;; (setq pyvenv-virtualenvwrapper-python "/usr/bin/env python") 301 ) 302 303 '(use-package live-py-mode 304 ) 305 306 (use-package elpy 307 :config 308 (elpy-enable) 309 310 (setq python-shell-interpreter "jupyter" 311 python-shell-interpreter-args "console --simple-prompt") 312 313 (setq elpy-rpc-python-command "python3.6") 314 (setq elpy-syntax-check-command "flake8") 315 316 ;; XXX TODO 317 ;; (setq elpy-disable-backend-error-display nil) 318 ) 319 320 '(use-package ob-ipython 321 :config 322 ;; display/update images in the buffer after I evaluate. 323 (add-hook 'org-babel-after-execute-hook 324 'org-display-inline-images 'append 325 ) 326 ) 327 328 '(use-package ein 329 :requires markdown-mode 330 ) 331 332 '(use-package hy-mode 333 :config 334 (add-hook 'hy-mode-hook (lambda () (lispy-mode 1))) 335 (add-hook 'hy-mode-hook #'rainbow-delimiters-mode) 336 ) 337 338 (setq python-check-command "flake8") 339 (setq python-indent-offset 4) 340 341 '(use-package haskell-mode 342 :config 343 (setq haskell-hoogle-url "https://www.fpcomplete.com/hoogle?q=%s") 344 (setq haskell-stylish-on-save t) 345 (setq haskell-tags-on-save t) 346 ) 347 348 '(use-package proof 349 :config 350 (setq proof-autosend-enable t) 351 (setq proof-electric-terminator-enable t) 352 (setq proof-shell-quiet-errors nil) 353 ) 354 355 ;; start golang 356 (use-package company-go) 357 (use-package flycheck-gometalinter) 358 (use-package go-autocomplete) 359 (use-package go-eldoc) 360 (use-package go-imports) 361 (use-package go-playground) 362 (use-package go-projectile) 363 (use-package go-rename) 364 (use-package go-scratch) 365 (use-package go-snippets) 366 (use-package godoctor) 367 (use-package golint) 368 ;; end golang 369 370 ;; start nimlang 371 '(use-package flycheck-nim) 372 '(use-package flycheck-nimsuggest) 373 '(use-package nim-mode) 374 ;; end nimlang 375 376 (use-package magit 377 :config 378 (setq magit-log-section-arguments (quote ("--graph" "--color" "--decorate" "-n256"))) 379 380 :bind 381 ( 382 ("C-x g" . magit-status) 383 ("C-x M-g" . magit-dispatch-popup) 384 ) 385 ) 386 387 '(use-package vc-fossil 388 ) 389 390 '(use-package flycheck 391 :init (global-flycheck-mode) 392 ) 393 394 (use-package company 395 :config 396 (global-company-mode) 397 ) 398 399 '(use-package erc 400 :config 401 (setq log-mode t) 402 (setq erc-log-write-after-insert t) 403 (setq erc-log-write-after-send t) 404 ) 405 406 '(use-package circe 407 :config 408 (setq log-mode t) 409 (setq erc-log-write-after-insert t) 410 (setq erc-log-write-after-send t) 411 ) 412 413 '(use-package helm-circe 414 ) 415 416 '(use-package matrix-client) 417 418 '(use-package thumb-through 419 ) 420 421 '(use-package eloud 422 :config 423 (setq eloud-mode t) 424 (setq eloud-speech-rate 200) 425 ) 426 427 '(use-package ereader 428 ) 429 430 '(use-package spray 431 :config 432 (setq spray-save-point t) 433 ) 434 435 '(use-package emacspeak) 436 437 '(use-package elfeed-org 438 :config 439 (setq elfeed-curl-max-connections 10) 440 (setq rmh-elfeed-org-files '("~/foo/my-org-mode-notes/elfeed.org" "~/mine/elfeed/private.org")) 441 (elfeed-org) 442 443 :bind 444 ( 445 ("C-x w" . elfeed) 446 ) 447 ) 448 449 '(use-package elfeed-goodies 450 ) 451 452 (use-package uptimes 453 )