]> git.rkrishnan.org Git - .emacs.d.git/blobdiff - init.el
add dumb-jump mode
[.emacs.d.git] / init.el
diff --git a/init.el b/init.el
index d45bd441b42e73ae87898c8e0737a7013347e790..638d24df44275ec1c76a66a572e790ee9d8d833c 100644 (file)
--- a/init.el
+++ b/init.el
@@ -8,8 +8,11 @@
 (setq initial-scratch-message "")
 (setq inhibit-startup-message t)
 
+(setq initial-frame-alist (quote ((fullscreen . maximized))))
+(setq send-mail-function (quote smtpmail-send-it))
+
 ;; turn OFF syntax highlighting
-(global-font-lock-mode 0)
+;; (global-font-lock-mode 0)
 
 ;; cursor bar
 (setq-default cursor-type '(bar . 2))
 
 ;; font
 ;; (set-default-font "Inconsolata-12")
-(set-default-font "InconsolataGo-12")
+;; (set-default-font "InconsolataGo-12")
+;; set a default font
+(when (member "DejaVu Sans Mono" (font-family-list))
+  (set-face-attribute 'default nil :font "DejaVu Sans Mono-11"))
 
 ;; Don't let Emacs hurt your ears
 (setq visible-bell t)
 
-;; This is bound to f11 in Emacs 24.4
-;; (toggle-frame-fullscreen)
-(custom-set-variables
- ;; custom-set-variables 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.
- '(flycheck-haskell-runghc-command
-   (quote
-    ("stack" "--verbosity" "silent" "runghc" "--no-ghc-package-path" "--")))
- '(haskell-process-auto-import-loaded-modules t)
- '(haskell-process-log t)
- '(haskell-process-suggest-remove-import-lines t)
- '(haskell-process-type (quote cabal-repl))
- '(initial-frame-alist (quote ((fullscreen . maximized))))
- '(send-mail-function (quote smtpmail-send-it)))
-
 ;; Who use the bar to scroll?
 (when (display-graphic-p)
   (progn
@@ -50,9 +39,9 @@
     (menu-bar-mode 0)))
 
 ;; tangotango
-;; (load-theme 'tangotango t)
+;;(load-theme 'tangotango t)
 ;; (load-theme 'railscasts t)
-;; (load-theme 'leuven t)
+(load-theme 'leuven t)
 
 ;; erc
 (require 'erc)
@@ -62,8 +51,8 @@
 (erc-autojoin-mode t)
 (setq erc-autojoin-channels-alist
       '((".*\\.freenode.net" "#tahoe-lafs")
-        (".*\\.oftc.net" "#LeastAuthority")
-        ;; (".*\\.mozilla.org" "#rust-beginners")
+        (".*\\.oftc.net" "#leastauthority")
+        ;;(".*\\.mozilla.org" "#rust-beginners")
         ))
 
 ;; check channels
       c-basic-offset 4)
 
 ;; haskell
-(add-hook 'haskell-mode-hook #'hindent-mode)
-(add-hook 'haskell-mode-hook 'flyspell-prog-mode)
-
-(eval-after-load 'haskell-mode
-  '(define-key haskell-mode-map [f8] 'haskell-navigate-imports))
-
-
-
-;;; ghc-mod
-(let ((my-cabal-path (expand-file-name "~/.cabal/bin")))
-  (setenv "PATH" (concat my-cabal-path ":" (getenv "PATH")))
-  (add-to-list 'exec-path my-cabal-path))
-
-(autoload 'ghc-init "ghc" nil t)
-(autoload 'ghc-debug "ghc" nil t)
-(add-hook 'haskell-mode-hook (lambda () (ghc-init)))
-
-;; flycheck
-(eval-after-load 'flycheck
-  '(add-hook 'flycheck-mode-hook #'flycheck-haskell-setup))
+(setenv "PATH" (concat "~/.cabal/bin:" (getenv "PATH")))
+(add-to-list 'exec-path "~/.cabal/bin")
+(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
+
+;; haskell mode
+(require 'haskell-process)
+(require 'haskell-interactive-mode)
+(add-hook 'haskell-mode-hook 'interactive-haskell-mode)
+
+(setq haskell-process-suggest-remove-import-lines t)
+(setq haskell-process-auto-import-loaded-modules t)
+(setq haskell-process-log t)
+
+(define-key haskell-mode-map (kbd "C-c C-l") 'haskell-process-load-or-reload)
+(define-key haskell-mode-map (kbd "C-`") 'haskell-interactive-bring)
+(define-key haskell-mode-map (kbd "C-c C-t") 'haskell-process-do-type)
+(define-key haskell-mode-map (kbd "C-c C-i") 'haskell-process-do-info)
+(define-key haskell-mode-map (kbd "C-c C-c") 'haskell-process-cabal-build)
+(define-key haskell-mode-map (kbd "C-c C-k") 'haskell-interactive-mode-clear)
+(define-key haskell-mode-map (kbd "C-c c") 'haskell-process-cabal)
+
+;; ghc-mod
+;;(autoload 'ghc-init "ghc" nil t)
+;;(autoload 'ghc-debug "ghc" nil t)
+;;(setq ghc-debug t)
+;;(add-hook 'haskell-mode-hook (lambda () (ghc-init)))
 
 ;; hlint
 (add-to-list 'load-path "~/.emacs.d/hs-lint")
 
 (add-hook 'haskell-mode-hook 'my-haskell-mode-hook)
 
+;; hindent
+(add-hook 'haskell-mode-hook #'hindent-mode)
+
 ;; gofmt
 (add-hook 'before-save-hook #'gofmt-before-save)
 (add-hook 'go-mode-hook (lambda ()
 ;; sign all emails
 (add-hook 'message-setup-hook 'mml-secure-message-sign-pgp)
 
-(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.
- )
-
 ;; company mode for auto completion
 (add-hook 'after-init-hook 'global-company-mode)
 
 ;; flysheck
 (add-hook 'after-init-hook #'global-flycheck-mode)
 
+;; org-mode
+(setq org-todo-keywords
+      '((sequence "TODO(t)" "INPROGRESS(p)" "WAITING(w)" "|" "DONE" "CANCELLED")))
+
+(setq org-agenda-files '("~/src/org/"))
+(add-to-list 'load-path "~/.emacs.d/elisp")
+
+(require 'org-bullets)
+(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
+
+;; key shortcut for org-agenda
+(global-set-key (kbd "C-c a") 'org-agenda)
+
+(custom-set-variables
+ ;; custom-set-variables 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.
+ '(package-selected-packages
+   (quote
+    (dumb-jump tangotango-theme restclient railscasts-theme racket-mode racer paredit notmuch markdown-mode magit leuven-theme ledger-mode hindent go-mode flycheck-rust flycheck-haskell fill-column-indicator company-racer color-theme-sanityinc-tomorrow auto-complete))))
+(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.
+ )
 
+(dumb-jump-mode)