diff --git a/init.el b/init.el index 85150c6..bfdc9b9 100644 --- a/init.el +++ b/init.el @@ -28,12 +28,12 @@ (setq require-final-newline t) (setq warning-minimum-level :error) ; Don't show *warnings* (add-to-list 'default-frame-alist '(fullscreen . maximized)) -(set-frame-font "ZedMono Nerd Font-16" nil t) +; (set-frame-font "ZedMono Nerd Font-16" nil t) (setq create-lockfiles nil) (setq gc-cons-threshold 100000000) ; ~100 MB (setq read-process-output-max (* 1024 1024)) ; 1 MB read buffer chunk - +' ;; Stupid bold font for no reason, BEGONE! (mapc (lambda (face) @@ -71,8 +71,7 @@ (setq straight-use-package-by-default t) ; always use straight to install packages (setq use-package-always-ensure t) ; always auto-install packages -;; UTILS - +;;;; BEGIN: CORE ;; Dired (global-set-key (kbd "S-w") #'dired-jump) @@ -139,9 +138,6 @@ ivy-rich-switch-buffer-align-virtual-buffer t ivy-rich-path-style 'abbrev)) -;; Git frontend -(use-package magit) - ;; Upgraded searching (use-package swiper :after ivy @@ -154,25 +150,23 @@ (lsp-mode . dap-mode) (lsp-mode . dap-ui-mode)) -;; (use-package counsel :after ivy :config (counsel-mode)) +;;;; END: CORE -;; Positional frames -(use-package posframe) - -;; Perltidy +;;;; BEGIN: Perltidy (straight-use-package ; we have to use straight here because its not on MELPA/ELPA '(perltidy :type git :host github :repo "perl-ide/perltidy.el" :branch "master")) +;;;; END: Perltidy -;; MODES - -;;; No config use-packages +;;;; BEGIN: No config +(use-package magit) +(use-package posframe) (use-package apache-mode) (use-package yaml-mode) (use-package raku-mode) @@ -182,12 +176,13 @@ (use-package nix-mode) (use-package cmake-mode) (use-package meson-mode) - -;;; With config - -;;;; BEGIN theming +(use-package yasnippet) +(use-package which-key) (use-package all-the-icons) (use-package nerd-icons) +;;;; END: No config + +;;;; BEGIN theming (use-package doom-modeline :init (setq doom-modeline-height 25) @@ -225,12 +220,16 @@ (add-to-list 'auto-mode-alist '("\\.tx\\'" . web-mode)) ; Text::Xslate (add-to-list 'auto-mode-alist '("\\.ts\\'" . web-mode)) ; Typescript (add-to-list 'auto-mode-alist '("\\.js\\'" . web-mode)) ; Javascript - (add-to-list 'auto-mode-alist '("\\.tsx\\'" . web-mode)) ; React - (add-to-list 'auto-mode-alist '("\\.jsx\\'" . web-mode)) ; React + (add-to-list 'auto-mode-alist '("\\.tsx\\'" . web-mode)) ; React Typescript + (add-to-list 'auto-mode-alist '("\\.jsx\\'" . web-mode)) ; React Javascript + (add-to-list 'auto-mode-alist '("\\.ejs\\'" . web-mode)) ; Javascript templates + (add-to-list 'auto-mode-alist '("\\.erb\\'" . web-mode)) ; Ruby templates ) +;;;; END: web-mode +;;;; BEGIN: prettier (defun enable-minor-mode (my-pair) - "Enable minor mode if filename match the regexp. MY-PAIR is a cons cell (regexp . minor-mode)." + "Enables minor mode based on MY-PAIR filetype and mode." (if (buffer-file-name) (if (string-match (car my-pair) buffer-file-name) (funcall (cdr my-pair))))) @@ -242,8 +241,7 @@ '("\\.jsx?\\'" . prettier-js-mode)) (enable-minor-mode '("\\.tsx?\\'" . prettier-js-mode)))) - -;;;; END: web-mode +;;;; END: prettier ;;;; BEGIN: cperl-mode (require 'perl-mode) @@ -283,22 +281,18 @@ (add-hook 'cperl-mode-hook #'flycheck-perllib-init) -;;; cperl-mode does some ugly stuff -(eval-after-load 'cperl-mode +(eval-after-load 'cperl-mode ; cperl-mode does some ugly stuff by default. '(progn (set-face-attribute 'cperl-array-face nil :foreground 'unspecified :background 'unspecified :weight 'normal - :slant 'italic - ) + :slant 'italic) (set-face-attribute 'cperl-hash-face nil :foreground 'unspecified :background 'unspecified :weight 'normal - :slant 'italic - ) - )) + :slant 'italic))) ;;;; END cperl-mode ;;;; BEGIN common-lisp-mode @@ -335,8 +329,6 @@ ;;;; END company ;;;; BEGIN lsp -(use-package yasnippet) -(use-package which-key) (use-package lsp-mode :custom (lsp-keymap-prefix "C-c l") ; Prefix for LSP actions @@ -409,7 +401,6 @@ lsp-ui-doc-show-with-cursor nil ; Don't show doc when cursor is over symbol - too distracting lsp-ui-doc-include-signature t ; Show signature lsp-ui-doc-position 'at-point)) - ;;;; END lsp (custom-set-variables