Skip to content

Kab1r/.doom.d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kabir’s Doom Emacs Configuration

;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-

Installation

Prerequisites

Script

git clone https://github.com/Kab1r/.doom.d
git clone --depth 1 https://github.com/hlissner/doom-emacs ~/.emacs.d
~/.emacs.d/bin/doom install

Me.

(setq user-full-name "Kabir Kwatra"
      user-mail-address "kabir@kwatra.me")

Editor

Font

Default font is VictorMono, however this can be adjusted here as needed.

(setq doom-font (font-spec :family "VictorMono NF" ;; "Iosevka"
                           :size 16))

Dracula Theme

(setq doom-theme 'doom-dracula)

Transparency

(after! doom (doom/set-frame-opacity 50))

Line Numbers

This determines the style of line numbers in effect. If set to `nil’, line numbers are disabled. For relative line numbers, set this to `relative’.

(setq display-line-numbers-type 'relative)

Smooth Scrolling

Pixel-based smooth scrolling using good-scroll.el.

(package! good-scroll)
(good-scroll-mode 1)

Snippets

Additional code snippets from yasnippet-snippets.

(package! yasnippet-snippets)

Copilot

(use-package! copilot
  :hook (prog-mode . copilot-mode)
  :bind (("C-TAB" . 'copilot-accept-completion-by-word)
         ("C-<tab>" . 'copilot-accept-completion-by-word)
         :map copilot-completion-map
         ("<tab>" . 'copilot-accept-completion)
         ("TAB" . 'copilot-accept-completion)))
(setq copilot-node-executable "~/.local/share/nvm/v17.9.1/bin/node")
(package! copilot
  :recipe (:host github :repo "zerolfx/copilot.el" :files ("*.el" "dist")))

Transparency

; (set-frame-parameter (selected-frame) 'alpha '(92 . 90))
; (add-to-list 'default-frame-alist '(alpha . (92 . 90)))

Language Specific

Org Mode

Default Directory

If you use `org’ and don’t want your org files in the default location below, change `org-directory’. It must be set before org loads!

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

Headlines and Lists

(setq org-hide-emphasis-markers t)

Native Foundations

(setq org-src-fontify-natively t)

LaTeX Packages

(after! org
  (add-to-list 'org-latex-default-packages-alist '("margin=1in" "geometry")))

Async Babel

(package! ob-async)
(require 'ob-async)
(setq ob-async-no-async-language-alist '("rustic" "rust"))

Roam

(make-directory "~/Documents/org/roam")
(setq org-roam-directory (file-truename "~/Documents/org/roam"))

Roam-UI

(unpin! org-roam)
(package! org-roam-ui)
(use-package! websocket :after org-roam)

(use-package! org-roam-ui
    :after org-roam ;; or :after org
;;         normally we'd recommend hooking orui after org-roam, but since org-roam does not have
;;         a hookable mode anymore, you're advised to pick something yourself
;;         if you don't care about startup time, use
;;  :hook (after-init . org-roam-ui-mode)
    :config
    (setq org-roam-ui-sync-theme t
          org-roam-ui-follow t
          org-roam-ui-update-on-save t
          org-roam-ui-open-on-start t))

D2

(package! d2-mode)
(package! ob-d2
  :recipe (:host github :repo "dmacvicar/ob-d2"))
(setq d2-tmp-dir "/tmp/d2")
(org-babel-do-load-languages
    'org-babel-load-languages
    '((d2 . t)))

Protobuf

(package! protobuf-mode)

Julia (vterm)

(package! julia-vterm)
(package! ob-julia-vterm)

Code Formatting

Package to support deno fmt.

(package! deno-fmt)

Hook deno into typescript major modes.

(add-hook 'typescript-mode-hook 'deno-fmt-mode)
(add-hook 'typescript-tsx-mode-hook 'deno-fmt-mode)
(add-hook 'js2-mode-hook 'deno-fmt-mode)

Systemd

Major mode for service and timer files.

(package! systemd)

Major mode for Arch Linux package script.

(package! pkgbuild-mode)

Jupyter

(setq ein:output-area-inlined-images t)

Mermaid

Major mode for mermaid and minor mode for org-babel.

(package! mermaid-mode)
(package! ob-mermaid)

Set path to mermaid CLI for minor mode.

;; (setq ob-mermaid-cli-path (locate-file "mmdc" exec-path))

WGSL

(package! wgsl-mode
  :recipe (:host github :repo "acowley/wgsl-mode"))

Yuck (eww Widgets)

(package! yuck-mode
  :recipe (:host github :repo "mmcjimsey26/yuck-mode" :files ("yuck-mode.el")))

Elsa Lambda Calculus Evaluator

(package! elsa-lambda-calculus-mode
  :recipe (:host github :repo "Kab1r/elsa-lambda-calculus-mode" :files ("elsa-lambda-calculus-mode.el")))

TLA+

(package! tla-mode)

Package Lint

(package! package-lint)

Language Tool

(setq langtool-http-server-host "lt.kabr.dev"
      langtool-http-server-port 443
      langtool-http-server-stream-type 'tls)