dotemacs

My Emacs configuration
git clone git://git.entf.net/dotemacs
Log | Files | Refs | LICENSE

editorconfig.info (11356B)


      1 This is docuFgV6T.info, produced by makeinfo version 6.7 from
      2 editorconfig.texi.
      3 
      4 INFO-DIR-SECTION Emacs
      5 START-INFO-DIR-ENTRY
      6 * EditorConfig: (editorconfig). EditorConfig Emacs Plugin.
      7 END-INFO-DIR-ENTRY
      8 
      9 
     10 File: docuFgV6T.info,  Node: Top,  Next: Getting Started,  Up: (dir)
     11 
     12 1 EditorConfig Emacs Plugin
     13 ***************************
     14 
     15 This is an EditorConfig (https://editorconfig.org) plugin for Emacs
     16 (https://www.gnu.org/software/emacs/).
     17 
     18 * Menu:
     19 
     20 * Getting Started::
     21 * Supported properties::
     22 * Customize::
     23 * Troubleshooting::
     24 * Submitting Bugs and Feature Requests::
     25 * License::
     26 
     27 
     28 File: docuFgV6T.info,  Node: Getting Started,  Next: Supported properties,  Prev: Top,  Up: Top
     29 
     30 1.1 Getting Started
     31 ===================
     32 
     33 * Menu:
     34 
     35 * packageel::
     36 * use-package::
     37 * Manual installation::
     38 
     39 
     40 File: docuFgV6T.info,  Node: packageel,  Next: use-package,  Up: Getting Started
     41 
     42 1.1.1 package.el
     43 ----------------
     44 
     45 This package is available from MELPA (https://melpa.org/#/editorconfig),
     46 MELPA Stable (https://stable.melpa.org/#/editorconfig) and NonGNU ELPA
     47 (http://elpa.nongnu.org/nongnu/editorconfig.html).  Install from these
     48 repositories and enable global minor-mode 'editorconfig-mode':
     49 
     50 (editorconfig-mode 1)
     51 
     52    Normally, enabling 'editorconfig-mode' should be enough for this
     53 plugin to work: all other configurations are optional.  This mode sets
     54 up hooks so that EditorConfig properties will be loaded and applied to
     55 the new buffers automatically when visiting files.
     56 
     57 
     58 File: docuFgV6T.info,  Node: use-package,  Next: Manual installation,  Prev: packageel,  Up: Getting Started
     59 
     60 1.1.2 use-package
     61 -----------------
     62 
     63 If you use *use-package* (https://www.emacswiki.org/emacs/UsePackage),
     64 add the following to your 'init.el' file:
     65 
     66 (use-package editorconfig
     67   :ensure t
     68   :config
     69   (editorconfig-mode 1))
     70 
     71 
     72 File: docuFgV6T.info,  Node: Manual installation,  Prev: use-package,  Up: Getting Started
     73 
     74 1.1.3 Manual installation
     75 -------------------------
     76 
     77 Copy all '.el' files in this repository to '~/.emacs.d/lisp' and add the
     78 following:
     79 
     80 (add-to-list 'load-path "~/.emacs.d/lisp")
     81 (require 'editorconfig)
     82 (editorconfig-mode 1)
     83 
     84 
     85 File: docuFgV6T.info,  Node: Supported properties,  Next: Customize,  Prev: Getting Started,  Up: Top
     86 
     87 1.2 Supported properties
     88 ========================
     89 
     90 Current Emacs plugin coverage for EditorConfig's properties
     91 (https://editorconfig.org/#supported-properties):
     92 
     93    * 'indent_style'
     94    * 'indent_size'
     95    * 'tab_width'
     96    * 'end_of_line'
     97    * 'charset'
     98    * 'trim_trailing_whitespace'
     99    * 'insert_final_newline = true' is supported
    100    * 'insert_final_newline = false' is not enforced (as in trailing
    101      newlines actually being removed automagically), we just
    102      buffer-locally override any preferences that would auto-add them to
    103      files '.editorconfig' marks as trailing-newline-free
    104    * 'max_line_length'
    105    * 'file_type_ext' (Experimental) (See below)
    106    * 'file_type_emacs' (Experimental) (See below)
    107    * 'root' (only used by EditorConfig core)
    108 
    109    Not yet covered properties marked with over-strike - pull requests
    110 implementing missing features warmly welcomed!  Typically, you will want
    111 to tie these to native functionality, or the configuration of existing
    112 packages handling the feature.
    113 
    114    As several packages have their own handling of, say, indentation, we
    115 might not yet cover some mode you use, but we try to add the ones that
    116 show up on our radar.
    117 
    118 * Menu:
    119 
    120 * File Type file_type_ext file_type_emacs::
    121 
    122 
    123 File: docuFgV6T.info,  Node: File Type file_type_ext file_type_emacs,  Up: Supported properties
    124 
    125 1.2.1 File Type (file_type_ext, file_type_emacs)
    126 ------------------------------------------------
    127 
    128 File-type feature is currently disabled, because this package is now
    129 undergoing big internal refactoring.  For those who want this
    130 functionality, please consider using editorconfig-custom-majormode
    131 (https://github.com/10sr/editorconfig-custom-majormode-el).
    132 
    133 
    134 File: docuFgV6T.info,  Node: Customize,  Next: Troubleshooting,  Prev: Supported properties,  Up: Top
    135 
    136 1.3 Customize
    137 =============
    138 
    139 'editorconfig-emacs' provides some customize variables.
    140 
    141    Here are some of these variables: for the full list of available
    142 variables, type M-x customize-group [RET] editorconfig [RET].
    143 
    144 * Menu:
    145 
    146 * editorconfig-trim-whitespaces-mode::
    147 * editorconfig-after-apply-functions::
    148 * editorconfig-hack-properties-functions::
    149 
    150 
    151 File: docuFgV6T.info,  Node: editorconfig-trim-whitespaces-mode,  Next: editorconfig-after-apply-functions,  Up: Customize
    152 
    153 1.3.1 'editorconfig-trim-whitespaces-mode'
    154 ------------------------------------------
    155 
    156 Buffer local minor-mode to use to trim trailing whitespaces.
    157 
    158    If set, editorconfig will enable/disable this mode in accord with
    159 'trim_trailing_whitespace' property in '.editorconfig'.  Otherwise, use
    160 Emacs built-in 'delete-trailing-whitespace' function.
    161 
    162    One possible value is 'ws-butler-mode'
    163 (https://github.com/lewang/ws-butler), with which only lines touched get
    164 trimmed.  To use it, add following to your init.el:
    165 
    166 (setq editorconfig-trim-whitespaces-mode
    167       'ws-butler-mode)
    168 
    169 
    170 File: docuFgV6T.info,  Node: editorconfig-after-apply-functions,  Next: editorconfig-hack-properties-functions,  Prev: editorconfig-trim-whitespaces-mode,  Up: Customize
    171 
    172 1.3.2 'editorconfig-after-apply-functions'
    173 ------------------------------------------
    174 
    175 (Formerly 'editorconfig-custom-hooks')
    176 
    177    A list of functions which will be called after loading common
    178 EditorConfig settings, when you can set some custom variables.
    179 
    180    For example, 'web-mode' has several variables for indentation offset
    181 size and EditorConfig sets them at once by 'indent_size'.  You can stop
    182 indenting only blocks of 'web-mode' by adding following to your init.el:
    183 
    184 (add-hook 'editorconfig-after-apply-functions
    185   (lambda (props) (setq web-mode-block-padding 0)))
    186 
    187 
    188 File: docuFgV6T.info,  Node: editorconfig-hack-properties-functions,  Prev: editorconfig-after-apply-functions,  Up: Customize
    189 
    190 1.3.3 'editorconfig-hack-properties-functions'
    191 ----------------------------------------------
    192 
    193 A list of functions to alter property values before applying them.
    194 
    195    These functions will be run after loading ".editorconfig" files and
    196 before applying them to current buffer, so that you can alter some
    197 properties from ".editorconfig" before they take effect.
    198 
    199    For example, Makefile files always use tab characters for
    200 indentation: you can overwrite "indent_style" property when current
    201 'major-mode' is 'makefile-mode':
    202 
    203 (add-hook 'editorconfig-hack-properties-functions
    204           '(lambda (props)
    205              (when (derived-mode-p 'makefile-mode)
    206                (puthash 'indent_style "tab" props))))
    207 
    208 
    209 File: docuFgV6T.info,  Node: Troubleshooting,  Next: Submitting Bugs and Feature Requests,  Prev: Customize,  Up: Top
    210 
    211 1.4 Troubleshooting
    212 ===================
    213 
    214 Enabling 'editorconfig-mode' should be enough for normal cases.
    215 
    216    When EditorConfig properties are not effective for unknown reason, we
    217 recommend first trying 'M-x editorconfig-display-current-properties'.
    218 
    219    This command will open a new buffer and display the EditorConfig
    220 properties loaded for current buffer.  You can check if EditorConfig
    221 properties were not read for buffers at all, or they were loaded but did
    222 not take effect for some other reasons.
    223 
    224 * Menu:
    225 
    226 * Indentation for new major-modes::
    227 * Not work at all for FOO-mode!::
    228 
    229 
    230 File: docuFgV6T.info,  Node: Indentation for new major-modes,  Next: Not work at all for FOO-mode!,  Up: Troubleshooting
    231 
    232 1.4.1 Indentation for new major-modes
    233 -------------------------------------
    234 
    235 Because most Emacs major-modes have their own indentation settings, this
    236 plugin requires explicit support for each major-mode for 'indent_size'
    237 property.
    238 
    239    By default this plugin ships with settings for many major-modes, but,
    240 sorry to say, it cannot be perfect.  Especially it is difficult to
    241 support brand-new major-modes.  Please feel free to submit issue or
    242 pull-request for such major-mode!
    243 
    244    Supported major-modes and their indentation configs are defined in
    245 the variable 'editorconfig-indentation-alist'.
    246 
    247 
    248 File: docuFgV6T.info,  Node: Not work at all for FOO-mode!,  Prev: Indentation for new major-modes,  Up: Troubleshooting
    249 
    250 1.4.2 Not work at all for FOO-mode!
    251 -----------------------------------
    252 
    253 Most cases properties are loaded just after visiting files when
    254 'editorconfig-mode' is enabled.  But it is known that there are
    255 major-modes that this mechanism does not work for and require explicit
    256 call of 'editorconfig-apply'.
    257 
    258    Typically it will occur when the major-mode is not defined using
    259 'define-derived-mode' ('rpm-spec-mode' is an example for this).  Please
    260 feel free to submit issues if you find such modes!
    261 
    262 
    263 File: docuFgV6T.info,  Node: Submitting Bugs and Feature Requests,  Next: License,  Prev: Troubleshooting,  Up: Top
    264 
    265 1.5 Submitting Bugs and Feature Requests
    266 ========================================
    267 
    268 Bugs, feature requests, and other issues should be submitted to the
    269 issue tracker: https://github.com/editorconfig/editorconfig-emacs/issues
    270 
    271 * Menu:
    272 
    273 * Development::
    274 
    275 
    276 File: docuFgV6T.info,  Node: Development,  Up: Submitting Bugs and Feature Requests
    277 
    278 1.5.1 Development
    279 -----------------
    280 
    281 Make and CMake (https://cmake.org) must be installed to run the tests
    282 locally:
    283 
    284 $ make check
    285 
    286    To start a new Emacs process with current '*.el' and without loading
    287 user init file, run:
    288 
    289 $ make sandbox
    290 
    291 
    292 File: docuFgV6T.info,  Node: License,  Prev: Submitting Bugs and Feature Requests,  Up: Top
    293 
    294 1.6 License
    295 ===========
    296 
    297 EditorConfig Emacs Plugin is free software: you can redistribute it
    298 and/or modify it under the terms of the GNU General Public License as
    299 published by the Free Software Foundation, either version 3 of the
    300 License, or (at your option) any later version.
    301 
    302    This program is distributed in the hope that it will be useful, but
    303 WITHOUT ANY WARRANTY; without even the implied warranty of
    304 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
    305 Public License for more details.
    306 
    307    You should have received a copy of the GNU General Public License
    308 along with this program.  If not, see <https://www.gnu.org/licenses/>.
    309 
    310 
    311 
    312 Tag Table:
    313 Node: Top205
    314 Ref: #editorconfig-emacs-plugin334
    315 Node: Getting Started584
    316 Ref: #getting-started724
    317 Node: packageel788
    318 Ref: #package.el907
    319 Node: use-package1471
    320 Ref: #use-package1620
    321 Node: Manual installation1808
    322 Ref: #manual-installation1955
    323 Node: Supported properties2130
    324 Ref: #supported-properties2286
    325 Node: File Type file_type_ext file_type_emacs3460
    326 Ref: #file-type-file_type_ext-file_type_emacs3658
    327 Node: Customize3917
    328 Ref: #customize4051
    329 Node: editorconfig-trim-whitespaces-mode4370
    330 Ref: #editorconfig-trim-whitespaces-mode4583
    331 Node: editorconfig-after-apply-functions5074
    332 Ref: #editorconfig-after-apply-functions5334
    333 Node: editorconfig-hack-properties-functions5820
    334 Ref: #editorconfig-hack-properties-functions6045
    335 Node: Troubleshooting6655
    336 Ref: #troubleshooting6817
    337 Node: Indentation for new major-modes7357
    338 Ref: #indentation-for-new-major-modes7558
    339 Node: Not work at all for FOO-mode!8074
    340 Ref: #not-work-at-all-for-foo-mode8271
    341 Node: Submitting Bugs and Feature Requests8693
    342 Ref: #submitting-bugs-and-feature-requests8895
    343 Node: Development9063
    344 Ref: #development9187
    345 Node: License9391
    346 Ref: #license9511
    347 
    348 End Tag Table
    349 
    350 
    351 Local Variables:
    352 coding: utf-8
    353 End: