@@ -11,19 +11,19 @@ Plugins and modules included with Nvim
1111Nvim includes various Lua and Vim plugins or modules which may provide
1212commands (such as :TOhtml) or modules that you can optionally require() or
1313:packadd. The Lua ones are not part of the | lua-stdlib | , that is, they are not
14- available from the global `vim ` module namespace. Some of the plugins are by
15- default loaded while others require a | :packadd | to be loaded .
14+ available from the global `vim ` module namespace. Some of the plugins are
15+ loaded by default while others are not loaded until requested by | :packadd | .
1616
1717==============================================================================
1818Standard plugins ~
1919 *standard-plugin-list*
20- Help-link Loaded Short description
20+ Help-link Loaded Short description ~
2121| package-cfilter | No Filtering quickfix/location list
2222| package-justify | No Justify text
2323| package-nohlsearch | No Automatically run :nohlsearch
2424| package-termdebug | No Debug inside Nvim with gdb
2525| matchit | Yes Extended | % | matching
26- | editorconfig.txt | Yes Detect and internet editorconfig
26+ | editorconfig | Yes Detect and internet editorconfig
2727| spellfile.vim | Yes Install spellfile if missing
2828| pi_tutor.txt | Yes Interactive tutorial
2929| pi_gzip.txt | Yes Reading and writing compressed files
@@ -37,6 +37,91 @@ Help-link Loaded Short description
3737 | pi_spec.txt | Yes Filetype plugin to work with rpm spec files
3838| tohtml | Yes Convert buffer to html, syntax included
3939
40+ ==============================================================================
41+ Builtin plugin: editorconfig *editorconfig*
42+
43+ Nvim supports EditorConfig. When a file is opened, after running | ftplugin | s
44+ and | FileType | autocommands, Nvim searches all parent directories of that file
45+ for ".editorconfig" files, parses them, and applies any properties that match
46+ the opened file. Think of it like 'modeline' for an entire (recursive)
47+ directory. For more information see https://editorconfig.org/ .
48+
49+ *g:editorconfig* *b:editorconfig*
50+
51+ EditorConfig is enabled by default. To disable it, add to your config: >lua
52+ vim.g.editorconfig = false
53+ <
54+
55+ (Vimscript: `let g:editorconfig = v:false`). It can also be disabled
56+ per-buffer by setting the | b:editorconfig | buffer-local variable to `false` .
57+
58+ Nvim stores the applied properties in | b:editorconfig | if it is not `false` .
59+
60+ *editorconfig-custom-properties*
61+
62+ New properties can be added by adding a new entry to the "properties" table.
63+ The table key is a property name and the value is a callback function which
64+ accepts the number of the buffer to be modified, the value of the property in
65+ the `.editorconfig` file, and (optionally) a table containing all of the other
66+ properties and their values (useful for properties which depend on other
67+ properties). The value is always a string and must be coerced if necessary.
68+ Example: >lua
69+
70+ require('editorconfig' ).properties.foo = function(bufnr, val, opts)
71+ if opts.charset and opts.charset ~= "utf-8" then
72+ error("foo can only be set when charset is utf-8", 0)
73+ end
74+ vim.b[bufnr].foo = val
75+ end
76+ <
77+
78+ *editorconfig-properties*
79+
80+ The following properties are supported by default:
81+
82+
83+ charset *editorconfig.charset*
84+ One of `" utf-8" ` , `" utf-8-bom" ` , `" latin1" ` , `" utf-16be" ` , or
85+ `" utf-16le" ` . Sets the 'fileencoding' and 'bomb' options.
86+
87+ end_of_line *editorconfig.end_of_line*
88+ One of `" lf" ` , `" crlf" ` , or `" cr" ` . These correspond to setting
89+ 'fileformat' to "unix", "dos", or "mac", respectively.
90+
91+ indent_size *editorconfig.indent_size*
92+ A number indicating the size of a single indent. Alternatively, use the
93+ value "tab" to use the value of the tab_width property. Sets the
94+ 'shiftwidth' and 'softtabstop' options. If this value is not "tab" and the
95+ tab_width property is not set, 'tabstop' is also set to this value.
96+
97+ indent_style *editorconfig.indent_style*
98+ One of `" tab" ` or `" space" ` . Sets the 'expandtab' option.
99+
100+ insert_final_newline *editorconfig.insert_final_newline*
101+ `" true" ` or `" false" ` to ensure the file always has a trailing newline as
102+ its last byte. Sets the 'fixendofline' and 'endofline' options.
103+
104+ max_line_length *editorconfig.max_line_length*
105+ A number indicating the maximum length of a single line. Sets the
106+ 'textwidth' option.
107+
108+ root *editorconfig.root*
109+ If "true", then stop searching for `.editorconfig` files in parent
110+ directories. This property must be at the top-level of the `.editorconfig`
111+ file (i.e. it must not be within a glob section).
112+
113+ spelling_language *editorconfig.spelling_language*
114+ A code of the format ss or ss-TT, where ss is an ISO 639 language code and
115+ TT is an ISO 3166 territory identifier. Sets the 'spelllang' option.
116+
117+ tab_width *editorconfig.tab_width*
118+ The display size of a single tab character. Sets the 'tabstop' option.
119+
120+ trim_trailing_whitespace *editorconfig.trim_trailing_whitespace*
121+ When `" true" ` , trailing whitespace is automatically removed when the
122+ buffer is written.
123+
124+
40125==============================================================================
41126Builtin plugin: tohtml *tohtml*
42127
0 commit comments