Added support syntax Django
This commit is contained in:
parent
aa77769f08
commit
0064120e82
@ -11,7 +11,7 @@
|
||||
'(ecb-options-version "2.50")
|
||||
'(package-selected-packages
|
||||
(quote
|
||||
(dokuwiki-mode web-mode rainbow-mode yaml-mode sass-mode less-css-mode pkgbuild-mode py-autopep8 pip-requirements elpy company-php php-mode php-refactor-mode markdown-mode crystal-mode git-timemachine gitattributes-mode gitignore-mode gitconfig-mode git-gutter-fringe nginx-mode emmet-mode whitespace-cleanup-mode log4j-mode ivy-rich counsel flycheck company-quickhelp company apache-mode neotree shrink-path all-the-icons highlight-indent-guides anzu sml-modeline smart-mode-line-powerline-theme smart-mode-line ecb diminish undo-tree nlinum sublime-themes use-package))))
|
||||
(git-gutter-fringe yaml-mode whitespace-cleanup-mode web-mode use-package undo-tree sublime-themes sml-modeline smart-mode-line-powerline-theme shrink-path sass-mode rainbow-mode py-autopep8 pkgbuild-mode pip-requirements php-refactor-mode nlinum nginx-mode neotree markdown-mode log4j-mode less-css-mode ivy-rich highlight-indent-guides gitignore-mode gitconfig-mode gitattributes-mode git-timemachine flycheck emmet-mode elpy ecb dokuwiki-mode diminish crystal-mode counsel company-quickhelp company-php apache-mode anzu all-the-icons))))
|
||||
(custom-set-faces
|
||||
;; custom-set-faces was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
|
13
modules/init-projectile.el
Normal file
13
modules/init-projectile.el
Normal file
@ -0,0 +1,13 @@
|
||||
;;; init-projectile.el --- .Emacs Configuration -*- lexical-binding: t -*-
|
||||
;;; Commentary:
|
||||
;;
|
||||
|
||||
;;; Code:
|
||||
;; Projectile
|
||||
(use-package projectile
|
||||
:ensure t
|
||||
:init
|
||||
(projectile-mode))
|
||||
|
||||
(provide 'init-projectile)
|
||||
;;; init-yaml.el ends here
|
@ -15,7 +15,31 @@
|
||||
;; web-modeの設定
|
||||
(setq web-mode-enable-current-element-highlight t)
|
||||
(set-face-background 'web-mode-current-element-highlight-face "#a3a3a3")
|
||||
)
|
||||
|
||||
;; Django hook
|
||||
;; require projectile
|
||||
(defun my-django-mode-hook ()
|
||||
(if (projectile-project-p)
|
||||
(when (file-exists-p (concat (projectile-project-root) "manage.py"))
|
||||
(web-mode-set-engine "django")
|
||||
|
||||
;; HTML auto functions
|
||||
(setq web-mode-enable-auto-opening t)
|
||||
(setq web-mode-enable-auto-closing t)
|
||||
(setq web-mode-enable-auto-quoting t)
|
||||
(setq web-mode-enable-auto-expanding t)
|
||||
|
||||
;; Auto-pairing
|
||||
(require 'smartparens)
|
||||
(sp-pair "{% " " %}")
|
||||
(sp-pair "{{ " " }}")
|
||||
(sp-pair "{# " " #}")
|
||||
(sp-pair "{" nil :actions :rem)
|
||||
(sp-pair "<" ">")
|
||||
|
||||
(setq web-mode-enable-auto-pairing nil))))
|
||||
;; Add hooks
|
||||
(add-hook 'web-mode-hook 'my-django-mode-hook))
|
||||
|
||||
(provide 'init-web-mode)
|
||||
;;; init-web-mode.el ends here
|
||||
|
Loading…
x
Reference in New Issue
Block a user