2022-10-26 00:13:43 -04:00
|
|
|
|
#+TITLE: Simponic's Settings
|
|
|
|
|
#+AUTHOR: Simponic
|
|
|
|
|
#+STARTUP: fold
|
|
|
|
|
|
2023-08-11 13:00:34 -04:00
|
|
|
|
* image-types hack (thanks macos)
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(setq image-types '(svg png gif tiff jpeg xpm xbm pbg))
|
|
|
|
|
#+END_SRC
|
2022-10-26 00:13:43 -04:00
|
|
|
|
* Packages
|
|
|
|
|
** Melpa
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(require 'package)
|
|
|
|
|
(add-to-list 'package-archives
|
|
|
|
|
'("melpa" . "https://melpa.org/packages/") t)
|
|
|
|
|
#+END_SRC
|
|
|
|
|
* General emacs
|
2024-10-26 15:56:07 -04:00
|
|
|
|
** Bell Mode
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(setq ring-bell-function 'ignore)
|
|
|
|
|
#+END_SRC
|
|
|
|
|
|
2022-10-26 00:13:43 -04:00
|
|
|
|
** Tab bar mode
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(defun my-tabbar-buffer-groups () ;; customize to show all normal files in one group
|
|
|
|
|
(list (cond ((string-equal "*" (substring (buffer-name) 0 1)) "emacs")
|
|
|
|
|
((eq major-mode 'dired-mode) "emacs")
|
|
|
|
|
(t "user"))))
|
|
|
|
|
(setq tabbar-buffer-groups-function 'my-tabbar-buffer-groups)
|
|
|
|
|
(tab-bar-mode)
|
|
|
|
|
#+END_SRC
|
|
|
|
|
** Indentation
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
2023-09-22 11:41:26 -04:00
|
|
|
|
(setq default-tab-width 2
|
|
|
|
|
tab-width 2
|
|
|
|
|
indent-tabs-mode nil)
|
2022-10-26 00:13:43 -04:00
|
|
|
|
#+END_SRC
|
|
|
|
|
** Line numbers
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(setq display-line-numbers-type 'relative)
|
|
|
|
|
(global-display-line-numbers-mode)
|
|
|
|
|
#+END_SRC
|
|
|
|
|
** Filesystem stuff
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
2023-09-28 23:27:34 -04:00
|
|
|
|
(setq auto-save-default nil
|
|
|
|
|
make-backup-files nil
|
|
|
|
|
create-lockfiles nil)
|
2022-10-26 00:13:43 -04:00
|
|
|
|
(global-auto-revert-mode t) ;; Change files on disk as they are updated
|
|
|
|
|
#+END_SRC
|
2024-04-22 00:28:21 -04:00
|
|
|
|
** Move by whole line units not visually
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(setq line-move-visual nil)
|
|
|
|
|
#+END_SRC
|
2024-10-26 15:56:07 -04:00
|
|
|
|
** Fuzy Wuzzy
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package ivy
|
|
|
|
|
:ensure t)
|
|
|
|
|
(use-package counsel
|
|
|
|
|
:ensure t)
|
|
|
|
|
(ivy-mode 1)
|
|
|
|
|
(counsel-mode 1)
|
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
|
|
** Electric Pair Mode
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(electric-pair-mode)
|
|
|
|
|
(electric-quote-mode)
|
|
|
|
|
#+END_SRC
|
2022-10-26 00:13:43 -04:00
|
|
|
|
** GUI stuff
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(menu-bar-mode -1)
|
2023-09-28 23:27:34 -04:00
|
|
|
|
(setq inhibit-startup-screen t ;; Startup screen
|
|
|
|
|
frame-resize-pixelwise t) ;; Use 100% of window space
|
2023-04-04 12:47:14 -04:00
|
|
|
|
(defun do-frame-config ()
|
|
|
|
|
(tool-bar-mode -1) ;; System bar
|
|
|
|
|
(set-fringe-mode '(1 . 1)) ;; Minimize arrows before and after wrapped lines by setting fringe to 1px
|
|
|
|
|
(toggle-scroll-bar -1))
|
|
|
|
|
|
|
|
|
|
(defun disable-scroll-bars (frame)
|
|
|
|
|
(modify-frame-parameters frame
|
|
|
|
|
'((vertical-scroll-bars . nil)
|
|
|
|
|
(horizontal-scroll-bars . nil))))
|
|
|
|
|
(when (display-graphic-p)
|
|
|
|
|
(do-frame-config)
|
|
|
|
|
(add-hook 'after-make-frame-functions 'disable-scroll-bars))
|
2022-10-26 00:13:43 -04:00
|
|
|
|
#+END_SRC
|
|
|
|
|
** System path (macos)
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package exec-path-from-shell
|
2023-03-16 14:38:15 -04:00
|
|
|
|
:ensure t
|
|
|
|
|
:init
|
|
|
|
|
(when (memq window-system '(mac ns x))
|
|
|
|
|
(exec-path-from-shell-initialize)))
|
2022-10-26 00:13:43 -04:00
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
|
|
* Theming
|
2023-09-22 11:41:26 -04:00
|
|
|
|
** Line spacing
|
2022-10-26 00:13:43 -04:00
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
2023-09-22 11:41:26 -04:00
|
|
|
|
(setq line-spacing 0.24)
|
2022-10-26 00:13:43 -04:00
|
|
|
|
#+END_SRC
|
2023-09-22 11:41:26 -04:00
|
|
|
|
** Highlight current line
|
2023-09-14 11:25:00 -04:00
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
2023-09-22 11:41:26 -04:00
|
|
|
|
(global-hl-line-mode)
|
2023-09-14 11:25:00 -04:00
|
|
|
|
#+END_SRC
|
2022-10-26 00:13:43 -04:00
|
|
|
|
** Font
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
2024-10-26 15:56:07 -04:00
|
|
|
|
;; (let ((font "JetBrains Mono-13:style=Regular"))
|
|
|
|
|
;; (set-face-attribute 'default nil :font font)
|
|
|
|
|
;; (set-frame-font font nil t))
|
|
|
|
|
(let ((font "ZedMono Nerd Font-13:style=Regular"))
|
|
|
|
|
(set-face-attribute 'default nil :font font)
|
2022-10-26 00:13:43 -04:00
|
|
|
|
(set-frame-font font nil t))
|
2024-10-26 15:56:07 -04:00
|
|
|
|
;; This assumes you've installed the package via MELPA.
|
|
|
|
|
(use-package ligature
|
|
|
|
|
:config
|
|
|
|
|
;; Enable the "www" ligature in every possible major mode
|
|
|
|
|
(ligature-set-ligatures 't '("www"))
|
|
|
|
|
;; Enable traditional ligature support in eww-mode, if the
|
|
|
|
|
;; `variable-pitch' face supports it
|
|
|
|
|
(ligature-set-ligatures 'eww-mode '("ff" "fi" "ffi"))
|
|
|
|
|
;; Enable all Cascadia Code ligatures in programming modes
|
|
|
|
|
(ligature-set-ligatures 'prog-mode '("|||>" "<|||" "<==>" "<!--" "####" "~~>" "***" "||=" "||>"
|
|
|
|
|
":::" "::=" "=:=" "===" "==>" "=!=" "=>>" "=<<" "=/=" "!=="
|
|
|
|
|
"!!." ">=>" ">>=" ">>>" ">>-" ">->" "->>" "-->" "---" "-<<"
|
|
|
|
|
"<~~" "<~>" "<*>" "<||" "<|>" "<$>" "<==" "<=>" "<=<" "<->"
|
|
|
|
|
"<--" "<-<" "<<=" "<<-" "<<<" "<+>" "</>" "###" "#_(" "..<"
|
|
|
|
|
"..." "+++" "/==" "///" "_|_" "www" "&&" "^=" "~~" "~@" "~="
|
|
|
|
|
"~>" "~-" "**" "*>" "*/" "||" "|}" "|]" "|=" "|>" "|-" "{|"
|
|
|
|
|
"[|" "]#" "::" ":=" ":>" ":<" "$>" "==" "=>" "!=" "!!" ">:"
|
|
|
|
|
">=" ">>" ">-" "-~" "-|" "->" "--" "-<" "<~" "<*" "<|" "<:"
|
|
|
|
|
"<$" "<=" "<>" "<-" "<<" "<+" "</" "#{" "#[" "#:" "#=" "#!"
|
|
|
|
|
"##" "#(" "#?" "#_" "%%" ".=" ".-" ".." ".?" "+>" "++" "?:"
|
|
|
|
|
"?=" "?." "??" ";;" "/*" "/=" "/>" "//" "__" "~~" "(*" "*)"
|
|
|
|
|
"\\\\" "://"))
|
|
|
|
|
;; Enables ligature checks globally in all buffers. You can also do it
|
|
|
|
|
;; per mode with `ligature-mode'.
|
|
|
|
|
(global-ligature-mode t))
|
2022-10-26 00:13:43 -04:00
|
|
|
|
#+END_SRC
|
2024-10-26 15:56:07 -04:00
|
|
|
|
|
2024-05-26 16:23:12 -04:00
|
|
|
|
** Catppuccin and theme notify watcher
|
2024-01-15 21:05:35 -05:00
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package catppuccin-theme
|
|
|
|
|
:ensure t)
|
2024-05-26 16:23:12 -04:00
|
|
|
|
(require 'filenotify)
|
2024-01-15 21:05:35 -05:00
|
|
|
|
|
2024-05-26 16:23:12 -04:00
|
|
|
|
(setq *theme-file* "~/theme")
|
|
|
|
|
(defun set-system-theme ()
|
|
|
|
|
(let ((theme
|
|
|
|
|
(with-temp-buffer
|
|
|
|
|
(insert-file-contents *theme-file*)
|
|
|
|
|
(buffer-string)))
|
|
|
|
|
(current-flavor catppuccin-flavor))
|
|
|
|
|
(setq catppuccin-flavor (if (string-prefix-p "dark" theme) 'mocha 'latte))
|
|
|
|
|
(if (not (eq catppuccin-flavor current-flavor))
|
|
|
|
|
(catppuccin-reload))))
|
2024-01-15 21:05:35 -05:00
|
|
|
|
|
2024-10-26 15:56:07 -04:00
|
|
|
|
(set-system-theme) (catppuccin-reload)
|
2024-05-26 16:23:12 -04:00
|
|
|
|
(file-notify-add-watch *theme-file* '(change)
|
|
|
|
|
#'(lambda (event) (set-system-theme)))
|
|
|
|
|
#+END_SRC
|
2024-10-26 15:56:07 -04:00
|
|
|
|
|
2022-10-26 00:13:43 -04:00
|
|
|
|
** Doom-modeline
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package doom-modeline
|
|
|
|
|
:ensure t
|
2023-09-28 23:27:34 -04:00
|
|
|
|
:config
|
|
|
|
|
(doom-modeline-mode 1))
|
2022-10-26 00:13:43 -04:00
|
|
|
|
#+END_SRC
|
2023-09-28 23:27:34 -04:00
|
|
|
|
** Icons
|
|
|
|
|
must run ~(all-the-icons-install-fonts)~ and ~(nerd-fonts-install-fonts)~
|
2022-10-26 00:13:43 -04:00
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package all-the-icons
|
|
|
|
|
:ensure t)
|
2023-09-28 23:27:34 -04:00
|
|
|
|
|
|
|
|
|
(use-package nerd-icons
|
|
|
|
|
:ensure t)
|
2022-10-26 00:13:43 -04:00
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
|
|
* Projectile
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package projectile
|
|
|
|
|
:bind ("C-c p" . 'projectile-command-map)
|
|
|
|
|
:init (projectile-mode +1) (setq projectile-enable-caching t)
|
|
|
|
|
:ensure t)
|
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
|
|
* Swiper, Ivy
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package counsel
|
|
|
|
|
:ensure t
|
|
|
|
|
:bind
|
|
|
|
|
("C-s" . 'swiper-isearch)
|
|
|
|
|
("M-x" . 'counsel-M-x)
|
|
|
|
|
:init
|
|
|
|
|
(setq ivy-use-virtual-buffers t)
|
|
|
|
|
(setq enable-recursive-minibuffers t)
|
|
|
|
|
(ivy-mode 1))
|
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
|
|
* Neotree
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package neotree
|
|
|
|
|
:ensure t
|
|
|
|
|
:bind ("C-c j" . 'neotree-toggle)
|
|
|
|
|
:init
|
|
|
|
|
;; slow rendering
|
|
|
|
|
(setq inhibit-compacting-font-caches t)
|
|
|
|
|
|
|
|
|
|
;; set icons theme
|
|
|
|
|
(setq neo-theme (if (display-graphic-p) 'icons 'arrow))
|
|
|
|
|
|
|
|
|
|
;; Every time when the neotree window is opened, let it find current file and jump to node
|
|
|
|
|
(setq neo-smart-open t)
|
|
|
|
|
|
|
|
|
|
;; When running ‘projectile-switch-project’ (C-c p p), ‘neotree’ will change root automatically
|
|
|
|
|
(setq projectile-switch-project-action 'neotree-projectile-action)
|
|
|
|
|
|
|
|
|
|
(setq neo-window-width 35)
|
|
|
|
|
|
|
|
|
|
;; show hidden files
|
|
|
|
|
(setq-default neo-show-hidden-files t))
|
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
|
|
* Org mode
|
|
|
|
|
** General
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
2023-09-22 11:41:26 -04:00
|
|
|
|
(setq org-startup-indented t
|
|
|
|
|
org-html-postamble nil
|
|
|
|
|
org-html-preamble t)
|
2022-10-26 00:13:43 -04:00
|
|
|
|
#+END_SRC
|
|
|
|
|
** Babel
|
2023-03-16 14:38:15 -04:00
|
|
|
|
*** Elixir
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package ob-elixir
|
|
|
|
|
:ensure t)
|
|
|
|
|
#+END_SRC
|
2023-10-23 11:43:13 -04:00
|
|
|
|
*** JS
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(require 'ob-js)
|
|
|
|
|
#+END_SRC
|
2023-03-16 14:38:15 -04:00
|
|
|
|
*** Load Languages
|
2022-10-26 00:13:43 -04:00
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(org-babel-do-load-languages
|
|
|
|
|
'org-babel-load-languages
|
|
|
|
|
'((lisp . t)
|
2023-02-22 13:40:00 -05:00
|
|
|
|
(elixir . t)
|
|
|
|
|
(emacs-lisp . t)
|
2023-10-23 11:43:13 -04:00
|
|
|
|
(js . t)
|
2022-10-26 00:13:43 -04:00
|
|
|
|
(python . t)))
|
|
|
|
|
#+END_SRC
|
|
|
|
|
** org-bullets
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package org-bullets
|
|
|
|
|
:ensure t
|
|
|
|
|
:init
|
|
|
|
|
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))))
|
|
|
|
|
#+END_SRC
|
|
|
|
|
** org-appear
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package org-appear
|
|
|
|
|
:ensure t
|
|
|
|
|
:init
|
|
|
|
|
(add-hook 'org-mode-hook 'org-appear-mode))
|
|
|
|
|
#+END_SRC
|
2022-11-25 13:21:06 -05:00
|
|
|
|
** Presentations
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package org-present
|
|
|
|
|
:ensure t
|
|
|
|
|
:straight '(org-present
|
|
|
|
|
:type git
|
|
|
|
|
:host github
|
|
|
|
|
:repo "rlister/org-present"))
|
|
|
|
|
#+END_SRC
|
2022-10-26 00:13:43 -04:00
|
|
|
|
|
|
|
|
|
* Development
|
|
|
|
|
** Git
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package magit :ensure t)
|
|
|
|
|
#+END_SRC
|
2024-03-01 13:54:18 -05:00
|
|
|
|
|
|
|
|
|
|
2022-11-25 13:46:38 -05:00
|
|
|
|
** Autocomplete
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package auto-complete :ensure t)
|
|
|
|
|
(ac-config-default)
|
|
|
|
|
#+END_SRC
|
2024-03-01 13:54:18 -05:00
|
|
|
|
*** Copilot
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package copilot
|
|
|
|
|
:straight (:host github :repo "copilot-emacs/copilot.el" :files ("dist" "*.el"))
|
2024-03-12 20:42:27 -04:00
|
|
|
|
:ensure t
|
|
|
|
|
:config
|
|
|
|
|
(setq copilot-indent-offset-warning-disable t))
|
2024-03-01 13:54:18 -05:00
|
|
|
|
(define-key copilot-completion-map (kbd "C-c c") 'copilot-accept-completion)
|
|
|
|
|
(define-key copilot-completion-map (kbd "C-c c") 'copilot-accept-completion)
|
2024-03-01 13:54:56 -05:00
|
|
|
|
(add-hook 'prog-mode-hook 'copilot-mode)
|
2024-03-01 13:54:18 -05:00
|
|
|
|
#+END_SRC
|
|
|
|
|
|
2022-10-26 00:13:43 -04:00
|
|
|
|
** Company mode
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package company
|
|
|
|
|
:ensure t
|
|
|
|
|
:init
|
|
|
|
|
(global-company-mode t)
|
|
|
|
|
:bind (:map company-active-map
|
|
|
|
|
("C-n" . company-select-next)
|
|
|
|
|
("C-p" . company-select-previous))
|
|
|
|
|
:config
|
|
|
|
|
(setq company-idle-delay 0.3))
|
|
|
|
|
#+END_SRC
|
|
|
|
|
** LSP Mode
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package lsp-mode
|
|
|
|
|
:ensure t
|
|
|
|
|
:init
|
|
|
|
|
(setq lsp-keymap-prefix "C-c l")
|
2024-02-01 15:39:39 -05:00
|
|
|
|
:hook ((python-ts-mode . lsp) ;; pip install python-lsp-server pyls-black pyls-isort pyls-mypy
|
2022-10-26 00:13:43 -04:00
|
|
|
|
(elixir-mode . lsp)
|
2024-10-26 15:56:07 -04:00
|
|
|
|
(rust-ts-mode . lsp)
|
|
|
|
|
(go-ts-mode . lsp)
|
2023-01-24 18:03:04 -05:00
|
|
|
|
(java-mode . lsp)
|
2023-02-16 15:56:23 -05:00
|
|
|
|
(php-mode . lsp)
|
2023-10-23 11:43:13 -04:00
|
|
|
|
(c-mode . lsp)
|
2024-10-26 15:56:07 -04:00
|
|
|
|
(typescript-ts-mode . lsp)
|
|
|
|
|
(tsx-ts-mode . lsp)
|
2022-10-26 00:13:43 -04:00
|
|
|
|
(lsp-mode . lsp-enable-which-key-integration))
|
2023-12-09 21:06:26 -05:00
|
|
|
|
:config (progn
|
|
|
|
|
(lsp-register-custom-settings
|
|
|
|
|
'(("pyls.plugins.pyls_mypy.enabled" t t)
|
|
|
|
|
("pyls.plugins.pyls_mypy.live_mode" nil t)
|
|
|
|
|
("pyls.plugins.pyls_black.enabled" t t)
|
|
|
|
|
("pyls.plugins.pyls_isort.enabled" t t))))
|
2022-10-26 00:13:43 -04:00
|
|
|
|
:commands lsp)
|
|
|
|
|
#+END_SRC
|
2023-12-29 14:57:55 -05:00
|
|
|
|
** Tree-Sitter
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package treesit-auto
|
|
|
|
|
:ensure t
|
|
|
|
|
:custom (treesit-auto-install 'prompt)
|
|
|
|
|
:config
|
|
|
|
|
(treesit-auto-add-to-auto-mode-alist 'all)
|
|
|
|
|
(global-treesit-auto-mode))
|
|
|
|
|
#+END_SRC
|
2022-10-26 00:13:43 -04:00
|
|
|
|
** Languages
|
|
|
|
|
*** Common Lisp
|
2022-12-02 20:53:53 -05:00
|
|
|
|
**** Rainbow Parentheses
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package rainbow-delimiters :ensure t)
|
|
|
|
|
(add-hook 'lisp-mode-hook #'rainbow-delimiters-mode)
|
|
|
|
|
#+END_SRC
|
2022-10-26 00:13:43 -04:00
|
|
|
|
**** Slime
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package slime
|
|
|
|
|
:ensure t
|
|
|
|
|
:init
|
|
|
|
|
(setq inferior-lisp-program "sbcl"))
|
|
|
|
|
#+END_SRC
|
2022-11-25 13:46:38 -05:00
|
|
|
|
**** AC-Slime
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package ac-slime
|
|
|
|
|
:ensure t
|
|
|
|
|
:straight '(ac-slime
|
|
|
|
|
:type git
|
|
|
|
|
:host github
|
|
|
|
|
:repo "purcell/ac-slime"))
|
|
|
|
|
(add-hook 'slime-mode-hook 'set-up-slime-ac)
|
|
|
|
|
(add-hook 'slime-repl-mode-hook 'set-up-slime-ac)
|
|
|
|
|
(eval-after-load "auto-complete"
|
|
|
|
|
'(add-to-list 'ac-modes 'slime-repl-mode))
|
2023-04-24 15:21:18 -04:00
|
|
|
|
#+END_SRC
|
|
|
|
|
**** cl-indentify
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
2023-09-22 11:41:26 -04:00
|
|
|
|
;; roswell is in the AUR
|
|
|
|
|
;; ros install cl-indentify
|
2023-04-24 15:21:18 -04:00
|
|
|
|
(defun on-lisp-save-cl-indentify ()
|
|
|
|
|
(when (eq major-mode 'lisp-mode)
|
|
|
|
|
(shell-command
|
|
|
|
|
(format "~/.roswell/bin/cl-indentify -r %s" (buffer-file-name)))))
|
|
|
|
|
(add-hook 'after-save-hook
|
|
|
|
|
#'on-lisp-save-cl-indentify)
|
2022-11-25 13:46:38 -05:00
|
|
|
|
#+END_SRC
|
2022-10-26 00:13:43 -04:00
|
|
|
|
*** Elixir
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
2023-01-03 12:40:08 -05:00
|
|
|
|
(use-package elixir-mode
|
|
|
|
|
:ensure t
|
2023-03-16 14:54:30 -04:00
|
|
|
|
:hook ((before-save .
|
|
|
|
|
(lambda ()
|
|
|
|
|
(when (eq major-mode 'elixir-mode)
|
|
|
|
|
(elixir-format))))))
|
2022-10-26 00:13:43 -04:00
|
|
|
|
#+END_SRC
|
|
|
|
|
*** Rust
|
2023-09-22 11:41:26 -04:00
|
|
|
|
After installing the ~rust-analyzer~, the following can be used:
|
2022-10-26 00:13:43 -04:00
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package rust-mode
|
|
|
|
|
:ensure t)
|
|
|
|
|
(setq lsp-rust-server 'rust-analyzer)
|
|
|
|
|
#+END_SRC
|
|
|
|
|
*** Web Stuff
|
2023-12-29 14:57:55 -05:00
|
|
|
|
**** astro
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package astro-ts-mode
|
|
|
|
|
:ensure t)
|
|
|
|
|
;; note - do treesit-install-language-grammar astro @ https://github.com/virchau13/tree-sitter-astro
|
|
|
|
|
#+END_SR
|
2022-10-26 00:13:43 -04:00
|
|
|
|
**** Web Mode
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(setq web-mode-markup-indent-offset 2)
|
|
|
|
|
(setq web-mode-code-indent-offset 2)
|
|
|
|
|
(setq web-mode-css-indent-offset 2)
|
|
|
|
|
(use-package web-mode
|
|
|
|
|
:ensure t
|
2023-03-16 14:51:59 -04:00
|
|
|
|
:mode (("\\.scss\\'" . web-mode)
|
2022-11-15 17:30:07 -05:00
|
|
|
|
("\\.css\\'" . web-mode)
|
2022-10-26 00:13:43 -04:00
|
|
|
|
("\\.jsx\\'" . web-mode)
|
|
|
|
|
("\\.tsx\\'" . web-mode)
|
|
|
|
|
("\\.html\\'" . web-mode))
|
|
|
|
|
:commands web-mode)
|
|
|
|
|
#+END_SRC
|
2022-11-15 17:47:11 -05:00
|
|
|
|
**** Prisma
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package prisma-mode
|
|
|
|
|
:ensure t
|
|
|
|
|
:straight '(prisma-mode
|
|
|
|
|
:type git
|
|
|
|
|
:host github
|
|
|
|
|
:repo "pimeys/emacs-prisma-mode"))
|
|
|
|
|
#+END_SRC
|
2023-01-17 22:57:50 -05:00
|
|
|
|
**** Svelte
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package svelte-mode
|
|
|
|
|
:ensure t
|
|
|
|
|
:straight '(svelte-mode
|
|
|
|
|
:type git
|
|
|
|
|
:host github
|
|
|
|
|
:repo "leafOfTree/svelte-mode"))
|
|
|
|
|
#+END_SRC
|
2023-12-29 14:57:55 -05:00
|
|
|
|
**** Prettier
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package prettier-js
|
|
|
|
|
:ensure t)
|
|
|
|
|
(add-hook 'astro-ts-mode-hook 'prettier-js-mode)
|
|
|
|
|
(add-hook 'js2-mode-hook 'prettier-js-mode)
|
|
|
|
|
(add-hook 'typescript-mode 'prettier-js-mode)
|
|
|
|
|
(add-hook 'web-mode-hook 'prettier-js-mode)
|
|
|
|
|
#+END_SRC
|
2022-11-07 17:47:39 -05:00
|
|
|
|
*** Kotlin
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package kotlin-mode
|
|
|
|
|
:ensure t)
|
|
|
|
|
#+END_SRC
|
2023-01-24 12:18:25 -05:00
|
|
|
|
*** Java
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package lsp-java
|
|
|
|
|
:config (add-hook 'java-mode-hook 'lsp)
|
|
|
|
|
:ensure t)
|
|
|
|
|
#+END_SRC
|
|
|
|
|
|
2023-02-16 15:56:23 -05:00
|
|
|
|
*** PHP
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package php-mode
|
|
|
|
|
:ensure t)
|
|
|
|
|
#+END_SRC
|
|
|
|
|
|
2023-01-24 18:03:04 -05:00
|
|
|
|
** Format All The Buffers
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package format-all
|
|
|
|
|
:ensure t)
|
|
|
|
|
(add-hook 'prog-mode-hook 'format-all-mode)
|
2023-12-29 14:57:55 -05:00
|
|
|
|
(add-hook 'astro-ts-mode-hook 'format-all-mode)
|
2023-01-24 18:03:04 -05:00
|
|
|
|
(add-hook 'format-all-mode-hook 'format-all-ensure-formatter)
|
|
|
|
|
#+END_SRC
|
|
|
|
|
|
2023-03-23 17:45:08 -04:00
|
|
|
|
* Multiple Cursors
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package multiple-cursors
|
|
|
|
|
:straight t
|
2023-09-22 11:41:26 -04:00
|
|
|
|
:ensure t
|
2023-03-23 17:45:08 -04:00
|
|
|
|
:bind (("H-SPC" . set-rectangular-region-anchor)
|
|
|
|
|
("C-M-SPC" . set-rectangular-region-anchor)
|
|
|
|
|
("C->" . mc/mark-next-like-this)
|
|
|
|
|
("C-<" . mc/mark-previous-like-this)
|
|
|
|
|
("C-c C->" . mc/mark-all-like-this)
|
2023-09-22 11:41:26 -04:00
|
|
|
|
("C-c C-SPC" . mc/edit-lines)))
|
2023-03-23 17:45:08 -04:00
|
|
|
|
#+END_SRC
|
2023-01-03 12:40:08 -05:00
|
|
|
|
* Elcord
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package elcord
|
2023-09-22 11:41:26 -04:00
|
|
|
|
:config
|
|
|
|
|
(setq elcord-idle-message "Idling..."
|
|
|
|
|
elcord-idle-timer 300
|
|
|
|
|
elcord-refresh-rate 3)
|
2023-01-03 12:40:08 -05:00
|
|
|
|
:ensure t)
|
|
|
|
|
(elcord-mode)
|
|
|
|
|
#+END_SRC
|
2024-05-22 00:40:41 -04:00
|
|
|
|
* Cookbook
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
|
(use-package org-chef
|
|
|
|
|
:config
|
|
|
|
|
(setq org-capture-templates
|
|
|
|
|
'(("c" "Cookbook" entry (file "~/org/cookbook.org")
|
|
|
|
|
"%(org-chef-get-recipe-from-url)"
|
|
|
|
|
:empty-lines 1)
|
|
|
|
|
("m" "Manual Cookbook" entry (file "~/org/cookbook.org")
|
|
|
|
|
"* %^{Recipe title: }\n :PROPERTIES:\n :source-url:\n :servings:\n :prep-time:\n :cook-time:\n :ready-in:\n :END:\n** Ingredients\n %?\n** Directions\n\n")))
|
|
|
|
|
:ensure t)
|
|
|
|
|
#+END_SRC
|