single syntax with «use-package»
This commit is contained in:
parent
4a3d8a46f9
commit
aaa86c4187
@ -1,10 +1,7 @@
|
||||
;;----------------------------------------------------------------------------
|
||||
;; Crystal Mode
|
||||
;;----------------------------------------------------------------------------
|
||||
(use-package 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))
|
||||
(use-package crystal-mode
|
||||
:mode ("\\.cr\\'" . crystal-mode))
|
||||
|
||||
(provide 'init-crystal)
|
||||
|
@ -1,6 +1,9 @@
|
||||
;; emmet-mode
|
||||
(use-package emmet-mode)
|
||||
(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.
|
||||
(use-package emmet-mode
|
||||
;; Enable for only languages
|
||||
:init
|
||||
(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.
|
||||
)
|
||||
|
||||
(provide 'init-emmet-mode)
|
||||
|
@ -1,12 +1,12 @@
|
||||
(use-package flycheck)
|
||||
|
||||
;; Enable for only languages
|
||||
;;(add-hook 'emacs-lisp-mode-hook 'flycheck-mode)
|
||||
(add-hook 'c++-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 'php-mode-hook 'flycheck-mode)
|
||||
;; (add-hook 'after-init-hook 'global-flycheck-mode)
|
||||
(use-package flycheck
|
||||
;; Enable for only languages
|
||||
:init
|
||||
;; (add-hook 'after-init-hook 'global-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 'js-mode-hook 'flycheck-mode)
|
||||
(add-hook 'php-mode-hook 'flycheck-mode)
|
||||
(add-hook 'sh-mode-hook 'flycheck-mode))
|
||||
|
||||
(provide 'init-flycheck)
|
||||
|
@ -1,8 +1,10 @@
|
||||
;; This minor mode highlights indentation levels via font-lock
|
||||
(use-package highlight-indent-guides)
|
||||
|
||||
(setq highlight-indent-guides-method 'character)
|
||||
|
||||
(add-hook 'prog-mode-hook 'highlight-indent-guides-mode)
|
||||
(use-package highlight-indent-guides
|
||||
:config
|
||||
(setq highlight-indent-guides-method 'character)
|
||||
;; Indent character samples: fill, column or character
|
||||
(setq highlight-indent-guides-method 'character)
|
||||
(add-hook 'prog-mode-hook 'highlight-indent-guides-mode))
|
||||
|
||||
(provide 'init-indent-guides)
|
||||
|
@ -1,7 +1,7 @@
|
||||
;;----------------------------------------------------------------------------
|
||||
;; Less Mode
|
||||
;;----------------------------------------------------------------------------
|
||||
(use-package less-css-mode)
|
||||
(add-to-list 'auto-mode-alist '("\\.less$" . less-css-mode))
|
||||
(use-package less-css-mode
|
||||
:mode ("\\.less\\'" . less-css-mode))
|
||||
|
||||
(provide 'init-less)
|
||||
|
@ -1,20 +1,18 @@
|
||||
;;----------------------------------------------------------------------------
|
||||
;; Markdown mode
|
||||
;;----------------------------------------------------------------------------
|
||||
(use-package markdown-mode)
|
||||
(use-package markdown-mode
|
||||
:mode (("\\.markdown\\'" . markdown-mode)
|
||||
("\\.md\\'" . markdown-mode))
|
||||
|
||||
(autoload 'markdown-mode "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
|
||||
;;----------------------------------------------------------------------------
|
||||
(eval-after-load "markdown-mode"
|
||||
'(defalias 'markdown-add-xhtml-header-and-footer 'as/markdown-add-xhtml-header-and-footer))
|
||||
|
||||
;;----------------------------------------------------------------------------
|
||||
;; Generated HTML 5 and UTF-8 with Markdown
|
||||
;;----------------------------------------------------------------------------
|
||||
(eval-after-load "markdown-mode"
|
||||
'(defalias 'markdown-add-xhtml-header-and-footer 'as/markdown-add-xhtml-header-and-footer))
|
||||
|
||||
(defun as/markdown-add-xhtml-header-and-footer (title)
|
||||
(defun as/markdown-add-xhtml-header-and-footer (title)
|
||||
"Wrap XHTML header and footer with given TITLE around current buffer."
|
||||
(goto-char (point-min))
|
||||
(insert "<!DOCTYPE html>\n"
|
||||
@ -30,6 +28,6 @@
|
||||
(goto-char (point-max))
|
||||
(insert "\n"
|
||||
"</body>\n"
|
||||
"</html>\n"))
|
||||
"</html>\n")))
|
||||
|
||||
(provide 'init-markdown)
|
||||
|
@ -4,43 +4,43 @@
|
||||
|
||||
(use-package smart-mode-line)
|
||||
(use-package smart-mode-line-powerline-theme)
|
||||
(use-package sml-modeline)
|
||||
;; Show number of occurrences when searching
|
||||
(use-package anzu)
|
||||
(use-package sml-modeline
|
||||
:config
|
||||
;; Show number of occurrences when searching
|
||||
(setq sml/theme 'powerline)
|
||||
|
||||
(setq sml/theme 'powerline)
|
||||
(setq sml/no-confirm-load-theme t)
|
||||
(setq sml/shorten-modes t)
|
||||
;; Show EOL mode
|
||||
(setq sml/show-eol t)
|
||||
;; Show remote buffers
|
||||
(setq sml/show-remote t)
|
||||
|
||||
(setq sml/no-confirm-load-theme t)
|
||||
(setq sml/shorten-modes t)
|
||||
;; Show EOL mode
|
||||
(setq sml/show-eol t)
|
||||
;; Show remote buffers
|
||||
(setq sml/show-remote t)
|
||||
(sml/setup)
|
||||
(add-to-list 'sml/replacer-regexp-list '("^~/Proyectos/git/" ":Git:") t)
|
||||
(add-to-list 'sml/replacer-regexp-list '("^~/www/" ":www:") t)
|
||||
|
||||
(sml/setup)
|
||||
(add-to-list 'sml/replacer-regexp-list '("^~/Proyectos/git/" ":Git:") t)
|
||||
(add-to-list 'sml/replacer-regexp-list '("^~/www/" ":www:") t)
|
||||
(sml-modeline-mode t))
|
||||
(use-package anzu
|
||||
:config
|
||||
(custom-set-variables
|
||||
'(anzu-search-threshold 1000)
|
||||
'(anzu-replace-threshold 1000)
|
||||
'(anzu-deactivate-region t)
|
||||
'(anzu-input-idle-delay 0.1)
|
||||
'(anzu-replace-to-string-separator " => "))
|
||||
(global-anzu-mode +1)
|
||||
(set-face-attribute 'anzu-mode-line nil
|
||||
:foreground "yellow" :weight 'bold)
|
||||
|
||||
(sml-modeline-mode t)
|
||||
(define-key isearch-mode-map [remap isearch-query-replace] #'anzu-isearch-query-replace)
|
||||
(define-key isearch-mode-map [remap isearch-query-replace-regexp] #'anzu-isearch-query-replace-regexp)
|
||||
|
||||
(custom-set-variables
|
||||
'(anzu-search-threshold 1000)
|
||||
'(anzu-replace-threshold 1000)
|
||||
'(anzu-deactivate-region t)
|
||||
'(anzu-input-idle-delay 0.1)
|
||||
'(anzu-replace-to-string-separator " => "))
|
||||
(global-anzu-mode +1)
|
||||
(set-face-attribute 'anzu-mode-line nil
|
||||
:foreground "yellow" :weight 'bold)
|
||||
|
||||
(define-key isearch-mode-map [remap isearch-query-replace] #'anzu-isearch-query-replace)
|
||||
(define-key isearch-mode-map [remap isearch-query-replace-regexp] #'anzu-isearch-query-replace-regexp)
|
||||
|
||||
;;----------------------------------------------------------------------------
|
||||
;; Keyboard shortcuts in Anzu Mode
|
||||
;;----------------------------------------------------------------------------
|
||||
(global-set-key (kbd "M-%") 'anzu-query-replace)
|
||||
(global-set-key (kbd "s-<SPC>") 'anzu-query-replace)
|
||||
;;----------------------------------------------------------------------------
|
||||
;; Keyboard shortcuts in Anzu Mode
|
||||
;;----------------------------------------------------------------------------
|
||||
(global-set-key (kbd "M-%") 'anzu-query-replace)
|
||||
(global-set-key (kbd "s-<SPC>") 'anzu-query-replace))
|
||||
|
||||
(myemacs/elapsed-time)
|
||||
(provide 'init-modeline)
|
||||
|
@ -1,17 +1,16 @@
|
||||
;;-----------------------------------
|
||||
;; Neotree - NerdTree for Vim
|
||||
;;-----------------------------------
|
||||
(use-package neotree)
|
||||
(global-set-key [f8] 'neotree-toggle)
|
||||
|
||||
;;-----------------------
|
||||
;; neo-smart-open
|
||||
;;-----------------------
|
||||
;;(setq neo-smart-open t)
|
||||
|
||||
;;---------------------------------------------------------
|
||||
;; Custom icons - Require of all-the-icons
|
||||
;;---------------------------------------------------------
|
||||
(setq neo-theme (if (display-graphic-p) 'icons 'arrow))
|
||||
(use-package neotree
|
||||
:config
|
||||
(global-set-key [f8] 'neotree-toggle)
|
||||
;;-----------------------
|
||||
;; neo-smart-open
|
||||
;;-----------------------
|
||||
;;(setq neo-smart-open t)
|
||||
;;---------------------------------------------------------
|
||||
;; Custom icons - Require of all-the-icons
|
||||
;;---------------------------------------------------------
|
||||
(setq neo-theme (if (display-graphic-p) 'icons 'arrow)))
|
||||
|
||||
(provide 'init-neotree)
|
||||
|
@ -1,8 +1,7 @@
|
||||
;;---------------------------
|
||||
;; Nginx Mode
|
||||
;;---------------------------
|
||||
(use-package nginx-mode)
|
||||
|
||||
(add-to-list 'auto-mode-alist '("/nginx/sites-\\(?:available\\|enabled\\)/" . nginx-mode))
|
||||
(use-package nginx-mode
|
||||
:mode ("/nginx/sites-\\(?:available\\|enabled\\)/" . nginx-mode))
|
||||
|
||||
(provide 'init-nginx)
|
||||
|
@ -1,21 +1,19 @@
|
||||
(use-package php-mode)
|
||||
(use-package ac-php)
|
||||
|
||||
(autoload 'php-mode "php-mode" "Major mode for editing PHP code." t)
|
||||
(add-to-list 'auto-mode-alist '("\\.php$" . php-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.inc$" . php-mode))
|
||||
(use-package php-mode
|
||||
:mode (("\\.php$" . php-mode)
|
||||
("\\.inc$" . php-mode))
|
||||
:config
|
||||
(add-hook 'php-mode-hook
|
||||
'(lambda ()
|
||||
(auto-complete-mode t)
|
||||
(require 'ac-php)
|
||||
(setq ac-sources '(ac-source-php ))
|
||||
(setq ac-sources '(ac-source-dictionary ac-source-abbrev ac-source-php ))
|
||||
|
||||
(add-hook 'php-mode-hook
|
||||
'(lambda ()
|
||||
(auto-complete-mode t)
|
||||
(require 'ac-php)
|
||||
(setq ac-sources '(ac-source-php ))
|
||||
(setq ac-sources '(ac-source-dictionary ac-source-abbrev ac-source-php ))
|
||||
|
||||
(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-t") 'ac-php-location-stack-back) ;go back
|
||||
))
|
||||
(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-t") 'ac-php-location-stack-back)))) ;go back
|
||||
|
||||
(use-package smarty-mode)
|
||||
|
||||
|
@ -1,6 +1,4 @@
|
||||
(use-package pkgbuild-mode)
|
||||
|
||||
(autoload 'pkgbuild-mode "pkgbuild-mode.el" "PKGBUILD mode." t)
|
||||
(setq auto-mode-alist (append '(("/PKGBUILD$" . pkgbuild-mode)) auto-mode-alist))
|
||||
(use-package pkgbuild-mode
|
||||
:mode ("/PKGBUILD$" . pkgbuild-mode))
|
||||
|
||||
(provide 'init-pkgbuild)
|
||||
|
@ -1,10 +1,11 @@
|
||||
;; rainbow-mode
|
||||
(use-package rainbow-mode)
|
||||
(add-hook 'css-mode-hook 'rainbow-mode)
|
||||
(add-hook 'sass-mode-hook 'rainbow-mode)
|
||||
(add-hook 'scss-mode-hook 'rainbow-mode)
|
||||
(add-hook 'less-mode-hook 'rainbow-mode)
|
||||
(add-hook 'web-mode-hook 'rainbow-mode)
|
||||
(add-hook 'html-mode-hook 'rainbow-mode)
|
||||
(use-package rainbow-mode
|
||||
:init
|
||||
(add-hook 'css-mode-hook 'rainbow-mode)
|
||||
(add-hook 'sass-mode-hook 'rainbow-mode)
|
||||
(add-hook 'scss-mode-hook 'rainbow-mode)
|
||||
(add-hook 'less-mode-hook 'rainbow-mode)
|
||||
(add-hook 'web-mode-hook 'rainbow-mode)
|
||||
(add-hook 'html-mode-hook 'rainbow-mode))
|
||||
|
||||
(provide 'init-rainbow)
|
||||
|
@ -1,7 +1,7 @@
|
||||
;;----------------------------------------------------------------------------
|
||||
;; Sass Mode
|
||||
;;----------------------------------------------------------------------------
|
||||
(use-package sass-mode)
|
||||
(add-to-list 'auto-mode-alist '("\\.sass\\'" . sass-mode))
|
||||
(use-package sass-mode
|
||||
:mode ("\\.sass\\'" . sass-mode))
|
||||
|
||||
(provide 'init-sass)
|
||||
|
@ -1,8 +1,7 @@
|
||||
;;----------------------------------------------------------------------------
|
||||
;; Scss Mode
|
||||
;;----------------------------------------------------------------------------
|
||||
(use-package scss-mode)
|
||||
|
||||
(add-to-list 'auto-mode-alist '("\\.scss\\'" . scss-mode))
|
||||
(use-package scss-mode
|
||||
:mode ("\\.scss\\'" . scss-mode))
|
||||
|
||||
(provide 'init-scss)
|
||||
|
@ -1,10 +1,10 @@
|
||||
(use-package sublime-themes)
|
||||
(load-theme 'spolsky t)
|
||||
|
||||
;; Fix linum current-line highlight. Doesn't looks good with this theme
|
||||
(defface my-linum-hl
|
||||
'((t :background "gray30" :foreground "gold"))
|
||||
"Face for the currently active Line number"
|
||||
:group 'linum)
|
||||
(use-package sublime-themes
|
||||
:config
|
||||
(load-theme 'spolsky t)
|
||||
;; Fix linum current-line highlight. Doesn't looks good with this theme
|
||||
(defface my-linum-hl
|
||||
'((t :background "gray30" :foreground "gold"))
|
||||
"Face for the currently active Line number"
|
||||
:group 'linum))
|
||||
|
||||
(provide 'init-theme)
|
||||
|
@ -1,4 +1,5 @@
|
||||
;; yaml-mode
|
||||
(use-package yaml-mode)
|
||||
(add-to-list 'auto-mode-alist '("\\.yml\\'" . yaml-mode))
|
||||
(use-package yaml-mode
|
||||
:mode ("\\.yml\\'" . yaml-mode))
|
||||
|
||||
(provide 'init-yaml)
|
||||
|
Loading…
x
Reference in New Issue
Block a user