doomemacs/modules/tools/editorconfig
Henrik Lissner 261f94c768
bump: :tools
NicolasPetton/pass@5651da5313 -> NicolasPetton/pass@c721604b3b
Olivia5k/makefile-executor.el@170d14d834 -> Olivia5k/makefile-executor.el@d1d98eaf52
Silex/docker.el@cc0046e6a5 -> Silex/docker.el@6997c86a24
cjohansson/emacs-ssh-deploy@94b56c0428 -> cjohansson/emacs-ssh-deploy@95fb076c9b
editorconfig/editorconfig-emacs@6f6b5c1a95 -> editorconfig/editorconfig-emacs@2fed9599bc
emacs-lsp/dap-mode@de41d62fc4 -> emacs-lsp/dap-mode@096070aacf
emacs-lsp/lsp-mode@0dfe214573 -> emacs-lsp/lsp-mode@266945b3e4
emacs-pe/docker-tramp.el@930d7b46c1 -> emacs-pe/docker-tramp.el@19d0771db4
emacs-straight/eglot@a399fc0d03 -> emacs-straight/eglot@8ccec6532e
emacs-straight/rainbow-mode@8e96388fb4 -> emacs-straight/rainbow-mode@24437ec2c6
emacs-tree-sitter/tree-sitter-langs@944a734b7c -> emacs-tree-sitter/tree-sitter-langs@2f0f97abbd
emacsfodder/kurecolor@ac67ceba85 -> emacsfodder/kurecolor@fbf98e1e38
emacsorphanage/quickrun@7a89313c07 -> emacsorphanage/quickrun@6f96318930
meain/evil-textobj-tree-sitter@e8bb9d63de -> meain/evil-textobj-tree-sitter@19979843f5
millejoh/emacs-ipython-notebook@b2410dc96f -> millejoh/emacs-ipython-notebook@998ba22660
nicolaisingh/saveplace-pdf-view@54ed966b84 -> nicolaisingh/saveplace-pdf-view@abfb5e1f46
purcell/envrc@1954e8c0b5 -> purcell/envrc@33d01388ce
vedang/pdf-tools@bc2ba117e8 -> vedang/pdf-tools@c69e7656a4
xiongtx/eros@dd89102792 -> xiongtx/eros@a9a92bdc6b
zx2c4/password-store@26d2dae04b -> zx2c4/password-store@28cec11f1d

I've intentionally omitted magit from this list while I resolve
incompatibilities between code-review and later versions of
closql (emacsql).

I've also omitted treemacs b/c of #7410.
2023-09-12 21:30:56 +02:00
..
autoload.el 💥 Remove :feature category 2019-04-24 18:16:04 -04:00
config.el refactor: rename orig-fn arg in advice to fn 2021-08-04 01:53:12 -04:00
doctor.el tools/editorconfig: add binary check to doctor.el 2018-09-28 23:52:22 -04:00
packages.el bump: :tools 2023-09-12 21:30:56 +02:00
README.org docs: change link format 2022-10-05 01:01:19 +02:00

:tools editorconfig

Description   unfold

This module integrates EditorConfig into Emacs, allowing users to dictate code style on a per-project basis with an .editorconfig file (formal specification).

Module flags

This module has no flags.

Hacks

  • Added logic to guess an extension-less file's type from its shebang line. For example, editorconfig rules for *.py files will apply to bin/myscript assuming its first line is #!/usr/bin/env python. See +editorconfig-mode-alist for adding support for more languages.
  • Special integration for dtrt-indent: If the local editorconfig file specifies indent_style or indent_size, the doom-package:dtrt-indent (which tries to guess your indent settings by analyzing your text file) will bow out.
  • Special integration for ws-butler: this module will use doom-package:ws-butler to enforce trim_trailing_whitespace.

TODO Changelog

This module does not have a changelog yet.

Installation

Enable this module in your doom! block.

This module has one optional dependency: the editorconfig native binary. Without it, a built-in elisp implementation will be used, but it has fewer features and can be a bit slower.

The editorconfig binary has many implementations you can choose from, typically available through your OS package manager (or build it yourself).

Usage

You will need to write an .editorconfig file in your project (this is usually in the root of your project) you can find out about all the properties here.

TODO Configuration

🔨 This module's configuration documentation is incomplete. Complete it?

Adding support for more major modes

Out the box, the editorconfig plugin supports many Emacs major modes, but it's possible you'll find one it doesn't support. Adding support is easy so long as you know that mode's indentation variables. For example, coffee-mode has a coffee-tab-width variable that controls indentation width in CoffeeScript files. Editorconfig already supports this language, but let's pretend it doesn't:

The editorconfig-indentation-alist variable contains a list of major modes and their indentation variables. To add coffee-mode to it:

;; in $DOOMDIR/config.el
(after! editorconfig
  (add-to-list 'editorconfig-indentation-alist '(coffee-mode coffee-tab-width)))

But what if you don't know the correct indentation variable(s). Use SPC h v (C-h v for non-evil users) to peruse all the available variables in your current session of Emacs. Look for variables that have the words indent, offset or tab-width in them. They will be prefixed with the plugin they belong to (e.g. rustic-indent-offset).

Troubleshooting

There are no known problems with this module. Report one?

Frequently asked questions

This module has no FAQs yet. Ask one?

TODO Appendix

🔨 This module has no appendix yet. Write one?