333 lines
12 KiB
EmacsLisp
333 lines
12 KiB
EmacsLisp
;; Alamat host email
|
|
(setq mail-host-address "mrfirmansyah.my.id")
|
|
|
|
;; Auto-save
|
|
(setq backup-directory-alist
|
|
`((".*" . ,temporary-file-directory))
|
|
auto-save-file-name-transforms
|
|
`((".*" ,temporary-file-directory t)))
|
|
|
|
;; Mengikuti symlink tanpa prompt
|
|
(setq vc-follow-symlinks t)
|
|
|
|
;; Mode minor global
|
|
(global-visual-line-mode t)
|
|
(setq electric-indent-mode nil)
|
|
|
|
;; Menampilkan buffer scratch kosong saat memulai
|
|
(setq inhibit-startup-screen t
|
|
initial-scratch-message nil)
|
|
|
|
;; Arsip-arsip paket dan prioritasnya
|
|
(require 'package)
|
|
(setq package-archives
|
|
'(("gnu" . "https://elpa.gnu.org/packages/")
|
|
("nongnu" . "https://elpa.nongnu.org/nongnu/")
|
|
("melpa-stable" . "http://stable.melpa.org/packages/")
|
|
("melpa" . "http://melpa.org/packages/"))
|
|
package-archive-priorities '(("melpa-stable" . 20) ("gnu" . 10) ("melpa" . 0)))
|
|
(package-initialize)
|
|
|
|
;; Spell-checker
|
|
(setq ispell-program-name "hunspell"
|
|
ispell-dictionary "id_ID")
|
|
(add-to-list 'ispell-skip-region-alist '(":\\(PROPERTIES\\|LOGBOOK\\):" . ":END:"))
|
|
(add-to-list 'ispell-skip-region-alist '("#\\+BEGIN_SRC" . "#\\+END_SRC"))
|
|
(add-hook 'text-mode-hook 'flyspell-mode)
|
|
(add-hook 'prog-mode-hook 'flyspell-prog-mode)
|
|
(add-hook 'org-mode-hook 'flyspell-mode)
|
|
|
|
;; Tema
|
|
(tool-bar-mode -1)
|
|
(scroll-bar-mode -1)
|
|
(setq-default cursor-type 'bar)
|
|
|
|
;; Org mode
|
|
(global-set-key (kbd "C-c a") #'org-agenda)
|
|
(global-set-key (kbd "C-c c") #'org-capture)
|
|
(global-set-key (kbd "C-c l") #'org-store-link)
|
|
(setq org-agenda-files '("/media/Data/Dokumen/Agenda/")
|
|
org-capture-templates '(("c" "Catatan singkat" entry (file+datetree "Catatan/catatan_singkat.org") "* %?\nCREATED: %U" :empty-lines-before 1)
|
|
("t" "Tugas" entry (file+datetree "Agenda/tugas.org") "* TODO %?\nCREATED: %U" :empty-lines-before 1)
|
|
("p" "Proyek" entry (file "Agenda/proyek.org") "* %?\nCREATED: %U" :empty-lines-before 1))
|
|
org-agenda-custom-commands '(("i" "Ikhtisar hari ini" ((todo "DOING" ((org-agenda-overriding-header "Tugas yang sedang dikerjakan:")
|
|
(org-agenda-prefix-format "")))
|
|
(todo "NEXT" ((org-agenda-overriding-header "Tugas selanjutnya:")
|
|
(org-agenda-prefix-format "")))
|
|
(tags "CLOSED>=\"<today>\"" ((org-agenda-overriding-header "Tugas yang telah diselesaikan:")
|
|
(org-agenda-prefix-format "")))
|
|
(agenda "" ((org-agenda-files '("Agenda/jadwal.org"))
|
|
(org-agenda-overriding-header "Jadwal:")
|
|
(org-agenda-prefix-format "%?-12t% s")
|
|
(org-agenda-skip-function '(org-agenda-skip-entry-if 'deadline))
|
|
(org-agenda-span 1)
|
|
(org-deadline-warning-days 0)))))
|
|
("d" "Deadline" ((agenda nil ((org-agenda-entry-types '(:deadline))
|
|
(org-agenda-format-date "")
|
|
(org-deadline-warning-days 7)
|
|
(org-agenda-skip-function '(org-agenda-skip-entry-if 'notregexp "\\* NEXT"))
|
|
(org-agenda-overriding-header "Deadline:")
|
|
(org-agenda-prefix-format "%?-12t% s"))))))
|
|
org-agenda-time-grid '((daily today require-timed) (430 915 1200 1515 1800 1900 2045) " ┄┄┄┄┄ " "┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄")
|
|
org-directory "/media/Data/Dokumen/"
|
|
org-hide-emphasis-markers t
|
|
org-id-get-create t
|
|
org-image-actual-width '(300)
|
|
org-log-done 'time
|
|
org-pretty-entities t
|
|
org-startup-indented t
|
|
org-startup-with-inline-images t
|
|
org-stuck-projects '("+PROJECT/-MAYBE-DONE" ("TODO" "NEXT" "DOING") nil "\\<IGNORE\\>")
|
|
org-todo-keywords '((sequence "TODO" "NEXT" "DOING" "|" "DONE" "CANCELED"))
|
|
org-todo-keyword-faces '(("NEXT" . "dark orange")
|
|
("DOING" . "dark green")
|
|
("DONE" . (:background "dark green" :foreground "white" :weight bold))
|
|
("CANCELED" . (:background "red" :foreground "white" :weight bold))))
|
|
|
|
;; Paket-paket
|
|
|
|
(use-package all-the-icons
|
|
:if (display-graphic-p))
|
|
|
|
(use-package all-the-icons-dired
|
|
:hook (dired-mode . all-the-icons-dired-mode))
|
|
|
|
(use-package citar
|
|
:custom
|
|
(org-cite-global-bibliography '("/media/Data/Dokumen/Referensi/referensi.bib"))
|
|
(org-cite-insert-processor 'citar)
|
|
(org-cite-follow-processor 'citar)
|
|
(org-cite-activate-processor 'citar)
|
|
(citar-bibliography org-cite-global-bibliography)
|
|
:bind
|
|
(:map org-mode-map :package org ("C-c b" . #'org-cite-insert))
|
|
:hook
|
|
(LaTeX-mode . citar-capf-setup)
|
|
(org-mode . citar-capf-setup)
|
|
:config
|
|
(defvar citar-indicator-files-icons (citar-indicator-create
|
|
:symbol (all-the-icons-faicon "file-o"
|
|
:face 'all-the-icons-green
|
|
:v-adjust -0.1)
|
|
:function #'citar-has-files
|
|
:padding " "
|
|
:tag "has:files"))
|
|
(defvar citar-indicator-links-icons (citar-indicator-create
|
|
:symbol (all-the-icons-octicon "link"
|
|
:face 'all-the-icons-orange
|
|
:v-adjust 0.01)
|
|
:function #'citar-has-links
|
|
:padding " "
|
|
:tag "has:links"))
|
|
(defvar citar-indicator-notes-icons (citar-indicator-create
|
|
:symbol (all-the-icons-material
|
|
"speaker_notes"
|
|
:face 'all-the-icons-blue
|
|
:v-adjust -0.3)
|
|
:function #'citar-has-notes
|
|
:padding " "
|
|
:tag "has:notes"))
|
|
(defvar citar-indicator-cited-icons (citar-indicator-create
|
|
:symbol (all-the-icons-faicon "circle-o"
|
|
:face 'all-the-icon-green)
|
|
:function #'citar-is-cited
|
|
:padding " "
|
|
:tag "is:cited"))
|
|
(setq citar-indicators (list citar-indicator-files-icons
|
|
citar-indicator-links-icons
|
|
citar-indicator-notes-icons
|
|
citar-indicator-cited-icons)))
|
|
|
|
(use-package citar-embark
|
|
:after citar embark
|
|
:no-require
|
|
:config (citar-embark-mode))
|
|
|
|
(use-package citar-org-roam
|
|
:after (citar org-roam)
|
|
:config (citar-org-roam-mode))
|
|
|
|
(use-package company
|
|
:config (global-company-mode t))
|
|
|
|
(use-package company-box
|
|
:hook (company-mode . company-box-mode))
|
|
|
|
(use-package consult
|
|
:bind (("C-c M-x" . consult-mode-command)
|
|
("C-c h" . consult-history)
|
|
("C-c k" . consult-kmacro)
|
|
("C-c m" . consult-man)
|
|
("C-c i" . consult-info)
|
|
([remap Info-search] . consult-info)
|
|
("C-x M-:" . consult-complex-command)
|
|
("C-x b" . consult-buffer)
|
|
("C-x 4 b" . consult-buffer-other-window)
|
|
("C-x 5 b" . consult-buffer-other-frame)
|
|
("C-x t b" . consult-buffer-other-tab)
|
|
("C-x r b" . consult-bookmark)
|
|
("C-x p b" . consult-project-buffer)
|
|
("M-#" . consult-register-load)
|
|
("M-'" . consult-register-store)
|
|
("C-M-#" . consult-register)
|
|
("M-y" . consult-yank-pop)
|
|
("M-g e" . consult-compile-error)
|
|
("M-g f" . consult-flymake)
|
|
("M-g g" . consult-goto-line)
|
|
("M-g M-g" . consult-goto-line)
|
|
("M-g o" . consult-outline)
|
|
("M-g m" . consult-mark)
|
|
("M-g k" . consult-global-mark)
|
|
("M-g i" . consult-imenu)
|
|
("M-g I" . consult-imenu-multi)
|
|
("M-s d" . consult-find)
|
|
("M-s c" . consult-locate)
|
|
("M-s g" . consult-grep)
|
|
("M-s G" . consult-git-grep)
|
|
("M-s r" . consult-ripgrep)
|
|
("M-s l" . consult-line)
|
|
("M-s L" . consult-line-multi)
|
|
("M-s k" . consult-keep-lines)
|
|
("M-s u" . consult-focus-lines)
|
|
("M-s e" . consult-isearch-history)
|
|
:map isearch-mode-map
|
|
("M-e" . consult-isearch-history)
|
|
("M-s e" . consult-isearch-history)
|
|
("M-s l" . consult-line)
|
|
("M-s L" . consult-line-multi)
|
|
:map minibuffer-local-map
|
|
("M-s" . consult-history)
|
|
("M-r" . consult-history))
|
|
|
|
:hook (completion-list-mode . consult-preview-at-point-mode)
|
|
:init
|
|
(setq register-preview-delay 0.5
|
|
register-preview-function #'consult-register-format)
|
|
(advice-add #'register-preview :override #'consult-register-window)
|
|
(setq xref-show-xrefs-function #'consult-xref
|
|
xref-show-definitions-function #'consult-xref)
|
|
:config
|
|
(consult-customize
|
|
consult-theme :preview-key '(:debounce 0.2 any)
|
|
consult-ripgrep consult-git-grep consult-grep
|
|
consult-bookmark consult-recent-file consult-xref
|
|
consult--source-bookmark consult--source-file-register
|
|
consult--source-recent-file consult--source-project-recent-file
|
|
:preview-key '(:debounce 0.4 any))
|
|
(setq consult-narrow-key "<"))
|
|
|
|
(use-package consult-projectile
|
|
:bind ("C-c p" . consult-projectile))
|
|
|
|
(use-package doom-modeline
|
|
:init
|
|
(doom-modeline-mode 1)
|
|
(add-to-list 'doom-modeline-mode-alist '(dashboard-mode)))
|
|
|
|
(use-package dashboard
|
|
:config
|
|
(dashboard-setup-startup-hook)
|
|
(setq dashboard-banner-logo-title ""
|
|
dashboard-center-content t
|
|
dashboard-footer-messages '("")
|
|
dashboard-items '((recents . 5)
|
|
(bookmarks . 5)
|
|
(projects . 5))
|
|
dashboard-show-shortcuts nil
|
|
dashboard-startup-banner nil
|
|
dashboard-vertically-center-content t
|
|
initial-buffer-choice (lambda () (get-buffer-create dashboard-buffer-name))))
|
|
|
|
(use-package embark
|
|
:init (setq prefix-help-command #'embark-prefix-help-command)
|
|
:config
|
|
(add-to-list 'display-buffer-alist
|
|
'("\\`\\*Embark Collect \\(Live\\|Completions\\)\\*"
|
|
nil
|
|
(window-parameters (mode-line-format . none)))))
|
|
|
|
(use-package embark-consult
|
|
:hook (embark-collect-mode . consult-preview-at-point-mode))
|
|
|
|
(use-package hide-mode-line
|
|
:hook (dashboard-mode . hide-mode-line-mode))
|
|
|
|
(use-package marginalia
|
|
:init (marginalia-mode))
|
|
|
|
(use-package modus-themes
|
|
:init
|
|
(require 'modus-themes)
|
|
(load-theme 'modus-operandi :no-confirm)
|
|
(customize-set-variable 'modus-themes-common-palette-overrides
|
|
'((bg-hover bg-active)
|
|
(bg-mode-line-active bg-inactive)
|
|
(bg-mode-line-inactive bg-dim)
|
|
(bg-region bg-completion)
|
|
(border-mode-line-active unspecified)
|
|
(border-mode-line-inactive unspecified))))
|
|
|
|
(use-package orderless
|
|
:custom
|
|
(completion-styles '(orderless basic))
|
|
(completion-category-defaults nil)
|
|
(completion-category-overrides '((file (styles basic partial-completion)))))
|
|
|
|
(use-package org-appear
|
|
:hook (org-mode . org-appear-mode))
|
|
|
|
(use-package org-fragtog
|
|
:hook (org-mode . org-fragtog-mode))
|
|
|
|
(use-package org-pomodoro
|
|
:bind (("C-c C-x C-<tab>" . org-pomodoro))
|
|
:commands (org-pomodoro)
|
|
:config (setq org-pomodoro-length 45
|
|
org-pomodoro-long-break-length 15
|
|
org-pomodoro-manual-break t
|
|
org-pomodoro-short-break-length 15))
|
|
|
|
(use-package org-roam
|
|
:custom
|
|
(org-roam-directory "~/.emacs.d/org-roam/")
|
|
(org-roam-capture-templates '(("c" "Catatan" plain "%?" :target (file+head "${slug}.org" "#+TITLE: ${title}\n#+DATE: %U\n\n") nil nil)))
|
|
(org-roam-database-connector 'sqlite-builtin)
|
|
:bind (("C-c n f" . org-roam-node-find)
|
|
("C-c n i" . org-roam-node-insert)
|
|
("C-c n l" . org-roam-buffer-toggle))
|
|
:config (setq org-roam-db-gc-threshold most-positive-fixnum)
|
|
:init
|
|
(require 'org-roam-protocol)
|
|
(org-roam-db-autosync-mode 1))
|
|
|
|
(use-package org-roam-ui
|
|
:after org-roam
|
|
:bind (("C-c n g" . 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))
|
|
|
|
(use-package projectile
|
|
:init (projectile-mode))
|
|
|
|
(use-package vertico
|
|
:init (vertico-mode))
|
|
|
|
(use-package which-key
|
|
:init (which-key-mode))
|
|
|
|
(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.
|
|
'(package-selected-packages
|
|
'(org-fragtog org-roam-ui org-pomodoro all-the-icons-dired emacsql-sqlite-builtin citar-org-roam org-appear hide-mode-line doom-modeline all-the-icons citar-embark citar nano-modeline which-key vertico orderless modus-themes marginalia magit embark-consult dashboard consult-projectile company-web company-go company-box)))
|
|
(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.
|
|
)
|