Rename functions
This commit is contained in:
parent
9508dfa70d
commit
c95181ebe5
10 changed files with 91 additions and 87 deletions
|
|
@ -6,7 +6,7 @@
|
|||
(require '+custom-pkg-ctags "$HOME/.emacs.d/pkg/ctags.el")
|
||||
(require '+custom-pkg-prog-mode "$HOME/.emacs.d/pkg/prog-mode.el")
|
||||
|
||||
(defun activate-clang-mode ()
|
||||
(defun +custom-lang-clang/activate-clang-mode ()
|
||||
"Goodies for editing c files."
|
||||
|
||||
;; Set column width to 100
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
"ctags -e -R --languages=C -f %sTAGS %s/*"
|
||||
(projectile-project-root) (projectile-project-root))))
|
||||
|
||||
(add-hook 'c-mode-hook 'activate-clang-mode)
|
||||
(add-hook 'c-mode-hook '+custom-lang-clang/activate-clang-mode)
|
||||
|
||||
(provide '+custom-lang-clang)
|
||||
;;; clang.el ends here
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
:straight t)
|
||||
|
||||
;; Transient
|
||||
(transient-define-prefix +my-transient-cider-context-menu ()
|
||||
(transient-define-prefix +custom-lang-clojure/cider-context-menu ()
|
||||
"Clojure Buffer Commands"
|
||||
[""
|
||||
["Cider"
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
[""
|
||||
("q" "Quit" keyboard-quit)])
|
||||
|
||||
(defun activate-my-clojure-mode ()
|
||||
(defun +custom-lang-clojure/activate-clojure-mode ()
|
||||
"Goodies for clojure files."
|
||||
(set-indent 2) ;; Default indentation of 2 characters
|
||||
(column-enforce-n 80)
|
||||
|
|
@ -42,20 +42,21 @@
|
|||
(cider-mode 1)
|
||||
(setq-local indent-tabs-mode nil)
|
||||
|
||||
(define-key clojure-mode-map (kbd "C-c l") '+my-transient-cider-context-menu)
|
||||
(define-key
|
||||
clojure-mode-map (kbd "C-c l") '+custom-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 'activate-my-clojure-mode)
|
||||
(add-hook 'clojure-mode-hook '+custom-lang-clojure/activate-clojure-mode)
|
||||
|
||||
(defun my-clj-repl-config ()
|
||||
(defun +custom-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 'my-clj-repl-config)
|
||||
(add-hook 'cider-repl-mode-hook '+custom-lang-clojure/clj-repl-config)
|
||||
(add-hook 'cider-mode-hook #'cider-company-enable-fuzzy-completion)
|
||||
|
||||
(provide '+custom-lang-clojure)
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
(add-to-list 'auto-mode-alist '("\\.heex\\'" . elixir-mode))
|
||||
|
||||
(transient-define-prefix +my-transient-elixir-context-menu ()
|
||||
(transient-define-prefix +custom-lang-elixir/transient-context-menu ()
|
||||
"Elixir Buffer Commands"
|
||||
[""
|
||||
["LSP"
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
[""
|
||||
("q" "Quit" keyboard-quit)])
|
||||
|
||||
(defun activate-elixir-mode ()
|
||||
(defun +custom-lang-elixir/activate-elixir-mode ()
|
||||
"All things Elixir."
|
||||
(set-indent 2)
|
||||
(column-enforce-n 98)
|
||||
|
|
@ -36,13 +36,13 @@
|
|||
;; If needed, switch the one below to false to disable documentation pop-ups
|
||||
;; (setq-local lsp-ui-doc-enable t)
|
||||
|
||||
(define-key elixir-mode-map (kbd "C-c l") '+my-transient-elixir-context-menu)
|
||||
(define-key elixir-mode-map (kbd "C-c l") '+custom-lang-elixir/transient-context-menu)
|
||||
|
||||
;; Company list override
|
||||
(add-to-list (make-local-variable 'company-backends)
|
||||
'(company-capf company-yasnippet)))
|
||||
|
||||
(add-hook 'elixir-mode-hook 'activate-elixir-mode)
|
||||
(add-hook 'elixir-mode-hook '+custom-lang-elixir/activate-elixir-mode)
|
||||
|
||||
(provide '+custom-lang-elixir)
|
||||
;;; elixir.el ends here
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
:defer t
|
||||
:init (setq-default markdown-command "pandoc"))
|
||||
|
||||
(defun activate-markdown-mode ()
|
||||
(defun +custom-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 'activate-markdown-mode)
|
||||
(add-hook 'markdown-mode-hook '+custom-lang-markdown/activate-markdown-mode)
|
||||
(add-hook 'markdown-mode-hook 'display-line-numbers-mode)
|
||||
|
||||
(provide '+custom-lang-markdown)
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
:defer t
|
||||
:straight t)
|
||||
|
||||
(transient-define-prefix +my-transient-ocaml-context-menu ()
|
||||
(transient-define-prefix +custom-lang-ocaml/context-menu ()
|
||||
"Ocaml Actions"
|
||||
["OCaml actions"
|
||||
[""
|
||||
|
|
@ -48,7 +48,7 @@
|
|||
|
||||
;; Use opam switch to lookup ocamlmerlin binary
|
||||
(setq merlin-command 'opam)))
|
||||
(define-key tuareg-mode-map (kbd "C-c l") '+my-transient-ocaml-context-menu))
|
||||
(define-key tuareg-mode-map (kbd "C-c l") '+custom-lang-ocaml/context-menu))
|
||||
|
||||
;; OCaml setup
|
||||
(add-hook 'tuareg-mode-hook 'merlin-mode)
|
||||
|
|
@ -66,7 +66,7 @@
|
|||
;; Use tuareg-opam with lock files
|
||||
(add-to-list 'auto-mode-alist '("\\.opam.locked\\'" . tuareg-opam-mode))
|
||||
|
||||
(transient-define-prefix +my-transient-reasonml-context-menu ()
|
||||
(transient-define-prefix +custom-lang-ocaml/reasonml-context-menu ()
|
||||
"ReasonML Actions"
|
||||
["ReasonML actions"
|
||||
[""
|
||||
|
|
@ -79,16 +79,16 @@
|
|||
("q" "Quit" keyboard-quit)])
|
||||
|
||||
|
||||
(defun my-reason-mode ()
|
||||
(defun custom-lang-ocaml/activate-reason-mode ()
|
||||
"Generate reason config."
|
||||
(define-key
|
||||
reason-mode-map (kbd "C-c l") '+my-transient-reasonml-context-menu))
|
||||
reason-mode-map (kbd "C-c l") '+custom-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 'my-reason-mode)
|
||||
(add-hook 'reason-mode-hook 'custom-lang-ocaml/activate-reason-mode)
|
||||
(add-hook 'reason-mode-hook 'merlin-mode)
|
||||
|
||||
(provide '+custom-lang-ocaml)
|
||||
|
|
|
|||
10
lang/php.el
10
lang/php.el
|
|
@ -18,32 +18,32 @@
|
|||
:requires (lsp-mode lsp-ui)
|
||||
:straight t)
|
||||
|
||||
(transient-define-prefix +my-transient-php-context-menu ()
|
||||
(transient-define-prefix +custom-lang-php/context-menu ()
|
||||
"PHP Buffer Commands"
|
||||
[""
|
||||
["LSP"
|
||||
("m" "iMenu" lsp-ui-imenu)]
|
||||
["Buffer"
|
||||
("r" "Reload" revert-buffer-no-confirm)
|
||||
("f" "Format" elixir-format)
|
||||
("f" "Format" lsp-format-buffer)
|
||||
("i" "Indent" mark-and-indent-whole-buffer)
|
||||
("e" "Show Errors" flycheck-list-errors)]]
|
||||
[""
|
||||
("q" "Quit" keyboard-quit)])
|
||||
|
||||
|
||||
(defun activate-php-mode ()
|
||||
(defun +custom-lang-php/activate-php-mode ()
|
||||
"All things php."
|
||||
(set-indent 4)
|
||||
(column-enforce-n 80)
|
||||
|
||||
(define-key php-mode-map (kbd "C-c l") '+my-transient-php-context-menu)
|
||||
(define-key php-mode-map (kbd "C-c l") '+custom-lang-php/context-menu)
|
||||
|
||||
;; Company list override
|
||||
(add-to-list (make-local-variable 'company-backends)
|
||||
'(company-capf company-yasnippet)))
|
||||
|
||||
(add-hook 'php-mode-hook 'activate-php-mode)
|
||||
(add-hook 'php-mode-hook '+custom-lang-php/activate-php-mode)
|
||||
|
||||
(provide '+custom-lang-php)
|
||||
;;; php.el ends here
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue