commit 22320eefcafb6019aa705ab7154342f8f6239439 Author: SouthFox Date: Tue Mar 12 20:33:18 2024 +0800 [feat] add init.el diff --git a/init.el b/init.el new file mode 100644 index 0000000..f19ec21 --- /dev/null +++ b/init.el @@ -0,0 +1,82 @@ +(require 'package) +(setq package-enable-at-startup nil) +(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3") +(setq package-archives + '(("GNU ELPA" . "https://elpa.gnu.org/packages/") + ("MELPA Stable" . "https://stable.melpa.org/packages/") + ("MELPA" . "https://melpa.org/packages/")) + package-archive-priorities + '(("MELPA" . 15) + ("MELPA Stable" . 10) + ("GNU ELPA" . 5))) + +(package-initialize) +(setq use-package-always-ensure t) +(unless (package-installed-p 'use-package) + (package-refresh-contents) + (package-install 'use-package)) +(eval-when-compile + (require 'use-package)) + +;; ORG +(use-package org + :ensure t + :init + (setq org-src-fontify-natively t) + :config + ;; (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode)) + (define-key org-mode-map (kbd "M-p") 'org-metaup) + (define-key org-mode-map (kbd "M-n") 'org-metadown) + (setq org-catch-invisible-edits 'show-and-error) + (setq org-cycle-separator-lines -1) + (setq org-return-follows-link t) + (setq org-export-with-toc 'nil) + (setq org-startup-folded 'content) + (setq org-ellipsis "⇣")) + +(use-package vertico + :ensure t + :config + (vertico-mode)) + +(use-package orderless + :ensure t + :init + ;; Configure a custom style dispatcher (see the Consult wiki) + ;; (setq orderless-style-dispatchers '(+orderless-consult-dispatch orderless-affix-dispatch) + ;; orderless-component-separator #'orderless-escapable-split-on-space) + (setq completion-styles '(orderless basic) + completion-category-defaults nil + completion-category-overrides '((file (styles partial-completion))))) + +(use-package docker + :ensure t) + +;;; Vim Bindings +(use-package evil + :demand t + :bind (("" . keyboard-escape-quit)) + :init + ;; allows for using cgn + ;; (setq evil-search-module 'evil-search) + (setq evil-want-keybinding nil) + (setq evil-want-C-i-jump nil) + ;; no vim insert bindings + (setq evil-undo-system 'undo-fu) + :config + (evil-mode 1)) + +;;; Vim Bindings Everywhere else +(use-package evil-collection + :after evil + :config + (setq evil-want-integration t) + (evil-collection-init)) + +(use-package evil-org + :ensure t + :after org + :hook (org-mode . (lambda () evil-org-mode)) + :config + (require 'evil-org-agenda) + (evil-org-agenda-set-keys))