[parinfer] Remove path hack and obsolete layer specific hooks

This commit is contained in:
Maximilian Wolff 2021-04-15 20:51:31 +00:00
parent 4471024721
commit 3f795aebdb
5 changed files with 76 additions and 103 deletions

View File

@ -46,7 +46,6 @@
counsel-gtags
helm-gtags
org
parinfer
popwin
(sayid :toggle clojure-enable-sayid)
smartparens
@ -524,9 +523,6 @@
(require 'sayid)
(setq cider-jack-in-lein-plugins (delete `("com.billpiel/sayid" nil) cider-jack-in-lein-plugins))))))
(defun clojure/post-init-parinfer ()
(add-hook 'clojure-mode-hook 'parinfer-mode))
(defun clojure/post-init-flycheck ()
;; When user has chosen to use multiple linters.
(when (> (safe-length clojure-enable-linters) 1)

View File

@ -21,20 +21,19 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(setq common-lisp-packages
'(
auto-highlight-symbol
(common-lisp-snippets :requires yasnippet)
evil
evil-cleverparens
ggtags
counsel-gtags
helm
helm-gtags
parinfer
rainbow-identifiers
slime
(slime-company :requires company)))
(defconst common-lisp-packages
'(
auto-highlight-symbol
(common-lisp-snippets :requires yasnippet)
evil
evil-cleverparens
ggtags
counsel-gtags
helm
helm-gtags
rainbow-identifiers
slime
(slime-company :requires company)))
(defun common-lisp/post-init-auto-highlight-symbol ()
@ -73,9 +72,6 @@
(defun common-lisp/post-init-helm-gtags ()
(spacemacs/helm-gtags-define-keys-for-mode 'common-lisp-mode))
(defun common-lisp/post-init-parinfer ()
(add-hook 'lisp-mode-hook 'parinfer-mode))
(defun common-lisp/post-init-rainbow-identifiers ()
(add-hook 'lisp-mode-hook #'colors//rainbow-identifiers-ignore-keywords))

View File

@ -21,35 +21,33 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(setq emacs-lisp-packages
'(
auto-compile
company
(debug :location built-in)
(edebug :location built-in)
eldoc
elisp-slime-nav
(emacs-lisp :location built-in)
evil
evil-cleverparens
eval-sexp-fu
flycheck
flycheck-elsa
flycheck-package
ggtags
counsel-gtags
helm-gtags
(ielm :location built-in)
macrostep
nameless
overseer
parinfer
rainbow-identifiers
semantic
smartparens
srefactor
emr
))
(defconst emacs-lisp-packages
'(
auto-compile
company
(debug :location built-in)
(edebug :location built-in)
eldoc
elisp-slime-nav
(emacs-lisp :location built-in)
evil
evil-cleverparens
eval-sexp-fu
flycheck
flycheck-elsa
flycheck-package
ggtags
counsel-gtags
helm-gtags
(ielm :location built-in)
macrostep
nameless
overseer
rainbow-identifiers
semantic
smartparens
srefactor
emr))
(defun emacs-lisp/init-ielm ()
(use-package ielm
@ -224,40 +222,40 @@
"dm" 'spacemacs/macrostep-transient-state/body))))
(defun emacs-lisp/init-nameless ()
(use-package nameless
:defer (spacemacs/defer)
:init
(progn
(spacemacs|require-when-dumping 'nameless)
(setq
;; always show the separator since it can have a semantic purpose
;; like in Spacemacs where - is variable and / is a function.
;; moreover it makes nameless work for all kind of separators.
nameless-separator nil
;; Use > as the defautl prefix : is already used for
;; keywords
nameless-prefix ">")
;; some default aliases for Spacemacs source code
(setq nameless-global-aliases '(("SB" . "spacemacs-buffer")
("S" . "spacemacs")
(".S" . "dotspacemacs")
("CL" . "configuration-layer")))
;; make `nameless-current-name' safe as a local variable for string
;; values
(put 'nameless-current-name 'safe-local-variable #'stringp)
(spacemacs|diminish nameless-mode " 🅽" " [n]")
(spacemacs|add-toggle nameless
:status nameless-mode
:on (nameless-mode)
:off (nameless-mode -1)
:documentation "Hide package namespaces in your emacs-lisp code."
:evil-leader-for-mode (emacs-lisp-mode . "Tn"))
;; activate nameless only when in a GUI
;; in a terminal nameless triggers all sorts of graphical glitches.
(spacemacs|unless-dumping-and-eval-after-loaded-dump nameless
(spacemacs|do-after-display-system-init
(when emacs-lisp-hide-namespace-prefix
(spacemacs/toggle-nameless-on-register-hook-emacs-lisp-mode)))))))
(use-package nameless
:defer (spacemacs/defer)
:init
(progn
(spacemacs|require-when-dumping 'nameless)
(setq
;; always show the separator since it can have a semantic purpose
;; like in Spacemacs where - is variable and / is a function.
;; moreover it makes nameless work for all kind of separators.
nameless-separator nil
;; Use > as the defautl prefix : is already used for
;; keywords
nameless-prefix ">")
;; some default aliases for Spacemacs source code
(setq nameless-global-aliases '(("SB" . "spacemacs-buffer")
("S" . "spacemacs")
(".S" . "dotspacemacs")
("CL" . "configuration-layer")))
;; make `nameless-current-name' safe as a local variable for string
;; values
(put 'nameless-current-name 'safe-local-variable #'stringp)
(spacemacs|diminish nameless-mode " 🅽" " [n]")
(spacemacs|add-toggle nameless
:status nameless-mode
:on (nameless-mode)
:off (nameless-mode -1)
:documentation "Hide package namespaces in your emacs-lisp code."
:evil-leader-for-mode (emacs-lisp-mode . "Tn"))
;; activate nameless only when in a GUI
;; in a terminal nameless triggers all sorts of graphical glitches.
(spacemacs|unless-dumping-and-eval-after-loaded-dump nameless
(spacemacs|do-after-display-system-init
(when emacs-lisp-hide-namespace-prefix
(spacemacs/toggle-nameless-on-register-hook-emacs-lisp-mode)))))))
(defun emacs-lisp/init-overseer ()
(use-package overseer
@ -311,9 +309,6 @@
(defun emacs-lisp/post-init-ggtags ()
(add-hook 'emacs-lisp-mode-local-vars-hook #'spacemacs/ggtags-mode-enable))
(defun emacs-lisp/post-init-parinfer ()
(add-hook 'emacs-lisp-mode-hook 'parinfer-mode))
(defun emacs-lisp/post-init-rainbow-identifiers ()
(add-hook 'emacs-lisp-mode-hook #'colors//rainbow-identifiers-ignore-keywords))

View File

@ -28,7 +28,6 @@
ggtags
counsel-gtags
helm-gtags
parinfer-rust-mode
(geiser-chez :toggle (memq 'chez scheme-implementations))
(geiser-chibi :toggle (memq 'chibi scheme-implementations))
(geiser-chicken :toggle (memq 'chicken scheme-implementations))
@ -112,9 +111,6 @@
(defun scheme/post-init-helm-gtags ()
(spacemacs/helm-gtags-define-keys-for-mode 'scheme-mode))
(defun scheme/post-init-parinfer-rust-mode ()
(add-hook 'scheme-mode-hook 'parinfer-rust-mode))
(defun scheme/init-geiser-chez ()
(use-package geiser-chez
:defer t))

View File

@ -32,19 +32,9 @@
:init
(progn
(setq parinfer-rust-auto-download t)
;;; TODO smile13241324 07-03-2021
;;; Needed to duplicate the lib name algorithm to safely change the lib
;;; install directory to our cache folder. This is caused by the folders
;;; not having been separated from the system dependent library name.
;;; A PR has been opened see here
;;; https://github.com/justinbarclay/parinfer-rust-mode/pull/39
(setq parinfer-rust-library
(setq parinfer-rust-library-directory
(concat spacemacs-cache-directory
"parinfer-rust/"
(cond
((eq system-type 'darwin) "parinfer-rust-darwin.so")
((eq system-type 'gnu/linux) "parinfer-rust-linux.so")
((eq system-type 'windows-nt) "parinfer-rust-windows.dll"))))
"parinfer-rust/"))
(spacemacs|add-toggle parinfer-smart-indent
:evil-leader "tP"
:documentation "Enable Parinfer Smart Indent Mode."