Skip to content

Instantly share code, notes, and snippets.

@MadanBhandari
Forked from rxcmr/config.org
Created December 21, 2020 10:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MadanBhandari/dac9042bcc591a6c2efd51a90e422737 to your computer and use it in GitHub Desktop.
Save MadanBhandari/dac9042bcc591a6c2efd51a90e422737 to your computer and use it in GitHub Desktop.
doom emacs config

Doom Emacs Literate Config

Table of Contents

Doom Emacs

Fonts

Set all fonts to the Recursive typeface.

(setq doom-font (font-spec :family "Rec Mono Casual" :size 12)
      doom-variable-pitch-font (font-spec :family "Recursive Sans Casual Static" :size 12)
      doom-big-font (font-spec :family "Rec Mono Casual" :size 16))

Theme

Set theme to Monokai Pro. Because Monokai is <3 and Monokai Pro is professional <3

(setq doom-theme 'doom-monokai-pro)

Emacs

Org mode

Set org-mode directory.

(setq org-directory "~/org/")

Preview org files on save.

(add-to-list 'load-path "~/.doom.d/")

Editor

Maximize on startup.

(toggle-frame-maximized)

Set tab sizes to 2. Tabs are chunky enough, I don’t need it to look chunky.

(setq-default tab-width 2)

Display line numbers and make them exact.

(setq display-line-numbers-type t)

Smooth mouse scrolling.

(setq mouse-wheel-scroll-amount '(1 ((shift) . 1))
      mouse-wheel-progressive-speed nil
      mouse-wheel-follow-mouse '(t)
      scroll-step 1)

Ivy Rich

Ivy Rich should start on init.

(use-package ivy-rich
  :init (ivy-rich-mode 1)
  :config (setcdr (assq t ivy-format-functions-alist) #'ivy-format-function-line))

Flycheck

Near real-time syntax checking.

(use-package flycheck :config (setq flycheck-idle-change-delay 0.1
                                    flycheck-idle-buffer-switch-delay 0.1
                                    flycheck-check-syntax-automatically '(idle-change idle-buffer-switch newline save mode-enabled)))

Company

Company should check code as fast as Flycheck

(use-package company :config (setq company-lsp-cache-candidates t
                                   company-idle-delay 0
                                   company-require-match 'never
                                   company-dabbrev-downcase nil
                                   company-tooltip-align-annotations t
                                   company-minimum-prefix-length 3))

Centaur Tabs

Buffer opened tabs should be available after opening a buffer.

(use-package centaur-tabs
  :init (centaur-tabs-mode t)
  :config (setq centaur-tabs-style "bar"
                centaur-tabs-height 36
                centaur-tabs-set-icons t
                centaur-tabs-set-bar 'under
                centaur-tabs-set-modified-marker t))

LSP

Make rust-analyzer the default LSP for Rust.

(setq rustic-lsp-server 'rust-analyzer)
(setq lsp-rust-server 'rust-analyzer)

Projectile

Set up project directories.

(use-package projectile :config
  (projectile-add-known-project "~/go/src/bidoof")
  (projectile-add-known-project "~/go/src/github.com/rxcmr/docbot"))

Miscellaneous

Credentials

Set full name and e-mail address.

(setq user-full-name "rxcmr"
      user-mail-address "lythe1107@icloud.com")

Discord Rich Presence

Enable elcord on startup.

(use-package elcord :init (elcord-mode))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment