Replace icejam/ with icejam- and icejam-lang/ with icejam- namespacing
All checks were successful
/ Test config on 20 (push) Successful in 27s
All checks were successful
/ Test config on 20 (push) Successful in 27s
This commit is contained in:
parent
70418a27c3
commit
42e9ee7862
31 changed files with 144 additions and 140 deletions
|
|
@ -82,7 +82,7 @@
|
|||
(define-key company-active-map (kbd "C-p") 'company-select-previous-or-abort)
|
||||
(define-key company-active-map (kbd "C-n") 'company-select-next-or-abort)
|
||||
|
||||
(defun icejam/insert-space-and-complete ()
|
||||
(defun icejam-insert-space-and-complete ()
|
||||
"Insert space before trying to complete a section."
|
||||
(interactive)
|
||||
(save-excursion
|
||||
|
|
@ -94,11 +94,11 @@
|
|||
|
||||
;;; Yasnippet configuration
|
||||
(define-key prog-mode-map (kbd "C-c y") 'company-yasnippet)
|
||||
(define-key prog-mode-map (kbd "<f13>") 'icejam/insert-space-and-complete)
|
||||
(define-key prog-mode-map (kbd "<f13>") 'icejam-insert-space-and-complete)
|
||||
(define-key prog-mode-map (kbd "TAB") 'company-indent-or-complete-common)
|
||||
|
||||
(define-key text-mode-map (kbd "C-c y") 'company-yasnippet)
|
||||
(define-key text-mode-map (kbd "<f13>") 'icejam/insert-space-and-complete)
|
||||
(define-key text-mode-map (kbd "<f13>") 'icejam-insert-space-and-complete)
|
||||
(define-key text-mode-map (kbd "TAB") 'company-indent-or-complete-common)
|
||||
|
||||
(provide 'icejam-company-yasnippet)
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
(defconst icejam-font-size 14
|
||||
"Default size of then font.
|
||||
It is used to calculated the size in relation to the screen
|
||||
in icejam/set-font-to-screen.")
|
||||
in icejam-set-font-to-screen.")
|
||||
|
||||
(defcustom icejam-mut-font
|
||||
icejam-font
|
||||
|
|
@ -48,7 +48,7 @@ in icejam/set-font-to-screen.")
|
|||
;; First, let's silence a warning about free variables
|
||||
(defvar lsp-ui-doc-frame-hook)
|
||||
|
||||
(defun icejam/set-lsp-ui-font-hook ()
|
||||
(defun icejam-set-lsp-ui-font-hook ()
|
||||
"Reset LSP IO font to specified icejam-font and icejam-font-size."
|
||||
(setq lsp-ui-doc-frame-hook nil)
|
||||
(add-hook 'lsp-ui-doc-frame-hook
|
||||
|
|
@ -57,7 +57,7 @@ in icejam/set-font-to-screen.")
|
|||
'default frame :font
|
||||
(format "%s %d" icejam-mut-font (- icejam-mut-font-size 2))))))
|
||||
|
||||
(defun icejam/set-font (name size)
|
||||
(defun icejam-set-font (name size)
|
||||
"Set font to NAME and its SIZE to X pixels."
|
||||
(interactive "sNew font: \nnEnter size for %s: ")
|
||||
(setq icejam-mut-font name)
|
||||
|
|
@ -83,9 +83,9 @@ in icejam/set-font-to-screen.")
|
|||
'mode-line-inactive nil :font (format "%s %d" name (- size 1)))
|
||||
|
||||
;; Call LSP-UI hook
|
||||
(icejam/set-lsp-ui-font-hook))
|
||||
(icejam-set-lsp-ui-font-hook))
|
||||
|
||||
(defun icejam/set-font-to-screen ()
|
||||
(defun icejam-set-font-to-screen ()
|
||||
"Automatically set font size to suit the monitor."
|
||||
;; If display is set to emulate FullHD resultion or less, make the font
|
||||
;; smaller.
|
||||
|
|
@ -93,38 +93,38 @@ in icejam/set-font-to-screen.")
|
|||
(cond ((eq (x-display-list) nil))
|
||||
;; built-in screen
|
||||
((>= 1050 (x-display-pixel-height))
|
||||
(icejam/set-font icejam-font icejam-font-size))
|
||||
(icejam-set-font icejam-font icejam-font-size))
|
||||
|
||||
;; 4K screen on a Mac
|
||||
((>= 1080 (x-display-pixel-height))
|
||||
(icejam/set-font icejam-font icejam-font-size))
|
||||
(icejam-set-font icejam-font icejam-font-size))
|
||||
|
||||
;; Other screens
|
||||
((>= 1120 (x-display-pixel-height))
|
||||
(icejam/set-font icejam-font icejam-font-size))
|
||||
(icejam-set-font icejam-font icejam-font-size))
|
||||
|
||||
((>= 1440 (x-display-pixel-height))
|
||||
(icejam/set-font icejam-font (+ icejam-font-size 3)))
|
||||
(icejam-set-font icejam-font (+ icejam-font-size 3)))
|
||||
|
||||
((>= 1920 (x-display-pixel-height))
|
||||
(icejam/set-font icejam-font icejam-font-size))
|
||||
(icejam-set-font icejam-font icejam-font-size))
|
||||
|
||||
;; 4K screen on Windows or Linux
|
||||
((>= 2160 (x-display-pixel-height))
|
||||
(icejam/set-font icejam-font (- icejam-font-size 3)))
|
||||
(icejam-set-font icejam-font (- icejam-font-size 3)))
|
||||
|
||||
;; Default
|
||||
(t (icejam/set-font icejam-font (- icejam-font-size 3)))))
|
||||
(t (icejam-set-font icejam-font (- icejam-font-size 3)))))
|
||||
|
||||
;; Do it automatically on startup
|
||||
(icejam/set-font-to-screen)
|
||||
(icejam-set-font-to-screen)
|
||||
|
||||
(defun icejam/set-font-size (size)
|
||||
(defun icejam-set-font-size (size)
|
||||
"Set font to a specified SIZE."
|
||||
(interactive "nEnter size for font: ")
|
||||
(icejam/set-font icejam-mut-font size))
|
||||
(icejam-set-font icejam-mut-font size))
|
||||
|
||||
(defun icejam/set-font-size-for-this-frame (new-size)
|
||||
(defun icejam-set-font-size-for-this-frame (new-size)
|
||||
"Set font NEW-SIZE for this frame only."
|
||||
(interactive "nEnter new size for font in this frame: ")
|
||||
(set-frame-font (format "%s %d" icejam-mut-font new-size)))
|
||||
|
|
|
|||
|
|
@ -3,6 +3,10 @@
|
|||
;;; Global Language Server Protocol Config
|
||||
;;; Code:
|
||||
|
||||
;; https://emacs-lsp.github.io/lsp-mode/page/performance/#use-plists-for-deserialization
|
||||
;; This supposedly makes it faster.
|
||||
(setenv "LSP_USE_PLISTS" "true")
|
||||
|
||||
(use-package lsp-mode
|
||||
:straight t
|
||||
:defer t
|
||||
|
|
@ -15,7 +19,7 @@
|
|||
lsp-server-trace nil
|
||||
lsp-lens-enable nil
|
||||
lsp-lens-mode nil
|
||||
read-process-output-max (* 1024 1024 2)
|
||||
read-process-output-max (* 1024 1024 4)
|
||||
;; Disable the piece of shit vue LSP server. It activates itself in every
|
||||
;; project with .js, .ts or .json file due to something called 'takeover
|
||||
;; mode' or 'hybrid mode' or some such.
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@
|
|||
(setq tab-stop-list (number-sequence tab-width 200 tab-width))
|
||||
|
||||
;; Ensure indentation in steps:
|
||||
(defun icejam/set-indent (step)
|
||||
(defun icejam-set-indent (step)
|
||||
"Set indentation to STEP."
|
||||
(interactive "NNumber of columns for one step: ")
|
||||
(setq-local tab-width step)
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
(setq mac-option-modifier 'meta)
|
||||
(setq mac-command-modifier 'hyper)
|
||||
|
||||
(defun icejam/mac-switch-meta nil
|
||||
(defun icejam-mac-switch-meta nil
|
||||
"Switch meta between Option and Command."
|
||||
(interactive)
|
||||
(if (eq mac-option-modifier nil)
|
||||
|
|
|
|||
|
|
@ -12,16 +12,16 @@
|
|||
(interactive)
|
||||
(indent-region (point-min) (point-max)))
|
||||
|
||||
(transient-define-prefix icejam/project-menu ()
|
||||
(transient-define-prefix icejam-project-menu ()
|
||||
"Project Commands."
|
||||
[""
|
||||
["Project"
|
||||
("s" "Switch project" project-switch-project)
|
||||
("f" "Find file in project" project-find-file)
|
||||
("g" "Grep in project" consult-ripgrep)]
|
||||
["Ivy"
|
||||
("a" "Grep in buffer" consult-ripgrep)
|
||||
("b" "Buffer list" ibuffer)
|
||||
["Completions"
|
||||
("a" "Grep in buffer" swiper)
|
||||
("b" "Buffer list" consult-buffer)
|
||||
("t" "Find file" find-file)]
|
||||
["Magit"
|
||||
("m" "Git status" magit-status)
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
("d" "deft" deft)
|
||||
("T" "Speed Type" speed-type-text)]])
|
||||
|
||||
(transient-define-prefix icejam/code-menu ()
|
||||
(transient-define-prefix icejam-code-menu ()
|
||||
"Code Commands."
|
||||
[""
|
||||
["Manipulate"
|
||||
|
|
@ -52,7 +52,7 @@
|
|||
("u" "Vundo" vundo)
|
||||
("d" "Dash" dash-at-point)]])
|
||||
|
||||
(transient-define-prefix icejam/window-menu ()
|
||||
(transient-define-prefix icejam-window-menu ()
|
||||
"Windows Commands."
|
||||
[""
|
||||
["Move"
|
||||
|
|
@ -69,7 +69,7 @@
|
|||
""
|
||||
("k" "Kill Buffer" kill-buffer-and-window)]])
|
||||
|
||||
(transient-define-prefix icejam/language-menu ()
|
||||
(transient-define-prefix icejam-language-menu ()
|
||||
"Language (Buffer) Commands."
|
||||
[""
|
||||
["Buffer"
|
||||
|
|
@ -80,13 +80,13 @@
|
|||
("m" "iMenu" lsp-ui-imenu)
|
||||
("e" "Show Errors" flycheck-list-errors)]])
|
||||
|
||||
(transient-define-prefix icejam/history-menu ()
|
||||
(transient-define-prefix icejam-history-menu ()
|
||||
"Buffer History Commands."
|
||||
["History"
|
||||
("[" "Previous" previous-buffer)
|
||||
("]" "Next" previous-buffer)])
|
||||
|
||||
(transient-define-prefix icejam/move-menu ()
|
||||
(transient-define-prefix icejam-move-menu ()
|
||||
"Move Commands."
|
||||
[""
|
||||
["Move this buffer"
|
||||
|
|
@ -99,7 +99,7 @@
|
|||
("l" "Character" avy-goto-line)
|
||||
("c" "Line" avy-goto-char-2)]])
|
||||
|
||||
(transient-define-prefix icejam/font-menu ()
|
||||
(transient-define-prefix icejam-font-menu ()
|
||||
"Font Commands."
|
||||
[""
|
||||
["Everywhere"
|
||||
|
|
@ -122,19 +122,19 @@
|
|||
"Get transient for major mode.
|
||||
You can pass MAYBE-MODE to find mode explicitly."
|
||||
(let* ((mode (if maybe-mode maybe-mode major-mode)))
|
||||
(alist-get mode icejam-language-transient-alist 'icejam/language-menu)))
|
||||
(alist-get mode icejam-language-transient-alist 'icejam-language-menu)))
|
||||
|
||||
(defun icejam-transient-for-lang ()
|
||||
"Call transient for current major mode."
|
||||
(interactive)
|
||||
(funcall (icejam-language-transient-for-mode)))
|
||||
|
||||
(define-key icejam-keys-mode-map (kbd "C-c p") 'icejam/project-menu)
|
||||
(define-key icejam-keys-mode-map (kbd "C-c c") 'icejam/code-menu)
|
||||
(define-key icejam-keys-mode-map (kbd "C-c w") 'icejam/window-menu)
|
||||
(define-key icejam-keys-mode-map (kbd "C-c s") 'icejam/history-menu)
|
||||
(define-key icejam-keys-mode-map (kbd "C-c f") 'icejam/font-menu)
|
||||
(define-key icejam-keys-mode-map (kbd "C-c m") 'icejam/move-menu)
|
||||
(define-key icejam-keys-mode-map (kbd "C-c p") 'icejam-project-menu)
|
||||
(define-key icejam-keys-mode-map (kbd "C-c c") 'icejam-code-menu)
|
||||
(define-key icejam-keys-mode-map (kbd "C-c w") 'icejam-window-menu)
|
||||
(define-key icejam-keys-mode-map (kbd "C-c s") 'icejam-history-menu)
|
||||
(define-key icejam-keys-mode-map (kbd "C-c f") 'icejam-font-menu)
|
||||
(define-key icejam-keys-mode-map (kbd "C-c m") 'icejam-move-menu)
|
||||
(define-key icejam-keys-mode-map (kbd "C-c l") 'icejam-transient-for-lang)
|
||||
|
||||
(provide 'icejam-transient)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
(declare-function column-enforce-n "column-enforce-mode" (number))
|
||||
|
||||
(defun icejam-lang/activate-clang-mode ()
|
||||
(defun icejam-lang-activate-clang-mode ()
|
||||
"Goodies for editing c files."
|
||||
|
||||
;; Set column width to 100
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
(add-to-list (make-local-variable 'company-backends)
|
||||
'(company-etags company-yasnippet)))
|
||||
|
||||
(add-hook 'c-mode-hook 'icejam-lang/activate-clang-mode)
|
||||
(add-hook 'c-mode-hook 'icejam-lang-activate-clang-mode)
|
||||
|
||||
(provide 'icejam-lang-clang)
|
||||
;;; icejam-lang-clang.el ends here
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
:straight t)
|
||||
|
||||
;; Transient
|
||||
(transient-define-prefix icejam-lang/cider-context-menu ()
|
||||
(transient-define-prefix icejam-lang-cider-context-menu ()
|
||||
"Clojure Buffer Commands."
|
||||
[""
|
||||
["Cider"
|
||||
|
|
@ -36,28 +36,28 @@
|
|||
[""
|
||||
("q" "Quit" keyboard-quit)])
|
||||
|
||||
(defun icejam-lang/activate-clojure-mode ()
|
||||
(defun icejam-lang-activate-clojure-mode ()
|
||||
"Goodies for clojure files."
|
||||
(icejam/set-indent 2) ;; Default indentation of 2 characters
|
||||
(icejam-set-indent 2) ;; Default indentation of 2 characters
|
||||
(column-enforce-n 80)
|
||||
(cider-mode 1)
|
||||
(setq-local indent-tabs-mode nil)
|
||||
|
||||
(define-key
|
||||
clojure-mode-map (kbd "C-c l") 'icejam-lang/cider-context-menu)
|
||||
clojure-mode-map (kbd "C-c l") 'icejam-lang-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 'icejam-lang/activate-clojure-mode)
|
||||
(add-hook 'clojure-mode-hook 'icejam-lang-activate-clojure-mode)
|
||||
|
||||
(defun icejam-lang/clojure-repl-config ()
|
||||
(defun icejam-lang-clojure-repl-config ()
|
||||
"Do not show stacktrace when in REPL."
|
||||
(setq-local cider-show-error-buffer 'except-in-repl))
|
||||
|
||||
(add-hook 'cider-repl-mode-hook 'icejam-lang/clojure-repl-config)
|
||||
(add-hook 'cider-repl-mode-hook 'icejam-lang-clojure-repl-config)
|
||||
(add-hook 'cider-mode-hook #'cider-company-enable-fuzzy-completion)
|
||||
|
||||
(provide 'icejam-lang-clojure)
|
||||
|
|
|
|||
|
|
@ -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 icejam-lang/activate-dart-mode ()
|
||||
(defun icejam-lang-activate-dart-mode ()
|
||||
"Reconfigure dart mode for your own purposes."
|
||||
(lsp))
|
||||
|
||||
(add-hook 'dart-mode-hook 'icejam-lang/activate-dart-mode)
|
||||
(add-hook 'dart-mode-hook 'icejam-lang-activate-dart-mode)
|
||||
|
||||
(provide 'icejam-lang-dart)
|
||||
;;; icejam-lang-dart.el ends here
|
||||
|
|
|
|||
|
|
@ -7,11 +7,11 @@
|
|||
|
||||
(use-package dhall-mode :straight t :defer t :requires (lsp))
|
||||
|
||||
(defun icejam-lang/activate-dhall-mode ()
|
||||
(defun icejam-lang-activate-dhall-mode ()
|
||||
"Reconfigure dhall mode for your own purposes."
|
||||
(lsp))
|
||||
|
||||
(add-hook 'dhall-mode-hook 'icejam-lang/activate-dhall-mode)
|
||||
(add-hook 'dhall-mode-hook 'icejam-lang-activate-dhall-mode)
|
||||
(add-hook 'dhall-mode-hook 'display-line-numbers-mode)
|
||||
|
||||
(provide 'icejam-lang-dhall)
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
(declare-function column-enforce-n "column-enforce-mode" (number))
|
||||
(add-to-list 'auto-mode-alist '("/Eask\\'" . emacs-lisp-mode))
|
||||
|
||||
(transient-define-prefix icejam/elisp-lang-menu ()
|
||||
(transient-define-prefix icejam-elisp-lang-menu ()
|
||||
"Elisp Buffer Commands."
|
||||
[""
|
||||
["Buffer"
|
||||
|
|
@ -22,11 +22,11 @@
|
|||
("q" "Quit" keyboard-quit)])
|
||||
|
||||
(add-to-list
|
||||
'icejam-language-transient-alist '(emacs-lisp-mode . icejam/elisp-lang-menu))
|
||||
'icejam-language-transient-alist '(emacs-lisp-mode . icejam-elisp-lang-menu))
|
||||
|
||||
(defun icejam/activate-emacs-lisp-mode ()
|
||||
(defun icejam-activate-emacs-lisp-mode ()
|
||||
"Goodies for editing Emacs files."
|
||||
(icejam/set-indent 2) ;; Default indentation of 2 characters
|
||||
(icejam-set-indent 2) ;; Default indentation of 2 characters
|
||||
(column-enforce-n 80)
|
||||
(lispy-mode)
|
||||
(setq-default indent-tabs-mode nil)
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
(add-to-list (make-local-variable 'company-backends)
|
||||
'(company-yasnippet company-capf)))
|
||||
|
||||
(add-hook 'emacs-lisp-mode-hook 'icejam/activate-emacs-lisp-mode)
|
||||
(add-hook 'emacs-lisp-mode-hook 'icejam-activate-emacs-lisp-mode)
|
||||
|
||||
(provide 'icejam-lang-elisp)
|
||||
;;; icejam-lang-elisp.el ends here
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
(add-to-list 'auto-mode-alist '("\\.exs\\'" . elixir-ts-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.ex\\'" . elixir-ts-mode))
|
||||
|
||||
(transient-define-prefix icejam/elixir-lang-menu ()
|
||||
(transient-define-prefix icejam-elixir-lang-menu ()
|
||||
"Elixir Buffer Commands."
|
||||
[""
|
||||
["LSP"
|
||||
|
|
@ -31,11 +31,11 @@
|
|||
("q" "Quit" keyboard-quit)])
|
||||
|
||||
(add-to-list
|
||||
'icejam-language-transient-alist '(elixir-ts-mode . icejam/elixir-lang-menu))
|
||||
'icejam-language-transient-alist '(elixir-ts-mode . icejam-elixir-lang-menu))
|
||||
|
||||
(defun icejam/activate-elixir-ts-mode ()
|
||||
(defun icejam-activate-elixir-ts-mode ()
|
||||
"All things Elixir."
|
||||
(icejam/set-indent 2)
|
||||
(icejam-set-indent 2)
|
||||
(column-enforce-n 98)
|
||||
(lsp)
|
||||
(setq-local flycheck-check-syntax-automatically '(save mode-enabled))
|
||||
|
|
@ -50,8 +50,8 @@
|
|||
(add-to-list (make-local-variable 'company-backends)
|
||||
'(company-capf company-yasnippet)))
|
||||
|
||||
(add-hook 'heex-ts-mode-hook 'icejam/activate-elixir-ts-mode)
|
||||
(add-hook 'elixir-ts-mode-hook 'icejam/activate-elixir-ts-mode)
|
||||
(add-hook 'heex-ts-mode-hook 'icejam-activate-elixir-ts-mode)
|
||||
(add-hook 'elixir-ts-mode-hook 'icejam-activate-elixir-ts-mode)
|
||||
|
||||
(provide 'icejam-lang-elixir)
|
||||
;;; icejam-lang-elixir.el ends here
|
||||
|
|
|
|||
|
|
@ -13,46 +13,46 @@
|
|||
:straight t
|
||||
:requires (lsp-mode lsp-ui))
|
||||
|
||||
(cl-defun icejam/erlang-emacs-path (erlang-version)
|
||||
(cl-defun icejam-erlang-emacs-path (erlang-version)
|
||||
"Find path to Emacs tooling for ERLANG-VERSION."
|
||||
(car (split-string
|
||||
(shell-command-to-string
|
||||
(format "find $HOME/.asdf/installs/erlang/%s/ -name erlang.el"
|
||||
erlang-version)) "erlang.el")))
|
||||
|
||||
(cl-defun icejam/erlang-path (erlang-version)
|
||||
(cl-defun icejam-erlang-path (erlang-version)
|
||||
"Find asdf path for ERLANG-VERSION."
|
||||
(format "$HOME/.asdf/installs/erlang/%s/" erlang-version))
|
||||
|
||||
(defun icejam/erlang-plist (erlang-version)
|
||||
(defun icejam-erlang-plist (erlang-version)
|
||||
"Create property list for ERLANG-VERSION."
|
||||
(list :version erlang-version
|
||||
:erlang-path (icejam/erlang-path erlang-version)
|
||||
:emacs-path (icejam/erlang-emacs-path erlang-version)))
|
||||
:erlang-path (icejam-erlang-path erlang-version)
|
||||
:emacs-path (icejam-erlang-emacs-path erlang-version)))
|
||||
|
||||
(cl-defun icejam/installed-erlangs ()
|
||||
(cl-defun icejam-installed-erlangs ()
|
||||
"List Erlang versions installed with asdf."
|
||||
(split-string
|
||||
(shell-command-to-string
|
||||
(format "asdf list erlang"))))
|
||||
|
||||
(cl-defun icejam/erlang-available-versions--plist ()
|
||||
(cl-defun icejam-erlang-available-versions--plist ()
|
||||
"Create plist for all installed Erlang versions."
|
||||
(mapcar 'icejam/erlang-plist (icejam/installed-erlangs)))
|
||||
(mapcar 'icejam-erlang-plist (icejam-installed-erlangs)))
|
||||
|
||||
(defvar icejam/erlang-available-versions (icejam/erlang-available-versions--plist))
|
||||
(defvar icejam-erlang-available-versions (icejam-erlang-available-versions--plist))
|
||||
|
||||
(cl-defun icejam/erlang-currently-in-use ()
|
||||
(cl-defun icejam-erlang-currently-in-use ()
|
||||
"Get Erlang version currently in use."
|
||||
(car (split-string (shell-command-to-string "asdf current erlang"))))
|
||||
|
||||
(cl-defun icejam/erlang-current-version--plistp (erlang-plist)
|
||||
(cl-defun icejam-erlang-current-version--plistp (erlang-plist)
|
||||
"Check if currently in use Erlang is the same as the one in ERLANG-PLIST."
|
||||
(equal (plist-get erlang-plist :version) (icejam/erlang-currently-in-use)))
|
||||
(equal (plist-get erlang-plist :version) (icejam-erlang-currently-in-use)))
|
||||
|
||||
(cl-defun icejam/erlang-current-plist ()
|
||||
(cl-defun icejam-erlang-current-plist ()
|
||||
"Create plist from current Erlang version."
|
||||
(seq-find 'icejam/erlang-current-version--plistp icejam/erlang-available-versions))
|
||||
(seq-find 'icejam-erlang-current-version--plistp icejam-erlang-available-versions))
|
||||
|
||||
;; Flycheck checker for Erlang
|
||||
(flycheck-define-checker erlang-otp
|
||||
|
|
@ -65,11 +65,11 @@
|
|||
(error line-start (file-name) ":" line ": " (message) line-end))
|
||||
:modes (my-erlang-mode))
|
||||
|
||||
(defun icejam/activate-erlang-mode ()
|
||||
(defun icejam-activate-erlang-mode ()
|
||||
"All things for all Erlang, including header files."
|
||||
(when (featurep 'erlang-start) (unload-feature 'erlang-start))
|
||||
|
||||
(defvar erlang/current-erlang (icejam/erlang-current-plist))
|
||||
(defvar erlang/current-erlang (icejam-erlang-current-plist))
|
||||
|
||||
(add-to-list (make-local-variable 'load-path)
|
||||
(plist-get erlang/current-erlang :emacs-path))
|
||||
|
|
@ -83,7 +83,7 @@
|
|||
(plist-get erlang/current-erlang :erlang-path)))
|
||||
|
||||
(require 'erlang-start)
|
||||
(icejam/set-indent 4)
|
||||
(icejam-set-indent 4)
|
||||
(column-enforce-n 80)
|
||||
|
||||
;; Add include path so that Erlang does not complain about
|
||||
|
|
@ -106,7 +106,7 @@
|
|||
;; Start LSP server
|
||||
(lsp))
|
||||
|
||||
(add-hook 'erlang-mode-hook 'icejam/activate-erlang-mode)
|
||||
(add-hook 'erlang-mode-hook 'icejam-activate-erlang-mode)
|
||||
|
||||
(provide 'icejam-lang-erlang)
|
||||
;;; icejam-lang-erlang.el ends here
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@
|
|||
:straight t
|
||||
:defer t)
|
||||
|
||||
(defun icejam/activate-fsharp-mode ()
|
||||
(defun icejam-activate-fsharp-mode ()
|
||||
"Activate F# goodies."
|
||||
(icejam/set-indent 4)
|
||||
(icejam-set-indent 4)
|
||||
(column-enforce-n 100)
|
||||
(lsp-deferred)
|
||||
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
(add-to-list (make-local-variable 'company-backends)
|
||||
'(company-capf company-yasnippet)))
|
||||
|
||||
(add-hook 'fsharp-mode-hook 'icejam/activate-fsharp-mode)
|
||||
(add-hook 'fsharp-mode-hook 'icejam-activate-fsharp-mode)
|
||||
|
||||
(provide 'icejam-lang-fsharp)
|
||||
;;; icejam-lang-fsharp.el ends here
|
||||
|
|
|
|||
|
|
@ -20,13 +20,13 @@
|
|||
|
||||
(add-to-list 'auto-mode-alist '("\\.gleam\\'" . gleam-ts-mode))
|
||||
|
||||
(defun icejam-lang/activate-gleam-mode ()
|
||||
(defun icejam-lang-activate-gleam-mode ()
|
||||
"All things Gleam."
|
||||
(icejam/set-indent 2)
|
||||
(icejam-set-indent 2)
|
||||
(column-enforce-n 100)
|
||||
(lsp))
|
||||
|
||||
(add-hook 'gleam-mode-hook 'icejam-lang/activate-gleam-mode)
|
||||
(add-hook 'gleam-mode-hook 'icejam-lang-activate-gleam-mode)
|
||||
|
||||
(provide 'icejam-lang-gleam)
|
||||
;;; icejam-lang-gleam.el ends here
|
||||
|
|
|
|||
|
|
@ -17,13 +17,13 @@
|
|||
:defer t
|
||||
:straight t)
|
||||
|
||||
(defun icejam/activate-golang-mode ()
|
||||
(defun icejam-activate-golang-mode ()
|
||||
"Activate my own Golang mode settings."
|
||||
(icejam/set-indent 8)
|
||||
(icejam-set-indent 8)
|
||||
(column-enforce-n 100)
|
||||
(lsp))
|
||||
|
||||
(add-hook 'go-mode-hook 'icejam/activate-golang-mode)
|
||||
(add-hook 'go-mode-hook 'icejam-activate-golang-mode)
|
||||
|
||||
(provide 'icejam-lang-golang)
|
||||
;;; icejam-lang-golang.el ends here
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@
|
|||
:defer t
|
||||
:requires (lsp-mode lsp-ui haskell-mode))
|
||||
|
||||
(defun icejam/activate-haskell-mode ()
|
||||
(defun icejam-activate-haskell-mode ()
|
||||
"Run this in haskell-mode."
|
||||
(icejam/set-indent 2)
|
||||
(icejam-set-indent 2)
|
||||
(column-enforce-n 80)
|
||||
(lsp-deferred)
|
||||
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
(add-to-list (make-local-variable 'company-backends)
|
||||
'(company-capf company-yasnippet)))
|
||||
|
||||
(add-hook 'haskell-mode-hook 'icejam/activate-haskell-mode)
|
||||
(add-hook 'haskell-mode-hook 'icejam-activate-haskell-mode)
|
||||
|
||||
(provide 'icejam-lang-haskell)
|
||||
;;; icejam-lang-haskell.el ends here
|
||||
|
|
|
|||
|
|
@ -20,9 +20,9 @@
|
|||
(add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.json\\'" . js2-mode))
|
||||
|
||||
(defun icejam/activate-js2-mode ()
|
||||
(defun icejam-activate-js2-mode ()
|
||||
"JS2 mode overrides."
|
||||
(icejam/set-indent 2)
|
||||
(icejam-set-indent 2)
|
||||
|
||||
(when (not (string-match-p ".json" (buffer-file-name)))
|
||||
(lsp-deferred))
|
||||
|
|
@ -41,7 +41,7 @@
|
|||
(add-to-list (make-local-variable 'company-backends)
|
||||
'(company-capf company-yasnippet)))
|
||||
|
||||
(add-hook 'js2-mode-hook 'icejam/activate-js2-mode)
|
||||
(add-hook 'js2-mode-hook 'icejam-activate-js2-mode)
|
||||
|
||||
(provide 'icejam-lang-javascript)
|
||||
;;; icejam-lang-javascript.el ends here
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@
|
|||
:defer t
|
||||
:straight t)
|
||||
|
||||
(defun icejam/activate-kotlin-mode ()
|
||||
(defun icejam-activate-kotlin-mode ()
|
||||
"All things Kotlin."
|
||||
(icejam/set-indent 4)
|
||||
(icejam-set-indent 4)
|
||||
(column-enforce-n 100)
|
||||
(lsp)
|
||||
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
(add-to-list (make-local-variable 'company-backends)
|
||||
'(company-capf company-yasnippet)))
|
||||
|
||||
(add-hook 'kotlin-mode-hook 'icejam/activate-kotlin-mode)
|
||||
(add-hook 'kotlin-mode-hook 'icejam-activate-kotlin-mode)
|
||||
|
||||
(provide 'icejam-lang-kotlin)
|
||||
;;; icejam-lang-kotlin.el ends here
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
:requires (lsp)
|
||||
:defer t)
|
||||
|
||||
(defun icejam/activate-lean-mode ()
|
||||
(defun icejam-activate-lean-mode ()
|
||||
"All things for Lean mode."
|
||||
(interactive)
|
||||
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
(add-to-list (make-local-variable 'company-backends)
|
||||
'(company-capf company-yasnippet)))
|
||||
|
||||
(add-hook 'lean4-mode-hook 'icejam/activate-lean-mode)
|
||||
(add-hook 'lean4-mode-hook 'icejam-activate-lean-mode)
|
||||
|
||||
(provide 'icejam-lang-lean)
|
||||
;;; icejam-lang-lean.el ends here
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@
|
|||
:defer t
|
||||
:init (setq-default markdown-command "pandoc"))
|
||||
|
||||
(defun icejam-lang/activate-markdown-mode ()
|
||||
(defun icejam-lang-activate-markdown-mode ()
|
||||
"Reconfigure markdown mode for your own purposes."
|
||||
(icejam/set-indent 2)
|
||||
(icejam-set-indent 2)
|
||||
(column-enforce-n 10000)
|
||||
|
||||
;; Markdown mode reuses my bindings, remove them.
|
||||
|
|
@ -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 'icejam-lang/activate-markdown-mode)
|
||||
(add-hook 'markdown-mode-hook 'icejam-lang-activate-markdown-mode)
|
||||
(add-hook 'markdown-mode-hook 'display-line-numbers-mode)
|
||||
|
||||
(provide 'icejam-lang-markdown)
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
:straight t
|
||||
:config (add-hook 'tuareg-mode-hook 'merlin-mode))
|
||||
|
||||
(transient-define-prefix icejam/ocaml-lang-menu ()
|
||||
(transient-define-prefix icejam-ocaml-lang-menu ()
|
||||
"Ocaml Actions."
|
||||
["OCaml actions"
|
||||
[""
|
||||
|
|
@ -27,9 +27,9 @@
|
|||
[""
|
||||
("q" "Quit" keyboard-quit)])
|
||||
|
||||
(add-to-list 'icejam-language-transient-alist '(tuareg-mode . icejam/ocaml-lang-menu))
|
||||
(add-to-list 'icejam-language-transient-alist '(tuareg-mode . icejam-ocaml-lang-menu))
|
||||
|
||||
(defun icejam/load-ocaml-site-packages ()
|
||||
(defun icejam-load-ocaml-site-packages ()
|
||||
"Generate ocaml config."
|
||||
(let ((opam-share (ignore-errors (car (process-lines "opam" "var" "share")))))
|
||||
(when (and opam-share (file-directory-p opam-share))
|
||||
|
|
@ -43,14 +43,14 @@
|
|||
(setq merlin-command 'opam))))
|
||||
|
||||
;; OCaml setup
|
||||
(defun icejam/activate-tuareg-mode ()
|
||||
(defun icejam-activate-tuareg-mode ()
|
||||
"All thing OCaml."
|
||||
(icejam/set-indent 2)
|
||||
(icejam-set-indent 2)
|
||||
(opam-switch-mode t)
|
||||
(icejam/load-ocaml-site-packages)
|
||||
(icejam-load-ocaml-site-packages)
|
||||
(lsp))
|
||||
|
||||
(add-hook 'tuareg-mode-hook 'icejam/activate-tuareg-mode)
|
||||
(add-hook 'tuareg-mode-hook 'icejam-activate-tuareg-mode)
|
||||
|
||||
;; Disable merlin keys that are unused by me
|
||||
(add-hook 'merlin-mode-hook (lambda ()
|
||||
|
|
@ -66,7 +66,7 @@
|
|||
;; Use tuareg-opam with lock files
|
||||
(add-to-list 'auto-mode-alist '("\\.opam.locked\\'" . tuareg-opam-mode))
|
||||
|
||||
;; (transient-define-prefix icejam-lang/reasonml-context-menu ()
|
||||
;; (transient-define-prefix icejam-lang-reasonml-context-menu ()
|
||||
;; "ReasonML Actions."
|
||||
;; ["ReasonML actions"
|
||||
;; [""
|
||||
|
|
@ -79,16 +79,16 @@
|
|||
;; ("q" "Quit" keyboard-quit)])
|
||||
|
||||
|
||||
;; (defun icejam-lang/activate-reason-mode ()
|
||||
;; (defun icejam-lang-activate-reason-mode ()
|
||||
;; "Generate reason config."
|
||||
;; (define-key
|
||||
;; reason-mode-map (kbd "C-c l") 'icejam-lang/reasonml-context-menu))
|
||||
;; reason-mode-map (kbd "C-c l") 'icejam-lang-reasonml-context-menu))
|
||||
|
||||
;; ;; Reason setup
|
||||
;; (add-hook 'reason-mode-hook
|
||||
;; (lambda ()
|
||||
;; (add-hook 'before-save-hook #'refmt-before-save)))
|
||||
;; (add-hook 'reason-mode-hook 'icejam-lang/activate-reason-mode)
|
||||
;; (add-hook 'reason-mode-hook 'icejam-lang-activate-reason-mode)
|
||||
;; (add-hook 'reason-mode-hook 'merlin-mode)
|
||||
|
||||
(provide 'icejam-lang-ocaml)
|
||||
|
|
|
|||
|
|
@ -24,11 +24,11 @@
|
|||
;; Yaml
|
||||
(use-package yaml-mode :straight t :defer t :requires (lsp))
|
||||
|
||||
(defun icejam-lang/activate-yaml-mode ()
|
||||
(defun icejam-lang-activate-yaml-mode ()
|
||||
"Activate yaml-mode."
|
||||
(lsp))
|
||||
|
||||
(add-hook 'yaml-mode-hook 'icejam-lang/activate-yaml-mode)
|
||||
(add-hook 'yaml-mode-hook 'icejam-lang-activate-yaml-mode)
|
||||
|
||||
;; Other text files
|
||||
(use-package json-mode :straight t :defer t)
|
||||
|
|
|
|||
|
|
@ -32,9 +32,9 @@
|
|||
("q" "Quit" keyboard-quit)])
|
||||
|
||||
|
||||
(defun icejam-lang/activate-php-mode ()
|
||||
(defun icejam-lang-activate-php-mode ()
|
||||
"All things php."
|
||||
(icejam/set-indent 4)
|
||||
(icejam-set-indent 4)
|
||||
(column-enforce-n 80)
|
||||
|
||||
(define-key php-mode-map (kbd "C-c l") 'icejam-lang-php/context-menu)
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
(add-to-list (make-local-variable 'company-backends)
|
||||
'(company-capf company-yasnippet)))
|
||||
|
||||
(add-hook 'php-mode-hook 'icejam-lang/activate-php-mode)
|
||||
(add-hook 'php-mode-hook 'icejam-lang-activate-php-mode)
|
||||
|
||||
(provide 'icejam-lang-php)
|
||||
;;; icejam-lang-php.el ends here
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@
|
|||
:requires (lsp-mode lsp-ui)
|
||||
:straight t)
|
||||
|
||||
(defun icejam/activate-purescript-mode ()
|
||||
(defun icejam-activate-purescript-mode ()
|
||||
"All things Purescript."
|
||||
(icejam/set-indent 2)
|
||||
(icejam-set-indent 2)
|
||||
(column-enforce-n 98)
|
||||
|
||||
;; Purescript indentation
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
(add-to-list (make-local-variable 'company-backends)
|
||||
'(company-capf company-yasnippet)))
|
||||
|
||||
(add-hook 'purescript-mode-hook 'icejam/activate-purescript-mode)
|
||||
(add-hook 'purescript-mode-hook 'icejam-activate-purescript-mode)
|
||||
|
||||
(provide 'icejam-lang-purescript)
|
||||
;;; icejam-lang-purescript.el ends here
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
(declare-function lsp nil)
|
||||
(declare-function column-enforce-n "column-enforce-mode" (number))
|
||||
|
||||
(transient-define-prefix icejam/python-lang-menu ()
|
||||
(transient-define-prefix icejam-python-lang-menu ()
|
||||
"Python Buffer Commands."
|
||||
[""
|
||||
["LSP"
|
||||
|
|
@ -23,9 +23,9 @@
|
|||
|
||||
;; Add lookup for C-c l transient menu
|
||||
(add-to-list
|
||||
'icejam-language-transient-alist '(python-mode . icejam/python-lang-menu))
|
||||
'icejam-language-transient-alist '(python-mode . icejam-python-lang-menu))
|
||||
|
||||
(defun icejam-lang/activate-python-mode ()
|
||||
(defun icejam-lang-activate-python-mode ()
|
||||
"Activate python mode."
|
||||
(lsp)
|
||||
(column-enforce-n 99)
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
(add-to-list (make-local-variable 'company-backends)
|
||||
'(company-capf company-yasnippet)))
|
||||
|
||||
(add-hook 'python-mode-hook 'icejam-lang/activate-python-mode)
|
||||
(add-hook 'python-mode-hook 'icejam-lang-activate-python-mode)
|
||||
|
||||
(provide 'icejam-lang-python)
|
||||
;;; icejam-lang-python.el ends here
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@
|
|||
|
||||
(add-to-list 'auto-mode-alist '("\\.rb\\'" . ruby-ts-mode))
|
||||
|
||||
(defun icejam/activate-ruby-mode ()
|
||||
(defun icejam-activate-ruby-mode ()
|
||||
"All things for ruby mode."
|
||||
(icejam/set-indent 2)
|
||||
(icejam-set-indent 2)
|
||||
|
||||
;; Disable reek syntax checking permanently
|
||||
(add-to-list (make-local-variable 'flycheck-disabled-checkers) 'ruby-reek 'ruby-rubocop)
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
(add-hook 'ruby-ts-mode-hook 'rspec-mode)
|
||||
(add-hook 'ruby-ts-mode-hook 'ruby-end-mode)
|
||||
(eval-after-load 'rspec-mode '(rspec-install-snippets))
|
||||
(add-hook 'ruby-ts-mode-hook 'icejam/activate-ruby-mode)
|
||||
(add-hook 'ruby-ts-mode-hook 'icejam-activate-ruby-mode)
|
||||
|
||||
(provide 'icejam-lang-ruby)
|
||||
;;; icejam-lang-ruby.el ends here
|
||||
|
|
|
|||
|
|
@ -15,10 +15,10 @@
|
|||
:defer t
|
||||
:requires (rust-mode lsp))
|
||||
|
||||
(defun icejam/activate-rust-mode ()
|
||||
(defun icejam-activate-rust-mode ()
|
||||
"All things for Rust mode."
|
||||
(interactive)
|
||||
(icejam/set-indent 4)
|
||||
(icejam-set-indent 4)
|
||||
(column-enforce-n 99)
|
||||
|
||||
;; Run LSP
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
(add-to-list (make-local-variable 'company-backends)
|
||||
'(company-capf company-yasnippet)))
|
||||
|
||||
(add-hook 'rust-mode-hook 'icejam/activate-rust-mode)
|
||||
(add-hook 'rust-mode-hook 'icejam-activate-rust-mode)
|
||||
(add-hook 'rust-mode-hook 'flycheck-rust-setup)
|
||||
|
||||
(provide 'icejam-lang-rust)
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
("erb" . (("<%" "%>")
|
||||
("beg" "end")))))
|
||||
|
||||
(defun icejam/activate-web-mode ()
|
||||
(defun icejam-activate-web-mode ()
|
||||
"Web mode overrides."
|
||||
;; Indent web mode scripts by 2
|
||||
(setq-local web-mode-script-padding 2)
|
||||
|
|
@ -44,7 +44,7 @@
|
|||
(when (string-match-p ".vue" (buffer-file-name))
|
||||
(lsp)))
|
||||
|
||||
(add-hook 'web-mode-hook 'icejam/activate-web-mode)
|
||||
(add-hook 'web-mode-hook 'icejam-activate-web-mode)
|
||||
|
||||
(provide 'icejam-lang-web)
|
||||
;;; icejam-lang-web.el ends here
|
||||
|
|
|
|||
|
|
@ -13,17 +13,17 @@
|
|||
|
||||
(use-package zig-mode :straight t :defer t :requires (lsp))
|
||||
|
||||
(defun icejam/activate-zig-mode ()
|
||||
(defun icejam-activate-zig-mode ()
|
||||
"Goodies for editing zig files."
|
||||
|
||||
;; Set column width to 100
|
||||
(column-enforce-n 100)
|
||||
|
||||
;; Set indentation to 4 chars
|
||||
(icejam/set-indent 4)
|
||||
(icejam-set-indent 4)
|
||||
(lsp))
|
||||
|
||||
(add-hook 'zig-mode-hook 'icejam/activate-zig-mode)
|
||||
(add-hook 'zig-mode-hook 'icejam-activate-zig-mode)
|
||||
|
||||
(provide 'icejam-lang-ziglang)
|
||||
;;; icejam-lang-ziglang.el ends here
|
||||
|
|
|
|||
|
|
@ -328,7 +328,7 @@ More information on Tron: https://en.wikipedia.org/wiki/Tron")
|
|||
:box `(:line-width 2 :color ,orange :style nil))
|
||||
)
|
||||
|
||||
(defun icejam/tronesque-mode-line ()
|
||||
(defun icejam-tronesque-mode-line ()
|
||||
"Change default mode-line."
|
||||
(interactive)
|
||||
(setq-default
|
||||
|
|
@ -364,7 +364,7 @@ More information on Tron: https://en.wikipedia.org/wiki/Tron")
|
|||
mode-line-end-spaces)))
|
||||
|
||||
;; Helper function
|
||||
(defun icejam/shorten-directory (dir max-length)
|
||||
(defun icejam-shorten-directory (dir max-length)
|
||||
"Show up a directory named `DIR' with `MAX-LENGTH' characters."
|
||||
(let ((path (reverse (split-string (abbreviate-file-name dir) "/")))
|
||||
(output ""))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue