-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
207 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
'( | ||
company | ||
company-tern | ||
company-c-headers | ||
)) | ||
|
||
(defvar company-mode-excluded-packages | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# HTML contribution layer for Spacemacs | ||
|
||
![logo](html.png) | ||
|
||
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc/generate-toc again --> | ||
**Table of Contents** | ||
|
||
- [HTML contribution layer for Spacemacs](#html-contribution-layer-for-spacemacs) | ||
- [Description](#description) | ||
- [Install](#install) | ||
- [Key Bindings](#key-bindings) | ||
|
||
<!-- markdown-toc end --> | ||
|
||
## Description | ||
|
||
This layer adds support for editing HTML and CSS. | ||
|
||
Features: | ||
- Editing HTML and CSS file using [web-mode][] | ||
- Support for Scss and Less files | ||
- Generate HTML and CSS coding using [emmet-mode][] | ||
|
||
## Install | ||
|
||
To use this contribution add it to your `~/.spacemacs` | ||
|
||
```elisp | ||
(setq-default dotspacemacs-configuration-layers '(html) | ||
"List of contribution to load." | ||
) | ||
``` | ||
|
||
## Key Bindings | ||
|
||
### commands | ||
|
||
Key Binding | Description | ||
---------------------|------------------------------------------------------------ | ||
<kbd>SPC m h</kbd> | quick navigate CSS rules using helm | ||
|
||
[web-mode]: http://web-mode.org/ | ||
[emmet-mode]: https://github.com/smihica/emmet-mode |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
(defvar html-packages | ||
'( | ||
emmet-mode | ||
flycheck | ||
helm-css-scss | ||
less-css-mode | ||
scss-mode | ||
tagedit | ||
web-mode | ||
) | ||
"List of all packages to install and/or initialize. Built-in packages | ||
which require an initialization must be listed explicitly in the list.") | ||
|
||
(defun html/init-helm-css-scss () | ||
(use-package helm-css-scss | ||
:defer t | ||
:init | ||
(eval-after-load 'scss-mode | ||
'(evil-leader/set-key-for-mode 'scss-mode "mh" 'helm-css-scss)))) | ||
|
||
(defun html/init-web-mode () | ||
(use-package web-mode | ||
:defer t | ||
:mode (("\\.phtml\\'" . web-mode) | ||
("\\.tpl\\.php\\'" . web-mode) | ||
("\\.html\\'" . web-mode) | ||
("\\.htm\\'" . web-mode) | ||
("\\.[gj]sp\\'" . web-mode) | ||
("\\.as[cp]x\\'" . web-mode) | ||
("\\.erb\\'" . web-mode) | ||
("\\.mustache\\'" . web-mode) | ||
("\\.djhtml\\'" . web-mode)))) | ||
|
||
(defun html/init-emmet-mode () | ||
(use-package emmet-mode | ||
:defer t | ||
:init | ||
(progn | ||
(add-hook 'web-mode-hook 'emmet-mode) | ||
(add-hook 'html-mode-hook 'emmet-mode) | ||
(add-hook 'css-mode-hook 'emmet-mode)) | ||
:config | ||
(progn | ||
;; buggy with undo-tree, need to take a look | ||
;; (local-set-key (kbd "<tab>") 'emmet-expand-yas) | ||
(spacemacs|hide-lighter emmet-mode)))) | ||
|
||
(defun html/init-scss-mode () | ||
(use-package scss-mode | ||
:defer t | ||
:mode ("\\.scss\\'" . scss-mode))) | ||
|
||
(defun html/init-flycheck () | ||
(add-hook 'web-mode-hook 'flycheck-mode) | ||
(add-hook 'scss-mode-hook 'flycheck-mode)) | ||
|
||
(defun html/init-tagedit () | ||
(use-package tagedit | ||
:defer t | ||
:config | ||
(progn | ||
(tagedit-add-experimental-features) | ||
(add-hook 'html-mode-hook (lambda () (tagedit-mode 1))) | ||
(spacemacs|diminish tagedit-mode " Ⓣ")))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.