Clear up functions named with +custom

This commit is contained in:
Maciej 2024-07-27 11:37:43 +03:00
parent 1f20dd7bc1
commit dd5387cd7e
Signed by: maciej
GPG key ID: 41D62D42D3B0D765
23 changed files with 187 additions and 183 deletions

View file

@ -4,7 +4,7 @@
(require 'icejam-prog-mode)
(defun +custom-lang-clang/activate-clang-mode ()
(defun icejam-lang-clang/activate-clang-mode ()
"Goodies for editing c files."
;; Set column width to 100
@ -22,7 +22,7 @@
(add-to-list (make-local-variable 'company-backends)
'(company-etags company-yasnippet)))
(add-hook 'c-mode-hook '+custom-lang-clang/activate-clang-mode)
(add-hook 'c-mode-hook 'icejam-lang-clang/activate-clang-mode)
(provide 'icejam-lang-clang)
;;; icejam-lang-clang.el ends here

View file

@ -20,21 +20,21 @@
:straight t)
;; Transient
(transient-define-prefix +custom-lang-clojure/cider-context-menu ()
(transient-define-prefix icejam-lang-clojure/cider-context-menu ()
"Clojure Buffer Commands."
[""
["Cider"
("j" "Jack in" cider-jack-in)
("t" "Test" cider-test-run-loaded-tests)]
["Buffer"
("r" "Reload" revert-buffer-no-confirm)
("r" "Reload" icejam-revert-buffer-no-confirm)
("f" "Format" cider-format-buffer)
("l" "Load" cider-load-buffer)
("e" "Show Errors" flycheck-list-errors)]]
[""
("q" "Quit" keyboard-quit)])
(defun +custom-lang-clojure/activate-clojure-mode ()
(defun icejam-lang-clojure/activate-clojure-mode ()
"Goodies for clojure files."
(set-indent 2) ;; Default indentation of 2 characters
(column-enforce-n 80)
@ -43,20 +43,20 @@
(setq-local indent-tabs-mode nil)
(define-key
clojure-mode-map (kbd "C-c l") '+custom-lang-clojure/cider-context-menu)
clojure-mode-map (kbd "C-c l") 'icejam-lang-clojure/cider-context-menu)
;; Do not enable paredit for clojure
;; (paredit-mode 1)
;; Do not show separate error window when in REPL
(setq cider-show-error-buffer 'except-in-repl))
(add-hook 'clojure-mode-hook '+custom-lang-clojure/activate-clojure-mode)
(add-hook 'clojure-mode-hook 'icejam-lang-clojure/activate-clojure-mode)
(defun +custom-lang-clojure/clj-repl-config ()
(defun icejam-lang-clojure/clj-repl-config ()
"Do not show stacktrace when in REPL."
(setq-local cider-show-error-buffer 'except-in-repl))
(add-hook 'cider-repl-mode-hook '+custom-lang-clojure/clj-repl-config)
(add-hook 'cider-repl-mode-hook 'icejam-lang-clojure/clj-repl-config)
(add-hook 'cider-mode-hook #'cider-company-enable-fuzzy-completion)
(provide 'icejam-lang-clojure)

View file

@ -7,11 +7,11 @@
(use-package dart-mode :straight t :defer t)
(use-package lsp-dart :defer t :straight t :requires (dart-mode lsp))
(defun +custom-lang-dart/activate-dart-mode ()
(defun icejam-lang-dart/activate-dart-mode ()
"Reconfigure dart mode for your own purposes."
(lsp))
(add-hook 'dart-mode-hook '+custom-lang-dart/activate-dart-mode)
(add-hook 'dart-mode-hook 'icejam-lang-dart/activate-dart-mode)
(provide 'icejam-lang-dart)
;;; icejam-lang-dart.el ends here

View file

@ -3,14 +3,15 @@
;;; Code:
(require 'icejam-prog-mode)
(require 'icejam-lsp)
(use-package dhall-mode :straight t :defer t :requires (lsp))
(defun +custom-lang-dhall/activate-dhall-mode ()
(defun icejam-lang-dhall/activate-dhall-mode ()
"Reconfigure dhall mode for your own purposes."
(lsp))
(add-hook 'dhall-mode-hook '+custom-lang-dhall/activate-dhall-mode)
(add-hook 'dhall-mode-hook 'icejam-lang-dhall/activate-dhall-mode)
(add-hook 'dhall-mode-hook 'display-line-numbers-mode)
(provide 'icejam-lang-dhall)

View file

@ -4,12 +4,12 @@
(require 'icejam-prog-mode)
(transient-define-prefix +custom-lang-elisp/transient-context-menu ()
(transient-define-prefix icejam-lang-elisp/transient-context-menu ()
"Elisp Buffer Commands."
[""
["Buffer"
("r" "Reload" revert-buffer-no-confirm)
("i" "Indent" mark-and-indent-whole-buffer)
("r" "Reload" icejam-revert-buffer-no-confirm)
("i" "Indent" icejam-mark-and-indent-whole-buffer)
("e" "Show Errors" flycheck-list-errors)]]
[""
("q" "Quit" keyboard-quit)])
@ -21,7 +21,7 @@
(setq-default indent-tabs-mode nil)
(define-key emacs-lisp-mode-map
(kbd "C-c l") '+custom-lang-elisp/transient-context-menu)
(kbd "C-c l") 'icejam-lang-elisp/transient-context-menu)
;; Company list override
(add-to-list (make-local-variable 'company-backends)

View file

@ -13,20 +13,20 @@
(add-to-list 'auto-mode-alist '("\\.ex\\'" . elixir-ts-mode))
(add-to-list 'auto-mode-alist '("\\.heex\\'" . elixir-ts-mode))
(transient-define-prefix +custom-lang-elixir/transient-context-menu ()
(transient-define-prefix icejam-lang-elixir/transient-context-menu ()
"Elixir Buffer Commands."
[""
["LSP"
("m" "iMenu" lsp-ui-imenu)]
["Buffer"
("r" "Reload" revert-buffer-no-confirm)
("r" "Reload" icejam-revert-buffer-no-confirm)
("f" "Format" elixir-format)
("i" "Indent" mark-and-indent-whole-buffer)
("i" "Indent" icejam-mark-and-indent-whole-buffer)
("e" "Show Errors" flycheck-list-errors)]]
[""
("q" "Quit" keyboard-quit)])
(defun +custom-lang-elixir/activate-elixir-ts-mode ()
(defun icejam-lang-elixir/activate-elixir-ts-mode ()
"All things Elixir."
(set-indent 2)
(column-enforce-n 98)
@ -38,13 +38,13 @@
;; If needed, switch the one below to false to disable documentation pop-ups
;; (setq-local lsp-ui-doc-enable t)
(define-key elixir-ts-mode-map (kbd "C-c l") '+custom-lang-elixir/transient-context-menu)
(define-key elixir-ts-mode-map (kbd "C-c l") 'icejam-lang-elixir/transient-context-menu)
;; Company list override
(add-to-list (make-local-variable 'company-backends)
'(company-capf company-yasnippet)))
(add-hook 'elixir-ts-mode-hook '+custom-lang-elixir/activate-elixir-ts-mode)
(add-hook 'elixir-ts-mode-hook 'icejam-lang-elixir/activate-elixir-ts-mode)
(provide 'icejam-lang-elixir)
;;; icejam-lang-elixir.el ends here

View file

@ -19,13 +19,13 @@
:repo "gleam-lang/gleam-mode"
:files ("gleam-mode.el" "tree-sitter-gleam")))
(defun +custom-lang-gleam/activate-gleam-mode ()
(defun icejam-lang-gleam/activate-gleam-mode ()
"All things Gleam."
(set-indent 2)
(column-enforce-n 100)
(lsp))
(add-hook 'gleam-mode-hook '+custom-lang-gleam/activate-gleam-mode)
(add-hook 'gleam-mode-hook 'icejam-lang-gleam/activate-gleam-mode)
(provide 'icejam-lang-gleam)
;;; icejam-lang-gleam.el ends here

View file

@ -9,7 +9,7 @@
:defer t
:init (setq-default markdown-command "pandoc"))
(defun +custom-lang-markdown/activate-markdown-mode ()
(defun icejam-lang-markdown/activate-markdown-mode ()
"Reconfigure markdown mode for your own purposes."
(set-indent 2)
(column-enforce-n 10000)
@ -21,7 +21,7 @@
(define-key markdown-mode-map (kbd "C-c <down>") nil)
(define-key markdown-mode-map (kbd "C-c C-v") 'markdown-preview))
(add-hook 'markdown-mode-hook '+custom-lang-markdown/activate-markdown-mode)
(add-hook 'markdown-mode-hook 'icejam-lang-markdown/activate-markdown-mode)
(add-hook 'markdown-mode-hook 'display-line-numbers-mode)
(provide 'icejam-lang-markdown)

View file

@ -23,12 +23,12 @@
:defer t
:straight t)
(transient-define-prefix +custom-lang-ocaml/context-menu ()
(transient-define-prefix icejam-lang-ocaml/context-menu ()
"Ocaml Actions."
["OCaml actions"
[""
("r" "Reload" revert-buffer-no-confirm)
("i" "Indent" mark-and-indent-whole-buffer)]
("r" "Reload" icejam-revert-buffer-no-confirm)
("i" "Indent" icejam-mark-and-indent-whole-buffer)]
[""
("f" "Format" ocamlformat)
("e" "Opam Env" tuareg-opam-update-env)]]
@ -48,7 +48,7 @@
;; Use opam switch to lookup ocamlmerlin binary
(setq merlin-command 'opam)))
(define-key tuareg-mode-map (kbd "C-c l") '+custom-lang-ocaml/context-menu))
(define-key tuareg-mode-map (kbd "C-c l") 'icejam-lang-ocaml/context-menu))
;; OCaml setup
(add-hook 'tuareg-mode-hook 'merlin-mode)
@ -66,12 +66,12 @@
;; Use tuareg-opam with lock files
(add-to-list 'auto-mode-alist '("\\.opam.locked\\'" . tuareg-opam-mode))
(transient-define-prefix +custom-lang-ocaml/reasonml-context-menu ()
(transient-define-prefix icejam-lang-ocaml/reasonml-context-menu ()
"ReasonML Actions"
["ReasonML actions"
[""
("r" "Reload" revert-buffer-no-confirm)
("i" "Indent" mark-and-indent-whole-buffer)]
("r" "Reload" icejam-revert-buffer-no-confirm)
("i" "Indent" icejam-mark-and-indent-whole-buffer)]
[""
("f" "Format" refmt)
("e" "Opam Env" tuareg-opam-update-env)]]
@ -79,16 +79,16 @@
("q" "Quit" keyboard-quit)])
(defun custom-lang-ocaml/activate-reason-mode ()
(defun icejam-lang-ocaml/activate-reason-mode ()
"Generate reason config."
(define-key
reason-mode-map (kbd "C-c l") '+custom-lang-ocaml/reasonml-context-menu))
reason-mode-map (kbd "C-c l") 'icejam-lang-ocaml/reasonml-context-menu))
;; Reason setup
(add-hook 'reason-mode-hook
(lambda ()
(add-hook 'before-save-hook #'refmt-before-save)))
(add-hook 'reason-mode-hook 'custom-lang-ocaml/activate-reason-mode)
(add-hook 'reason-mode-hook 'icejam-lang-ocaml/activate-reason-mode)
(add-hook 'reason-mode-hook 'merlin-mode)
(provide 'icejam-lang-ocaml)

View file

@ -24,11 +24,11 @@
;; Yaml
(use-package yaml-mode :straight t :defer t :requires (lsp))
(defun +custom-lang-yaml/activate-yaml-mode ()
(defun icejam-lang-yaml/activate-yaml-mode ()
"Activate yaml-mode."
(lsp))
(add-hook 'yaml-mode-hook '+custom-lang-yaml/activate-yaml-mode)
(add-hook 'yaml-mode-hook 'icejam-lang-yaml/activate-yaml-mode)
;; Other text files
(use-package json-mode :straight t :defer t)

View file

@ -18,32 +18,32 @@
:requires (lsp-mode lsp-ui)
:straight t)
(transient-define-prefix +custom-lang-php/context-menu ()
(transient-define-prefix icejam-lang-php/context-menu ()
"PHP Buffer Commands."
[""
["LSP"
("m" "iMenu" lsp-ui-imenu)]
["Buffer"
("r" "Reload" revert-buffer-no-confirm)
("r" "Reload" icejam-revert-buffer-no-confirm)
("f" "Format" lsp-format-buffer)
("i" "Indent" mark-and-indent-whole-buffer)
("i" "Indent" icejam-mark-and-indent-whole-buffer)
("e" "Show Errors" flycheck-list-errors)]]
[""
("q" "Quit" keyboard-quit)])
(defun +custom-lang-php/activate-php-mode ()
(defun icejam-lang-php/activate-php-mode ()
"All things php."
(set-indent 4)
(column-enforce-n 80)
(define-key php-mode-map (kbd "C-c l") '+custom-lang-php/context-menu)
(define-key php-mode-map (kbd "C-c l") 'icejam-lang-php/context-menu)
;; Company list override
(add-to-list (make-local-variable 'company-backends)
'(company-capf company-yasnippet)))
(add-hook 'php-mode-hook '+custom-lang-php/activate-php-mode)
(add-hook 'php-mode-hook 'icejam-lang-php/activate-php-mode)
(provide 'icejam-lang-php)
;;; icejam-lang-php.el ends here

View file

@ -5,32 +5,32 @@
(require 'icejam-prog-mode)
(require 'icejam-transient)
(transient-define-prefix +custom-lang-python/transient-context-menu ()
(transient-define-prefix icejam-lang-python/transient-context-menu ()
"Python Buffer Commands."
[""
["LSP"
("m" "iMenu" lsp-ui-imenu)]
["Buffer"
("r" "Reload" revert-buffer-no-confirm)
("r" "Reload" icejam-revert-buffer-no-confirm)
("f" "Format" lsp-format-buffer)
("i" "Indent" mark-and-indent-whole-buffer)
("i" "Indent" icejam-mark-and-indent-whole-buffer)
("e" "Show Errors" flycheck-list-errors)]]
[""
("q" "Quit" keyboard-quit)])
(defun +custom-lang-python/activate-python-mode ()
(defun icejam-lang-python/activate-python-mode ()
(lsp)
(column-enforce-n 99)
(define-key python-mode-map (kbd "C-c l") '+custom-lang-python/transient-context-menu)
(define-key python-mode-map (kbd "C-c l") 'icejam-lang-python/transient-context-menu)
;; Company list override
(add-to-list (make-local-variable 'company-backends)
'(company-capf company-yasnippet)))
(add-hook 'python-mode-hook '+custom-lang-python/activate-python-mode)
(add-hook 'python-mode-hook 'icejam-lang-python/activate-python-mode)
(provide 'icejam-lang-python)
;;; icejam-lang-python.el ends here