Skip to content

Emacs poly mode for nginx configuration files with embedded lua

License

Notifications You must be signed in to change notification settings

harsman/poly-nginx-lua-mode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

poly-nginx-lua-mode

poly-nginx-lua-mode is a polymode minor mode for editing nginx configuration files with embedded Lua code. It uses polymode to support dual major modes in one file.

This is very useful when using e.g. OpenResty.

Get the latest version of poly-nginx-lua-mode at https://github.com/harsman/poly-nginx-lua-mode

Installation

From MELPA

Since version 24.1, Emacs includes a package management system. Using the MELPA package repository is the easiest way to install and update poly-nginx-lua-mode.

If you have installed packages from Melpa before, all you have to do is:

M-x package-install RET poly-nginx-lua-mode RET

If you haven't used Melpa before, then you have to configure package.el first. Add the following to your init file

(require 'package)
(add-to-list 'package-archives
             '("melpa" . "http://melpa.org/packages/") t)

Restart Emacs and update the package cache by running:

M-x package-refresh-contents RET

You can now install poly-nginx-lua-mode by running M-x package-install, as above.

Installing in older versions of Emacs

If you have an older version of Emacs, please follow the instructions from MELPA.

Installing manually

To install manually, clone the git repository and add the following to your init file:

(autoload 'poly-nginx-lua-mode 
          "/path/to/poly-nginx-lua-mode.el"
          "Edit Nginx configs with embedded Lua" t)

Dependencies

If you install with package.el then dependencies are automatically installed. If you install manually, you have to install dependencies manually as well.

  • polymode is used to enable multiple major modes in a single buffer. Get it here.
  • nginx-mode is the mode used for editing the non-Lua parts of the nginx configuration. Get it here

Getting started

To get started, just open any nginx configuration file and do M-x poly-nginx-lua-mode.

About

Emacs poly mode for nginx configuration files with embedded lua

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published