#+TITLE: Ian's Emacs Config * Appearance ** Misc #+begin_src emacs-lisp (setq fancy-splash-image (concat doom-private-dir "sink.png")) ;; the best emacs logo (load-theme 'doom-oceanic-next t) (setq lsp-lens-enable nil) ;; gets rid of the little '0 references' note from lsp #+end_src ** Font #+begin_src emacs-lisp (setq doom-font (font-spec :family "Fira Mono for Powerline" :size=28 :weight=medium) ;; default-font-size 28 doom-font-increment 1 ;; TODO doom-unicode-font, check out fira-code-symbol? ) #+end_src * Window Management and Navigation ** TODO General Concepts and Rationale ** Tab Behavior #+begin_src emacs-lisp (setq tab-bar-show nil) (doom-modeline-mode -1) (define-key evil-normal-state-map (kbd "s-t") 'tab-next) (define-key evil-normal-state-map (kbd "s-z") 'toggle-maximize-buffer) #+end_src ** Window Movement #+begin_src emacs-lisp (defun split-and-follow-horizontally () (interactive) (split-window-below) (balance-windows) (other-window 1)) (defun split-and-follow-vertically () (interactive) (split-window-right) (balance-windows) (other-window 1)) #+end_src #+begin_src emacs-lisp (global-set-key (kbd "s-c") 'delete-window) (global-set-key (kbd "s-h") 'windmove-left) (global-set-key (kbd "s-j") 'windmove-down) (global-set-key (kbd "s-k") 'windmove-up) (global-set-key (kbd "s-l") 'windmove-right) (define-key evil-normal-state-map (kbd "s-d") 'kill-this-buffer) (define-key evil-normal-state-map (kbd "s-n") 'projectile-next-project-buffer) (define-key evil-normal-state-map (kbd "s-p") 'projectile-previous-project-buffer) (define-key evil-normal-state-map (kbd "s-J") 'split-and-follow-horizontally) (define-key evil-normal-state-map (kbd "s-L") 'split-and-follow-vertically) (define-key evil-normal-state-map (kbd "s-b") 'buffer-menu) (define-key evil-normal-state-map (kbd "s-x") 'execute-extended-command) (global-set-key (kbd "s-SPC") 'tab-next) #+end_src #+begin_src emacs-lisp ;; disable mac default bindings (when IS-MAC (setq mac-pass-command-to-system nil)) #+end_src ** TODO Toggle Maximize Buffer This was meant to replace the functionality of =ctrl b z= in tmux. It's not really good enough though, I'd like it to be independent of workspaces and tabs, for example, so that I can zoom one window, move to another context and zoom the others and be able to undo the zoom on the buffer I'm on specifically #+begin_src emacs-lisp (defun toggle-maximize-buffer () "Maximize buffer" (interactive) (if (= 1 (length (window-list))) (jump-to-register '_) (progn (window-configuration-to-register '_) (delete-other-windows)))) #+end_src * IRC #+begin_src emacs-lisp (setq circe-network-options '(("Libera" :host "dump.town" :port (6667 . 6697) :tls t :user "bl0rt/libera" :pass (password-store-get "self/irc/znc")))) #+end_src * Org Mode #+begin_src emacs-lisp (setq deft-directory "~/notes/deft" deft-extensions '("org" "txt") deft-recursive t) (setq org-roam-directory "~/notes/roam") (map! :leader (:prefix ("e" . "export") :desc "Export Org to HTML" "e" #'org-html-export-to-html)) #+end_src * Ejira #+begin_src emacs-lisp (use-package! ejira :init (setq jiralib2-url "https://everblue.atlassian.net" jiralib2-auth 'basic jiralib2-user-login-name "ian@fs.tech" jiralib2-token (password-store-get "work/api-keys/jira") ;; NOTE, this directory needs to be in `org-agenda-files'` ejira-org-directory "~/notes/jira" ejira-projects '("FP" "RWA") ejira-priorities-alist '(("Highest" . ?A) ("High" . ?B) ("Medium" . ?C) ("Low" . ?D) ("Lowest" . ?E)) ejira-todo-states-alist '(("To Do" . 1) ("Development In Progress" . 2) ("QA" . 3))) :config ;; Tries to auto-set custom fields by looking into /editmeta ;; of an issue and an epic. (add-hook 'jiralib2-post-login-hook #'ejira-guess-epic-sprint-fields) ;; They can also be set manually if autoconfigure is not used. ;; (setq ejira-sprint-field 'customfield_10001 ;; ejira-epic-field 'customfield_10002 ;; ejira-epic-summary-field 'customfield_10004) (require 'ejira-agenda) ;; Make the issues visisble in your agenda by adding `ejira-org-directory' ;; into your `org-agenda-files'. (add-to-list 'org-agenda-files ejira-org-directory) ;; Add an agenda view to browse the issues that (org-add-agenda-custom-command '("j" "My JIRA issues" ((ejira-jql "resolution = unresolved and assignee = currentUser()" ((org-agenda-overriding-header "Assigned to me"))))))) #+end_src * One-Off Behavior Tweaks ** Projectile search path #+begin_src emacs-lisp (setq projectile-project-search-path '("~/code/")) #+end_src ** Speed up flycheck for TS/JS file opening [[https://github.com/flycheck/flycheck/issues/1129#issuecomment-319600923][source]] #+begin_src emacs-lisp (with-eval-after-load 'flycheck (advice-add 'flycheck-eslint-config-exists-p :override (lambda() t))) #+end_src ** Company mode manual activation Keep auto-complete from constantly suggesting things. #+begin_src emacs-lisp (setq company-minimum-prefix-length 100) (map! :i "S-o" #'company-complete) #+end_src * Todo ** Bind 'Kill buffer and window' to spc b w ** Make c-spc change tabs, make sure tabs are invisible ** Word wrap on org mode ** Highlight matching paren