docs(:tools): update READMEs to new format
This commit is contained in:
parent
a226655486
commit
6da20e45bd
21 changed files with 1401 additions and 748 deletions
|
@ -1,46 +1,44 @@
|
|||
#+TITLE: tools/editorconfig
|
||||
#+DATE: August 22, 2020
|
||||
#+SINCE: 2.0.9
|
||||
#+STARTUP: inlineimages nofold
|
||||
← [[doom-module-index:][Back to module index]] ↙ [[doom-module-issues:::tools editorconfig][Issues]] ↖ [[doom-module-source:tools/editorconfig][Source]] ± [[doom-suggest-edit:][Suggest edits]] ? [[doom-help-modules:][Help]]
|
||||
--------------------------------------------------------------------------------
|
||||
#+TITLE: :tools editorconfig
|
||||
#+SUBTITLE: Let someone else argue tabs and spaces
|
||||
#+CREATED: December 27, 2015
|
||||
#+SINCE: 0.9
|
||||
|
||||
* Table of Contents :TOC_3:noexport:
|
||||
- [[#description][Description]]
|
||||
- [[#maintainers][Maintainers]]
|
||||
- [[#module-flags][Module Flags]]
|
||||
- [[#plugins][Plugins]]
|
||||
- [[#hacks][Hacks]]
|
||||
- [[#prerequisites][Prerequisites]]
|
||||
- [[#features][Features]]
|
||||
- [[#configuration][Configuration]]
|
||||
- [[#adding-support-for-more-major-modes][Adding support for more major modes]]
|
||||
- [[#troubleshooting][Troubleshooting]]
|
||||
|
||||
* Description
|
||||
* Description :unfold:
|
||||
This module integrates [[https://editorconfig.org/][EditorConfig]] into Emacs, allowing users to dictate code
|
||||
style on a per-project basis with an =.editorconfig= file ([[https://editorconfig-specification.readthedocs.io/][formal
|
||||
specification]]).
|
||||
|
||||
** Maintainers
|
||||
This module has no dedicated maintainers
|
||||
- [[doom-user:][@hlissner]]
|
||||
|
||||
** Module Flags
|
||||
This module provides no flags.
|
||||
[[doom-contrib-maintainer:][Become a maintainer?]]
|
||||
|
||||
** Plugins
|
||||
+ [[https://github.com/editorconfig/editorconfig-emacs][editorconfig-emacs]]
|
||||
** Module flags
|
||||
/This module has no flags./
|
||||
|
||||
** Packages
|
||||
- [[doom-package:][editorconfig-emacs]]
|
||||
|
||||
** Hacks
|
||||
+ Added logic to guess an extension-less file's type from its shebang line. For
|
||||
- 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 =dtrt-indent= (which tries to
|
||||
- *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 =ws-butler= to
|
||||
- *Special integration for =ws-butler=:* this module will use [[doom-package:][ws-butler]] to
|
||||
enforce ~trim_trailing_whitespace~.
|
||||
|
||||
* Prerequisites
|
||||
** TODO Changelog
|
||||
# This section will be machine generated. Don't edit it by hand.
|
||||
/This module does not have a changelog yet./
|
||||
|
||||
* Installation
|
||||
[[id:01cffea4-3329-45e2-a892-95a384ab2338][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.
|
||||
|
@ -48,11 +46,15 @@ features and can be a bit slower.
|
|||
The editorconfig binary has [[https://github.com/editorconfig#contributing][many implementations]] you can choose from, typically
|
||||
available through your OS package manager (or build it yourself).
|
||||
|
||||
* Features
|
||||
* 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 [[https://editorconfig.org/#example-file][here]]
|
||||
in the root of your project) you can find out about all the properties [[https://editorconfig.org/#example-file][here]].
|
||||
|
||||
* TODO Configuration
|
||||
#+begin_quote
|
||||
🔨 /This module's configuration documentation is incomplete./ [[doom-contrib-module:][Complete it?]]
|
||||
#+end_quote
|
||||
|
||||
* Configuration
|
||||
** 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
|
||||
|
@ -63,16 +65,25 @@ doesn't:
|
|||
|
||||
The ~editorconfig-indentation-alist~ variable contains a list of major modes and
|
||||
their indentation variables. To add coffee-mode to it:
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
#+begin_src emacs-lisp
|
||||
;; in $DOOMDIR/config.el
|
||||
(after! editorconfig
|
||||
(add-to-list 'editorconfig-indentation-alist '(coffee-mode coffee-tab-width)))
|
||||
#+END_SRC
|
||||
#+end_src
|
||||
|
||||
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~).
|
||||
But what if you don't know the correct indentation variable(s). Use [[kbd:][SPC h v]] ([[kbd:][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~).
|
||||
|
||||
* TODO Troubleshooting
|
||||
* Troubleshooting
|
||||
/There are no known problems with this module./ [[doom-report:][Report one?]]
|
||||
|
||||
* Frequently asked questions
|
||||
/This module has no FAQs yet./ [[doom-suggest-faq:][Ask one?]]
|
||||
|
||||
* TODO Appendix
|
||||
#+begin_quote
|
||||
🔨 This module has no appendix yet. [[doom-contrib-module:][Write one?]]
|
||||
#+end_quote
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue