single syntax with «use-package»

This commit is contained in:
Jesús 2018-10-26 23:27:56 -05:00
parent 4a3d8a46f9
commit aaa86c4187
No known key found for this signature in database
GPG Key ID: F6EE7BC59A315766
16 changed files with 120 additions and 125 deletions

View File

@ -1,10 +1,7 @@
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
;; Crystal Mode ;; Crystal Mode
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
(use-package crystal-mode) (use-package crystal-mode
:mode ("\\.cr\\'" . crystal-mode))
(autoload 'crystal-mode "crystal-mode" "Major mode for crystal files" t)
(add-to-list 'auto-mode-alist '("\\.cr$" . crystal-mode))
(add-to-list 'interpreter-mode-alist '("crystal" . crystal-mode))
(provide 'init-crystal) (provide 'init-crystal)

View File

@ -1,6 +1,9 @@
;; emmet-mode ;; emmet-mode
(use-package emmet-mode) (use-package emmet-mode
;; Enable for only languages
:init
(add-hook 'sgml-mode-hook 'emmet-mode) ;; Auto-start on any markup modes (add-hook 'sgml-mode-hook 'emmet-mode) ;; Auto-start on any markup modes
(add-hook 'css-mode-hook 'emmet-mode) ;; enable Emmet's css abbreviation. (add-hook 'css-mode-hook 'emmet-mode) ;; enable Emmet's css abbreviation.
)
(provide 'init-emmet-mode) (provide 'init-emmet-mode)

View File

@ -1,12 +1,12 @@
(use-package flycheck) (use-package flycheck
;; Enable for only languages ;; Enable for only languages
;;(add-hook 'emacs-lisp-mode-hook 'flycheck-mode) :init
;; (add-hook 'after-init-hook 'global-flycheck-mode)
(add-hook 'c++-mode-hook 'flycheck-mode) (add-hook 'c++-mode-hook 'flycheck-mode)
;; (add-hook 'emacs-lisp-mode-hook 'flycheck-mode)
(add-hook 'html-mode-hook 'flycheck-mode) (add-hook 'html-mode-hook 'flycheck-mode)
(add-hook 'sh-mode-hook 'flycheck-mode)
(add-hook 'js-mode-hook 'flycheck-mode) (add-hook 'js-mode-hook 'flycheck-mode)
(add-hook 'php-mode-hook 'flycheck-mode) (add-hook 'php-mode-hook 'flycheck-mode)
;; (add-hook 'after-init-hook 'global-flycheck-mode) (add-hook 'sh-mode-hook 'flycheck-mode))
(provide 'init-flycheck) (provide 'init-flycheck)

View File

@ -1,8 +1,10 @@
;; This minor mode highlights indentation levels via font-lock ;; This minor mode highlights indentation levels via font-lock
(use-package highlight-indent-guides)
(use-package highlight-indent-guides
:config
(setq highlight-indent-guides-method 'character) (setq highlight-indent-guides-method 'character)
;; Indent character samples: fill, column or character
(add-hook 'prog-mode-hook 'highlight-indent-guides-mode) (setq highlight-indent-guides-method 'character)
(add-hook 'prog-mode-hook 'highlight-indent-guides-mode))
(provide 'init-indent-guides) (provide 'init-indent-guides)

View File

@ -1,7 +1,7 @@
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
;; Less Mode ;; Less Mode
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
(use-package less-css-mode) (use-package less-css-mode
(add-to-list 'auto-mode-alist '("\\.less$" . less-css-mode)) :mode ("\\.less\\'" . less-css-mode))
(provide 'init-less) (provide 'init-less)

View File

@ -1,13 +1,11 @@
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
;; Markdown mode ;; Markdown mode
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
(use-package markdown-mode) (use-package markdown-mode
:mode (("\\.markdown\\'" . markdown-mode)
(autoload 'markdown-mode "markdown-mode" ("\\.md\\'" . markdown-mode))
"Major mode for editing Markdown files" t)
(add-to-list 'auto-mode-alist '("\\.markdown\\'" . markdown-mode))
(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode))
:config
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
;; Generated HTML 5 and UTF-8 with Markdown ;; Generated HTML 5 and UTF-8 with Markdown
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
@ -30,6 +28,6 @@
(goto-char (point-max)) (goto-char (point-max))
(insert "\n" (insert "\n"
"</body>\n" "</body>\n"
"</html>\n")) "</html>\n")))
(provide 'init-markdown) (provide 'init-markdown)

