ebe4c60264
This reverts commit 29c78ce841
and all other fixes
that have been made afterwards.
The motivation is that use-package is seen by many as a replacement for
`require`. Is use-package always defer the loading of packages then is breaks
this use case, this does not respect POLA so even if it was making Spacemacs
loading faster (up to 3s faster on some startup on my machine) we just cannot
use it, it would be irresponsible. Spacemacs should be easy to use, loading
performance will come with time but it is not a priority.
52 lines
1.3 KiB
EmacsLisp
52 lines
1.3 KiB
EmacsLisp
;;; packages.el --- vimscript Layer packages File for Spacemacs
|
|
;;
|
|
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
|
;;
|
|
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
|
;; URL: https://github.com/syl20bnr/spacemacs
|
|
;;
|
|
;; This file is not part of GNU Emacs.
|
|
;;
|
|
;;; License: GPLv3
|
|
|
|
(setq vimscript-packages
|
|
'(
|
|
vimrc-mode
|
|
ggtags
|
|
counsel-gtags
|
|
helm-gtags
|
|
dactyl-mode
|
|
))
|
|
|
|
(defun vimscript/init-vimrc-mode ()
|
|
"Initialize vimrc package"
|
|
(use-package vimrc-mode
|
|
:mode "\\.vim[rc]?\\'"
|
|
:mode "_vimrc\\'"
|
|
:defer t
|
|
:init
|
|
(progn
|
|
(defun spacemacs//vimrc-mode-hook ()
|
|
"Hooked function for `vimrc-mode-hook'."
|
|
(highlight-numbers-mode -1)
|
|
(rainbow-delimiters-mode-disable))
|
|
(add-hook 'vimrc-mode-hook 'spacemacs//vimrc-mode-hook))))
|
|
|
|
(defun vimscript/init-dactyl-mode ()
|
|
(use-package dactyl-mode
|
|
:mode "pentadactylrc\\'"
|
|
:mode "vimperatorrc\\'"
|
|
:mode "_pentadactylrc\\'"
|
|
:mode "_vimperatorrc\\'"
|
|
:mode "\\.penta\\'"
|
|
:mode "\\.vimp\\'"
|
|
:defer t))
|
|
|
|
(defun vimscript/post-init-ggtags ()
|
|
(add-hook 'vimrc-mode-local-vars-hook #'spacemacs/ggtags-mode-enable))
|
|
|
|
(defun vimscript/post-init-counsel-gtags ()
|
|
(spacemacs/counsel-gtags-define-keys-for-mode 'vimrc-mode))
|
|
|
|
(defun vimscript/post-init-helm-gtags ()
|
|
(spacemacs/helm-gtags-define-keys-for-mode 'vimrc-mode))
|