Last active
January 18, 2019 19:50
-
-
Save urkonn/e8678ae61038fc72bc3bc463dfd2e13a to your computer and use it in GitHub Desktop.
emacs.d/init.el
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'package) | |
(add-to-list 'package-archives | |
'("marmalade" . "http://marmalade-repo.org/packages/")) | |
(require 'package) | |
(add-to-list 'package-archives | |
'("melpa" . "http://melpa.milkbox.net/packages/") t) | |
(package-initialize) | |
(setenv "PYTHONPATH" "/usr/bin/python") | |
(load-theme 'zenburn t) | |
(global-linum-mode 1) | |
(setq linum-format "%4d \u2502 ") | |
(electric-pair-mode 1) | |
(editorconfig-mode 1) | |
(require 'indent-guide) | |
(indent-guide-global-mode) | |
(require 'neotree) | |
(global-set-key [f8] 'neotree-toggle) | |
(setq neo-theme (if (display-graphic-p) 'icons 'arrow)) | |
;;YAML | |
(require 'yaml-mode) | |
(add-to-list 'auto-mode-alist '("\\.yml\\'" . yaml-mode)) | |
;;Python | |
(elpy-enable) | |
(require 'py-autopep8) | |
;(require 'jedi) | |
;(setq jedi:server-args | |
; '("--sys-path" "/usr/local/lib/python3.7" | |
; "--sys-path" "/usr/local/lib/python3.7/site-packages")) | |
;(add-hook 'python-mode-hook 'jedi:setup) | |
;(setq jedi:complete-on-dot t) | |
;;Golang | |
(autoload 'go-mode "go-mode" nil t) | |
(add-to-list 'auto-mode-alist '("\\.go\\'" . go-mode)) | |
;; Rust | |
;;(add-hook 'rust-mode-hook) | |
;; Enable company globally for all mode | |
(global-company-mode) | |
;; Reduce the time after which the company auto completion popup opens | |
(setq company-idle-delay 0.2) | |
;; Reduce the number of characters before company kicks in | |
(setq company-minimum-prefix-length 1) | |
;; Set path to racer binary | |
(setq racer-cmd "/usr/local/bin/racer") | |
;; Set path to rust src directory | |
;;(setq racer-rust-src-path "/Users/YOURUSERNAME/.rust/src/") | |
;; Load rust-mode when you open `.rs` files | |
(add-to-list 'auto-mode-alist '("\\.rs\\'" . rust-mode)) | |
;; Setting up configurations when you load rust-mode | |
(add-hook 'rust-mode-hook | |
'(lambda () | |
;; Enable racer | |
(racer-activate) | |
;; Hook in racer with eldoc to provide documentation | |
(racer-turn-on-eldoc) | |
;; Use flycheck-rust in rust-mode | |
(add-hook 'flycheck-mode-hook #'flycheck-rust-setup) | |
;; Use company-racer in rust mode | |
(set (make-local-variable 'company-backends) '(company-racer)) | |
;; Key binding to jump to method definition | |
(local-set-key (kbd "M-.") #'racer-find-definition) | |
;; Key binding to auto complete and indent | |
(local-set-key (kbd "TAB") #'racer-complete-or-indent))) | |
(global-wakatime-mode) | |
(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. | |
'(wakatime-api-key "secret-key") | |
'(wakatime-cli-path "/usr/local/bin/wakatime")) | |
(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. | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment