(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name
"straight/repos/straight.el/bootstrap.el"
(or (bound-and-true-p straight-base-dir)
user-emacs-directory)))
(bootstrap-version 7))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
(setq straight-vc-git-default-clone-depth 1)
;; A full history (in the case of editing the code) can be fetched
;; with M-x magit-remote-unshallow
(setq straight-check-for-modifications nil)
(use-package use-package
:demand
:config
(setq straight-use-package-by-default t))
(use-package diminish)
(use-package no-littering
:demand t
:config
(setq auto-save-file-name-transforms `((".*" ,(no-littering-expand-var-file-name "auto-save/")
t)))
(setq custom-file (no-littering-expand-etc-file-name "custom.el")))
(use-package gruvbox-theme
:config
(load-theme 'gruvbox-dark-medium t))
(windmove-default-keybindings)
(unless (display-graphic-p)
(xterm-mouse-mode))
(toggle-debug-on-error)
;; line
(add-hook 'prog-mode-hook
#'display-line-numbers-mode)
(add-hook 'org-mode-hook
#'display-line-numbers-mode)
(use-package orderless
:init
(setq completion-styles '(orderless basic)
completion-category-defaults nil
completion-category-overrides '((file (styles partial-completion)))))
(use-package vertico
:config
(vertico-mode t)
(define-key vertico-map (kbd "<escape>") #'abort-recursive-edit))
(use-package consult
:config
(global-set-key (kbd "C-c s") 'consult-line))
(use-package corfu
:custom
(corfu-cycle t)
(corfu-auto t)
(corfu-separator ?\s) ;; Orderless field separator
(corfu-quit-at-boundary nil) ;; Never quit at completion boundary
(corfu-quit-no-match nil) ;; Never quit, even if there is no match
(corfu-preview-current nil) ;; Disable current candidate preview
(corfu-preselect 'prompt) ;; Preselect the prompt
(corfu-on-exact-match nil) ;; Configure handling of exact matches
(corfu-scroll-margin 5) ;; Use scroll margin
:config
(global-corfu-mode))
(use-package corfu-terminal
:config
(unless (display-graphic-p)
(corfu-terminal-mode t)))
(use-package emacs
:after corfu
:init
;; Hide commands in M-x which do not apply to the current mode.
;; Corfu commands are hidden, since they are not supposed to be used via M-x.
(setq read-extended-command-predicate
#'command-completion-default-include-p)
;; Enable indentation+completion using the TAB key.
;; `completion-at-point' is often bound to M-TAB.
(setq tab-always-indent 'complete))
(use-package evil
:config
(evil-mode t)
(setq evil-normal-state-cursor '(box)
evil-insert-state-cursor '(bar)
evil-visual-state-cursor '(hollow)))
(use-package org
:straight nil
:config
(setq org-use-speed-commands t
org-startup-indented t
org-support-shift-select t
org-catch-invisible-edits 'show-and-error
org-hide-emphasis-markers nil
org-indent-mode-turns-on-hiding-stars nil))
(use-package magit
:config
(global-set-key (kbd "C-x g") #'magit))