Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[craftedv2beta] Replace / in function names with - #357

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions modules/crafted-completion-config.el
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

;;; Code:

(defun crafted-completion/minibuffer-backward-kill (arg)
(defun crafted-completion-minibuffer-backward-kill (arg)
"Delete word or delete up to parent folder when completion is a file.

ARG is the thing being completed in the minibuffer."
Expand Down Expand Up @@ -131,13 +131,13 @@ ARG is the thing being completed in the minibuffer."
(advice-add 'pcomplete-completions-at-point :around #'cape-wrap-purify)

;; No auto-completion or completion-on-quit in eshell
(defun crafted-completion/corfu-eshell ()
(defun crafted-completion-corfu-eshell ()
"Special settings for when using corfu with eshell."
(setq-local corfu-quit-at-boundary t
corfu-quit-no-match t
corfu-auto nil)
(corfu-mode))
(add-hook 'eshell-mode-hook #'crafted-completion/corfu-eshell))
(add-hook 'eshell-mode-hook #'crafted-completion-corfu-eshell))

(provide 'crafted-completion-config)
;;; crafted-completion.el ends here
18 changes: 9 additions & 9 deletions modules/crafted-evil-config.el
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,18 @@ Take some of the default keybindings for evil mode."

Rebinds the arrow keys to display a message instead."

(defun crafted-evil/discourage-arrow-keys ()
(defun crafted-evil-discourage-arrow-keys ()
(message "Use HJKL keys instead!"))

;; Disable arrow keys in normal and visual modes
(keymap-set evil-normal-state-map "<left>" 'crafted-evil/discourage-arrow-keys)
(keymap-set evil-normal-state-map "<right>" 'crafted-evil/discourage-arrow-keys)
(keymap-set evil-normal-state-map "<down>" 'crafted-evil/discourage-arrow-keys)
(keymap-set evil-normal-state-map "<up>" 'crafted-evil/discourage-arrow-keys)
(evil-global-set-key 'motion (kbd "<left>") 'crafted-evil/discourage-arrow-keys)
(evil-global-set-key 'motion (kbd "<right>") 'crafted-evil/discourage-arrow-keys)
(evil-global-set-key 'motion (kbd "<down>") 'crafted-evil/discourage-arrow-keys)
(evil-global-set-key 'motion (kbd "<up>") 'crafted-evil/discourage-arrow-keys))
(keymap-set evil-normal-state-map "<left>" 'crafted-evil-discourage-arrow-keys)
(keymap-set evil-normal-state-map "<right>" 'crafted-evil-discourage-arrow-keys)
(keymap-set evil-normal-state-map "<down>" 'crafted-evil-discourage-arrow-keys)
(keymap-set evil-normal-state-map "<up>" 'crafted-evil-discourage-arrow-keys)
(evil-global-set-key 'motion (kbd "<left>") 'crafted-evil-discourage-arrow-keys)
(evil-global-set-key 'motion (kbd "<right>") 'crafted-evil-discourage-arrow-keys)
(evil-global-set-key 'motion (kbd "<down>") 'crafted-evil-discourage-arrow-keys)
(evil-global-set-key 'motion (kbd "<up>") 'crafted-evil-discourage-arrow-keys))

;; Make sure some modes start in Emacs state
;; TODO: Split this out to other configuration modules?
Expand Down
4 changes: 2 additions & 2 deletions modules/crafted-ide-config.el
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ Example: `(crafted-tree-sitter-load 'python)'"

;; enhance ibuffer with ibuffer-project if it is available.
(when (require 'ibuffer-project nil :noerror)
(defun crafted-ide/enhance-ibuffer-with-ibuffer-project ()
(defun crafted-ide-enhance-ibuffer-with-ibuffer-project ()
"Set up integration for `ibuffer' with `ibuffer-project'."
(setq ibuffer-filter-groups (ibuffer-project-generate-filter-groups))
(unless (eq ibuffer-sorting-mode 'project-file-relative)
(ibuffer-do-sort-by-project-file-relative)))
(add-hook 'ibuffer-hook #'crafted-ide/enhance-ibuffer-with-ibuffer-project))
(add-hook 'ibuffer-hook #'crafted-ide-enhance-ibuffer-with-ibuffer-project))

(provide 'crafted-ide-config)
;;; crafted-ide-config.el ends here
4 changes: 2 additions & 2 deletions modules/crafted-lisp-config.el
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@
(require 'cider "cider" :no-error)
(require 'clj-refactor "clj-refactor" :no-error)

(defun crafted-lisp/load-clojure-refactor ()
(defun crafted-lisp-load-clojure-refactor ()
"Load `clj-refactor' toooling and fix keybinding conflicts with cider."
(when (locate-library "clj-refactor")
(clj-refactor-mode 1)
;; keybindings mentioned on clj-refactor github page
;; conflict with cider, use this by default as it does
;; not conflict and is a better mnemonic
(cljr-add-keybindings-with-prefix "C-c r")))
(add-hook 'clojure-mode-hook #'crafted-lisp/load-clojure-refactor)
(add-hook 'clojure-mode-hook #'crafted-lisp-load-clojure-refactor)

(with-eval-after-load "flycheck"
(flycheck-clojure-setup)))
Expand Down
6 changes: 3 additions & 3 deletions modules/crafted-org-config.el
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
(add-hook 'org-mode-hook 'org-appear-mode))

;; Disable auto-pairing of "<" in org-mode with electric-pair-mode
(defun crafted-org/enhance-electric-pair-inhibit-predicate ()
(defun crafted-org-enhance-electric-pair-inhibit-predicate ()
"Disable auto-pairing of \"<\" in `org-mode' when using `electric-pair-mode'."
(when (and electric-pair-mode (eql major-mode #'org-mode))
(setq-local electric-pair-inhibit-predicate
Expand All @@ -39,8 +39,8 @@
;; Add hook to both electric-pair-mode-hook and org-mode-hook
;; This ensures org-mode buffers don't behave weirdly,
;; no matter when electric-pair-mode is activated.
(add-hook 'electric-pair-mode-hook #'crafted-org/enhance-electric-pair-inhibit-predicate)
(add-hook 'org-mode-hook #'crafted-org/enhance-electric-pair-inhibit-predicate)
(add-hook 'electric-pair-mode-hook #'crafted-org-enhance-electric-pair-inhibit-predicate)
(add-hook 'org-mode-hook #'crafted-org-enhance-electric-pair-inhibit-predicate)

(provide 'crafted-org-config)
;;; crafted-org-config.el ends here
14 changes: 7 additions & 7 deletions modules/crafted-writing-config.el
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,11 @@ Depends on having `pdf-tools'."
(customize-set-variable 'TeX-source-correlate-start-server t)))

;; message the user if the latex executable is not found
(defun crafted-writing/tex-warning-if-no-latex-executable ()
(defun crafted-writing-tex-warning-if-no-latex-executable ()
"Print a message to the minibuffer if the \"latex\" executable cannot be found."
(unless (executable-find "latex")
(message "latex executable not found")))
(add-hook 'tex-mode-hook #'crafted-writing/tex-warning-if-no-latex-executable)
(add-hook 'tex-mode-hook #'crafted-writing-tex-warning-if-no-latex-executable)

(when (and (executable-find "latex")
(executable-find "latexmk"))
Expand All @@ -153,10 +153,10 @@ Depends on having `pdf-tools'."
(auctex-latexmk-setup)
(customize-set-variable 'auctex-latexmk-inherit-TeX-PDF-mode t))

(defun crafted-writing/tex-make-latexmk-default-command ()
(defun crafted-writing-tex-make-latexmk-default-command ()
"Set `TeX-command-default' to \"LatexMk\"."
(setq TeX-command-default "LatexMk"))
(add-hook 'TeX-mode-hook #'crafted-writing/tex-make-latexmk-default-command))))
(add-hook 'TeX-mode-hook #'crafted-writing-tex-make-latexmk-default-command))))


;;; Markdown
Expand All @@ -180,11 +180,11 @@ Depends on having `pdf-tools'."

;;; PDF Support when using pdf-tools
(when (locate-library "pdf-tools")
;; load pdf-tools when going into doc-view-mode
(defun crafted-writing/load-pdf-tools ()
;; load pdf-tools when going into doc-view-mode
(defun crafted-writing-load-pdf-tools ()
"Attempts to require pdf-tools, but for attaching to hooks."
(require 'pdf-tools nil :noerror))
(add-hook 'doc-view-mode-hook #'crafted-writing/load-pdf-tools)
(add-hook 'doc-view-mode-hook #'crafted-writing-load-pdf-tools)

;; when pdf-tools is loaded, apply settings.
(with-eval-after-load 'pdf-tools
Expand Down