diff --git a/config/init.org b/config/init.org index 945ff7d..8a45da0 100644 --- a/config/init.org +++ b/config/init.org @@ -13,6 +13,27 @@ (unless (server-running-p) (server-start)) #+end_src +** Fix Indents + +#+begin_src emacs-lisp + (electric-indent-mode 1) +#+end_src + +** Autopairs + +#+begin_src emacs-lisp + (electric-pair-mode 1) +#+end_src + +** Rainbow Delimiters + +#+begin_src emacs-lisp + (use-package rainbow-delimiters + :ensure t + :config + (add-hook 'prog-mode-hook 'rainbow-delimiters-mode)) +#+end_src + ** Disable Bars #+begin_src emacs-lisp @@ -108,6 +129,7 @@ #+begin_src emacs-lisp (use-package nix-mode :mode "\\.nix\\'") + (use-package lua-mode :mode "\\.lua\\'") #+end_src ** Treesitter @@ -138,6 +160,7 @@ java js json + lua markdown python ruby @@ -185,20 +208,30 @@ #+begin_src emacs-lisp (use-package corfu - :custom - (corfu-cycle t) - (corfu-preselect 'prompt) - :init - (global-corfu-mode)) -#+end_src - -** Flycheck - -#+begin_src emacs-lisp - (use-package flycheck :ensure t + :custom + (corfu-cycle t) ;;cycle through all things + (corfu-auto t) ;;autocomplete + (corfu-auto-prefix 1) ;; 2 letters to start autocomplete + (corfu-auto-delay 0.0) ;; idk 0s to start? + :bind (:map corfu-map ("" . corfu-quit)) + :init (global-corfu-mode)) + + (use-package cape :ensure t) + + ;; get eglot to play nice with corfu + (advice-add 'eglot-completion-at-point :around #'cape-wrap-buster) + + (use-package kind-icon + :ensure t + :after corfu + :custom + (kind-icon-use-icons t) + (kind-icon-default-face 'corfu-default) + (kind-icon-blend-background nil) + (kind-icon-blend-frac 0.08) :config - (add-hook 'after-init-hook #'global-flycheck-mode)) + (add-to-list 'corfu-margin-formatters #'kind-icon-margin-formatter)) #+end_src ** Sideline @@ -206,12 +239,10 @@ #+begin_src emacs-lisp (use-package sideline-flycheck :hook (flycheck-mode . sideline-mode) - :init (setq sideline-backends-right '(sideline-flycheck) - sideline-delay 0.0)) + :init + (setq sideline-backends-right '(sideline-flycheck))) - (use-package sideline-flycheck - :hook (flycheck-mode . sideline-flycheck-setup) - :init (setq sideline-flycheck-display-mode 'line)) + (use-package sideline-flycheck :hook (flycheck-mode . sideline-flycheck-setup)) (use-package sideline-eglot :init @@ -276,6 +307,19 @@ (global-set-key (kbd "C-S-v") 'yank) #+end_src +** Org Mode Templates + +#+begin_src emacs-lisp + ;; Inhibits autopairs from running for <> in org mode + (add-hook 'org-mode-hook + (lambda () + (setq-local electric-pair-inhibit-predicate + `(lambda (c) (if (char-equal c ?<) t (,electric-pair-inhibit-predicate c)))))) + + (require 'org-tempo) + (add-to-list 'org-modules 'org-tempo t) +#+end_src + * Tab Management ** Centaur Tabs