14. Buffer-local configuration: EditorConfig and file-local variables
These configurations affect only one buffer and take precedence over global options.
EditorConfig
When a file opens, coxn searches upward for .editorconfig, stopping at root = true; sections closer to the file override higher sections. Supported standard properties:
| Property | Effect |
|---|---|
indent_style | space / tab |
indent_size | Indentation width (tab uses tab_width) |
tab_width | Tab display width |
end_of_line | lf / crlf |
trim_trailing_whitespace | Remove trailing whitespace on save |
insert_final_newline | Ensure a final newline on save |
max_line_length | Maximum line width |
file-local variables
Only whitelisted variables are recognized; code in the file is never evaluated. Use the first line:
/* -*- mode: c; indent-offset: 2; tab-width: 4 -*- */
or the end of the file:
Local Variables:
fill-column: 80
End:
Whitelist: `mode` (only an already-registered major mode), `comment-start`,
`comment-end`, `fill-column`, `indent-offset`, `tab-width`, `indent-style`,
`insert-spaces?`, `eol`, `trim-trailing?`, `final-newline?`, `truncate-lines`, and
`eval-minibuffer?`.Raw Markdown: coxn manual (Markdown) · Installers: coxn product page