The Meowgorithm Dotfiles, Collectors’ Edition
(setq inhibit-startup-message t)
(editorconfig-mode 1)
(global-display-line-numbers-mode 1)
(global-hl-line-mode 1)
(load-theme 'leuven-dark t)
(xterm-mouse-mode 1)
(setq-default tab-width 4)
(electric-pair-mode 1)
;; Keep emphemeral customization in separate file
(setq custom-file (concat user-emacs-directory "custom.el"))
(when (file-exists-p custom-file)
(load custom-file))
;; Package setup
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(package-initialize)
(unless package-archive-contents
(package-refresh-contents))
;; Auto-install packages
(dolist (package '(company editorconfig vertico consult diff-hl neotree))
(unless (package-installed-p package)
(package-install package)))
;; Auto-completion
(add-hook 'after-init-hook 'global-company-mode)
(setq company-idle-delay 0.1)
(setq company-minimum-prefix-length 1)
;; Fuzzy file finding
(vertico-mode 1)
(if (executable-find "fd")
(global-set-key (kbd "C-c f") 'consult-fd)
(progn
(setq consult-find-args "find . -not ( -path '*/.git/*' -prune )")
(global-set-key (kbd "C-c f") 'consult-find)))
(if (executable-find "rg")
(global-set-key (kbd "C-c g") 'consult-ripgrep)