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
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue