Last active
October 3, 2020 04:29
-
-
Save iporsut/7ca88137619bdb609a95075a1b2e12d2 to your computer and use it in GitHub Desktop.
dot emacs
This file contains hidden or 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 | |
'("melpa" . "https://melpa.org/packages/") t) | |
(package-initialize) | |
(unless package-archive-contents | |
(package-refresh-contents)) | |
(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. | |
'(ag-arguments | |
'("--line-number" "--smart-case" "--nogroup" "--column" "--stats" "--")) | |
'(ag-group-matches nil) | |
'(ansi-color-faces-vector | |
[default bold shadow italic underline bold bold-italic bold]) | |
'(ansi-color-names-vector | |
(vector "#c5c8c6" "#cc6666" "#b5bd68" "#f0c674" "#81a2be" "#b294bb" "#8abeb7" "#373b41")) | |
'(beacon-color "#c82829") | |
'(column-number-mode t) | |
'(company-idle-delay 0) | |
'(company-minimum-prefix-length 1) | |
'(company-show-numbers nil) | |
'(custom-enabled-themes '(sanityinc-tomorrow-eighties)) | |
'(custom-safe-themes | |
'("30289fa8d502f71a392f40a0941a83842152a68c54ad69e0638ef52f04777a4c" "5b52a4d0d95032547f718e1574d3a096c6eaf56117e188945ae873bdb3200066" "e62e7ce5bd7498943b04f85a037de85579aa9ec06e60b2078d1756459733feed" "08ba513f6b6cab24f4b338739f3d7a964737dd0b6fd1c0f26c3a2f6985abff96" "82d2cac368ccdec2fcc7573f24c3f79654b78bf133096f9b40c20d97ec1d8016" "1b8d67b43ff1723960eb5e0cba512a2c7a2ad544ddb2533a90101fd1852b426e" "bb08c73af94ee74453c90422485b29e5643b73b05e8de029a6909af6a3fb3f58" "628278136f88aa1a151bb2d6c8a86bf2b7631fbea5f0f76cba2a0079cd910f7d" "06f0b439b62164c6f8f84fdda32b62fb50b6d00e8b01c2208e55543a6337433a" default)) | |
'(delete-selection-mode t) | |
'(dired-use-ls-dired nil) | |
'(fci-rule-color "#373b41") | |
'(flycheck-color-mode-line-face-to-color 'mode-line-buffer-id) | |
'(frame-background-mode 'light) | |
'(global-font-lock-mode t) | |
'(hl-paren-background-colors '("#e8fce8" "#c1e7f8" "#f8e8e8")) | |
'(hl-paren-colors '("#40883f" "#0287c8" "#b85c57")) | |
'(ivy-count-format "(%d/%d) ") | |
'(ivy-magic-tilde nil) | |
'(ivy-mode nil) | |
'(ivy-use-virtual-buffers t) | |
'(line-spacing nil) | |
'(lsp-enable-snippet nil) | |
'(lsp-rust-server 'rust-analyzer) | |
'(package-check-signature nil) | |
'(package-enable-at-startup nil) | |
'(package-selected-packages | |
'(cider clojure-mode slime-company yasnippet ivy-hydra counsel flycheck company-lsp company go-mode projectile multiple-cursors plan9-theme ivy ag lsp-mode ripgrep evil elm-mode request plain-theme slime image+ csv-mode yaml-mode yafolding web-mode web-beautify typescript-mode toml-mode rust-mode racket-mode protobuf-mode markdown-mode magit idris-mode haskell-mode groovy-mode exec-path-from-shell erlang elixir-mode dockerfile-mode color-theme-sanityinc-tomorrow coffee-mode)) | |
'(projectile-project-root-files | |
'("rebar.config" "project.clj" "build.boot" "deps.edn" "SConstruct" "pom.xml" "build.sbt" "gradlew" "build.gradle" ".ensime" "Gemfile" "requirements.txt" "setup.py" "pyproject.toml" "tox.ini" "composer.json" "Cargo.toml" "mix.exs" "stack.yaml" "info.rkt" "DESCRIPTION" "TAGS" "GTAGS" "configure.in" "configure.ac" "cscope.out" "go.mod")) | |
'(require-final-newline t) | |
'(safe-local-variable-values '((whitespace-line-column . 80))) | |
'(show-paren-mode t) | |
'(sml/active-background-color "#98ece8") | |
'(sml/active-foreground-color "#424242") | |
'(sml/inactive-background-color "#4fa8a8") | |
'(sml/inactive-foreground-color "#424242") | |
'(tab-width 8) | |
'(tool-bar-mode nil) | |
'(vc-annotate-background nil) | |
'(vc-annotate-color-map | |
'((20 . "#cc6666") | |
(40 . "#de935f") | |
(60 . "#f0c674") | |
(80 . "#b5bd68") | |
(100 . "#8abeb7") | |
(120 . "#81a2be") | |
(140 . "#b294bb") | |
(160 . "#cc6666") | |
(180 . "#de935f") | |
(200 . "#f0c674") | |
(220 . "#b5bd68") | |
(240 . "#8abeb7") | |
(260 . "#81a2be") | |
(280 . "#b294bb") | |
(300 . "#cc6666") | |
(320 . "#de935f") | |
(340 . "#f0c674") | |
(360 . "#b5bd68"))) | |
'(vc-annotate-very-old-color nil) | |
'(web-mode-markup-indent-offset 2) | |
'(window-divider-mode nil) | |
'(word-wrap nil)) | |
(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. | |
) | |
(defun copy-from-osx () | |
(shell-command-to-string "pbpaste")) | |
(defun paste-to-osx (text &optional push) | |
(let (process-connection-type) | |
(let ((proc (start-process "pbcopy" "*Messages*" "pbcopy"))) | |
(process-send-string proc text) | |
(process-send-eof proc)))) | |
(when (not (memq window-system '(mac ns))) | |
(menu-bar-mode -1) | |
(setq | |
interprogram-cut-function 'paste-to-osx | |
interprogram-paste-function 'copy-from-osx) | |
) | |
(when (memq window-system '(mac ns)) | |
(setq frame-resize-pixelwise t) | |
(set-face-attribute 'default nil :font "Source Code Pro-19") | |
(exec-path-from-shell-initialize) | |
(global-unset-key (kbd "C-z")) | |
(global-unset-key (kbd "C-x C-z"))) | |
(setq scroll-step 1 | |
scroll-conservatively 10000 | |
mouse-wheel-scroll-amount '(1) | |
mouse-wheel-progressive-speed nil) | |
(add-hook 'before-save-hook 'delete-trailing-whitespace) | |
(add-to-list 'auto-mode-alist '("\\.erb\\'" . web-mode)) | |
(add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode)) | |
(setq ring-bell-function 'ignore) | |
(setq column-number-mode t) | |
(setq line-number-mode t) | |
(setq js-indent-level 2) | |
(global-set-key (kbd "C-c m s") 'magit-status) | |
(global-set-key (kbd "C-c m c") 'magit-checkout) | |
(setq ns-pop-up-frames nil) | |
(setq frame-title-format | |
'((:eval (if (buffer-file-name) | |
(abbreviate-file-name (buffer-file-name)) | |
"%b")))) | |
(global-unset-key (kbd "<s-left>")) | |
(global-set-key (kbd "<s-left>") 'move-beginning-of-line) | |
(global-unset-key (kbd "<s-right>")) | |
(global-set-key (kbd "<s-right>") 'move-end-of-line) | |
(global-set-key (kbd "<s-up>") 'beginning-of-buffer) | |
(global-set-key (kbd "<s-down>") 'end-of-buffer) | |
(add-hook 'prog-mode-hook | |
(lambda () (yafolding-mode))) | |
(add-hook 'protobuf-mode-hook | |
(lambda () (yafolding-mode))) | |
(setq ruby-insert-encoding-magic-comment nil) | |
(setq backup-inhibited t) | |
(put 'upcase-region 'disabled nil) | |
(add-hook 'elm-mode-hook '(lambda () (eldoc-mode 0))) | |
(put 'narrow-to-region 'disabled nil) | |
(require 'lsp-mode) | |
(lsp-register-custom-settings | |
'(("gopls.completeUnimported" t t))) | |
;; ("gopls.staticcheck" t t))) | |
(defun lsp-go-install-save-hooks () | |
(add-hook 'before-save-hook #'lsp-format-buffer t t) | |
(add-hook 'before-save-hook #'lsp-organize-imports t t)) | |
(add-hook 'go-mode-hook #'lsp-go-install-save-hooks) | |
(add-hook 'go-mode-hook #'lsp-deferred) | |
(add-hook 'go-mode-hook #'yas-minor-mode) | |
(require 'projectile) | |
(setq projectile-completion-system 'ivy) | |
(define-key projectile-mode-map (kbd "s-p") 'projectile-command-map) | |
(projectile-mode +1) | |
;; Ivy-based interface to starndard commands | |
(global-set-key (kbd "C-s") 'swiper-isearch) | |
(global-set-key (kbd "M-y") 'counsel-yank-pop) | |
(global-set-key (kbd "C-x b") 'ivy-switch-buffer) | |
(global-set-key (kbd "M-x") 'counsel-M-x) | |
(global-set-key (kbd "C-x C-f") 'counsel-find-file) | |
(global-set-key (kbd "<f1> f") 'counsel-describe-function) | |
(global-set-key (kbd "<f1> v") 'counsel-describe-variable) | |
(global-set-key (kbd "<f1> l") 'counsel-find-library) | |
(global-set-key (kbd "<f2> i") 'counsel-info-lookup-symbol) | |
(global-set-key (kbd "<f2> u") 'counsel-unicode-char) | |
(global-set-key (kbd "<f2> j") 'counsel-set-variable) | |
(global-set-key (kbd "C-c v") 'ivy-push-view) | |
(global-set-key (kbd "C-c V") 'ivy-pop-view) | |
;; Ivy-based interface to shell and system tools | |
;; (global-set-key (kbd "C-c c") 'counsel-compile) | |
;; (global-set-key (kbd "C-c g") 'counsel-git) | |
;; (global-set-key (kbd "C-c j") 'counsel-git-grep) | |
;; (global-set-key (kbd "C-c L") 'counsel-git-log) | |
;; (global-set-key (kbd "C-c k") 'counsel-rg) | |
;; (global-set-key (kbd "C-c m") 'counsel-linux-app) | |
;; (global-set-key (kbd "C-c n") 'counsel-fzf) | |
;; (global-set-key (kbd "C-x l") 'counsel-locate) | |
;; (global-set-key (kbd "C-c J") 'counsel-file-jump) | |
;; (global-set-key (kbd "C-S-o") 'counsel-rhythmbox) | |
;; (global-set-key (kbd "C-c w") 'counsel-wmctrl) | |
;; Ivy-resume and other commands | |
;; (global-set-key (kbd "C-c C-r") 'ivy-resume) | |
;; (global-set-key (kbd "C-c b") 'counsel-bookmark) | |
;; (global-set-key (kbd "C-c d") 'counsel-descbinds) | |
;; (global-set-key (kbd "C-c o") 'counsel-outline) | |
;; (global-set-key (kbd "C-c t") 'counsel-load-theme) | |
;; (global-set-key (kbd "C-c F") 'counsel-org-file) | |
(add-hook 'after-init-hook 'global-company-mode) | |
(setq inferior-lisp-program "/usr/local/bin/sbcl") | |
(setq lsp-rust-server 'rust-analyzer) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment