All Projects → hlissner → emacs-pug-mode

hlissner / emacs-pug-mode

Licence: GPL-3.0 License
Pug support for Emacs, based on slim-mode.

Programming Languages

emacs lisp
2029 projects
Pug
443 projects
Makefile
30231 projects

Projects that are alternatives of or similar to emacs-pug-mode

Graphql Mode
An Emacs mode for GraphQL
Stars: ✭ 120 (+207.69%)
Mutual labels:  melpa, emacs-mode
emacs-mips-mode
An Emacs major mode for MIPS assembly code
Stars: ✭ 22 (-43.59%)
Mutual labels:  melpa, emacs-mode
go-playground
GNU/Emacs mode that setup local Go playground for code snippets like play.golang.org or even better :)
Stars: ✭ 64 (+64.1%)
Mutual labels:  melpa, emacs-mode
flycheck-dmd-dub
flycheck and DCD dub support to enable D IDE features in Emacs
Stars: ✭ 14 (-64.1%)
Mutual labels:  melpa
kontent-boilerplate-express-apollo
Kontent Boilerplate for development of Express application using Apollo server and GraphQL.
Stars: ✭ 21 (-46.15%)
Mutual labels:  pug
web-mode-edit-element
Helper-functions for attribute- and element-handling
Stars: ✭ 18 (-53.85%)
Mutual labels:  melpa
indent.js
Pure code indentation for jsx, tsx, ts, js, html, css, less, scss.
Stars: ✭ 55 (+41.03%)
Mutual labels:  pug
lsxc
Compile Livescript + Pug + React + SASS as a single component
Stars: ✭ 17 (-56.41%)
Mutual labels:  pug
sample-ui-react
Material-UI+ React.js + Redux [ Pug / Scss / Babel ]
Stars: ✭ 15 (-61.54%)
Mutual labels:  pug
company-ansible
Ansible keywords completion for Emacs
Stars: ✭ 21 (-46.15%)
Mutual labels:  melpa
generator-espress
an opinionated yeoman generator that scaffolds a mvc express webapp completely in es6
Stars: ✭ 20 (-48.72%)
Mutual labels:  pug
nestjs-mailer
🌈 A simple implementation example with and without email-templates using mailer module for nest js built on top of nodemailer.
Stars: ✭ 82 (+110.26%)
Mutual labels:  pug
shakespeare-mode
An emacs major mode for editing hamlet, lucius, and julius files
Stars: ✭ 35 (-10.26%)
Mutual labels:  melpa
web-generator
👑 Gulp based task runner which creates HTML output from Pug HTML templates
Stars: ✭ 13 (-66.67%)
Mutual labels:  pug
PugNotification
Strongly typed notifications for Swift. You might not need the pug parts.
Stars: ✭ 13 (-66.67%)
Mutual labels:  pug
vue-ssr-starter
Starter kit for projects with Webpack 4, Vue 2 and SSR
Stars: ✭ 53 (+35.9%)
Mutual labels:  pug
vue-bootstrap-boilerplate
📦 Vue 2/3, Bootstrap 5, Vuex, Vue-Router, Sass/Scss, ESLint, Axios (switch to vue3 branch)
Stars: ✭ 86 (+120.51%)
Mutual labels:  pug
preview-vscode
A previewer of Markdown and HTML for Visual Studio Code
Stars: ✭ 25 (-35.9%)
Mutual labels:  pug
virtual-jade
Compile Jade templates to Hyperscript for Virtual DOM libraries
Stars: ✭ 31 (-20.51%)
Mutual labels:  pug
alarm-clock
An alarm clock for Emacs
Stars: ✭ 15 (-61.54%)
Mutual labels:  melpa

Made with Doom Emacs Release tag MIT MELPA MELPA Stable Build Status

pug-mode

pug-mode offers Emacs support for Pug. Unlike jade-mode, it is based off of slim-mode.

Installation

pug-mode is available on MELPA.

M-x package-install RET pug-mode

(require 'pug-mode)

Why not use jade-mode?

I created pug-mode because jade-mode (based on sws-mode) is incomplete in ways that are inconvenient to me. For instance, it has poor/no fontification of plain-text, filter blocks, or mixin definitions/invokations; its indentation strategies seemed too aggressive and the source was too difficult to grok quickly to address these issues.

In contrast, it took me 10 minutes to grok slim-mode's source and another 10 to adapt it to Pug in—what I think—is a better result. Most of the code is lifted right out of slim-mode, so much of the credit belongs to its original developers!

Auto-compiling pug files

This plugin introduces a pug-compile function. You can call it directly (e.g. M-x pug-compile) or have it done automatically for .pug files:

(defun pug-compile-saved-file()
  (when (and (stringp buffer-file-name)
             (string-match "\\.pug\\'" buffer-file-name))
     (pug-compile)))
(add-hook 'after-save-hook 'pug-compile-saved-file)

It requires pug-cli.

Contributions

I am no expert at writing major modes for Emacs and welcome contributions of any kind. Be they pull requests, bug reports or elisp tips!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].