nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1# EditorConfig configuration for nixpkgs
2# https://EditorConfig.org
3
4# Top-most EditorConfig file
5root = true
6
7# Unix-style newlines with a newline ending every file, utf-8 charset
8[*]
9end_of_line = lf
10insert_final_newline = true
11trim_trailing_whitespace = true
12charset = utf-8
13
14# Ignore diffs/patches
15[*.{diff,patch}]
16end_of_line = unset
17insert_final_newline = unset
18trim_trailing_whitespace = unset
19
20# We want readFile .version to return the version without a newline.
21[.version]
22insert_final_newline = false
23
24# see https://nixos.org/nixpkgs/manual/#chap-conventions
25
26[*.{bash,css,js,json,lock,md,nix,pl,pm,py,rb,sh,xml}]
27indent_style = space
28
29# Match docbook files, set indent width of one
30[*.xml]
31indent_size = 1
32
33# Match json/lockfiles/markdown/nix/ruby files, set indent width of two
34[*.{js,json,lock,md,nix,rb}]
35indent_size = 2
36
37# Match all the Bash code in Nix files, set indent width of two
38[*.{bash,sh}]
39indent_size = 2
40
41# Match Perl and Python scripts, set indent width of four
42[*.{pl,pm,py}]
43indent_size = 4
44
45# Match gemfiles, set indent to spaces with width of two
46[Gemfile]
47indent_size = 2
48indent_style = space
49
50# Match package.json and package-lock.json, which are generally pulled from upstream and accept them as they are
51[package{,-lock}.json]
52indent_style = unset
53insert_final_newline = unset
54
55# Disable file types or individual files
56# some of these files may be auto-generated and/or require significant changes
57
58[*.{c,h}]
59insert_final_newline = unset
60trim_trailing_whitespace = unset
61
62[*.{asc,key,ovpn}]
63insert_final_newline = unset
64end_of_line = unset
65trim_trailing_whitespace = unset
66
67[*.json]
68insert_final_newline = unset
69
70[*.lock]
71indent_size = unset
72
73# Although Markdown/CommonMark allows using two trailing spaces to denote
74# a hard line break, we do not use that feature in nixpkgs since
75# it forces the surrounding paragraph to become a <literallayout> which
76# does not wrap reasonably.
77# Instead of a hard line break, start a new paragraph by inserting a blank line.
78[*.md]
79trim_trailing_whitespace = true
80
81# binaries
82[*.nib]
83end_of_line = unset
84insert_final_newline = unset
85trim_trailing_whitespace = unset
86charset = unset
87
88[eggs.nix]
89trim_trailing_whitespace = unset
90
91[registry.dat]
92end_of_line = unset
93insert_final_newline = unset
94
95# see https://manual.jule.dev/project/code-style.html#indentions
96[*.jule]
97indent_style = tab
98
99[jule.mod]
100insert_final_newline = unset
101
102# Keep this hint at the bottom:
103# Please don't add entries for subfolders here.
104# Create <subfolder>/.editorconfig instead.