Skip to content

hensansi/editorconfig-emacs

 
 

Repository files navigation

Build Status MELPA MELPA Stable

EditorConfig Emacs Plugin

This is an EditorConfig plugin for Emacs.

Installation

Download the EditorConfig C Core and follow the instructions in the README and INSTALL files to install it.

Or, when no Core executable is found, this plugin uses Emacs Lisp implemented Core as a fallback.

In either case, copy .el files in this repository to ~/.emacs.d/lisp and add the following to your ~/.emacs file:

(add-to-list 'load-path "~/.emacs.d/lisp")
(require 'editorconfig)
(editorconfig-mode 1)

Alternatively, you can find the package available on Marmalade and MELPA.

Supported properties

Current Emacs plugin coverage for EditorConfig's properties:

  • indent_style
  • indent_size
  • tab_width
  • end_of_line
  • charset
  • trim_trailing_whitespace
  • insert_final_newline = true is supported
  • insert_final_newline = false is not enforced (as in trailing newlines actually being removed automagically), we just buffer-locally override any preferences that would auto-add them to files .editorconfig marks as trailing-newline-free
  • max_line_length
  • root (only used by EditorConfig core)

Not yet covered properties marked with over-strike – pull requests implementing missing features warmly welcomed! Typically, you will want to tie these to native functionality, or the configuration of existing packages handling the feature.

As several packages have their own handling of, say, indention, we might not yet cover some mode you use, but we try to add the ones that show up on our radar. Similarly, we don't yet hook in to all different packages for whitespace trimming to inform them about editorconfig settings, but aim for better coverage of things like ws-trim.

Testing

Make and CMake must be installed to run the tests.

To run the tests:

$ make test

Submitting Bugs and Feature Requests

Bugs, feature requests, and other issues should be submitted to the issue tracker: https://github.com/editorconfig/editorconfig-emacs/issues

License

EditorConfig Emacs Plugin is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

About

EditorConfig plugin for emacs

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Emacs Lisp 97.6%
  • Makefile 2.4%