View File

@ -4,10 +4,9 @@
(use-package smart-mode-line) (use-package smart-mode-line)
(use-package smart-mode-line-powerline-theme) (use-package smart-mode-line-powerline-theme)
(use-package sml-modeline) (use-package sml-modeline
:config
;; Show number of occurrences when searching ;; Show number of occurrences when searching
(use-package anzu)
(setq sml/theme 'powerline) (setq sml/theme 'powerline)
(setq sml/no-confirm-load-theme t) (setq sml/no-confirm-load-theme t)
@ -21,8 +20,9 @@
(add-to-list 'sml/replacer-regexp-list '("^~/Proyectos/git/" ":Git:") t) (add-to-list 'sml/replacer-regexp-list '("^~/Proyectos/git/" ":Git:") t)
(add-to-list 'sml/replacer-regexp-list '("^~/www/" ":www:") t) (add-to-list 'sml/replacer-regexp-list '("^~/www/" ":www:") t)
(sml-modeline-mode t) (sml-modeline-mode t))
(use-package anzu
:config
(custom-set-variables (custom-set-variables
'(anzu-search-threshold 1000) '(anzu-search-threshold 1000)
'(anzu-replace-threshold 1000) '(anzu-replace-threshold 1000)
@ -40,7 +40,7 @@
;; Keyboard shortcuts in Anzu Mode ;; Keyboard shortcuts in Anzu Mode
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
(global-set-key (kbd "M-%") 'anzu-query-replace) (global-set-key (kbd "M-%") 'anzu-query-replace)
(global-set-key (kbd "s-<SPC>") 'anzu-query-replace) (global-set-key (kbd "s-<SPC>") 'anzu-query-replace))
(myemacs/elapsed-time) (myemacs/elapsed-time)
(provide 'init-modeline) (provide 'init-modeline)

View File

@ -1,17 +1,16 @@
;;----------------------------------- ;;-----------------------------------
;; Neotree - NerdTree for Vim ;; Neotree - NerdTree for Vim
;;----------------------------------- ;;-----------------------------------
(use-package neotree) (use-package neotree
:config
(global-set-key [f8] 'neotree-toggle) (global-set-key [f8] 'neotree-toggle)
;;----------------------- ;;-----------------------
;; neo-smart-open ;; neo-smart-open
;;----------------------- ;;-----------------------
;;(setq neo-smart-open t) ;;(setq neo-smart-open t)
;;--------------------------------------------------------- ;;---------------------------------------------------------
;; Custom icons - Require of all-the-icons ;; Custom icons - Require of all-the-icons
;;--------------------------------------------------------- ;;---------------------------------------------------------
(setq neo-theme (if (display-graphic-p) 'icons 'arrow)) (setq neo-theme (if (display-graphic-p) 'icons 'arrow)))
(provide 'init-neotree) (provide 'init-neotree)

View File

@ -1,8 +1,7 @@
;;--------------------------- ;;---------------------------
;; Nginx Mode ;; Nginx Mode
;;--------------------------- ;;---------------------------
(use-package nginx-mode) (use-package nginx-mode
:mode ("/nginx/sites-\\(?:available\\|enabled\\)/" . nginx-mode))
(add-to-list 'auto-mode-alist '("/nginx/sites-\\(?:available\\|enabled\\)/" . nginx-mode))
(provide 'init-nginx) (provide 'init-nginx)

View File

@ -1,10 +1,9 @@
(use-package php-mode)
(use-package ac-php) (use-package ac-php)
(autoload 'php-mode "php-mode" "Major mode for editing PHP code." t) (use-package php-mode
(add-to-list 'auto-mode-alist '("\\.php$" . php-mode)) :mode (("\\.php$" . php-mode)
(add-to-list 'auto-mode-alist '("\\.inc$" . php-mode)) ("\\.inc$" . php-mode))
:config
(add-hook 'php-mode-hook (add-hook 'php-mode-hook
'(lambda () '(lambda ()
(auto-complete-mode t) (auto-complete-mode t)
@ -14,8 +13,7 @@
(ac-php-core-eldoc-setup ) ;; enable eldoc (ac-php-core-eldoc-setup ) ;; enable eldoc
(define-key php-mode-map (kbd "C-]") 'ac-php-find-symbol-at-point) ;goto define (define-key php-mode-map (kbd "C-]") 'ac-php-find-symbol-at-point) ;goto define
(define-key php-mode-map (kbd "C-t") 'ac-php-location-stack-back) ;go back (define-key php-mode-map (kbd "C-t") 'ac-php-location-stack-back)))) ;go back
))
(use-package smarty-mode) (use-package smarty-mode)

