From 59f4251ed8b7df5d4cd844fb2d626004a0c595c0 Mon Sep 17 00:00:00 2001 From: Mars Date: Sun, 13 Oct 2024 19:52:09 -0400 Subject: [PATCH] suckle --- config.org | 155 +++++++++++++++++++++++++++-------------------------- 1 file changed, 80 insertions(+), 75 deletions(-) diff --git a/config.org b/config.org index b77cb64..7518eee 100644 --- a/config.org +++ b/config.org @@ -262,88 +262,93 @@ *** Eglot #+begin_src emacs-lisp - (use-package markdown-mode - :ensure t - :mode ("README\\.md\\'" . gfm-mode) - :init (setq markdown-command "multimarkdown") - :bind (:map markdown-mode-map - ("C-c C-e" . markdown-do))) + (use-package markdown-mode + :ensure t + :mode ("README\\.md\\'" . gfm-mode) + :init (setq markdown-command "multimarkdown") + :bind (:map markdown-mode-map + ("C-c C-e" . markdown-do))) - (use-package eglot-booster - :after eglot - :ensure (eglot-booster :type git :host github :repo "jdtsmith/eglot-booster") - :config (eglot-booster-mode)) + (use-package eglot-booster + :after eglot + :ensure (eglot-booster :type git :host github :repo "jdtsmith/eglot-booster") + :config (eglot-booster-mode)) - (use-package eglot - :ensure nil - :config - (defun my-eglot-rename (newname) - "Rename the current symbol to NEWNAME with initial input a." - (interactive - (list (read-from-minibuffer - (format "Rename `%s' to: " (or (thing-at-point 'symbol t) - (error "no symbol at point"))) - (or (thing-at-point 'symbol t) "") nil nil nil - (symbol-name (symbol-at-point))))) - (eglot--server-capable-or-lose :renameProvider) - (eglot--apply-workspace-edit - (jsonrpc-request (eglot--current-server-or-lose) - :textDocument/rename `(,@(eglot--TextDocumentPositionParams) - :newName ,newname)) - current-prefix-arg)) - (fset #'jsonrpc--log-event #'ignore) - (setopt eglot-events-buffer-size 0) - (defun eglot-format-buffer-on-save () - (when (not (derived-mode-p 'python-ts-mode)) - (add-hook 'before-save-hook #'eglot-format-buffer -10 t))) - (add-hook 'eglot-managed-mode-hook #'eglot-format-buffer-on-save) - (add-to-list 'eglot-server-programs - '(nix-mode . ("nixd")) - `(c++-mode . ("clangd" "--clang-tidy" "--completion-style=detailed" "--header-insertion=never"))) - :hook - (rust-mode . eglot-ensure) - (rust-ts-mode . eglot-ensure) - (sh-script-mode . eglot-ensure) - (python-mode . eglot-ensure) - (python-ts-mode . eglot-ensure) - (json-mode . eglot-ensure) - (json-ts-mode . eglot-ensure) - (nix-mode . eglot-ensure) - (yaml-mode . eglot-ensure) - (yaml-ts-mode . eglot-ensure) - (c-mode . eglot-ensure) - (c-ts-mode . eglot-ensure) - (c++-mode . eglot-ensure) - (c++-ts-mode . eglot-ensure) - (c3-ts-mode . eglot-ensure) - (rust-mode . eglot-ensure) - (go-mode . eglot-ensure) - (go-ts-mode . eglot-ensure)) + (use-package eglot + :ensure nil + :config + (defun my-eglot-rename (newname) + "Rename the current symbol to NEWNAME with initial input a." + (interactive + (list (read-from-minibuffer + (format "Rename `%s' to: " (or (thing-at-point 'symbol t) + (error "no symbol at point"))) + (or (thing-at-point 'symbol t) "") nil nil nil + (symbol-name (symbol-at-point))))) + (eglot--server-capable-or-lose :renameProvider) + (eglot--apply-workspace-edit + (jsonrpc-request (eglot--current-server-or-lose) + :textDocument/rename `(,@(eglot--TextDocumentPositionParams) + :newName ,newname)) + current-prefix-arg)) + (fset #'jsonrpc--log-event #'ignore) + (setopt eglot-events-buffer-size 0) + (defun eglot-format-buffer-on-save () + (when (not (derived-mode-p 'python-ts-mode)) + (add-hook 'before-save-hook #'eglot-format-buffer -10 t))) + (add-hook 'eglot-managed-mode-hook #'eglot-format-buffer-on-save) + (add-to-list 'eglot-server-programs + '(nix-mode . ("nixd")) + `(c++-mode . ("clangd" "--clang-tidy" "--completion-style=detailed" "--header-insertion=never"))) + :hook + (rust-mode . eglot-ensure) + (rust-ts-mode . eglot-ensure) + (sh-script-mode . eglot-ensure) + (python-mode . eglot-ensure) + (python-ts-mode . eglot-ensure) + (json-mode . eglot-ensure) + (json-ts-mode . eglot-ensure) + (nix-mode . eglot-ensure) + (yaml-mode . eglot-ensure) + (yaml-ts-mode . eglot-ensure) + (c-mode . eglot-ensure) + (c-ts-mode . eglot-ensure) + (c++-mode . eglot-ensure) + (c++-ts-mode . eglot-ensure) + (c3-ts-mode . eglot-ensure) + (rust-mode . eglot-ensure) + (go-mode . eglot-ensure) + (go-ts-mode . eglot-ensure)) - (use-package rust-mode - :ensure t) + (add-hook 'c-mode-hook 'hide-ifdef-mode) + (add-hook 'c++-mode-hook 'hide-ifdef-mode) + (setq hide-ifdef-initially t) + (setq hide-ifdef-shadow 'font-lock-comment-face) - (use-package tuareg - :ensure t - :mode ("\\.ml\\'" . tuareg-mode) - :hook (tuareg-mode . eglot-ensure)) + (use-package rust-mode + :ensure t) - (use-package merlin - :ensure t - :hook (tuareg-mode . merlin-mode)) + (use-package tuareg + :ensure t + :mode ("\\.ml\\'" . tuareg-mode) + :hook (tuareg-mode . eglot-ensure)) - (use-package glsl-mode - :ensure t - :mode ("\\.vert\\'" "\\.frag\\'" "\\.geom\\'")) + (use-package merlin + :ensure t + :hook (tuareg-mode . merlin-mode)) - (use-package eldoc-box - :custom - (eldoc-box-max-pixel-width 1024) - :custom-face - (eldoc-box-body ((t (:family "Iosevka Comfy Motion" :background "#181825" :foreground "#cdd6f4")))) - :config - (setq eldoc-message-function #'ignore - eldoc-idle-delay 0)) + (use-package glsl-mode + :ensure t + :mode ("\\.vert\\'" "\\.frag\\'" "\\.geom\\'")) + + (use-package eldoc-box + :custom + (eldoc-box-max-pixel-width 1024) + :custom-face + (eldoc-box-body ((t (:family "Iosevka Comfy Motion" :background "#181825" :foreground "#cdd6f4")))) + :config + (setq eldoc-message-function #'ignore + eldoc-idle-delay 0)) #+end_src *** Apheleia