knoebber / emacs / 6e1b031 vs. dc7ef91
Compare Hashes
HUNK
;;; Commentary:
;;; First Emacs install date: 04/30/2019
;;; To install config
;;; list-package RET package-install use-package RET
;;; To update packages:
;;; M-x list-packages U-x
;;; Code:
HUNK
;; Setup magit
(use-package magit)
;; Setup leader keys (TODO: switch to general.el)
(use-package evil-leader
(use-package general
:ensure t
:init
(setq evil-want-keybinding nil)
:config
(global-evil-leader-mode)
(evil-leader/set-leader "SPC")
(evil-leader/set-key
"RET" 'eshell
"x" 'helm-M-x
"b" 'helm-mini ;; In helm mini, use C-SPC to select buffers, M-D to kill all marked
"d" (lambda() (interactive) (load-theme 'spacemacs-dark))
"l" (lambda() (interactive) (load-theme 'spacemacs-light))
"f" 'helm-find-files
"s" 'rg-project
"j" 'other-window
"o" 'delete-other-windows
"g" 'magit-status
"k" (lambda() (interactive) (kill-buffer nil))
"r" (lambda() (interactive) (load-file "~/.emacs.d/init.el"))
"e" (lambda() (interactive) (find-file "~/.emacs.d/init.el"))
"C-i" (lambda() (interactive) (switch-to-buffer nil))) ;; C-i is tab
(general-create-definer my-evil-leader :prefix "SPC")
(my-evil-leader
:states 'normal
:keymaps 'override
"?" 'general-describe-keybindings
"C-i" (lambda() (interactive) (switch-to-buffer nil)) ;; C-i is tab
"RET" 'eshell
"b" 'helm-mini ;; In helm mini, use C-SPC to select buffers, M-D to kill all marked
"d" (lambda() (interactive) (load-theme 'spacemacs-dark))
"e" (lambda() (interactive) (find-file "~/.emacs.d/init.el"))
"f" 'helm-find-files
"g" 'magit-status
"j" 'other-window
"k" (lambda() (interactive) (kill-buffer nil))
"l" (lambda() (interactive) (load-theme 'spacemacs-light))
"o" 'delete-other-windows
"r" (lambda() (interactive) (load-file "~/.emacs.d/init.el"))
"s" 'rg-project
"x" 'helm-M-x
)
)
(use-package emacs
:config
;; Treesitter config
HUNK
(typescript-mode . typescript-ts-mode)
(json-mode . json-ts-mode)
(css-mode . css-ts-mode)
(python-mode . python-ts-mode)))
(python-mode . python-ts-mode)
(go-mode . go-ts-mode)
)
)
)
;; Setup evil
(use-package evil
HUNK
)
(use-package go-mode :ensure t)
(require 'project)
(defun project-find-go-module (dir)
(when-let ((root (locate-dominating-file dir "go.mod")))
(cons 'go-module root)))
(cl-defmethod project-root ((project (head go-module)))
(cdr project))
(add-hook 'project-find-functions #'project-find-go-module)
(use-package inf-elixir)
(use-package eglot
HUNK
(fset #'jsonrpc--log-event #'ignore) ; massive perf boost---don't log every event
)
(dolist (mode '(elixir-ts-mode heex-ts-mode))
(add-to-list 'eglot-server-programs `(,mode . ("/Users/nicolasknoebber/lang/elixir/language_server.sh"))))
(add-hook 'elixir-ts-mode-hook 'eglot-ensure)
(add-hook 'heex-ts-mode-hook 'eglot-ensure)
(add-hook 'go-mode-hook 'eglot-ensure)
(defun eglot-format-buffer-on-save ()
(add-hook 'before-save-hook #'eglot-format-buffer -10 t))
(add-hook 'go-mode-hook #'eglot-format-buffer-on-save)
(setq eldoc-echo-area-use-multiline-p 1)
(setq js-indent-level 2)
HUNK
;; 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.
'(connection-local-criteria-alist
'(((:application tramp :machine "localhost")
tramp-connection-local-darwin-ps-profile)
((:application tramp :machine "Nicolass-Air")
tramp-connection-local-darwin-ps-profile)
((:application tramp)
tramp-connection-local-default-system-profile tramp-connection-local-default-shell-profile)
((:application eshell)
eshell-connection-default-profile)))
'(connection-local-profile-alist
'((tramp-connection-local-darwin-ps-profile
(tramp-process-attributes-ps-args "-acxww" "-o" "pid,uid,user,gid,comm=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" "-o" "state=abcde" "-o" "ppid,pgid,sess,tty,tpgid,minflt,majflt,time,pri,nice,vsz,rss,etime,pcpu,pmem,args")
(tramp-process-attributes-ps-format
(pid . number)
(euid . number)
(user . string)
(egid . number)
(comm . 52)
(state . 5)
(ppid . number)
(pgrp . number)
(sess . number)
(ttname . string)
(tpgid . number)
(minflt . number)
(majflt . number)
(time . tramp-ps-time)
(pri . number)
(nice . number)
(vsize . number)
(rss . number)
(etime . tramp-ps-time)
(pcpu . number)
(pmem . number)
(args)))
(tramp-connection-local-busybox-ps-profile
(tramp-process-attributes-ps-args "-o" "pid,user,group,comm=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" "-o" "stat=abcde" "-o" "ppid,pgid,tty,time,nice,etime,args")
(tramp-process-attributes-ps-format
(pid . number)
(user . string)
(group . string)
(comm . 52)
(state . 5)
(ppid . number)
(pgrp . number)
(ttname . string)
(time . tramp-ps-time)
(nice . number)
(etime . tramp-ps-time)
(args)))
(tramp-connection-local-bsd-ps-profile
(tramp-process-attributes-ps-args "-acxww" "-o" "pid,euid,user,egid,egroup,comm=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" "-o" "state,ppid,pgid,sid,tty,tpgid,minflt,majflt,time,pri,nice,vsz,rss,etimes,pcpu,pmem,args")
(tramp-process-attributes-ps-format
(pid . number)
(euid . number)
(user . string)
(egid . number)
(group . string)
(comm . 52)
(state . string)
(ppid . number)
(pgrp . number)
(sess . number)
(ttname . string)
(tpgid . number)
(minflt . number)
(majflt . number)
(time . tramp-ps-time)
(pri . number)
(nice . number)
(vsize . number)
(rss . number)
(etime . number)
(pcpu . number)
(pmem . number)
(args)))
(tramp-connection-local-default-shell-profile
(shell-file-name . "/bin/sh")
(shell-command-switch . "-c"))
(tramp-connection-local-default-system-profile
(path-separator . ":")
(null-device . "/dev/null"))
(eshell-connection-default-profile
(eshell-path-env-list))))
'(custom-safe-themes
'("fa2b58bb98b62c3b8cf3b6f02f058ef7827a8e497125de0254f56e373abee088" "bffa9739ce0752a37d9b1eee78fc00ba159748f50dc328af4be661484848e476" default))
'(helm-minibuffer-history-key "M-p")
'(package-selected-packages
'(corfu-popupinfo inf-elixir htmlize rg flycheck web-mode elixir-ts-mode dockerfile-mode spaceline spacemacs-theme evil-collection evil-leader magit helm exec-path-from-shell)))
'(go-mode yaml-mode spacemacs-theme spaceline rg markdown-mode magit kind-icon json-mode inf-elixir htmlize helm general flycheck exec-path-from-shell evil-leader evil-collection elixir-ts-mode dockerfile-mode corfu-terminal)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.