View File

@ -1,6 +1,4 @@
(use-package pkgbuild-mode) (use-package pkgbuild-mode
:mode ("/PKGBUILD$" . pkgbuild-mode))
(autoload 'pkgbuild-mode "pkgbuild-mode.el" "PKGBUILD mode." t)
(setq auto-mode-alist (append '(("/PKGBUILD$" . pkgbuild-mode)) auto-mode-alist))
(provide 'init-pkgbuild) (provide 'init-pkgbuild)

View File

@ -1,10 +1,11 @@
;; rainbow-mode ;; rainbow-mode
(use-package rainbow-mode) (use-package rainbow-mode
:init
(add-hook 'css-mode-hook 'rainbow-mode) (add-hook 'css-mode-hook 'rainbow-mode)
(add-hook 'sass-mode-hook 'rainbow-mode) (add-hook 'sass-mode-hook 'rainbow-mode)
(add-hook 'scss-mode-hook 'rainbow-mode) (add-hook 'scss-mode-hook 'rainbow-mode)
(add-hook 'less-mode-hook 'rainbow-mode) (add-hook 'less-mode-hook 'rainbow-mode)
(add-hook 'web-mode-hook 'rainbow-mode) (add-hook 'web-mode-hook 'rainbow-mode)
(add-hook 'html-mode-hook 'rainbow-mode) (add-hook 'html-mode-hook 'rainbow-mode))
(provide 'init-rainbow) (provide 'init-rainbow)

View File

@ -1,7 +1,7 @@
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
;; Sass Mode ;; Sass Mode
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
(use-package sass-mode) (use-package sass-mode
(add-to-list 'auto-mode-alist '("\\.sass\\'" . sass-mode)) :mode ("\\.sass\\'" . sass-mode))
(provide 'init-sass) (provide 'init-sass)

View File

@ -1,8 +1,7 @@
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
;; Scss Mode ;; Scss Mode
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
(use-package scss-mode) (use-package scss-mode
:mode ("\\.scss\\'" . scss-mode))
(add-to-list 'auto-mode-alist '("\\.scss\\'" . scss-mode))
(provide 'init-scss) (provide 'init-scss)

View File

@ -1,10 +1,10 @@
(use-package sublime-themes) (use-package sublime-themes
:config
(load-theme 'spolsky t) (load-theme 'spolsky t)
;; Fix linum current-line highlight. Doesn't looks good with this theme ;; Fix linum current-line highlight. Doesn't looks good with this theme
(defface my-linum-hl (defface my-linum-hl
'((t :background "gray30" :foreground "gold")) '((t :background "gray30" :foreground "gold"))
"Face for the currently active Line number" "Face for the currently active Line number"
:group 'linum) :group 'linum))
(provide 'init-theme) (provide 'init-theme)

View File

@ -1,4 +1,5 @@
;; yaml-mode ;; yaml-mode
(use-package yaml-mode) (use-package yaml-mode
(add-to-list 'auto-mode-alist '("\\.yml\\'" . yaml-mode)) :mode ("\\.yml\\'" . yaml-mode))
(provide 'init-yaml) (provide 'init-yaml)