mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
Compare commits
482 Commits
release-0.
...
v0.9.4
Author | SHA1 | Date | |
---|---|---|---|
![]() |
d772f697a2 | ||
![]() |
cc398c5b06 | ||
![]() |
51ac490c01 | ||
![]() |
3257fdac36 | ||
![]() |
837f64f98a | ||
![]() |
4f6e4c5447 | ||
![]() |
eddead1cad | ||
![]() |
2bde3109b8 | ||
![]() |
e0d98bd25d | ||
![]() |
749ff7a342 | ||
![]() |
6809d3377c | ||
![]() |
00a0847675 | ||
![]() |
a0da8c3e69 | ||
![]() |
ce52639936 | ||
![]() |
bd042ef086 | ||
![]() |
1403779ae0 | ||
![]() |
49d7de8f5c | ||
![]() |
d5c16d1bfe | ||
![]() |
f5b43bf1f3 | ||
![]() |
e298c01cfb | ||
![]() |
ee8948f073 | ||
![]() |
9efc6f7c4d | ||
![]() |
b1891c5fea | ||
![]() |
0360ceffc9 | ||
![]() |
166c22f528 | ||
![]() |
2b2a20f4ea | ||
![]() |
b4f58d6745 | ||
![]() |
da4d59018d | ||
![]() |
e5ec72562d | ||
![]() |
00c3ffdb4b | ||
![]() |
c21ca9b87a | ||
![]() |
792b10d03e | ||
![]() |
c901472d67 | ||
![]() |
25ac45386c | ||
![]() |
5bf0873d86 | ||
![]() |
fd0ff7665c | ||
![]() |
b49cb1826a | ||
![]() |
aa5b5b434d | ||
![]() |
8063aa7cf6 | ||
![]() |
6156d3fdc9 | ||
![]() |
c16af962db | ||
![]() |
232a4eaef7 | ||
![]() |
b3b30dbaf7 | ||
![]() |
94246472e3 | ||
![]() |
a89c385f33 | ||
![]() |
926b8f9120 | ||
![]() |
1b8132880d | ||
![]() |
3f796c5410 | ||
![]() |
82e0a6028c | ||
![]() |
cb211e5746 | ||
![]() |
28f600337f | ||
![]() |
26c6d78a0c | ||
![]() |
249e930eaf | ||
![]() |
7fd12dabcc | ||
![]() |
3a5b46e6bb | ||
![]() |
68ae7ea529 | ||
![]() |
3f5f6d412b | ||
![]() |
aa04090e92 | ||
![]() |
cdb8c46253 | ||
![]() |
f0898d438e | ||
![]() |
d1813f73b8 | ||
![]() |
9df72d3f9f | ||
![]() |
cd6536c140 | ||
![]() |
d1cce10702 | ||
![]() |
fc8d1f7c7e | ||
![]() |
f0b1e46f91 | ||
![]() |
57aeacc344 | ||
![]() |
5f8676c268 | ||
![]() |
c7b316f71a | ||
![]() |
64160bac5b | ||
![]() |
51edadcaeb | ||
![]() |
284c2e0124 | ||
![]() |
e20f3a815a | ||
![]() |
fe869a8ce2 | ||
![]() |
3a13777289 | ||
![]() |
4728f2d2f9 | ||
![]() |
6490d937b2 | ||
![]() |
bee2ee211c | ||
![]() |
876cb05e2a | ||
![]() |
ed626d2f8f | ||
![]() |
c23bff6603 | ||
![]() |
f54806fd7f | ||
![]() |
3c5339ba36 | ||
![]() |
40a7228dcc | ||
![]() |
a285a0b36d | ||
![]() |
3ada031231 | ||
![]() |
be14ead380 | ||
![]() |
fec20ce15c | ||
![]() |
033059e781 | ||
![]() |
32de3f98ed | ||
![]() |
a3c963adfc | ||
![]() |
e3389c1533 | ||
![]() |
f5e6f592b6 | ||
![]() |
5ef7bc50cc | ||
![]() |
eacd5ca6b8 | ||
![]() |
a6226aea6c | ||
![]() |
8ec03bbc8b | ||
![]() |
3cca5449ac | ||
![]() |
1fc72d3e62 | ||
![]() |
2aa88ee86a | ||
![]() |
2ac6405e80 | ||
![]() |
96dc2d559b | ||
![]() |
40361818c1 | ||
![]() |
11cb728c35 | ||
![]() |
62ae5f373a | ||
![]() |
9f928902c7 | ||
![]() |
b30896bbaf | ||
![]() |
13c368eca5 | ||
![]() |
bb847a8b55 | ||
![]() |
b353c27338 | ||
![]() |
46fc9d547c | ||
![]() |
c083d7ac78 | ||
![]() |
016b883def | ||
![]() |
2a9af09187 | ||
![]() |
167499d36f | ||
![]() |
35bc5d1af3 | ||
![]() |
7854874367 | ||
![]() |
4d6d4f8fbe | ||
![]() |
021bed5ac2 | ||
![]() |
931bcc8081 | ||
![]() |
392e0b56f0 | ||
![]() |
403d17b5b7 | ||
![]() |
b82ba25ba5 | ||
![]() |
52669b5c69 | ||
![]() |
211db74a31 | ||
![]() |
79067685ab | ||
![]() |
1cd08f242f | ||
![]() |
ac2dff64a5 | ||
![]() |
bedd4bd746 | ||
![]() |
06ec1a49d7 | ||
![]() |
df63474930 | ||
![]() |
5e6c8b3385 | ||
![]() |
9d1c8bc5c0 | ||
![]() |
e977f3dd4f | ||
![]() |
060886e16c | ||
![]() |
241d649c23 | ||
![]() |
f237c92076 | ||
![]() |
90b1a3250a | ||
![]() |
ff689ed1a9 | ||
![]() |
f33d49a7a7 | ||
![]() |
d0a6c1437d | ||
![]() |
9f6fc24bcb | ||
![]() |
c03d38c51d | ||
![]() |
bde56f4e37 | ||
![]() |
1fdb41969f | ||
![]() |
1e905c52ca | ||
![]() |
b31b01cac2 | ||
![]() |
46301281f7 | ||
![]() |
d6733abc69 | ||
![]() |
42a735e524 | ||
![]() |
ada9443999 | ||
![]() |
69f11f6d26 | ||
![]() |
badb6f4bc3 | ||
![]() |
0afec352da | ||
![]() |
1da1e5a4f3 | ||
![]() |
dfed74188d | ||
![]() |
d1a7aaa7f2 | ||
![]() |
76bbfb3cfd | ||
![]() |
11e90126ba | ||
![]() |
aefacff567 | ||
![]() |
cba4362d85 | ||
![]() |
8dd4a2bdd1 | ||
![]() |
dc2860d821 | ||
![]() |
78b39d510a | ||
![]() |
16e690d595 | ||
![]() |
740cb0c7dd | ||
![]() |
48d5eaffcd | ||
![]() |
af1da51d11 | ||
![]() |
e2d14926d7 | ||
![]() |
a3889e743f | ||
![]() |
8ac7491685 | ||
![]() |
776a9b59b6 | ||
![]() |
e8ff921ed3 | ||
![]() |
d82f386201 | ||
![]() |
cf4b89f16b | ||
![]() |
953904c006 | ||
![]() |
c0c6294123 | ||
![]() |
b0abe426d6 | ||
![]() |
115fe762b4 | ||
![]() |
f0e4d284fd | ||
![]() |
65d9407835 | ||
![]() |
d3ac249806 | ||
![]() |
344bcb5f30 | ||
![]() |
0bc272d0ea | ||
![]() |
7253cb3905 | ||
![]() |
9fdaecba90 | ||
![]() |
6808f47ec5 | ||
![]() |
e9030d109e | ||
![]() |
541439b4ab | ||
![]() |
160bdee527 | ||
![]() |
84086283ac | ||
![]() |
5174ed6735 | ||
![]() |
f36433f83a | ||
![]() |
3fc024f238 | ||
![]() |
1234861183 | ||
![]() |
8fe351b674 | ||
![]() |
617c6014ea | ||
![]() |
041bc87333 | ||
![]() |
08ae485984 | ||
![]() |
3a6235cb81 | ||
![]() |
38af92ce39 | ||
![]() |
04f6463ee2 | ||
![]() |
1f9c2cfa91 | ||
![]() |
657072fc62 | ||
![]() |
f088b26ab1 | ||
![]() |
072d0b796e | ||
![]() |
4be7f29af6 | ||
![]() |
914717aa8b | ||
![]() |
e2ceb8dd47 | ||
![]() |
a830373860 | ||
![]() |
81290cda02 | ||
![]() |
f81b85a0fa | ||
![]() |
c8bd1d131f | ||
![]() |
213a5204ee | ||
![]() |
54294140d7 | ||
![]() |
e4945e69f7 | ||
![]() |
74c8878e9f | ||
![]() |
b9a513ae11 | ||
![]() |
d9a76056bb | ||
![]() |
6ed84f8571 | ||
![]() |
0f121fea81 | ||
![]() |
db41f29b7c | ||
![]() |
4c8376a876 | ||
![]() |
3d06b6c6af | ||
![]() |
abed0acf56 | ||
![]() |
2f9ee5eb16 | ||
![]() |
4dafd5341a | ||
![]() |
adea8885c4 | ||
![]() |
135cdd5ac0 | ||
![]() |
d182c1b526 | ||
![]() |
3dae99d86a | ||
![]() |
470017c9a8 | ||
![]() |
5825aec7ae | ||
![]() |
3904bf4906 | ||
![]() |
27c3e1d18f | ||
![]() |
0bbd78aef1 | ||
![]() |
db33f17618 | ||
![]() |
7e7fc4885f | ||
![]() |
55373061ab | ||
![]() |
79c8df7e97 | ||
![]() |
6937075304 | ||
![]() |
d7212c10e2 | ||
![]() |
af1f4c7122 | ||
![]() |
06d0985722 | ||
![]() |
b9e380fed9 | ||
![]() |
d964aba20d | ||
![]() |
4892db22e2 | ||
![]() |
7ef651beaf | ||
![]() |
0db9169a52 | ||
![]() |
9078db9bbb | ||
![]() |
0e39b334c0 | ||
![]() |
f9a615fb21 | ||
![]() |
022b5ba45d | ||
![]() |
56c35faf8b | ||
![]() |
06d137681e | ||
![]() |
4b79441b14 | ||
![]() |
2113b9e4b0 | ||
![]() |
6edd802840 | ||
![]() |
1513666203 | ||
![]() |
afdb5fa3cd | ||
![]() |
cd73e54c42 | ||
![]() |
0a954f41c4 | ||
![]() |
8463161daa | ||
![]() |
72209f4bf7 | ||
![]() |
2833230791 | ||
![]() |
09f97ff9a8 | ||
![]() |
b257480955 | ||
![]() |
a4097be568 | ||
![]() |
433ccdfc79 | ||
![]() |
126a757c55 | ||
![]() |
65fc17b343 | ||
![]() |
954cc51226 | ||
![]() |
18fe3a6a44 | ||
![]() |
7d4bba7aa7 | ||
![]() |
c0137e711b | ||
![]() |
a2bfe4e524 | ||
![]() |
a1007597ca | ||
![]() |
b1f5be5338 | ||
![]() |
edf2a5aa25 | ||
![]() |
e953f29c9b | ||
![]() |
eaacdd059e | ||
![]() |
b5a66b1830 | ||
![]() |
7556850724 | ||
![]() |
68f967ce47 | ||
![]() |
84542fc97f | ||
![]() |
a090be56bd | ||
![]() |
3591252cc8 | ||
![]() |
ea5ebe509b | ||
![]() |
fdf33d9b00 | ||
![]() |
86a1e79ee2 | ||
![]() |
9e603ec3e1 | ||
![]() |
624c25a70a | ||
![]() |
b6ddf72bf1 | ||
![]() |
a532f7d527 | ||
![]() |
d0d9662ea1 | ||
![]() |
d34d987070 | ||
![]() |
c75cf9b64a | ||
![]() |
ceba495e88 | ||
![]() |
55138cdd8f | ||
![]() |
cbe9351f8b | ||
![]() |
8ace26ade7 | ||
![]() |
2430e96da5 | ||
![]() |
2625d84577 | ||
![]() |
a01f8de1f0 | ||
![]() |
c8d6d14f71 | ||
![]() |
2be8c29406 | ||
![]() |
d5ac60c093 | ||
![]() |
3ea6c5e7ba | ||
![]() |
59e63b455b | ||
![]() |
87c44c7a0b | ||
![]() |
626e2277a9 | ||
![]() |
f3c7182482 | ||
![]() |
6f7e5ce006 | ||
![]() |
ae7db749b5 | ||
![]() |
9b90f5fa28 | ||
![]() |
e019371554 | ||
![]() |
35997026a2 | ||
![]() |
4e0cfe3805 | ||
![]() |
31a009c883 | ||
![]() |
06bee06ee5 | ||
![]() |
9652f7c4c9 | ||
![]() |
17bdaeb79e | ||
![]() |
4d30f34a37 | ||
![]() |
59ee42d05e | ||
![]() |
1a104253df | ||
![]() |
ac93bd3817 | ||
![]() |
c0c95bc823 | ||
![]() |
152c07249e | ||
![]() |
8f2b0d9b5d | ||
![]() |
bdb7c180b7 | ||
![]() |
965f817ade | ||
![]() |
9ea3a9c15b | ||
![]() |
c3d11208bc | ||
![]() |
fe261706a2 | ||
![]() |
592e4459fa | ||
![]() |
1b09bcef52 | ||
![]() |
c464df84f7 | ||
![]() |
13d8cca951 | ||
![]() |
9edddceb18 | ||
![]() |
7c48810397 | ||
![]() |
fb56d2a452 | ||
![]() |
106695d47e | ||
![]() |
56e0b425ea | ||
![]() |
017afa2fcf | ||
![]() |
61351adee8 | ||
![]() |
7dfddb3e43 | ||
![]() |
5fbe8409b5 | ||
![]() |
4d1d9472fe | ||
![]() |
bbf600b7b5 | ||
![]() |
76dd0f81b0 | ||
![]() |
607237a20a | ||
![]() |
5267e7b07a | ||
![]() |
49092de818 | ||
![]() |
20f5f4e916 | ||
![]() |
5b158b9375 | ||
![]() |
c693df02b3 | ||
![]() |
beaa29d70e | ||
![]() |
11a0fc9644 | ||
![]() |
756b74758d | ||
![]() |
3563f4b623 | ||
![]() |
f5cf033314 | ||
![]() |
7a9624f035 | ||
![]() |
5c30930fec | ||
![]() |
3754d833ec | ||
![]() |
b8b1221e58 | ||
![]() |
f77b2740ee | ||
![]() |
98a90abca9 | ||
![]() |
fc2822a819 | ||
![]() |
b8d0a2d2b2 | ||
![]() |
e81b2eb94a | ||
![]() |
5c2f442a74 | ||
![]() |
fb73bfd667 | ||
![]() |
6a8d1bb90b | ||
![]() |
feb8134b43 | ||
![]() |
d926f92ba1 | ||
![]() |
66a196c951 | ||
![]() |
d366a1f8ed | ||
![]() |
53d29a8b62 | ||
![]() |
26aa39f80c | ||
![]() |
a8c62d3024 | ||
![]() |
c236e674ce | ||
![]() |
0874a14dcf | ||
![]() |
4bc50de152 | ||
![]() |
a7578a873c | ||
![]() |
af6669cd35 | ||
![]() |
f24449d35c | ||
![]() |
0c8e2d128e | ||
![]() |
f991ddd1ab | ||
![]() |
a977c8b5fe | ||
![]() |
f5bf29a0ad | ||
![]() |
deec5e6e2a | ||
![]() |
d6deffad57 | ||
![]() |
d7b720f3d8 | ||
![]() |
39ae0a0b7a | ||
![]() |
f960f2621d | ||
![]() |
e937b9a9c7 | ||
![]() |
c52085997b | ||
![]() |
127a483142 | ||
![]() |
2363d44d5a | ||
![]() |
5cb6c44e30 | ||
![]() |
df3982e704 | ||
![]() |
30cfd28257 | ||
![]() |
1085e91876 | ||
![]() |
c0845343b6 | ||
![]() |
a99d5d17d5 | ||
![]() |
a77a8a9934 | ||
![]() |
6b32fe96b0 | ||
![]() |
6ba14ff182 | ||
![]() |
6bd73ed2d9 | ||
![]() |
b91278c4fa | ||
![]() |
b2a43b5287 | ||
![]() |
400bf2851a | ||
![]() |
a5d8024b24 | ||
![]() |
2d3c825ada | ||
![]() |
ef7513c87f | ||
![]() |
9cb2f2fc31 | ||
![]() |
a41930bcf0 | ||
![]() |
fa5fe845cc | ||
![]() |
30581744e4 | ||
![]() |
535d8553c4 | ||
![]() |
40ef3b2bd4 | ||
![]() |
54f930f4e3 | ||
![]() |
37a44f3247 | ||
![]() |
470aa2dbf9 | ||
![]() |
ba198bd7cc | ||
![]() |
96de6bbaad | ||
![]() |
54c6dfa009 | ||
![]() |
8e2af977b1 | ||
![]() |
fc545cb008 | ||
![]() |
42199afc14 | ||
![]() |
c9f1e6837a | ||
![]() |
1103a4c2c6 | ||
![]() |
79ee63bc36 | ||
![]() |
6b88a9555c | ||
![]() |
9066b68832 | ||
![]() |
f92d99f0d9 | ||
![]() |
fee9452b77 | ||
![]() |
69d4e64c60 | ||
![]() |
d24bdc4999 | ||
![]() |
6625fd8766 | ||
![]() |
30627250bd | ||
![]() |
232fdf2ccd | ||
![]() |
46e875a8a2 | ||
![]() |
4b728cc3d7 | ||
![]() |
2479c63d4a | ||
![]() |
f64518ed9c | ||
![]() |
eb9a95ea8e | ||
![]() |
2e819d3707 | ||
![]() |
911aabeaeb | ||
![]() |
763164cd9c | ||
![]() |
702621f058 | ||
![]() |
e50ce4ee3f | ||
![]() |
14e3936871 | ||
![]() |
00a1a9327e | ||
![]() |
7b64dcb30e | ||
![]() |
2658511d77 | ||
![]() |
974bd47067 | ||
![]() |
3cde3ae9b5 | ||
![]() |
4758f8ea7a | ||
![]() |
2812d6a6dd | ||
![]() |
8146fe86f9 | ||
![]() |
ae797c08e9 | ||
![]() |
8aeb262b1b | ||
![]() |
76631ee593 | ||
![]() |
ebd091f39e | ||
![]() |
756dd439db | ||
![]() |
e542e07c01 | ||
![]() |
d9ceb213d9 | ||
![]() |
92ffc44ce7 | ||
![]() |
19bc7456b8 | ||
![]() |
7a3dbde15c | ||
![]() |
513c881900 | ||
![]() |
eced07e6e3 | ||
![]() |
5f263789e0 | ||
![]() |
4db8c7d570 | ||
![]() |
67dc341aa0 | ||
![]() |
e2ab8f78c4 | ||
![]() |
07cba9e90a | ||
![]() |
f073f6248b | ||
![]() |
2399f4a539 | ||
![]() |
060fa561f7 | ||
![]() |
13b21bec0a |
@@ -6,10 +6,10 @@ freebsd_task:
|
||||
name: FreeBSD
|
||||
only_if: $BRANCH != "master"
|
||||
freebsd_instance:
|
||||
image_family: freebsd-14-2
|
||||
image_family: freebsd-13-1
|
||||
timeout_in: 30m
|
||||
install_script:
|
||||
- pkg install -y cmake gmake ninja unzip wget gettext python git
|
||||
- pkg install -y cmake gmake ninja pkgconf unzip wget gettext python libffi git
|
||||
build_deps_script:
|
||||
- gmake deps
|
||||
build_script:
|
||||
|
@@ -14,7 +14,7 @@ PenaltyReturnTypeOnItsOwnLine: 200
|
||||
AllowAllParametersOfDeclarationOnNextLine: false
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
BinPackParameters: true
|
||||
BinPackParameters: false
|
||||
BreakBeforeBinaryOperators: true
|
||||
BreakBeforeTernaryOperators: true
|
||||
ContinuationIndentWidth: 2
|
||||
@@ -23,7 +23,7 @@ AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakBeforeMultilineStrings: No
|
||||
AlwaysBreakTemplateDeclarations: No
|
||||
AlignEscapedNewlines: DontAlign
|
||||
BinPackArguments: true
|
||||
BinPackArguments: false
|
||||
BraceWrapping:
|
||||
AfterClass: false
|
||||
AfterControlStatement: false
|
||||
|
101
.clang-tidy
101
.clang-tidy
@@ -1,76 +1,43 @@
|
||||
WarningsAsErrors: '*,-clang-diagnostic-unused-function'
|
||||
WarningsAsErrors: '*'
|
||||
Checks: >
|
||||
Enable all warnings by default. This ensures we don't miss new and useful
|
||||
warnings when a new version of clang-tidy is dropped.
|
||||
-*,
|
||||
|
||||
IMPORTANT
|
||||
clang-tidy doesn't support comments but we can simulate comments by just
|
||||
writing text directly here. These are then interpreted as warnings and will
|
||||
be dropped. As long as you start every sentence with a capital letter and
|
||||
don't use commas in your "comments" you should be fine,
|
||||
*,
|
||||
bugprone-*,
|
||||
google-*,
|
||||
misc-*,
|
||||
modernize-*,
|
||||
performance-*,
|
||||
portability-*,
|
||||
readability-*,
|
||||
|
||||
Untriaged warnings. Please categorize them accordingly if you find a relevant
|
||||
section for it,
|
||||
-bugprone-assignment-in-if-condition,
|
||||
-bugprone-implicit-widening-of-multiplication-result,
|
||||
-bugprone-multi-level-implicit-pointer-conversion,
|
||||
-bugprone-not-null-terminated-result,
|
||||
-bugprone-suspicious-memory-comparison,
|
||||
-bugprone-switch-missing-default-case,
|
||||
-cert-env33-c,
|
||||
-cert-err33-c,
|
||||
-cert-err34-c,
|
||||
-concurrency-mt-unsafe,
|
||||
-cppcoreguidelines-narrowing-conversions,
|
||||
|
||||
Warnings that may be useful, but are too inconsistent to enable by default
|
||||
May yield useful results with some manual triaging,
|
||||
-bugprone-branch-clone,
|
||||
-bugprone-macro-parentheses,
|
||||
-bugprone-sizeof-expression,
|
||||
-hicpp-multiway-paths-covered,
|
||||
-hicpp-signed-bitwise,
|
||||
-misc-unused-parameters,
|
||||
-modernize-macro-to-enum,
|
||||
-readability-avoid-nested-conditional-operator,
|
||||
-readability-else-after-return,
|
||||
-readability-function-size,
|
||||
-readability-isolate-declaration,
|
||||
|
||||
Warnings that are rarely useful,
|
||||
-altera-*, Checks related to OpenCL programming for FPGAs. Not relevant,
|
||||
-android-*,
|
||||
-bugprone-easily-swappable-parameters,
|
||||
-bugprone-inc-dec-in-conditions,
|
||||
-bugprone-swapped-arguments,
|
||||
-clang-analyzer-*, Already covered by the cmake target "clang-analyzer",
|
||||
-cppcoreguidelines-avoid-non-const-global-variables,
|
||||
-cppcoreguidelines-init-variables,
|
||||
-llvm-header-guard, We use #pragma once,
|
||||
-llvmlibc-restrict-system-libc-headers, We want to use glibc,
|
||||
-misc-include-cleaner, Looks useful but redundant with IWYU. We may replace IWYU with this one day,
|
||||
-misc-misplaced-const,
|
||||
-misc-no-recursion,
|
||||
-performance-no-int-to-ptr,
|
||||
-readability-function-cognitive-complexity,
|
||||
-readability-identifier-length,
|
||||
-readability-magic-numbers,
|
||||
-readability-redundant-declaration, Conflicts with our header generation scripts,
|
||||
-readability-suspicious-call-argument,
|
||||
|
||||
Aliases. These are just duplicates of other warnings and should always be ignored,
|
||||
-bugprone-implicit-widening-of-multiplication-result,
|
||||
-bugprone-macro-parentheses,
|
||||
-bugprone-narrowing-conversions,
|
||||
-cert-dcl37-c,
|
||||
-cert-dcl51-cpp,
|
||||
-cert-exp42-c,
|
||||
-cert-flp37-c,
|
||||
-cert-msc24-c,
|
||||
-cert-msc33-c,
|
||||
-cppcoreguidelines-avoid-magic-numbers,
|
||||
-cppcoreguidelines-macro-to-enum,
|
||||
-bugprone-not-null-terminated-result,
|
||||
-bugprone-reserved-identifier,
|
||||
-bugprone-sizeof-expression,
|
||||
-bugprone-suspicious-include,
|
||||
-bugprone-suspicious-memory-comparison,
|
||||
-bugprone-unused-return-value,
|
||||
-google-readability-braces-around-statements,
|
||||
-google-readability-function-size,
|
||||
-hicpp-braces-around-statements,
|
||||
-hicpp-function-size,
|
||||
-llvm-else-after-return,
|
||||
-misc-misplaced-const,
|
||||
-misc-no-recursion,
|
||||
-misc-unused-parameters,
|
||||
-modernize-macro-to-enum,
|
||||
-performance-no-int-to-ptr,
|
||||
-readability-avoid-const-params-in-decls,
|
||||
-readability-braces-around-statements,
|
||||
-readability-else-after-return,
|
||||
-readability-function-cognitive-complexity,
|
||||
-readability-function-size,
|
||||
-readability-identifier-length,
|
||||
-readability-isolate-declaration,
|
||||
-readability-magic-numbers,
|
||||
-readability-misleading-indentation,
|
||||
-readability-redundant-declaration,
|
||||
-readability-redundant-function-ptr-dereference,
|
||||
-readability-suspicious-call-argument,
|
||||
|
2
.clangd
2
.clangd
@@ -1,4 +1,2 @@
|
||||
CompileFlags:
|
||||
CompilationDatabase: build/ # Search build/ directory for compile_commands.json
|
||||
Diagnostics:
|
||||
UnusedIncludes: None
|
||||
|
@@ -58,11 +58,6 @@ aa4f9c5341f5280f16cce0630ea54b84eef717b3
|
||||
6ff245732a5a8ab821598a38fb0c5805e6bd3779
|
||||
abf758a2977c4e6cab4dfa217f56da853d85851c
|
||||
cb84f5ee530f0f32b92bed5b4ad41344e8b551aa
|
||||
f98b8d2d44d289263b1a3b33b6a7f20644ef671c
|
||||
544ef994df72c3cbe0dca6b856ce2dcbc5169767
|
||||
45fe4d11add933df76a2ea4bf52ce8904f4a778b
|
||||
517f0cc634b985057da5b95cf4ad659ee456a77e
|
||||
04f2f864e270e772c6326cefdf24947f0130e492
|
||||
|
||||
# typos
|
||||
d238b8f6003d34cae7f65ff7585b48a2cd9449fb
|
||||
|
7
.gitattributes
vendored
7
.gitattributes
vendored
@@ -3,13 +3,6 @@
|
||||
*CMakeLists.txt linguist-language=CMake
|
||||
|
||||
runtime/doc/* linguist-documentation
|
||||
runtime/doc/builtin.txt linguist-generated
|
||||
|
||||
runtime/lua/vim/_meta/vimfn.lua linguist-generated
|
||||
runtime/lua/vim/_meta/vvars.lua linguist-generated
|
||||
runtime/lua/vim/_meta/api.lua linguist-generated
|
||||
runtime/lua/vim/_meta/api_keysets.lua linguist-generated
|
||||
runtime/lua/vim/_meta/options.lua linguist-generated
|
||||
|
||||
src/xdiff/** linguist-vendored
|
||||
src/cjson/** linguist-vendored
|
||||
|
10
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
10
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@@ -6,13 +6,8 @@ body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
*Before reporting:*
|
||||
- Confirm the problem is reproducible on [**master**](https://github.com/neovim/neovim/releases/nightly) or [**latest stable**](https://github.com/neovim/neovim/releases/stable) release
|
||||
- Run `make distclean` when encountering build issues
|
||||
- Search [existing issues](https://github.com/neovim/neovim/issues?q=is%3Aissue+is%3Aopen+label%3Abug,bug-crash) (including [closed](https://github.com/neovim/neovim/issues?q=is%3Aissue+is%3Aclosed+label%3Abug%2Cbug-crash))
|
||||
- Read the [FAQ](https://neovim.io/doc/user/faq.html) and ["Reporting Problems" in CONTRIBUTING.md](https://github.com/neovim/neovim/blob/master/CONTRIBUTING.md#reporting-problems).
|
||||
_Before reporting:_ search [existing issues](https://github.com/neovim/neovim/issues?q=is%3Aissue+is%3Aopen+label%3Abug) and check the [FAQ](https://github.com/neovim/neovim/wiki/FAQ). Usage or "How to" questions belong on the [stackoverflow](https://vi.stackexchange.com/) and will be closed.
|
||||
|
||||
Usage or "How to" questions belong on [stackoverflow](https://vi.stackexchange.com/) and will be closed.
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: "Problem"
|
||||
@@ -24,10 +19,7 @@ body:
|
||||
label: "Steps to reproduce"
|
||||
description: |
|
||||
- For build failures: list the exact steps including CMake flags (if any).
|
||||
- If the bug pertains to crashing (or segfault), please include a [stacktrace](https://neovim.io/doc/user/dev_tools.html#dev-tools-backtrace).
|
||||
- For startup or shell-related problems: try `env -i TERM=ansi-256color "$(which nvim)"`.
|
||||
- Use the provided [minimal reproduction template](https://github.com/neovim/neovim/blob/master/contrib/minimal.lua) to create a minimal configuration. After you fill it out with necessary information, run with `nvim --clean -u minimal.lua`.
|
||||
- Please do **not** include a package manager in the reproduction steps.
|
||||
placeholder: |
|
||||
nvim --clean
|
||||
:edit foo
|
||||
|
2
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
2
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
@@ -6,7 +6,7 @@ body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Before requesting: search [existing feature requests](https://github.com/neovim/neovim/labels/enhancement) and check the [FAQ](https://neovim.io/doc/user/faq.html).
|
||||
Before requesting: search [existing issues](https://github.com/neovim/neovim/labels/enhancement) and check the [FAQ](https://github.com/neovim/neovim/wiki/FAQ).
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
|
2
.github/ISSUE_TEMPLATE/lsp_bug_report.yml
vendored
2
.github/ISSUE_TEMPLATE/lsp_bug_report.yml
vendored
@@ -6,7 +6,7 @@ body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
_Before reporting:_ search [existing issues](https://github.com/neovim/neovim/issues?q=is%3Aissue+is%3Aopen+label%3Abug) and check the [FAQ](https://neovim.io/doc/user/faq.html). Usage questions or "Why isn't X language server/feature working?" belong on [stackoverflow](https://vi.stackexchange.com/) and will be closed.
|
||||
_Before reporting:_ search [existing issues](https://github.com/neovim/neovim/issues?q=is%3Aissue+is%3Aopen+label%3Abug) and check the [FAQ](https://github.com/neovim/neovim/wiki/FAQ). Usage questions or "Why isn't X language server/feature working?" belong on [stackoverflow](https://vi.stackexchange.com/) and will be closed.
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
|
11
.github/actions/cache/action.yml
vendored
11
.github/actions/cache/action.yml
vendored
@@ -3,9 +3,6 @@ description: "This action caches neovim dependencies"
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- run: echo "CACHE_KEY=${{ github.workflow }}" >> $GITHUB_ENV
|
||||
shell: bash
|
||||
|
||||
- run: echo "CACHE_KEY=${{ github.job }}" >> $GITHUB_ENV
|
||||
shell: bash
|
||||
|
||||
@@ -13,10 +10,6 @@ runs:
|
||||
run: echo "CACHE_KEY=$CACHE_KEY-${{ join(matrix.*, '-') }}" >> $GITHUB_ENV
|
||||
shell: bash
|
||||
|
||||
- if: ${{ matrix.build }}
|
||||
run: echo "CACHE_KEY=$CACHE_KEY-${{ join(matrix.build.*, '-') }}" >> $GITHUB_ENV
|
||||
shell: bash
|
||||
|
||||
- id: image
|
||||
run: echo "version=$ImageVersion" >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
@@ -25,9 +18,9 @@ runs:
|
||||
# if it makes the expression below simpler. hashFiles() has a timer that
|
||||
# will fail the job if it times out, which can happen if there are too many
|
||||
# files to search through.
|
||||
- uses: actions/cache@v4
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: .deps
|
||||
key: ${{ env.CACHE_KEY }}-${{ steps.image.outputs.version }}-${{ hashFiles('cmake**',
|
||||
'.github/**', 'CMakeLists.txt',
|
||||
'.github/workflows/test.yml', 'CMakeLists.txt',
|
||||
'runtime/CMakeLists.txt', 'src/nvim/**/CMakeLists.txt') }}
|
||||
|
29
.github/actions/setup/action.yml
vendored
29
.github/actions/setup/action.yml
vendored
@@ -1,29 +0,0 @@
|
||||
name: 'setup'
|
||||
description: "Creates necessary setup for CI"
|
||||
inputs:
|
||||
install_flags:
|
||||
description: 'Install script flags'
|
||||
required: false
|
||||
default: ''
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Set $BIN_DIR
|
||||
shell: bash
|
||||
run: echo "$BIN_DIR" >> $GITHUB_PATH
|
||||
|
||||
- if: ${{ runner.os != 'Windows' }}
|
||||
name: Set ulimit
|
||||
shell: bash
|
||||
run: ulimit -c unlimited
|
||||
|
||||
- if: ${{ runner.os == 'Windows' }}
|
||||
run: .github/scripts/env.ps1
|
||||
shell: pwsh
|
||||
|
||||
- name: Install dependencies
|
||||
run: ./.github/scripts/install_deps.sh ${{ inputs.install_flags }}
|
||||
shell: bash
|
||||
|
||||
- name: Cache
|
||||
uses: ./.github/actions/cache
|
66
.github/labeler.yml
vendored
Normal file
66
.github/labeler.yml
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
"lsp":
|
||||
- runtime/lua/vim/lsp.lua
|
||||
- runtime/lua/vim/lsp/*
|
||||
|
||||
"tui":
|
||||
- src/nvim/tui/tui.*
|
||||
|
||||
"treesitter":
|
||||
- src/nvim/lua/treesitter.*
|
||||
- runtime/lua/vim/treesitter.lua
|
||||
- runtime/lua/vim/treesitter/*
|
||||
- runtime/queries/**/*
|
||||
|
||||
"diagnostic":
|
||||
- runtime/lua/vim/diagnostic.lua
|
||||
|
||||
"dependencies":
|
||||
- cmake.deps/**/*
|
||||
|
||||
"spell":
|
||||
- src/nvim/spell*
|
||||
|
||||
"terminal":
|
||||
- src/nvim/terminal.*
|
||||
|
||||
"column":
|
||||
- src/nvim/sign*
|
||||
|
||||
"folds":
|
||||
- src/nvim/fold*
|
||||
|
||||
"mouse":
|
||||
- src/nvim/mouse*
|
||||
|
||||
"documentation":
|
||||
- all: ["runtime/doc/*"]
|
||||
- all: ["**/*.md"]
|
||||
|
||||
"clipboard":
|
||||
- runtime/autoload/provider/clipboard.vim
|
||||
|
||||
"diff":
|
||||
- src/nvim/diff.*
|
||||
|
||||
"build":
|
||||
- CMakeLists.txt
|
||||
- "**/CMakeLists.txt"
|
||||
- "**/Makefile"
|
||||
- "**/*.cmake"
|
||||
|
||||
"test":
|
||||
- all: ["test/**/*"]
|
||||
|
||||
"ci":
|
||||
- .github/labeler.yml
|
||||
- .github/workflows/**/*
|
||||
- .builds/*
|
||||
- ci/**/*
|
||||
|
||||
"filetype":
|
||||
- runtime/lua/vim/filetype.lua
|
||||
- runtime/lua/vim/filetype/detect.lua
|
||||
|
||||
"platform:nix":
|
||||
- contrib/flake.lock
|
||||
- contrib/flake.nix
|
13
.github/scripts/build_universal_macos.sh
vendored
Executable file
13
.github/scripts/build_universal_macos.sh
vendored
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
MACOSX_DEPLOYMENT_TARGET="$(sw_vers -productVersion | cut -f1 -d.)"
|
||||
export MACOSX_DEPLOYMENT_TARGET
|
||||
cmake -S cmake.deps -B .deps -G Ninja -D CMAKE_BUILD_TYPE=${NVIM_BUILD_TYPE} -D CMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} -D CMAKE_OSX_ARCHITECTURES=arm64\;x86_64
|
||||
cmake --build .deps
|
||||
cmake -B build -G Ninja -D CMAKE_BUILD_TYPE=${NVIM_BUILD_TYPE} -D CMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} -D CMAKE_OSX_ARCHITECTURES=arm64\;x86_64
|
||||
cmake --build build
|
||||
# Make sure we build everything for M1 as well
|
||||
for macho in build/bin/* build/lib/nvim/parser/*.so; do
|
||||
lipo -info "$macho" | grep -q arm64 || exit 1
|
||||
done
|
||||
cpack --config build/CPackConfig.cmake
|
3
.github/scripts/close_unresponsive.js
vendored
3
.github/scripts/close_unresponsive.js
vendored
@@ -26,7 +26,7 @@ module.exports = async ({ github, context }) => {
|
||||
repo: repo,
|
||||
issue_number: number,
|
||||
},
|
||||
(response) => response.data.filter(labeledEvent),
|
||||
(response) => response.data.filter(labeledEvent)
|
||||
);
|
||||
|
||||
const latest_response_label = events[events.length - 1];
|
||||
@@ -41,7 +41,6 @@ module.exports = async ({ github, context }) => {
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
issue_number: number,
|
||||
state_reason: "not_planned",
|
||||
state: "closed",
|
||||
});
|
||||
|
||||
|
9
.github/scripts/env.ps1
vendored
9
.github/scripts/env.ps1
vendored
@@ -1,9 +0,0 @@
|
||||
# This script enables Developer Command Prompt
|
||||
# See https://github.com/microsoft/vswhere/wiki/Start-Developer-Command-Prompt#using-powershell
|
||||
$installationPath = vswhere.exe -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath
|
||||
if ($installationPath -and (Test-Path "$installationPath\Common7\Tools\vsdevcmd.bat")) {
|
||||
& "${env:COMSPEC}" /s /c "`"$installationPath\Common7\Tools\vsdevcmd.bat`" -arch=x64 -no_logo && set" | ForEach-Object {
|
||||
$name, $value = $_ -split '=', 2
|
||||
"$name=$value" >> $env:GITHUB_ENV
|
||||
}
|
||||
}
|
41
.github/scripts/install_deps.sh
vendored
41
.github/scripts/install_deps.sh
vendored
@@ -1,47 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
while (($# > 0)); do
|
||||
case $1 in
|
||||
--test) # install test dependencies
|
||||
TEST=1
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
os=$(uname -s)
|
||||
if [[ $os == Linux ]]; then
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y build-essential cmake curl gettext ninja-build
|
||||
|
||||
if [[ $CC == clang ]]; then
|
||||
DEFAULT_CLANG_VERSION=$(echo | clang -dM -E - | grep __clang_major | awk '{print $3}')
|
||||
CLANG_VERSION=19
|
||||
if ((DEFAULT_CLANG_VERSION >= CLANG_VERSION)); then
|
||||
echo "Default clang version is $DEFAULT_CLANG_VERSION, which equal or larger than wanted version $CLANG_VERSION. Aborting!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
wget https://apt.llvm.org/llvm.sh
|
||||
chmod +x llvm.sh
|
||||
sudo ./llvm.sh $CLANG_VERSION
|
||||
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-$CLANG_VERSION 100
|
||||
sudo update-alternatives --set clang /usr/bin/clang-$CLANG_VERSION
|
||||
fi
|
||||
|
||||
if [[ -n $TEST ]]; then
|
||||
sudo apt-get install -y locales-all cpanminus attr libattr1-dev gdb fswatch xdg-utils
|
||||
|
||||
# Use default CC to avoid compilation problems when installing Python modules
|
||||
CC=cc python3 -m pip -q install --user --upgrade --break-system-packages pynvim
|
||||
fi
|
||||
sudo apt-get install -y build-essential cmake curl gettext locales-all ninja-build pkg-config unzip "$@"
|
||||
elif [[ $os == Darwin ]]; then
|
||||
brew update --quiet
|
||||
brew install ninja
|
||||
if [[ -n $TEST ]]; then
|
||||
brew install cpanminus fswatch
|
||||
|
||||
# Use default CC to avoid compilation problems when installing Python modules
|
||||
CC=cc python3 -m pip -q install --user --upgrade --break-system-packages pynvim
|
||||
fi
|
||||
brew install ninja "$@"
|
||||
fi
|
||||
|
91
.github/scripts/labeler_configuration.yml
vendored
91
.github/scripts/labeler_configuration.yml
vendored
@@ -1,91 +0,0 @@
|
||||
build:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: [ CMakeLists.txt, "**/CMakeLists.txt", "**/Makefile", "**/*.cmake", cmake.deps/**/* ]
|
||||
|
||||
checkhealth:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: [ "**/health.lua" ]
|
||||
|
||||
ci:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: [ .github/actions/**, .github/workflows/**, .github/scripts/** ]
|
||||
|
||||
clipboard:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: [ runtime/autoload/provider/clipboard.vim ]
|
||||
|
||||
column:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: [ src/nvim/sign* ]
|
||||
|
||||
comment:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: [ runtime/lua/vim/_comment.lua ]
|
||||
|
||||
defaults:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: [ runtime/lua/vim/_defaults.lua ]
|
||||
|
||||
diagnostic:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: [ runtime/lua/vim/diagnostic.lua ]
|
||||
|
||||
diff:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: [ src/nvim/diff.* ]
|
||||
|
||||
documentation:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: [ runtime/doc/*, "**/*.md" ]
|
||||
|
||||
editorconfig:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: [ .editorconfig, runtime/lua/editorconfig.lua, runtime/plugin/editorconfig.lua ]
|
||||
|
||||
filetype:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: [ runtime/lua/vim/filetype.lua, runtime/lua/vim/filetype/detect.lua ]
|
||||
|
||||
filesystem:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: [ runtime/lua/vim/fs.lua ]
|
||||
|
||||
folds:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: [ src/nvim/fold* ]
|
||||
|
||||
lsp:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: [ runtime/lua/vim/lsp.lua, runtime/lua/vim/lsp/* ]
|
||||
|
||||
mouse:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: [ src/nvim/mouse* ]
|
||||
|
||||
netrw:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: [ runtime/autoload/netrw.vim, runtime/plugin/netrwPlugin.vim ]
|
||||
|
||||
snippet:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: [ runtime/lua/vim/snippet.lua ]
|
||||
|
||||
spell:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: [ src/nvim/spell* ]
|
||||
|
||||
terminal:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: [ src/nvim/terminal.* ]
|
||||
|
||||
test:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files: [test/**/*]
|
||||
|
||||
treesitter:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: [ src/nvim/lua/treesitter.*, runtime/lua/vim/treesitter.lua, runtime/lua/vim/treesitter/*, runtime/queries/**/* ]
|
||||
|
||||
tui:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: [ src/nvim/tui/tui.* ]
|
@@ -7,6 +7,11 @@ module.exports = async ({ github, context }) => {
|
||||
const labels = pr_data.data.labels.map((e) => e.name);
|
||||
const reviewers = new Set();
|
||||
|
||||
if (labels.includes("api")) {
|
||||
reviewers.add("bfredl");
|
||||
reviewers.add("famiu");
|
||||
}
|
||||
|
||||
if (labels.includes("build")) {
|
||||
reviewers.add("dundargoc");
|
||||
reviewers.add("jamessan");
|
||||
@@ -23,12 +28,8 @@ module.exports = async ({ github, context }) => {
|
||||
reviewers.add("lewis6991");
|
||||
}
|
||||
|
||||
if (labels.includes("comment")) {
|
||||
reviewers.add("echasnovski");
|
||||
}
|
||||
|
||||
if (labels.includes("defaults")) {
|
||||
reviewers.add("gpanders");
|
||||
if (labels.includes("dependencies")) {
|
||||
reviewers.add("jamessan");
|
||||
}
|
||||
|
||||
if (labels.includes("diagnostic")) {
|
||||
@@ -39,35 +40,30 @@ module.exports = async ({ github, context }) => {
|
||||
reviewers.add("lewis6991");
|
||||
}
|
||||
|
||||
if (labels.includes("editorconfig")) {
|
||||
reviewers.add("gpanders");
|
||||
if (labels.includes("distribution")) {
|
||||
reviewers.add("jamessan");
|
||||
}
|
||||
|
||||
if (labels.includes("marks")) {
|
||||
if (labels.includes("documentation")) {
|
||||
reviewers.add("clason");
|
||||
}
|
||||
|
||||
if (labels.includes("extmarks")) {
|
||||
reviewers.add("bfredl");
|
||||
}
|
||||
|
||||
if (labels.includes("filetype")) {
|
||||
reviewers.add("clason");
|
||||
}
|
||||
|
||||
if (labels.includes("inccommand")) {
|
||||
reviewers.add("famiu");
|
||||
reviewers.add("gpanders");
|
||||
reviewers.add("smjonas");
|
||||
}
|
||||
|
||||
if (labels.includes("lsp")) {
|
||||
reviewers.add("MariaSolOs");
|
||||
reviewers.add("folke");
|
||||
reviewers.add("glepnir");
|
||||
reviewers.add("mfussenegger");
|
||||
}
|
||||
|
||||
if (labels.includes("netrw")) {
|
||||
reviewers.add("justinmk");
|
||||
}
|
||||
|
||||
if (labels.includes("options")) {
|
||||
reviewers.add("famiu");
|
||||
}
|
||||
|
||||
if (labels.includes("platform:nix")) {
|
||||
reviewers.add("teto");
|
||||
}
|
||||
@@ -77,30 +73,31 @@ module.exports = async ({ github, context }) => {
|
||||
reviewers.add("justinmk");
|
||||
}
|
||||
|
||||
if (labels.includes("snippet")) {
|
||||
reviewers.add("MariaSolOs");
|
||||
}
|
||||
|
||||
if (labels.includes("statusline")) {
|
||||
reviewers.add("famiu");
|
||||
}
|
||||
|
||||
if (labels.includes("test")) {
|
||||
reviewers.add("justinmk");
|
||||
}
|
||||
|
||||
if (labels.includes("treesitter")) {
|
||||
reviewers.add("bfredl");
|
||||
reviewers.add("clason");
|
||||
reviewers.add("lewis6991");
|
||||
reviewers.add("wookayin");
|
||||
}
|
||||
|
||||
if (labels.includes("tui")) {
|
||||
reviewers.add("gpanders");
|
||||
}
|
||||
|
||||
if (labels.includes("typo")) {
|
||||
reviewers.add("dundargoc");
|
||||
}
|
||||
|
||||
if (labels.includes("ui")) {
|
||||
reviewers.add("bfredl");
|
||||
reviewers.add("famiu");
|
||||
}
|
||||
|
||||
if (labels.includes("vim-patch")) {
|
||||
reviewers.add("seandewar");
|
||||
reviewers.add("zeertzjq");
|
||||
}
|
||||
|
@@ -1,19 +1,18 @@
|
||||
name: "reviewers: add"
|
||||
name: "Request reviews"
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [labeled, ready_for_review, reopened]
|
||||
workflow_call:
|
||||
jobs:
|
||||
request-reviewer:
|
||||
if: github.event.pull_request.state == 'open' && github.event.pull_request.draft == false && !endsWith(github.actor, '[bot]')
|
||||
if: github.event.pull_request.state == 'open' && github.event.pull_request.draft == false
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
- name: 'Request reviewers'
|
||||
uses: actions/github-script@v7
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: |
|
||||
const script = require('./.github/scripts/reviewers_add.js')
|
||||
const script = require('./.github/scripts/reviews.js')
|
||||
await script({github, context})
|
38
.github/workflows/api-docs.yml
vendored
Normal file
38
.github/workflows/api-docs.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
# Check if any PR needs to run the autogenerate script
|
||||
name: Autogenerate API docs
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'src/nvim/api/*.[ch]'
|
||||
- 'runtime/lua/**.lua'
|
||||
- 'runtime/doc/**'
|
||||
|
||||
jobs:
|
||||
regen-api-docs:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: rhysd/action-setup-vim@v1
|
||||
with:
|
||||
neovim: true
|
||||
version: nightly
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo env DEBIAN_FRONTEND=noninteractive apt-get install -y doxygen python3 python3-msgpack
|
||||
|
||||
- name: Generate docs
|
||||
id: docs
|
||||
run: |
|
||||
python3 scripts/gen_vimdoc.py
|
||||
printf 'UPDATED_DOCS=%s\n' $([ -z "$(git diff)" ]; echo $?) >> $GITHUB_OUTPUT
|
||||
|
||||
- name: FAIL, PR has not committed doc changes
|
||||
if: ${{ steps.docs.outputs.UPDATED_DOCS != 0 }}
|
||||
run: |
|
||||
echo "Job failed, run ./scripts/gen_vimdoc.py and commit your doc changes"
|
||||
echo "The doc generation produces the following changes:"
|
||||
git diff --color --exit-code
|
38
.github/workflows/backport.yml
vendored
38
.github/workflows/backport.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: backport
|
||||
name: Backport
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [closed, labeled]
|
||||
@@ -11,36 +11,6 @@ jobs:
|
||||
if: github.event.pull_request.merged
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/create-github-app-token@v1
|
||||
id: app-token
|
||||
with:
|
||||
app-id: ${{ vars.BACKPORT_APP }}
|
||||
private-key: ${{ secrets.BACKPORT_KEY }}
|
||||
|
||||
- name: Create backport PR
|
||||
id: backport
|
||||
uses: korthout/backport-action@v3
|
||||
with:
|
||||
pull_title: "${pull_title}"
|
||||
label_pattern: "^ci:backport ([^ ]+)$"
|
||||
github_token: ${{ steps.app-token.outputs.token }}
|
||||
|
||||
- name: Create failed backport label
|
||||
if: ${{ steps.backport.outputs.was_successful == 'false' }}
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
github.rest.issues.addLabels({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
labels: ['needs:backport']
|
||||
})
|
||||
|
||||
- name: Enable automerge
|
||||
if: ${{ steps.backport.outputs.was_successful == 'true' }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: gh pr merge --rebase --auto ${{ steps.backport.outputs.created_pull_numbers }}
|
||||
- uses: actions/checkout@v3
|
||||
- name: Create backport PRs
|
||||
uses: korthout/backport-action@v1
|
||||
|
61
.github/workflows/build.yml
vendored
61
.github/workflows/build.yml
vendored
@@ -10,27 +10,45 @@ on:
|
||||
- '**/CMakePresets.json'
|
||||
- 'cmake.*/**'
|
||||
- '.github/**'
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
group: ${{ github.workflow }}-${{ github.head_ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
BIN_DIR: ${{ github.workspace }}/bin
|
||||
INSTALL_PREFIX: ${{ github.workspace }}/nvim-install
|
||||
|
||||
jobs:
|
||||
macos-universal:
|
||||
runs-on: macos-latest
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: ./.github/scripts/install_deps.sh
|
||||
|
||||
- run: printf 'NVIM_BUILD_TYPE=Release\n' >> $GITHUB_ENV
|
||||
|
||||
- name: Build universal binary
|
||||
run: ./.github/scripts/build_universal_macos.sh
|
||||
|
||||
old-cmake:
|
||||
name: Test oldest supported cmake
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 15
|
||||
env:
|
||||
CMAKE_URL: 'https://cmake.org/files/v3.13/cmake-3.13.0-Linux-x86_64.sh'
|
||||
CMAKE_VERSION: '3.13.0'
|
||||
CMAKE_URL: 'https://cmake.org/files/v3.10/cmake-3.10.0-Linux-x86_64.sh'
|
||||
CMAKE_VERSION: '3.10.0'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./.github/actions/setup
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up environment
|
||||
run: echo "$BIN_DIR" >> $GITHUB_PATH
|
||||
|
||||
- name: Install dependencies
|
||||
run: ./.github/scripts/install_deps.sh
|
||||
|
||||
- name: Install minimum required version of cmake
|
||||
run: |
|
||||
@@ -53,30 +71,3 @@ jobs:
|
||||
|
||||
- name: Install
|
||||
run: make install
|
||||
|
||||
use-existing-src:
|
||||
name: Test USE_EXISTING_SRC_DIR=ON builds with no network access
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./.github/actions/setup
|
||||
|
||||
- name: Build bundled dependencies
|
||||
run: make deps
|
||||
|
||||
- name: Clean bundled dependencies à la neovim/deps
|
||||
run: |
|
||||
rm -rf ./build
|
||||
find .deps .deps/build -maxdepth 1 '!' \( -name .deps -o -name build -o -name src \) -exec rm -r '{}' +
|
||||
cd .deps/build/src
|
||||
rm -rf ./*-build
|
||||
rm -rf ./*-stamp/*-{configure,build,install,done}
|
||||
for d in *; do (cd "$d"; rm -rf ./autom4te.cache; make clean || true; make distclean || true); done
|
||||
|
||||
- name: Re-build bundled dependencies with no network access
|
||||
run: |
|
||||
sudo sysctl kernel.apparmor_restrict_unprivileged_userns=0
|
||||
unshare --map-root-user --net make deps DEPS_CMAKE_FLAGS=-DUSE_EXISTING_SRC_DIR=ON
|
||||
|
||||
- name: Build
|
||||
run: make CMAKE_FLAGS="-D CI_BUILD=ON"
|
||||
|
33
.github/workflows/build_dummy.yml
vendored
33
.github/workflows/build_dummy.yml
vendored
@@ -1,33 +0,0 @@
|
||||
name: build_dummy
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- 'master'
|
||||
- 'release-[0-9]+.[0-9]+'
|
||||
# This needs to be an exact complement of `paths` in the build.yml workflow.
|
||||
# This is required to bypass required checks since a required job is always
|
||||
# needed to run.
|
||||
paths-ignore:
|
||||
- '**.cmake'
|
||||
- '**/CMakeLists.txt'
|
||||
- '**/CMakePresets.json'
|
||||
- 'cmake.*/**'
|
||||
- '.github/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
jobs:
|
||||
old-cmake:
|
||||
name: Test oldest supported cmake
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- run: echo "success"
|
||||
|
||||
use-existing-src:
|
||||
name: Test USE_EXISTING_SRC_DIR=ON builds with no network access
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo "success"
|
25
.github/workflows/codeql.yml
vendored
25
.github/workflows/codeql.yml
vendored
@@ -1,17 +1,9 @@
|
||||
name: "codeql"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ "master" ]
|
||||
schedule:
|
||||
- cron: '42 0 * * 0'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
@@ -22,15 +14,18 @@ jobs:
|
||||
security-events: write
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./.github/actions/setup
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: ./.github/scripts/install_deps.sh
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: cpp
|
||||
|
||||
- run: make
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v3
|
||||
uses: github/codeql-action/analyze@v2
|
||||
|
8
.github/workflows/coverity.yml
vendored
8
.github/workflows/coverity.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: coverity
|
||||
name: Coverity
|
||||
on:
|
||||
schedule:
|
||||
- cron: '10 0 * * *' # Run every day at 00:10
|
||||
@@ -8,8 +8,10 @@ jobs:
|
||||
scan:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./.github/actions/setup
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: ./.github/scripts/install_deps.sh
|
||||
|
||||
- name: Download Coverity
|
||||
run: |
|
||||
|
26
.github/workflows/docs.yml
vendored
26
.github/workflows/docs.yml
vendored
@@ -1,26 +0,0 @@
|
||||
name: docs
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, ready_for_review]
|
||||
jobs:
|
||||
docs:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.pull_request.draft == false
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./.github/actions/setup
|
||||
|
||||
- name: Generate docs
|
||||
run: |
|
||||
make doc
|
||||
if [ -n "$(git status --porcelain)" ]; then
|
||||
echo "::error::Job failed, run 'make doc' and commit your doc changes."
|
||||
echo "::error::The doc generation produces the following changes:"
|
||||
git diff --color --exit-code
|
||||
fi
|
||||
|
||||
- name: Validate docs
|
||||
run: make lintdoc
|
@@ -1,27 +1,30 @@
|
||||
name: "labeler: issue"
|
||||
name: Issue Open Check
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [opened]
|
||||
|
||||
jobs:
|
||||
labeler:
|
||||
issue-open-check:
|
||||
permissions:
|
||||
issues: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: check issue title
|
||||
uses: actions/github-script@v7
|
||||
id: check-issue
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: |
|
||||
const title = context.payload.issue.title;
|
||||
const titleSplit = title.split(/\b/).map(e => e.toLowerCase());
|
||||
const keywords = ['api', 'treesitter', 'ui', 'lsp'];
|
||||
const titleSplit = title.split(/\s+/).map(e => e.toLowerCase());
|
||||
const keywords = ['api', 'treesitter', 'ui', 'lsp', 'doc'];
|
||||
var match = new Set();
|
||||
for (const keyword of keywords) {
|
||||
if (titleSplit.includes(keyword)) {
|
||||
for(const keyword of keywords) {
|
||||
if(titleSplit.includes(keyword)) {
|
||||
match.add(keyword)
|
||||
}
|
||||
}
|
||||
if (match.size !== 0) {
|
||||
if(match.size !== 0){
|
||||
github.rest.issues.addLabels({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
@@ -1,21 +1,20 @@
|
||||
name: "labeler: PR"
|
||||
name: "Pull Request Labeler"
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened]
|
||||
jobs:
|
||||
changed-files:
|
||||
|
||||
triage:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/labeler@v5
|
||||
- uses: actions/labeler@v4
|
||||
with:
|
||||
configuration-path: .github/scripts/labeler_configuration.yml
|
||||
sync-labels: ""
|
||||
|
||||
type-scope:
|
||||
needs: changed-files
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
@@ -33,25 +32,17 @@ jobs:
|
||||
- name: "Extract if the PR is a breaking change and add it as label"
|
||||
run: gh pr edit "$PR_NUMBER" --add-label "$(echo "$PR_TITLE" | sed -E 's|[[:alpha:]]+(\(.*\))?!:.*|breaking-change|')" || true
|
||||
|
||||
target-release:
|
||||
needs: ["changed-files", "type-scope"]
|
||||
request-reviewer:
|
||||
if: github.event.pull_request.state == 'open' && github.event.pull_request.draft == false
|
||||
runs-on: ubuntu-latest
|
||||
needs: ["triage", "type-scope"]
|
||||
permissions:
|
||||
pull-requests: write
|
||||
steps:
|
||||
- if: startsWith(github.base_ref, 'release')
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
github.rest.issues.addLabels({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
labels: ['target:release']
|
||||
})
|
||||
|
||||
request-reviewer:
|
||||
needs: ["changed-files", "type-scope", "target-release"]
|
||||
permissions:
|
||||
pull-requests: write
|
||||
uses: ./.github/workflows/reviewers_add.yml
|
||||
- uses: actions/checkout@v3
|
||||
- name: 'Request reviewers'
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: |
|
||||
const script = require('./.github/scripts/reviews.js')
|
||||
await script({github, context})
|
20
.github/workflows/lintcommit.yml
vendored
20
.github/workflows/lintcommit.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: lintcommit
|
||||
name: "Commit Linter"
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, ready_for_review]
|
||||
@@ -9,19 +9,11 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.pull_request.draft == false
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
|
||||
- uses: ./.github/actions/setup
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cmake -S cmake.deps --preset ci
|
||||
cmake --build .deps
|
||||
cmake --preset ci
|
||||
cmake --build build
|
||||
|
||||
- name: lintcommit
|
||||
run: cmake --build build --target lintcommit
|
||||
- uses: rhysd/action-setup-vim@v1
|
||||
with:
|
||||
neovim: true
|
||||
- run: nvim --clean -es +"lua require('scripts.lintcommit').main({trace=false})"
|
||||
|
16
.github/workflows/lintcommit_dummy.yml
vendored
16
.github/workflows/lintcommit_dummy.yml
vendored
@@ -1,16 +0,0 @@
|
||||
# Dummy workflow of lintcommit.yml. lintcommit is a required check, but it's
|
||||
# only designed to work on master. Since required checks are always required to
|
||||
# run, we can essentially "skip" the lintcommit on release branches with this
|
||||
# dummy check that automatically passes.
|
||||
name: lintcommit_dummy
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, ready_for_review]
|
||||
branches:
|
||||
- 'release-[0-9]+.[0-9]+'
|
||||
jobs:
|
||||
lint-commits:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.pull_request.draft == false
|
||||
steps:
|
||||
- run: echo "success"
|
8
.github/workflows/news.yml
vendored
8
.github/workflows/news.yml
vendored
@@ -1,15 +1,15 @@
|
||||
name: "news.txt"
|
||||
name: "news.txt check"
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]
|
||||
types: [opened, synchronize, reopened, ready_for_review]
|
||||
branches:
|
||||
- 'master'
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.pull_request.draft == false && !contains(github.event.pull_request.labels.*.name, 'ci:skip-news')
|
||||
if: github.event.pull_request.draft == false
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
|
74
.github/workflows/notes.md
vendored
74
.github/workflows/notes.md
vendored
@@ -10,83 +10,49 @@ ${NVIM_VERSION}
|
||||
|
||||
1. Download **nvim-win64.zip**
|
||||
2. Extract the zip
|
||||
3. Run `nvim.exe` on your CLI of choice
|
||||
3. Run `nvim-qt.exe`
|
||||
|
||||
#### MSI
|
||||
|
||||
1. Download **nvim-win64.msi**
|
||||
2. Run the MSI
|
||||
3. Run `nvim.exe` on your CLI of choice
|
||||
3. Search and run `nvim-qt.exe` or run `nvim.exe` on your CLI of choice
|
||||
|
||||
### macOS (x86_64)
|
||||
### macOS
|
||||
|
||||
1. Download **nvim-macos-x86_64.tar.gz**
|
||||
2. Run `xattr -c ./nvim-macos-x86_64.tar.gz` (to avoid "unknown developer" warning)
|
||||
3. Extract: `tar xzvf nvim-macos-x86_64.tar.gz`
|
||||
4. Run `./nvim-macos-x86_64/bin/nvim`
|
||||
1. Download **nvim-macos.tar.gz**
|
||||
2. Run `xattr -c ./nvim-macos.tar.gz` (to avoid "unknown developer" warning)
|
||||
3. Extract: `tar xzvf nvim-macos.tar.gz`
|
||||
4. Run `./nvim-macos/bin/nvim`
|
||||
|
||||
### macOS (arm64)
|
||||
|
||||
1. Download **nvim-macos-arm64.tar.gz**
|
||||
2. Run `xattr -c ./nvim-macos-arm64.tar.gz` (to avoid "unknown developer" warning)
|
||||
3. Extract: `tar xzvf nvim-macos-arm64.tar.gz`
|
||||
4. Run `./nvim-macos-arm64/bin/nvim`
|
||||
|
||||
### Linux (x86_64)
|
||||
|
||||
Minimum glibc version to run these releases is 2.31. People requiring releases
|
||||
that work on older glibc versions can find them at
|
||||
https://github.com/neovim/neovim-releases.
|
||||
### Linux (x64)
|
||||
|
||||
#### AppImage
|
||||
|
||||
1. Download **nvim-linux-x86_64.appimage**
|
||||
2. Run `chmod u+x nvim-linux-x86_64.appimage && ./nvim-linux-x86_64.appimage`
|
||||
1. Download **nvim.appimage**
|
||||
2. Run `chmod u+x nvim.appimage && ./nvim.appimage`
|
||||
- If your system does not have FUSE you can [extract the appimage](https://github.com/AppImage/AppImageKit/wiki/FUSE#type-2-appimage):
|
||||
```
|
||||
./nvim-linux-x86_64.appimage --appimage-extract
|
||||
./nvim.appimage --appimage-extract
|
||||
./squashfs-root/usr/bin/nvim
|
||||
```
|
||||
|
||||
#### Tarball
|
||||
|
||||
1. Download **nvim-linux-x86_64.tar.gz**
|
||||
2. Extract: `tar xzvf nvim-linux-x86_64.tar.gz`
|
||||
3. Run `./nvim-linux-x86_64/bin/nvim`
|
||||
|
||||
### Linux (arm64)
|
||||
|
||||
#### AppImage
|
||||
|
||||
1. Download **nvim-linux-arm64.appimage**
|
||||
2. Run `chmod u+x nvim-linux-arm64.appimage && ./nvim-linux-arm64.appimage`
|
||||
- If your system does not have FUSE you can [extract the appimage](https://github.com/AppImage/AppImageKit/wiki/FUSE#type-2-appimage):
|
||||
```
|
||||
./nvim-linux-arm64.appimage --appimage-extract
|
||||
./squashfs-root/usr/bin/nvim
|
||||
```
|
||||
|
||||
#### Tarball
|
||||
|
||||
1. Download **nvim-linux-arm64.tar.gz**
|
||||
2. Extract: `tar xzvf nvim-linux-arm64.tar.gz`
|
||||
3. Run `./nvim-linux-arm64/bin/nvim`
|
||||
1. Download **nvim-linux64.tar.gz**
|
||||
2. Extract: `tar xzvf nvim-linux64.tar.gz`
|
||||
3. Run `./nvim-linux64/bin/nvim`
|
||||
|
||||
### Other
|
||||
|
||||
- Install by [package manager](https://github.com/neovim/neovim/blob/master/INSTALL.md#install-from-package)
|
||||
- Install by [package manager](https://github.com/neovim/neovim/wiki/Installing-Neovim)
|
||||
|
||||
## SHA256 Checksums
|
||||
|
||||
```
|
||||
${SHA_APPIMAGE_ARM64}
|
||||
${SHA_APPIMAGE_ARM64_ZSYNC}
|
||||
${SHA_LINUX_ARM64_TAR}
|
||||
${SHA_APPIMAGE_X86_64}
|
||||
${SHA_APPIMAGE_X86_64_ZSYNC}
|
||||
${SHA_LINUX_X86_64_TAR}
|
||||
${SHA_MACOS_ARM64}
|
||||
${SHA_MACOS_X86_64}
|
||||
${SHA_WIN_64_MSI}
|
||||
${SHA_LINUX_64_TAR}
|
||||
${SHA_APP_IMAGE}
|
||||
${SHA_APP_IMAGE_ZSYNC}
|
||||
${SHA_MACOS}
|
||||
${SHA_WIN_64_ZIP}
|
||||
${SHA_WIN_64_MSI}
|
||||
```
|
||||
|
55
.github/workflows/optional.yml
vendored
55
.github/workflows/optional.yml
vendored
@@ -1,55 +0,0 @@
|
||||
name: optional
|
||||
on:
|
||||
pull_request:
|
||||
types: [labeled, opened, synchronize, reopened]
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
env:
|
||||
INSTALL_PREFIX: ${{ github.workspace }}/nvim-install
|
||||
# Double test timeout since it's running via qemu
|
||||
TEST_TIMEOUT: 3600
|
||||
# TEST_FILE: test/functional/shada
|
||||
# TEST_FILTER: foo
|
||||
|
||||
jobs:
|
||||
s390x:
|
||||
if: contains(github.event.pull_request.labels.*.name, 'ci:s390x') || github.event_name == 'workflow_dispatch'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
test: [functionaltest, oldtest]
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 90
|
||||
steps:
|
||||
- run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
||||
- uses: docker://multiarch/ubuntu-core:s390x-focal
|
||||
with:
|
||||
# Docker runs the command as root, but we want the build/test to run
|
||||
# as non-root so permissions based tests run correctly
|
||||
args: >
|
||||
bash -c
|
||||
"
|
||||
apt-get -y update &&
|
||||
time DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential cmake curl gettext ninja-build locales-all cpanminus git attr libattr1-dev xdg-utils &&
|
||||
useradd --create-home qemuci &&
|
||||
chown -R qemuci. . &&
|
||||
runuser -u qemuci -- git clone --depth=1 https://github.com/neovim/neovim.git &&
|
||||
cd neovim &&
|
||||
runuser -u qemuci -- git fetch origin ${{ github.ref }}:pr &&
|
||||
runuser -u qemuci -- git switch pr &&
|
||||
runuser -u qemuci -- cmake -S cmake.deps -B .deps -G Ninja -D USE_BUNDLED_LUAJIT=OFF -D USE_BUNDLED_LUA=ON &&
|
||||
runuser -u qemuci -- cmake --build .deps &&
|
||||
runuser -u qemuci -- cmake -B build -G Ninja -D CI_BUILD=ON -D PREFER_LUA=ON &&
|
||||
runuser -u qemuci -- make ${{ matrix.test }}
|
||||
"
|
||||
|
||||
windows-asan:
|
||||
if: contains(github.event.pull_request.labels.*.name, 'ci:windows-asan') || github.event_name == 'workflow_dispatch'
|
||||
uses: ./.github/workflows/test_windows.yml
|
||||
with:
|
||||
build_flags: "-D ENABLE_ASAN_UBSAN=ON"
|
||||
functionaltest_timeout: 40
|
249
.github/workflows/release.yml
vendored
249
.github/workflows/release.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: release
|
||||
name: Release
|
||||
on:
|
||||
schedule:
|
||||
- cron: '5 5 * * *'
|
||||
@@ -15,73 +15,58 @@ on:
|
||||
# Build on the oldest supported images, so we have broader compatibility
|
||||
# Build with gcc-10 to prevent triggering #14150 (default is still gcc-9 on 20.04)
|
||||
jobs:
|
||||
setup:
|
||||
runs-on: ubuntu-latest
|
||||
linux:
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
CC: gcc-10
|
||||
outputs:
|
||||
build_type: ${{ steps.build.outputs.build_type }}
|
||||
appimage_tag: ${{ steps.build.outputs.appimage_tag }}
|
||||
version: ${{ steps.build.outputs.version }}
|
||||
container:
|
||||
image: ubuntu:18.04
|
||||
options: --privileged # Privileged mode is needed to load fuse module.
|
||||
steps:
|
||||
# Nightly uses RelWithDebInfo while stable uses Release (which disables
|
||||
# asserts). This helps get better debug info from people brave enough to
|
||||
# use the nightly builds.
|
||||
- name: Prepare container
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y software-properties-common
|
||||
add-apt-repository -y ppa:ubuntu-toolchain-r/test # For gcc-10.
|
||||
add-apt-repository -y ppa:git-core/ppa # For git>=2.18.
|
||||
apt-get update
|
||||
apt-get install -y git gcc-10
|
||||
apt-get install -y fuse libfuse2 # For linuxdeploy.
|
||||
# Workaround for https://github.com/actions/checkout/issues/766.
|
||||
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y build-essential cmake gettext ninja-build unzip
|
||||
- if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly')
|
||||
run: |
|
||||
echo 'CMAKE_BUILD_TYPE=Release' >> $GITHUB_ENV
|
||||
echo 'NVIM_BUILD_TYPE=Release' >> $GITHUB_ENV
|
||||
echo 'APPIMAGE_TAG=latest' >> $GITHUB_ENV
|
||||
- if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly')
|
||||
run: |
|
||||
echo 'CMAKE_BUILD_TYPE=RelWithDebInfo' >> $GITHUB_ENV
|
||||
echo 'NVIM_BUILD_TYPE=RelWithDebInfo' >> $GITHUB_ENV
|
||||
echo 'APPIMAGE_TAG=nightly' >> $GITHUB_ENV
|
||||
- name: Export build information
|
||||
id: build
|
||||
run: |
|
||||
printf "build_type=${CMAKE_BUILD_TYPE}\n" >> $GITHUB_OUTPUT
|
||||
printf "appimage_tag=${APPIMAGE_TAG}\n" >> $GITHUB_OUTPUT
|
||||
|
||||
linux:
|
||||
needs: setup
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
runner: [ ubuntu-20.04, ubuntu-24.04-arm ]
|
||||
include:
|
||||
- runner: ubuntu-20.04
|
||||
arch: x86_64
|
||||
cc: gcc-10
|
||||
- runner: ubuntu-24.04-arm
|
||||
arch: arm64
|
||||
runs-on: ${{ matrix.runner }}
|
||||
env:
|
||||
CC: ${{ matrix.cc }}
|
||||
LDAI_NO_APPSTREAM: 1 # skip checking (broken) AppStream metadata for issues
|
||||
outputs:
|
||||
version: ${{ steps.build.outputs.version }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
# Perform a full checkout #13471
|
||||
fetch-depth: 0
|
||||
- run: ./.github/scripts/install_deps.sh
|
||||
- run: echo "CMAKE_BUILD_TYPE=${{ needs.setup.outputs.build_type }}" >> $GITHUB_ENV
|
||||
- if: matrix.arch == 'arm64'
|
||||
run: sudo apt-get update && sudo apt-get install -y libfuse2t64
|
||||
- name: appimage
|
||||
run: |
|
||||
./scripts/genappimage.sh ${{ needs.setup.outputs.appimage_tag }}
|
||||
run: ./scripts/genappimage.sh ${APPIMAGE_TAG}
|
||||
- name: tar.gz
|
||||
run: cpack --config build/CPackConfig.cmake -G TGZ
|
||||
- uses: actions/upload-artifact@v4
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: appimage-${{ matrix.arch }}
|
||||
name: appimage
|
||||
path: |
|
||||
build/bin/nvim-linux-${{ matrix.arch }}.appimage
|
||||
build/bin/nvim-linux-${{ matrix.arch }}.appimage.zsync
|
||||
build/bin/nvim.appimage
|
||||
build/bin/nvim.appimage.zsync
|
||||
retention-days: 1
|
||||
- uses: actions/upload-artifact@v4
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: nvim-linux-${{ matrix.arch }}
|
||||
name: nvim-linux64
|
||||
path: |
|
||||
build/nvim-linux-${{ matrix.arch }}.tar.gz
|
||||
build/nvim-linux64.tar.gz
|
||||
retention-days: 1
|
||||
- name: Export version
|
||||
id: build
|
||||
@@ -89,68 +74,52 @@ jobs:
|
||||
printf 'version<<END\n' >> $GITHUB_OUTPUT
|
||||
./build/bin/nvim --version | head -n 3 >> $GITHUB_OUTPUT
|
||||
printf 'END\n' >> $GITHUB_OUTPUT
|
||||
macos:
|
||||
needs: setup
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
runner: [ macos-13, macos-14 ]
|
||||
include:
|
||||
- runner: macos-13
|
||||
arch: x86_64
|
||||
- runner: macos-14
|
||||
arch: arm64
|
||||
runs-on: ${{ matrix.runner }}
|
||||
env:
|
||||
MACOSX_DEPLOYMENT_TARGET: 11.0
|
||||
|
||||
macOS:
|
||||
runs-on: macos-11
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
# Perform a full checkout #13471
|
||||
fetch-depth: 0
|
||||
- name: Install dependencies
|
||||
run: ./.github/scripts/install_deps.sh
|
||||
|
||||
- name: Build deps
|
||||
run: |
|
||||
cmake -S cmake.deps -B .deps -G Ninja \
|
||||
-D CMAKE_BUILD_TYPE=${{ needs.setup.outputs.build_type }} \
|
||||
-D CMAKE_FIND_FRAMEWORK=NEVER
|
||||
cmake --build .deps
|
||||
- name: Build neovim
|
||||
run: |
|
||||
cmake -B build -G Ninja \
|
||||
-D CMAKE_BUILD_TYPE=${{ needs.setup.outputs.build_type }} \
|
||||
-D ENABLE_LIBINTL=OFF \
|
||||
-D CMAKE_FIND_FRAMEWORK=NEVER
|
||||
cmake --build build
|
||||
- name: Package
|
||||
run: cpack --config build/CPackConfig.cmake
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
- if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly')
|
||||
run: printf 'NVIM_BUILD_TYPE=Release\n' >> $GITHUB_ENV
|
||||
- if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly')
|
||||
run: printf 'NVIM_BUILD_TYPE=RelWithDebInfo\n' >> $GITHUB_ENV
|
||||
- name: Build universal binary
|
||||
run: ./.github/scripts/build_universal_macos.sh
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: nvim-macos-${{ matrix.arch }}
|
||||
path: build/nvim-macos-${{ matrix.arch }}.tar.gz
|
||||
name: nvim-macos
|
||||
path: build/nvim-macos.tar.gz
|
||||
retention-days: 1
|
||||
|
||||
windows:
|
||||
needs: setup
|
||||
runs-on: windows-2019
|
||||
name: windows (MSVC_64)
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
# Perform a full checkout #13471
|
||||
fetch-depth: 0
|
||||
- run: .github/scripts/env.ps1
|
||||
- name: Set env
|
||||
run: |
|
||||
$installationPath = vswhere.exe -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath
|
||||
if ($installationPath -and (Test-Path "$installationPath\Common7\Tools\vsdevcmd.bat")) {
|
||||
& "${env:COMSPEC}" /s /c "`"$installationPath\Common7\Tools\vsdevcmd.bat`" -arch=x64 -no_logo && set" | ForEach-Object {
|
||||
$name, $value = $_ -split '=', 2
|
||||
"$name=$value" >> $env:GITHUB_ENV
|
||||
}
|
||||
}
|
||||
- name: Build deps
|
||||
run: |
|
||||
cmake -S cmake.deps -B .deps -G Ninja -DCMAKE_BUILD_TYPE=${{ needs.setup.outputs.build_type }}
|
||||
cmake -S cmake.deps -B .deps -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo'
|
||||
cmake --build .deps
|
||||
- name: build package
|
||||
run: |
|
||||
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=${{ needs.setup.outputs.build_type }}
|
||||
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo'
|
||||
cmake --build build --target package
|
||||
- uses: actions/upload-artifact@v4
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: nvim-win64
|
||||
path: |
|
||||
@@ -159,7 +128,7 @@ jobs:
|
||||
retention-days: 1
|
||||
|
||||
publish:
|
||||
needs: [linux, macos, windows]
|
||||
needs: [linux, macOS, windows]
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
GH_REPO: ${{ github.repository }}
|
||||
@@ -169,9 +138,9 @@ jobs:
|
||||
steps:
|
||||
# Must perform checkout first, since it deletes the target directory
|
||||
# before running, and would therefore delete the downloaded artifacts
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/download-artifact@v4
|
||||
- uses: actions/download-artifact@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: sudo apt-get update && sudo apt-get install -y gettext-base
|
||||
@@ -198,46 +167,26 @@ jobs:
|
||||
git push origin :stable || true
|
||||
# `sha256sum` outputs <sha> <path>, so we cd into each dir to drop the
|
||||
# containing folder from the output.
|
||||
- name: Generate Linux x86_64 SHA256 checksums
|
||||
- name: Generate Linux64 SHA256 checksums
|
||||
run: |
|
||||
cd ./nvim-linux-x86_64
|
||||
sha256sum nvim-linux-x86_64.tar.gz > nvim-linux-x86_64.tar.gz.sha256sum
|
||||
echo "SHA_LINUX_X86_64_TAR=$(cat nvim-linux-x86_64.tar.gz.sha256sum)" >> $GITHUB_ENV
|
||||
- name: Generate Linux arm64 SHA256 checksums
|
||||
cd ./nvim-linux64
|
||||
sha256sum nvim-linux64.tar.gz > nvim-linux64.tar.gz.sha256sum
|
||||
echo "SHA_LINUX_64_TAR=$(cat nvim-linux64.tar.gz.sha256sum)" >> $GITHUB_ENV
|
||||
- name: Generate App Image SHA256 checksums
|
||||
run: |
|
||||
cd ./nvim-linux-arm64
|
||||
sha256sum nvim-linux-arm64.tar.gz > nvim-linux-arm64.tar.gz.sha256sum
|
||||
echo "SHA_LINUX_ARM64_TAR=$(cat nvim-linux-arm64.tar.gz.sha256sum)" >> $GITHUB_ENV
|
||||
- name: Generate AppImage x64_64 SHA256 checksums
|
||||
cd ./appimage
|
||||
sha256sum nvim.appimage > nvim.appimage.sha256sum
|
||||
echo "SHA_APP_IMAGE=$(cat nvim.appimage.sha256sum)" >> $GITHUB_ENV
|
||||
- name: Generate App Image Zsync SHA256 checksums
|
||||
run: |
|
||||
cd ./appimage-x86_64
|
||||
sha256sum nvim-linux-x86_64.appimage > nvim-linux-x86_64.appimage.sha256sum
|
||||
echo "SHA_APPIMAGE_X86_64=$(cat nvim-linux-x86_64.appimage.sha256sum)" >> $GITHUB_ENV
|
||||
- name: Generate AppImage x86_64 Zsync SHA256 checksums
|
||||
cd ./appimage
|
||||
sha256sum nvim.appimage.zsync > nvim.appimage.zsync.sha256sum
|
||||
echo "SHA_APP_IMAGE_ZSYNC=$(cat nvim.appimage.zsync.sha256sum)" >> $GITHUB_ENV
|
||||
- name: Generate macOS SHA256 checksums
|
||||
run: |
|
||||
cd ./appimage-x86_64
|
||||
sha256sum nvim-linux-x86_64.appimage.zsync > nvim-linux-x86_64.appimage.zsync.sha256sum
|
||||
echo "SHA_APPIMAGE_X86_64_ZSYNC=$(cat nvim-linux-x86_64.appimage.zsync.sha256sum)" >> $GITHUB_ENV
|
||||
- name: Generate AppImage x64_64 SHA256 checksums
|
||||
run: |
|
||||
cd ./appimage-arm64
|
||||
sha256sum nvim-linux-arm64.appimage > nvim-linux-arm64.appimage.sha256sum
|
||||
echo "SHA_APPIMAGE_ARM64=$(cat nvim-linux-arm64.appimage.sha256sum)" >> $GITHUB_ENV
|
||||
- name: Generate AppImage arm64 Zsync SHA256 checksums
|
||||
run: |
|
||||
cd ./appimage-arm64
|
||||
sha256sum nvim-linux-arm64.appimage.zsync > nvim-linux-arm64.appimage.zsync.sha256sum
|
||||
echo "SHA_APPIMAGE_ARM64_ZSYNC=$(cat nvim-linux-arm64.appimage.zsync.sha256sum)" >> $GITHUB_ENV
|
||||
- name: Generate macos x86_64 SHA256 checksums
|
||||
run: |
|
||||
cd ./nvim-macos-x86_64
|
||||
sha256sum nvim-macos-x86_64.tar.gz > nvim-macos-x86_64.tar.gz.sha256sum
|
||||
echo "SHA_MACOS_X86_64=$(cat nvim-macos-x86_64.tar.gz.sha256sum)" >> $GITHUB_ENV
|
||||
- name: Generate macos arm64 SHA256 checksums
|
||||
run: |
|
||||
cd ./nvim-macos-arm64
|
||||
sha256sum nvim-macos-arm64.tar.gz > nvim-macos-arm64.tar.gz.sha256sum
|
||||
echo "SHA_MACOS_ARM64=$(cat nvim-macos-arm64.tar.gz.sha256sum)" >> $GITHUB_ENV
|
||||
cd ./nvim-macos
|
||||
sha256sum nvim-macos.tar.gz > nvim-macos.tar.gz.sha256sum
|
||||
echo "SHA_MACOS=$(cat nvim-macos.tar.gz.sha256sum)" >> $GITHUB_ENV
|
||||
- name: Generate Win64 SHA256 checksums
|
||||
run: |
|
||||
cd ./nvim-win64
|
||||
@@ -251,7 +200,35 @@ jobs:
|
||||
DEBUG: api
|
||||
run: |
|
||||
envsubst < "$GITHUB_WORKSPACE/.github/workflows/notes.md" > "$RUNNER_TEMP/notes.md"
|
||||
gh release create $TAG_NAME $PRERELEASE --notes-file "$RUNNER_TEMP/notes.md" --title "$SUBJECT" --target $GITHUB_SHA nvim-macos/* nvim-linux64/* appimage/* nvim-win64/*
|
||||
if [ "$TAG_NAME" != "nightly" ]; then
|
||||
gh release create stable $PRERELEASE --notes-file "$RUNNER_TEMP/notes.md" --title "$SUBJECT" --target $GITHUB_SHA nvim-macos-x86_64/* nvim-macos-arm64/* nvim-linux-x86_64/* nvim-linux-arm64/* appimage-x86_64/* appimage-arm64/* nvim-win64/*
|
||||
gh release create stable $PRERELEASE --notes-file "$RUNNER_TEMP/notes.md" --title "$SUBJECT" --target $GITHUB_SHA nvim-macos/* nvim-linux64/* appimage/* nvim-win64/*
|
||||
fi
|
||||
gh release create $TAG_NAME $PRERELEASE --notes-file "$RUNNER_TEMP/notes.md" --title "$SUBJECT" --target $GITHUB_SHA nvim-macos-x86_64/* nvim-macos-arm64/* nvim-linux-x86_64/* nvim-linux-arm64/* appimage-x86_64/* appimage-arm64/* nvim-win64/*
|
||||
|
||||
publish-winget:
|
||||
needs: publish
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly')
|
||||
name: Publish stable
|
||||
uses: vedantmgoyal2009/winget-releaser@v2
|
||||
with:
|
||||
identifier: Neovim.Neovim
|
||||
release-tag: ${{ github.event.inputs.tag_name || github.ref_name }}
|
||||
token: ${{ secrets.WINGET_TOKEN }}
|
||||
- if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly')
|
||||
name: Get nightly version
|
||||
id: get-version
|
||||
run: |
|
||||
Invoke-WebRequest https://github.com/neovim/neovim/releases/download/nightly/nvim-win64.msi -OutFile setup.msi
|
||||
Install-Module -Name 'Carbon.Windows.Installer' -Force
|
||||
$VERSION = (Get-CMsi (Resolve-Path .\setup.msi).Path).ProductVersion
|
||||
"version=$VERSION" >> $env:GITHUB_OUTPUT
|
||||
- if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly')
|
||||
name: Publish nightly
|
||||
uses: vedantmgoyal2009/winget-releaser@v2
|
||||
with:
|
||||
identifier: Neovim.Neovim.Nightly
|
||||
version: ${{ steps.get-version.outputs.version }}
|
||||
release-tag: nightly
|
||||
token: ${{ secrets.WINGET_TOKEN }}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
name: "reviewers: remove"
|
||||
name: "Remove reviewers"
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [converted_to_draft, closed]
|
||||
@@ -8,10 +8,10 @@ jobs:
|
||||
permissions:
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
- name: 'Remove reviewers'
|
||||
uses: actions/github-script@v7
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: |
|
||||
const script = require('./.github/scripts/reviewers_remove.js')
|
||||
const script = require('./.github/scripts/remove-reviewers.js')
|
||||
await script({github, context})
|
8
.github/workflows/response.yml
vendored
8
.github/workflows/response.yml
vendored
@@ -13,8 +13,8 @@ jobs:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/github-script@v7
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/github-script@v6
|
||||
with:
|
||||
script: |
|
||||
const script = require('./.github/scripts/close_unresponsive.js')
|
||||
@@ -27,8 +27,8 @@ jobs:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/github-script@v7
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/github-script@v6
|
||||
with:
|
||||
script: |
|
||||
const script = require('./.github/scripts/remove_response_label.js')
|
||||
|
337
.github/workflows/test.yml
vendored
337
.github/workflows/test.yml
vendored
@@ -8,45 +8,82 @@ on:
|
||||
branches:
|
||||
- 'master'
|
||||
- 'release-[0-9]+.[0-9]+'
|
||||
workflow_dispatch:
|
||||
paths-ignore:
|
||||
- 'contrib/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
ASAN_OPTIONS: detect_leaks=1:check_initialization_order=1:log_path=${{ github.workspace }}/build/log/asan:intercept_tls_get_addr=0
|
||||
ASAN_OPTIONS: detect_leaks=1:check_initialization_order=1:handle_abort=1:handle_sigill=1:log_path=${{ github.workspace }}/build/log/asan:intercept_tls_get_addr=0
|
||||
BIN_DIR: ${{ github.workspace }}/bin
|
||||
BUILD_DIR: ${{ github.workspace }}/build
|
||||
INSTALL_PREFIX: ${{ github.workspace }}/nvim-install
|
||||
LOG_DIR: ${{ github.workspace }}/build/log
|
||||
NVIM_LOG_FILE: ${{ github.workspace }}/build/.nvimlog
|
||||
TSAN_OPTIONS: log_path=${{ github.workspace }}/build/log/tsan
|
||||
UBSAN_OPTIONS: "print_stacktrace=1 log_path=${{ github.workspace }}/build/log/ubsan"
|
||||
VALGRIND_LOG: ${{ github.workspace }}/build/log/valgrind-%p.log
|
||||
# TEST_FILE: test/functional/core/startup_spec.lua
|
||||
# TEST_FILTER: foo
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-24.04
|
||||
if: (github.event_name == 'pull_request' && github.base_ref == 'master') || (github.event_name == 'push' && github.ref == 'refs/heads/master')
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 10
|
||||
env:
|
||||
CC: clang
|
||||
CACHE_UNCRUSTIFY: ${{ github.workspace }}/.cache/uncrustify
|
||||
UNCRUSTIFY_VERSION: uncrustify-0.75.0
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./.github/actions/setup
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install stylua
|
||||
- name: Install dependencies
|
||||
run: ./.github/scripts/install_deps.sh lua-check
|
||||
|
||||
- name: Set up Homebrew
|
||||
id: homebrew
|
||||
uses: Homebrew/actions/setup-homebrew@master
|
||||
|
||||
- run: |
|
||||
brew install stylua
|
||||
|
||||
- name: Cache uncrustify
|
||||
id: cache-uncrustify
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ env.CACHE_UNCRUSTIFY }}
|
||||
key: ${{ env.UNCRUSTIFY_VERSION }}
|
||||
|
||||
- name: Clone uncrustify
|
||||
if: steps.cache-uncrustify.outputs.cache-hit != 'true'
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: uncrustify/uncrustify
|
||||
ref: ${{ env.UNCRUSTIFY_VERSION }}
|
||||
path: uncrustify
|
||||
|
||||
- name: Install uncrustify
|
||||
if: steps.cache-uncrustify.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
wget --directory-prefix="$BIN_DIR" https://github.com/JohnnyMorganz/StyLua/releases/latest/download/stylua-linux-x86_64.zip
|
||||
(cd "$BIN_DIR"; unzip stylua*.zip)
|
||||
source_dir=uncrustify
|
||||
build_dir=uncrustify/build
|
||||
cmake -S $source_dir -B $build_dir -G Ninja -D CMAKE_BUILD_TYPE=Release
|
||||
cmake --build $build_dir
|
||||
mkdir -p .cache
|
||||
cp $build_dir/uncrustify ${{ env.CACHE_UNCRUSTIFY }}
|
||||
|
||||
- uses: ./.github/actions/cache
|
||||
|
||||
- name: Build third-party deps
|
||||
run: |
|
||||
cmake -S cmake.deps -B .deps -G Ninja
|
||||
cmake --build .deps
|
||||
|
||||
- run: cmake -B build -G Ninja -D CI_LINT=ON
|
||||
- if: success() || failure() && steps.abort_job.outputs.status == 'success'
|
||||
name: configure
|
||||
run: cmake -B build -G Ninja
|
||||
|
||||
- if: "!cancelled()"
|
||||
name: Determine if run should be aborted
|
||||
@@ -70,72 +107,66 @@ jobs:
|
||||
run: cmake --build build --target lintc-clint
|
||||
|
||||
- if: success() || failure() && steps.abort_job.outputs.status == 'success'
|
||||
name: clang-tidy
|
||||
run: cmake --build build --target lintc-clang-tidy
|
||||
run: cmake --build build --target clang-tidy
|
||||
|
||||
- if: success() || failure() && steps.abort_job.outputs.status == 'success'
|
||||
name: uncrustify
|
||||
run: cmake --build build --target lintc-uncrustify
|
||||
|
||||
clang-analyzer:
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 20
|
||||
env:
|
||||
CC: clang
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./.github/actions/setup
|
||||
- name: Build third-party deps
|
||||
run: |
|
||||
cmake -S cmake.deps --preset ci
|
||||
cmake --build .deps
|
||||
cmake --preset ci
|
||||
- run: cmake --build build --target clang-analyzer
|
||||
${{ env.CACHE_UNCRUSTIFY }} -c ./src/uncrustify.cfg -q --replace --no-backup $(find ./src/nvim -name "*.[ch]")
|
||||
|
||||
posix:
|
||||
name: ${{ matrix.build.os }} ${{ matrix.build.flavor }} ${{ matrix.build.cc }} ${{ matrix.test }}
|
||||
name: ${{ matrix.runner }} ${{ matrix.flavor }} (cc=${{ matrix.cc }})
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# The `os` field is not needed to differentiate between the different
|
||||
# matrix builds. It is needed to not change the required checks (which
|
||||
# uses jobs names) each time we bump the runner version. It may be
|
||||
# possible to remove if we e.g. start using `-latest` runner versions
|
||||
# or if github introduces a wildcard for required checks in the future.
|
||||
build:
|
||||
[
|
||||
{ runner: ubuntu-24.04, os: ubuntu, flavor: asan, cc: clang, flags: -D ENABLE_ASAN_UBSAN=ON },
|
||||
{ runner: ubuntu-24.04, os: ubuntu, flavor: tsan, cc: clang, flags: -D ENABLE_TSAN=ON },
|
||||
{ runner: ubuntu-24.04, os: ubuntu, flavor: release, cc: gcc, flags: -D CMAKE_BUILD_TYPE=Release },
|
||||
{ runner: ubuntu-24.04-arm, os: ubuntu, flavor: arm, cc: gcc, flags: -D CMAKE_BUILD_TYPE=RelWithDebInfo },
|
||||
{ runner: macos-13, os: macos, flavor: intel, cc: clang, flags: -D CMAKE_FIND_FRAMEWORK=NEVER, deps_flags: -D CMAKE_FIND_FRAMEWORK=NEVER },
|
||||
{ runner: macos-15, os: macos, flavor: arm, cc: clang, flags: -D CMAKE_FIND_FRAMEWORK=NEVER, deps_flags: -D CMAKE_FIND_FRAMEWORK=NEVER },
|
||||
{ runner: ubuntu-24.04, os: ubuntu, flavor: puc-lua, cc: gcc, deps_flags: -D USE_BUNDLED_LUAJIT=OFF -D USE_BUNDLED_LUA=ON, flags: -D PREFER_LUA=ON },
|
||||
]
|
||||
test: [unittest, functionaltest, oldtest]
|
||||
exclude:
|
||||
- test: unittest
|
||||
build: { flavor: tsan }
|
||||
- test: unittest
|
||||
build: { flavor: puc-lua }
|
||||
- test: oldtest
|
||||
build: { flavor: tsan }
|
||||
runs-on: ${{ matrix.build.runner }}
|
||||
include:
|
||||
- flavor: asan
|
||||
cc: clang
|
||||
runner: ubuntu-22.04
|
||||
flags: -D ENABLE_ASAN_UBSAN=ON
|
||||
- flavor: tsan
|
||||
cc: clang
|
||||
runner: ubuntu-22.04
|
||||
flags: -D ENABLE_TSAN=ON
|
||||
- flavor: uchar
|
||||
cc: gcc
|
||||
runner: ubuntu-22.04
|
||||
flags: -D UNSIGNED_CHAR=ON
|
||||
- cc: clang
|
||||
runner: macos-12
|
||||
|
||||
# functionaltest-lua is our dumping ground for non-mainline configurations.
|
||||
# 1. Check that the tests pass with PUC Lua instead of LuaJIT.
|
||||
# 2. No treesitter parsers installed.
|
||||
- flavor: functionaltest-lua
|
||||
cc: gcc
|
||||
runner: ubuntu-22.04
|
||||
deps_flags: -D USE_BUNDLED_LUAJIT=OFF -D USE_BUNDLED_LUA=ON
|
||||
flags: -D PREFER_LUA=ON
|
||||
runs-on: ${{ matrix.runner }}
|
||||
timeout-minutes: 45
|
||||
env:
|
||||
CC: ${{ matrix.build.cc }}
|
||||
CC: ${{ matrix.cc }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./.github/actions/setup
|
||||
with:
|
||||
install_flags: "--test"
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up environment
|
||||
run: |
|
||||
ulimit -c unlimited
|
||||
echo "$BIN_DIR" >> $GITHUB_PATH
|
||||
|
||||
- name: Create log dir
|
||||
run: mkdir -p "$LOG_DIR"
|
||||
|
||||
- if: ${{ matrix.test != 'unittest' }}
|
||||
name: Set up interpreter packages
|
||||
- name: Install dependencies
|
||||
run: ./.github/scripts/install_deps.sh cpanminus
|
||||
|
||||
- name: Setup interpreter packages
|
||||
run: |
|
||||
# Use default CC to avoid compilation problems when installing Python modules.
|
||||
echo "Install neovim module for Python."
|
||||
CC=cc python3 -m pip -q install --user --upgrade pynvim
|
||||
|
||||
echo "Install neovim RubyGem."
|
||||
gem install --no-document --bindir "$BIN_DIR" --user-install --pre neovim
|
||||
|
||||
@@ -143,36 +174,54 @@ jobs:
|
||||
npm install -g neovim
|
||||
npm link neovim
|
||||
|
||||
sudo cpanm -n Neovim::Ext || cat "$HOME/.cpanm/build.log"
|
||||
perl -W -e 'use Neovim::Ext; print $Neovim::Ext::VERSION'
|
||||
if [[ $RUNNER_OS != macOS ]]; then
|
||||
sudo cpanm -n Neovim::Ext || cat "$HOME/.cpanm/build.log"
|
||||
perl -W -e 'use Neovim::Ext; print $Neovim::Ext::VERSION'
|
||||
fi
|
||||
|
||||
- name: Remove .git directory
|
||||
if: ${{ matrix.build.os == 'ubuntu' }}
|
||||
run: cmake -E rm -rf -- .git
|
||||
- uses: ./.github/actions/cache
|
||||
|
||||
- name: Build third-party deps
|
||||
run: |
|
||||
cmake -S cmake.deps --preset ci -D CMAKE_BUILD_TYPE=Debug ${{ matrix.build.deps_flags }}
|
||||
cmake -S cmake.deps -B .deps -G Ninja ${{ matrix.deps_flags }}
|
||||
cmake --build .deps
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cmake --preset ci -D CMAKE_BUILD_TYPE=Debug -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX ${{ matrix.build.flags }}
|
||||
cmake -B build -G Ninja -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX ${{ matrix.flags }} -D CI_BUILD=ON
|
||||
cmake --build build
|
||||
|
||||
- if: ${{ matrix.test == 'oldtest' }}
|
||||
name: ${{ matrix.test }}
|
||||
timeout-minutes: 20
|
||||
run: make -C test/old/testdir NVIM_PRG=$(realpath build)/bin/nvim
|
||||
- if: "!cancelled()"
|
||||
name: Determine if run should be aborted
|
||||
id: abort_job
|
||||
run: echo "status=${{ job.status }}" >> $GITHUB_OUTPUT
|
||||
|
||||
- if: ${{ matrix.test != 'oldtest' }}
|
||||
name: ${{ matrix.test }}
|
||||
timeout-minutes: 20
|
||||
run: cmake --build build --target ${{ matrix.test }}
|
||||
- if: matrix.flavor != 'tsan' && matrix.flavor != 'functionaltest-lua' && (success() || failure() && steps.abort_job.outputs.status == 'success')
|
||||
name: Unittest
|
||||
timeout-minutes: 5
|
||||
run: cmake --build build --target unittest
|
||||
|
||||
- name: Install
|
||||
- if: matrix.flavor != 'functionaltest-lua' && (success() || failure() && steps.abort_job.outputs.status == 'success')
|
||||
name: Functionaltest
|
||||
timeout-minutes: 20
|
||||
run: cmake --build build --target functionaltest
|
||||
|
||||
- if: matrix.flavor == 'functionaltest-lua' && (success() || failure() && steps.abort_job.outputs.status == 'success')
|
||||
name: Functionaltest with PUC Lua
|
||||
timeout-minutes: 20
|
||||
run: cmake --build build --target functionaltest-lua
|
||||
|
||||
- if: matrix.flavor != 'tsan' && (success() || failure() && steps.abort_job.outputs.status == 'success')
|
||||
name: Oldtest
|
||||
run: make oldtest
|
||||
|
||||
- if: success() || failure() && steps.abort_job.outputs.status == 'success'
|
||||
name: Install
|
||||
run: cmake --install build
|
||||
|
||||
- if: success() || failure() && steps.abort_job.outputs.status == 'success'
|
||||
name: Installtests
|
||||
run: |
|
||||
cmake --install build
|
||||
"$INSTALL_PREFIX/bin/nvim" --version
|
||||
if ! "$INSTALL_PREFIX/bin/nvim" -u NONE -e -c ':help' -c ':qall'; then
|
||||
echo "Running ':help' in the installed nvim failed."
|
||||
@@ -197,25 +246,123 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- if: '!cancelled()'
|
||||
- if: success() || failure() && steps.abort_job.outputs.status == 'success'
|
||||
name: Show logs
|
||||
run: cat $(find "$LOG_DIR" -type f)
|
||||
|
||||
build-types:
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: ./.github/scripts/install_deps.sh
|
||||
|
||||
- uses: ./.github/actions/cache
|
||||
|
||||
- name: Build third-party deps
|
||||
run: |
|
||||
cmake -S cmake.deps -B .deps -G "Ninja Multi-Config"
|
||||
cmake --build .deps
|
||||
|
||||
- name: Configure
|
||||
run: cmake -B build -G "Ninja Multi-Config" -D CMAKE_C_COMPILER=gcc -D CI_BUILD=ON
|
||||
|
||||
- name: Release
|
||||
run: cmake --build build --config Release
|
||||
|
||||
- name: RelWithDebInfo
|
||||
run: cmake --build build --config RelWithDebInfo
|
||||
|
||||
- name: MinSizeRel
|
||||
run: cmake --build build --config MinSizeRel
|
||||
|
||||
windows:
|
||||
uses: ./.github/workflows/test_windows.yml
|
||||
runs-on: windows-2022
|
||||
timeout-minutes: 45
|
||||
name: windows
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: ./.github/actions/cache
|
||||
|
||||
- name: Set env
|
||||
run: |
|
||||
$installationPath = vswhere.exe -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath
|
||||
if ($installationPath -and (Test-Path "$installationPath\Common7\Tools\vsdevcmd.bat")) {
|
||||
& "${env:COMSPEC}" /s /c "`"$installationPath\Common7\Tools\vsdevcmd.bat`" -arch=x64 -no_logo && set" | ForEach-Object {
|
||||
$name, $value = $_ -split '=', 2
|
||||
"$name=$value" >> $env:GITHUB_ENV
|
||||
}
|
||||
}
|
||||
|
||||
- name: Build deps
|
||||
run: |
|
||||
cmake -S cmake.deps -B .deps -G Ninja -D CMAKE_BUILD_TYPE='RelWithDebInfo'
|
||||
cmake --build .deps
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cmake -B build -G Ninja -D CMAKE_BUILD_TYPE='RelWithDebInfo' -D CI_BUILD=ON
|
||||
cmake --build build
|
||||
|
||||
- name: Install test deps
|
||||
run: |
|
||||
$PSNativeCommandArgumentPassing = 'Legacy'
|
||||
|
||||
& build\bin\nvim.exe "--version"
|
||||
|
||||
# Ensure that the "win32" feature is set.
|
||||
& build\bin\nvim -u NONE --headless -c 'exe !has(\"win32\").\"cq\"'
|
||||
|
||||
python -m pip install pynvim
|
||||
# Sanity check
|
||||
python -c "import pynvim; print(str(pynvim))"
|
||||
|
||||
node --version
|
||||
npm.cmd --version
|
||||
|
||||
npm.cmd install -g neovim
|
||||
Get-Command -CommandType Application neovim-node-host.cmd
|
||||
npm.cmd link neovim
|
||||
|
||||
- if: "!cancelled()"
|
||||
name: Determine if run should be aborted
|
||||
id: abort_job
|
||||
run: |
|
||||
"status=${{ job.status }}" >> $env:GITHUB_OUTPUT
|
||||
|
||||
- if: success() || failure() && steps.abort_job.outputs.status == 'success'
|
||||
name: Run functionaltest
|
||||
timeout-minutes: 20
|
||||
run: cmake --build build --target functionaltest
|
||||
|
||||
- if: success() || failure() && steps.abort_job.outputs.status == 'success'
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
update: true
|
||||
pacboy: >-
|
||||
make:p gcc:p
|
||||
release: false
|
||||
|
||||
- if: success() || failure() && steps.abort_job.outputs.status == 'success'
|
||||
name: Run oldtest
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
cd test/old/testdir
|
||||
mingw32-make VERBOSE=1
|
||||
|
||||
with-external-deps:
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 10
|
||||
env:
|
||||
CC: gcc
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./.github/actions/setup
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo add-apt-repository ppa:neovim-ppa/stable
|
||||
./.github/scripts/install_deps.sh
|
||||
sudo apt-get install -y \
|
||||
libluajit-5.1-dev \
|
||||
libmsgpack-dev \
|
||||
@@ -224,20 +371,30 @@ jobs:
|
||||
libuv1-dev \
|
||||
lua-filesystem \
|
||||
lua-lpeg \
|
||||
luajit \
|
||||
lua-luv-dev
|
||||
lua-mpack \
|
||||
luajit
|
||||
# libtree-sitter-dev \
|
||||
# libvterm-dev
|
||||
# libvterm-dev \
|
||||
# lua-luv-dev
|
||||
|
||||
# Remove comments from packages once we start using these external
|
||||
# dependencies.
|
||||
|
||||
- uses: ./.github/actions/cache
|
||||
|
||||
- name: Build third-party deps
|
||||
run: |
|
||||
cmake -S cmake.deps --preset external_deps
|
||||
# Ideally all dependencies should external for this job, but some
|
||||
# dependencies don't have the required version available. We use the
|
||||
# bundled versions for these with the hopes of being able to remove them
|
||||
# later on.
|
||||
cmake -S cmake.deps -B .deps -G Ninja -D USE_BUNDLED=OFF \
|
||||
-D USE_BUNDLED_LUV=ON \
|
||||
-D USE_BUNDLED_LIBVTERM=ON \
|
||||
-D USE_BUNDLED_TS=ON
|
||||
cmake --build .deps
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cmake --preset ci
|
||||
cmake -B build -G Ninja -D CI_BUILD=ON
|
||||
cmake --build build
|
||||
|
79
.github/workflows/test_windows.yml
vendored
79
.github/workflows/test_windows.yml
vendored
@@ -1,79 +0,0 @@
|
||||
name: windows
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
build_flags:
|
||||
type: string
|
||||
functionaltest_timeout:
|
||||
default: 20
|
||||
type: number
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
windows:
|
||||
runs-on: windows-2022
|
||||
timeout-minutes: 45
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
test: [functional, old]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./.github/actions/setup
|
||||
|
||||
- name: Build deps
|
||||
run: |
|
||||
cmake -S cmake.deps -B .deps -G Ninja -D CMAKE_BUILD_TYPE='RelWithDebInfo'
|
||||
cmake --build .deps
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cmake --preset ci -D CMAKE_BUILD_TYPE='RelWithDebInfo' ${{ inputs.build_flags }}
|
||||
cmake --build build
|
||||
|
||||
# FIXME(dundargoc): this workaround is needed as the python3 provider
|
||||
# tests suddenly started to become extremely flaky, and this removes the
|
||||
# flakiness for some reason.
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.13'
|
||||
|
||||
- name: Install test deps
|
||||
run: |
|
||||
$PSNativeCommandArgumentPassing = 'Legacy'
|
||||
|
||||
& build\bin\nvim.exe "--version"
|
||||
|
||||
# Ensure that the "win32" feature is set.
|
||||
& build\bin\nvim -u NONE --headless -c 'exe !has(\"win32\").\"cq\"'
|
||||
|
||||
python -m pip install pynvim
|
||||
# Sanity check
|
||||
python -c "import pynvim; print(str(pynvim))"
|
||||
|
||||
node --version
|
||||
npm.cmd --version
|
||||
|
||||
npm.cmd install -g neovim
|
||||
Get-Command -CommandType Application neovim-node-host.cmd
|
||||
npm.cmd link neovim
|
||||
|
||||
- if: ${{ matrix.test == 'functional' }}
|
||||
name: functionaltest
|
||||
timeout-minutes: ${{ inputs.functionaltest_timeout }}
|
||||
run: cmake --build build --target functionaltest
|
||||
|
||||
- if: ${{ matrix.test == 'old' }}
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
update: true
|
||||
pacboy: >-
|
||||
make:p gcc:p diffutils:p
|
||||
release: false
|
||||
|
||||
- if: ${{ matrix.test == 'old' }}
|
||||
name: oldtest
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
cd test/old/testdir
|
||||
mingw32-make VERBOSE=1
|
@@ -15,11 +15,11 @@ jobs:
|
||||
VERSION_BRANCH: marvim/ci-version-update
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
repository: vim/vim
|
||||
path: ${{ env.VIM_SOURCE_DIR }}
|
||||
@@ -50,6 +50,6 @@ jobs:
|
||||
if: ${{ steps.update-version.outputs.NEW_PATCHES != 0 }}
|
||||
run: |
|
||||
git add -u
|
||||
git commit -m 'docs: update version.c'
|
||||
git commit -m 'version.c: update [skip ci]'
|
||||
git push --force https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY} ${VERSION_BRANCH}
|
||||
gh pr create --draft --fill --label vim-patch --base ${GITHUB_REF#refs/heads/} --head ${VERSION_BRANCH} || true
|
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1,8 +1,7 @@
|
||||
# Tools
|
||||
/.direnv/
|
||||
/venv/
|
||||
compile_commands.json
|
||||
/.envrc
|
||||
/.luarc.json
|
||||
|
||||
# IDEs
|
||||
/.vs/
|
||||
@@ -42,7 +41,6 @@ compile_commands.json
|
||||
/test/old/testdir/test*.res
|
||||
/test/old/testdir/test*.log
|
||||
/test/old/testdir/messages
|
||||
/test/old/testdir/starttime
|
||||
/test/old/testdir/viminfo
|
||||
/test/old/testdir/test.ok
|
||||
/test/old/testdir/*.failed
|
||||
|
@@ -43,10 +43,5 @@ globals = {
|
||||
|
||||
exclude_files = {
|
||||
'test/functional/fixtures/lua/syntax_error.lua',
|
||||
'runtime/lua/vim/treesitter/_meta.lua',
|
||||
'runtime/lua/vim/_meta/vimfn.lua',
|
||||
'runtime/lua/vim/_meta/api.lua',
|
||||
'runtime/lua/vim/re.lua',
|
||||
'runtime/lua/coxpcall.lua',
|
||||
'src/nvim/eval.lua',
|
||||
'runtime/lua/vim/treesitter/_meta.lua'
|
||||
}
|
||||
|
31
.luarc.json
31
.luarc.json
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json",
|
||||
"runtime": {
|
||||
"version": "LuaJIT"
|
||||
},
|
||||
"workspace": {
|
||||
"library": [
|
||||
"runtime/lua",
|
||||
"${3rd}/busted/library",
|
||||
"${3rd}/luv/library"
|
||||
],
|
||||
"ignoreDir": [
|
||||
"test"
|
||||
],
|
||||
"checkThirdParty": "Disable"
|
||||
},
|
||||
"diagnostics": {
|
||||
"groupFileStatus": {
|
||||
"strict": "Opened",
|
||||
"strong": "Opened"
|
||||
},
|
||||
"groupSeverity": {
|
||||
"strong": "Warning",
|
||||
"strict": "Warning"
|
||||
},
|
||||
"unusedLocalExclude": [ "_*" ],
|
||||
"disable": [
|
||||
"luadoc-miss-see-name"
|
||||
]
|
||||
}
|
||||
}
|
12
.mailmap
12
.mailmap
@@ -8,12 +8,15 @@ Anmol Sethi <hi@nhooyr.io> <nhooyr@users.noreply.github.com>
|
||||
BK1603 <chouhan.shreyansh2702@gmail.com> Shreyansh Chouhan
|
||||
Billy Su <g4691821@gmail.com> Billy SU
|
||||
Billy Vong <billyvg@gmail.com> <billyvg@users.noreply.github.com>
|
||||
bfredl <bjorn.linse@gmail.com>
|
||||
Carlos Hernandez <carlos@techbyte.ca> <hurricanehrndz@users.noreply.github.com>
|
||||
Chris Kipp <ckipp@pm.me> ckipp01
|
||||
Christian Clason <c.clason@uni-graz.at> <christian.clason@uni-due.de>
|
||||
Cédric Barreteau <> <cbarrete@users.noreply.github.com>
|
||||
Dan Aloni <alonid@gmail.com> <dan@kernelim.com>
|
||||
Daniel Hahler <git@thequod.de> <github@thequod.de>
|
||||
dundargoc <gocdundar@gmail.com> <33953936+dundargoc@users.noreply.github.com>
|
||||
dundargoc <gocdundar@gmail.com> Dundar Goc
|
||||
Eisuke Kawashima <e-kwsm@users.noreply.github.com> E Kawashima
|
||||
ElPiloto <luis.r.piloto@gmail.com> Luis Piloto
|
||||
Eliseo Martínez <eliseomarmol@gmail.com> Eliseo Martínez
|
||||
@@ -35,7 +38,6 @@ J Phani Mahesh <phanimahesh@gmail.com> <github@phanimahesh.me>
|
||||
Jack Bracewell <FriedSock@users.noreply.github.com> <jack.bracewell@unboxedconsulting.com>
|
||||
Jack Bracewell <FriedSock@users.noreply.github.com> <jbtwentythree@gmail.com>
|
||||
Jacques Germishuys <jacquesg@striata.com> <jacquesg@users.noreply.github.com>
|
||||
Jaehwang Jung <tomtomjhj@gmail.com> Jaehwang Jerry Jung
|
||||
Jakub Łuczyński <doubleloop@o2.pl> <doubleloop@users.noreply.github.com>
|
||||
James McCoy <jamessan@jamessan.com> <vega.james@gmail.com>
|
||||
Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> <janedmundlazo@hotmail.com>
|
||||
@@ -55,8 +57,6 @@ Kwon-Young Choi <kwon-young.choi@hotmail.fr> Kwon-Young
|
||||
Lewis Russell <lewis6991@gmail.com> <me@lewisr.dev>
|
||||
Lucas Hoffmann <l-m-h@web.de> <lucc@posteo.de>
|
||||
Lucas Hoffmann <l-m-h@web.de> <lucc@users.noreply.github.com>
|
||||
Luuk van Baal <luukvbaal@gmail.com> <31730729+luukvbaal@users.noreply.github.com>
|
||||
Luuk van Baal <luukvbaal@gmail.com> luukvbaal
|
||||
Marco Hinz <mh.codebro@gmail.com> <mh.codebro+github@gmail.com>
|
||||
Marvim the Paranoid Android <marvim@users.noreply.github.com> marvim
|
||||
Mateusz Czapliński <czapkofan@gmail.com> Mateusz Czaplinski
|
||||
@@ -111,20 +111,14 @@ Yorick Peterse <git@yorickpeterse.com> <yorick@yorickpeterse.com>
|
||||
ZyX <kp-pav@yandex.ru> <kp-pav@ya.ru>
|
||||
ZyX <kp-pav@yandex.ru> Nikolai Aleksandrovich Pavlov
|
||||
aph <a.hewson@gmail.com> Ashley Hewson
|
||||
bfredl <bjorn.linse@gmail.com>
|
||||
butwerenotthereyet <58348703+butwerenotthereyet@users.noreply.github.com> We're Yet
|
||||
chemzqm <chemzqm@gmail.com> Qiming zhao
|
||||
chentau <tchen1998@gmail.com> Tony Chen
|
||||
dedmass <carlo.abelli@gmail.com> Carlo Abelli
|
||||
dundargoc <gocdundar@gmail.com> <33953936+dundargoc@users.noreply.github.com>
|
||||
dundargoc <gocdundar@gmail.com> Dundar Goc
|
||||
equal-l2 <eng.equall2@gmail.com> <equal-l2@users.noreply.github.com>
|
||||
francisco souza <fsouza@users.noreply.github.com> <108725+fsouza@users.noreply.github.com>
|
||||
glacambre <code@lacamb.re> <me@r4>
|
||||
glacambre <code@lacamb.re> Ghjuvan Lacambre
|
||||
glepnir <glephunter@gmail.com> Raphael
|
||||
glepnir <glepnir@gopherhub.org> Raphael
|
||||
glepnir <glepnir@neovim.pro> Raphael
|
||||
ii14 <ii14@users.noreply.github.com> <59243201+ii14@users.noreply.github.com>
|
||||
jdrouhard <john@jmdtech.org> <github@jmdtech.org>
|
||||
kuuote <znmxodq1@gmail.com> <36663503+kuuote@users.noreply.github.com>
|
||||
|
@@ -3,4 +3,4 @@ line_endings = "Unix"
|
||||
indent_type = "Spaces"
|
||||
indent_width = 2
|
||||
quote_style = "AutoPreferSingle"
|
||||
call_parentheses = "Input"
|
||||
call_parentheses = "Always"
|
||||
|
@@ -1,14 +1,3 @@
|
||||
/build/
|
||||
/.deps/
|
||||
/runtime/lua/coxpcall.lua
|
||||
/runtime/lua/vim/_meta
|
||||
/runtime/lua/vim/re.lua
|
||||
|
||||
test/functional/ui/decorations_spec.lua
|
||||
test/functional/ui/float_spec.lua
|
||||
test/functional/ui/multigrid_spec.lua
|
||||
/test/functional/fixtures/lua/syntax_error.lua
|
||||
/test/functional/legacy/030_fileformats_spec.lua
|
||||
/test/functional/legacy/044_099_regexp_multibyte_magic_spec.lua
|
||||
/test/functional/legacy/093_mksession_cursor_cols_latin1_spec.lua
|
||||
/test/functional/lua/luaeval_spec.lua
|
||||
/scripts
|
||||
/src
|
||||
/test
|
||||
|
@@ -1,15 +1,8 @@
|
||||
*backers.txt* Nvim
|
||||
# Bountysource Backers
|
||||
|
||||
Thank you to everyone who backed our [Bountysource fundraiser](https://www.bountysource.com/teams/neovim/fundraiser)!
|
||||
|
||||
NVIM REFERENCE MANUAL
|
||||
|
||||
|
||||
==============================================================================
|
||||
Fundraiser Backers
|
||||
|
||||
Thank you to everyone who backed the original Neovim Fundraiser.
|
||||
|
||||
LIST OF BACKERS
|
||||
### Your name and URL in BACKERS.md.
|
||||
|
||||
- [Bob Breznak](http://brez.io)
|
||||
- [Tim Uruski](http://timuruski.net)
|
||||
@@ -230,7 +223,7 @@ LIST OF BACKERS
|
||||
- BenBergman
|
||||
- Bengt Lüers
|
||||
- Benjamin Bryant
|
||||
- Bèr "berkes" Kessels
|
||||
- Bèr 'berkes' Kessels
|
||||
- Bernd Homuth
|
||||
- Bheesham Persaud
|
||||
- Bilal Quadri
|
||||
@@ -466,7 +459,7 @@ LIST OF BACKERS
|
||||
- Matthias Lehmann
|
||||
- Maximilian Gerlach
|
||||
- Meryn Stol
|
||||
- Michael "manveru" Fellinger
|
||||
- Michael 'manveru' Fellinger
|
||||
- Michael "beefsack" Alexander
|
||||
- Michael Iles
|
||||
- Michael Irwin/mdi
|
||||
@@ -648,9 +641,6 @@ LIST OF BACKERS
|
||||
- Ziling Zhao
|
||||
- Zsolt Botykai
|
||||
|
||||
ANONYMOUS SUPPORTERS
|
||||
### Anonymous Supporters
|
||||
|
||||
There were also 307 other people who didn't claim any level of reward but
|
||||
contributed to the fundraiser. Thank you all for the support!
|
||||
|
||||
vim:tw=78:ts=8:et:ft=help:norl:
|
||||
There were also 307 other people who didn't claim any level of reward but contributed to the fundraiser. Thank you all for the support!
|
451
BUILD.md
451
BUILD.md
@@ -1,451 +0,0 @@
|
||||
- **IMPORTANT**: Before upgrading to a new version, **always check for [breaking changes](https://neovim.io/doc/user/news.html#news-breaking).**
|
||||
|
||||
|
||||
## Quick start
|
||||
|
||||
1. Install [build prerequisites](#build-prerequisites) on your system
|
||||
2. `git clone https://github.com/neovim/neovim`
|
||||
3. `cd neovim && make CMAKE_BUILD_TYPE=RelWithDebInfo`
|
||||
- If you want the **stable release**, also run `git checkout stable`.
|
||||
- If you want to install to a custom location, set `CMAKE_INSTALL_PREFIX`. See also [INSTALL.md](./INSTALL.md#install-from-source).
|
||||
- On BSD, use `gmake` instead of `make`.
|
||||
- To build on Windows, see the [Building on Windows](#building-on-windows) section. _MSVC (Visual Studio) is recommended._
|
||||
4. `sudo make install`
|
||||
- Default install location is `/usr/local`
|
||||
- On Debian/Ubuntu, instead of `sudo make install`, you can try `cd build && cpack -G DEB && sudo dpkg -i nvim-linux-<arch>.deb` (with `<arch>` either `x86_64` or `arm64`) to build DEB-package and install it. This helps ensure clean removal of installed files. Note: This is an unsupported, "best-effort" feature of the Nvim build.
|
||||
|
||||
**Notes**:
|
||||
- From the repository's root directory, running `make` will download and build all the needed dependencies and put the `nvim` executable in `build/bin`.
|
||||
- Third-party dependencies (libuv, LuaJIT, etc.) are downloaded automatically to `.deps/`. See the [FAQ](https://neovim.io/doc/user/faq.html#faq-build) if you have issues.
|
||||
- After building, you can run the `nvim` executable without installing it by running `VIMRUNTIME=runtime ./build/bin/nvim`.
|
||||
- If you plan to develop Neovim, install [Ninja](https://ninja-build.org/) for faster builds. It will automatically be used.
|
||||
- Install [ccache](https://ccache.dev/) for faster rebuilds of Neovim. It's used by default. To disable it, use `CCACHE_DISABLE=true make`.
|
||||
|
||||
## Running tests
|
||||
|
||||
See [test/README.md](https://github.com/neovim/neovim/blob/master/test/README.md).
|
||||
|
||||
## Building
|
||||
|
||||
First make sure you installed the [build prerequisites](#build-prerequisites). Now that you have the dependencies, you can try other build targets explained below.
|
||||
|
||||
The _build type_ determines the level of used compiler optimizations and debug information:
|
||||
|
||||
- `Release`: Full compiler optimizations and no debug information. Expect the best performance from this build type. Often used by package maintainers.
|
||||
- `Debug`: Full debug information; few optimizations. Use this for development to get meaningful output from debuggers like GDB or LLDB. This is the default if `CMAKE_BUILD_TYPE` is not specified.
|
||||
- `RelWithDebInfo` ("Release With Debug Info"): Enables many optimizations and adds enough debug info so that when Neovim ever crashes, you can still get a backtrace.
|
||||
|
||||
So, for a release build, just use:
|
||||
|
||||
```
|
||||
make CMAKE_BUILD_TYPE=Release
|
||||
```
|
||||
(Do not add a `-j` flag if `ninja` is installed! The build will be in parallel automatically.)
|
||||
|
||||
Afterwards, the `nvim` executable can be found in `build/bin`. To verify the build type after compilation, run:
|
||||
|
||||
```sh
|
||||
./build/bin/nvim --version | grep ^Build
|
||||
```
|
||||
|
||||
To install the executable to a certain location, use:
|
||||
|
||||
```
|
||||
make CMAKE_INSTALL_PREFIX=$HOME/local/nvim install
|
||||
```
|
||||
|
||||
CMake, our main build system, caches a lot of things in `build/CMakeCache.txt`. If you ever want to change `CMAKE_BUILD_TYPE` or `CMAKE_INSTALL_PREFIX`, run `rm -rf build` first. This is also required when rebuilding after a Git commit adds or removes files (including from `runtime`) — when in doubt, run `make distclean` (which is basically a shortcut for `rm -rf build .deps`).
|
||||
|
||||
By default (`USE_BUNDLED=1`), Neovim downloads and statically links its needed dependencies. In order to be able to use a debugger on these libraries, you might want to compile them with debug information as well:
|
||||
|
||||
<!-- THIS CAUSES SCREEN INTERFERENCE
|
||||
```
|
||||
make distclean
|
||||
VERBOSE=1 DEBUG=1 make deps
|
||||
```
|
||||
-->
|
||||
```
|
||||
make distclean
|
||||
make deps
|
||||
```
|
||||
|
||||
## Building on Windows
|
||||
|
||||
### Windows / MSVC
|
||||
|
||||
**MSVC (Visual Studio) is the recommended way to build on Windows.** These steps were confirmed as of 2023.
|
||||
|
||||
1. Install [Visual Studio](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community) (2017 or later) with the _Desktop development with C++_ workload.
|
||||
- On 32-bit Windows, you will need [this workaround](https://developercommunity.visualstudio.com/content/problem/212989/ninja-binary-format.html).
|
||||
2. Open the Neovim project folder.
|
||||
- Visual Studio should detect the cmake files and automatically start building...
|
||||
3. Choose the `nvim.exe (bin\nvim.exe)` target and hit F5.
|
||||
- If the build fails, it may be because Visual Studio started the build with `x64-{Debug,Release}` before you switched the configuration to `x86-Release`.
|
||||
- Right-click _CMakeLists.txt → Delete Cache_.
|
||||
- Right-click _CMakeLists.txt → Generate Cache_.
|
||||
- If you see an "access violation" from `ntdll`, you can ignore it and continue.
|
||||
4. If you set an error like `msgpackc.dll not found`, try the `nvim.exe (Install)` target. Then switch back to `nvim.exe (bin\nvim.exe)`.
|
||||
|
||||
### Windows / MSVC PowerShell
|
||||
|
||||
To build from the command line (i.e. invoke the `cmake` commands yourself),
|
||||
|
||||
1. Ensure you have the Visual Studio environment variables, using any of the following:
|
||||
- Using the [Visual Studio Developer Command Prompt or Visual Studio Developer PowerShell](https://learn.microsoft.com/en-us/visualstudio/ide/reference/command-prompt-powershell?view=vs-2022)
|
||||
- Invoking `Import-VisualStudioVars` in PowerShell from [this PowerShell module](https://github.com/Pscx/Pscx)
|
||||
- Invoking `VsDevCmd.bat` in Command Prompt
|
||||
```
|
||||
VsDevCmd.bat -arch=x64
|
||||
```
|
||||
This is to make sure that `luarocks` finds the Visual Studio installation, and doesn't fall back to MinGW with errors like:
|
||||
```
|
||||
'mingw32-gcc' is not recognized as an internal or external command
|
||||
```
|
||||
2. From the "Developer PowerShell" or "Developer Command Prompt":
|
||||
```
|
||||
cmake -S cmake.deps -B .deps -G Ninja -D CMAKE_BUILD_TYPE=Release
|
||||
cmake --build .deps --config Release
|
||||
cmake -B build -G Ninja -D CMAKE_BUILD_TYPE=Release
|
||||
cmake --build build --config Release
|
||||
```
|
||||
- Omit `--config Release` if you want a debug build.
|
||||
- Omit `-G Ninja` to use the "Visual Studio" generator.
|
||||
|
||||
### Windows / CLion
|
||||
|
||||
1. Install [CLion](https://www.jetbrains.com/clion/).
|
||||
2. Open the Neovim project in CLion.
|
||||
3. Select _Build → Build All in 'Release'_.
|
||||
|
||||
### Windows / Cygwin
|
||||
|
||||
Install all dependencies the normal way, then build Neovim the normal way for a random CMake application (i.e. do not use the `Makefile` that automatically downloads and builds "bundled" dependencies).
|
||||
|
||||
The `cygport` repo contains Cygport files (e.g. `APKBUILD`, `PKGBUILD`) for all the dependencies not available in the Cygwin distribution, and describes any special commands or arguments needed to build. The Cygport definitions also try to describe the required dependencies for each one. Unless custom commands are provided, Cygport just calls `autogen`/`cmake`, `make`, `make install`, etc. in a clean and consistent way.
|
||||
|
||||
https://github.com/cascent/neovim-cygwin was built on Cygwin 2.9.0. Newer `libuv` should require slightly less patching. Some SSP stuff changed in Cygwin 2.10.0, so that might change things too when building Neovim.
|
||||
|
||||
|
||||
### Windows / MSYS2 / MinGW
|
||||
|
||||
1. From the MSYS2 shell, install these packages:
|
||||
```
|
||||
pacman -S \
|
||||
mingw-w64-x86_64-{gcc,cmake,make,ninja,diffutils}
|
||||
```
|
||||
2. From the Windows Command Prompt (`cmd.exe`), set up the `PATH` and build.
|
||||
|
||||
```cmd
|
||||
set PATH=c:\msys64\mingw64\bin;c:\msys64\usr\bin;%PATH%
|
||||
```
|
||||
3. You have two options:
|
||||
- Build using `cmake` and `Ninja` generator:
|
||||
```cmd
|
||||
cmake -S cmake.deps -B .deps -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
cmake --build .deps
|
||||
cmake -B build -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
cmake --build build
|
||||
```
|
||||
If you cannot install neovim with `ninja install` due to permission restriction, you can install neovim in a directory you have write access to.
|
||||
```cmd
|
||||
cmake -S cmake.deps -B .deps -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
cmake --build .deps
|
||||
cmake -B build -G Ninja -D CMAKE_INSTALL_PREFIX=C:\nvim -D CMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
cmake --build build
|
||||
```
|
||||
- Or, alternatively, you can use `mingw32-make`:
|
||||
```cmd
|
||||
mingw32-make deps
|
||||
mingw32-make CMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
:: Or you can do the previous command specifying a custom prefix
|
||||
:: (Default is C:\Program Files (x86)\nvim)
|
||||
:: mingw32-make CMAKE_BUILD_TYPE=RelWithDebInfo CMAKE_INSTALL_PREFIX=C:\nvim
|
||||
mingw32-make install
|
||||
```
|
||||
|
||||
## Localization
|
||||
|
||||
### Localization build
|
||||
|
||||
A normal build will create `.mo` files in `build/src/nvim/po`.
|
||||
|
||||
* If you see `msgfmt: command not found`, you need to install [`gettext`](http://en.wikipedia.org/wiki/Gettext). On most systems, the package is just called `gettext`.
|
||||
|
||||
### Localization check
|
||||
|
||||
To check the translations for `$LANG`, run `make -C build check-po-$LANG`. Examples:
|
||||
|
||||
```
|
||||
cmake --build build --target check-po-de
|
||||
cmake --build build --target check-po-pt_BR
|
||||
```
|
||||
|
||||
- `check-po-$LANG` generates a detailed report in `./build/src/nvim/po/check-${LANG}.log`. (The report is generated by `nvim`, not by `msgfmt`.)
|
||||
|
||||
### Localization update
|
||||
|
||||
To update the `src/nvim/po/$LANG.po` file with the latest strings, run the following:
|
||||
|
||||
```
|
||||
cmake --build build --target update-po-$LANG
|
||||
```
|
||||
|
||||
- **Note**: Run `src/nvim/po/cleanup.vim` after updating.
|
||||
|
||||
## Compiler options
|
||||
|
||||
To see the chain of includes, use the `-H` option ([#918](https://github.com/neovim/neovim/issues/918)):
|
||||
|
||||
```sh
|
||||
echo '#include "./src/nvim/buffer.h"' | \
|
||||
> clang -I.deps/usr/include -Isrc -std=c99 -P -E -H - 2>&1 >/dev/null | \
|
||||
> grep -v /usr/
|
||||
```
|
||||
|
||||
- `grep -v /usr/` is used to filter out system header files.
|
||||
- `-save-temps` can be added as well to see expanded macros or commented assembly.
|
||||
|
||||
## Custom Makefile
|
||||
|
||||
You can customize the build process locally by creating a `local.mk`, which is referenced at the top of the main `Makefile`. It's listed in `.gitignore`, so it can be used across branches. **A new target in `local.mk` overrides the default make-target.**
|
||||
|
||||
Here's a sample `local.mk` which adds a target to force a rebuild but *does not* override the default-target:
|
||||
|
||||
```make
|
||||
all:
|
||||
|
||||
rebuild:
|
||||
rm -rf build
|
||||
make
|
||||
```
|
||||
|
||||
## Third-party dependencies
|
||||
|
||||
Reference the [Debian package](https://packages.debian.org/sid/source/neovim) (or alternatively, the [Homebrew formula](https://github.com/Homebrew/homebrew-core/blob/master/Formula/neovim.rb)) for the precise list of dependencies/versions.
|
||||
|
||||
To build the bundled dependencies using CMake:
|
||||
|
||||
```sh
|
||||
cmake -S cmake.deps -B .deps -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
cmake --build .deps
|
||||
```
|
||||
|
||||
By default the libraries and headers are placed in `.deps/usr`. Now you can build Neovim:
|
||||
|
||||
```sh
|
||||
cmake -B build -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
cmake --build build
|
||||
```
|
||||
|
||||
### How to build without "bundled" dependencies
|
||||
|
||||
1. Manually install the dependencies:
|
||||
- libuv libluv libvterm luajit lua-lpeg lua-mpack msgpack-c tree-sitter tree-sitter-c tree-sitter-lua tree-sitter-markdown tree-sitter-query tree-sitter-vim tree-sitter-vimdoc unibilium
|
||||
2. Run CMake:
|
||||
```sh
|
||||
cmake -B build -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
cmake --build build
|
||||
```
|
||||
If all the dependencies are not available in the package, you can use only some of the bundled dependencies as follows (example of using `ninja`):
|
||||
```sh
|
||||
cmake -S cmake.deps -B .deps -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo -DUSE_BUNDLED=OFF -DUSE_BUNDLED_LIBVTERM=ON -DUSE_BUNDLED_TS=ON
|
||||
cmake --build .deps
|
||||
cmake -B build -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
cmake --build build
|
||||
```
|
||||
3. Run `make`, `ninja`, or whatever build tool you told CMake to generate.
|
||||
- Using `ninja` is strongly recommended.
|
||||
4. If treesitter parsers are not bundled, they need to be available in a `parser/` runtime directory (e.g. `/usr/share/nvim/runtime/parser/`).
|
||||
|
||||
#### Debian 10 (Buster) example:
|
||||
|
||||
```sh
|
||||
sudo apt install luajit libluajit-5.1-dev lua-mpack lua-lpeg libunibilium-dev libmsgpack-dev
|
||||
cmake -S cmake.deps -B .deps -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo -DUSE_BUNDLED=OFF -DUSE_BUNDLED_LIBUV=ON -DUSE_BUNDLED_LUV=ON -DUSE_BUNDLED_LIBVTERM=ON -DUSE_BUNDLED_TS=ON
|
||||
cmake --build .deps
|
||||
cmake -B build -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
cmake --build build
|
||||
```
|
||||
|
||||
#### Example of using a Makefile
|
||||
|
||||
- Example of using a package with all dependencies:
|
||||
```
|
||||
make USE_BUNDLED=OFF
|
||||
```
|
||||
- Example of using a package with some dependencies:
|
||||
```
|
||||
make BUNDLED_CMAKE_FLAG="-DUSE_BUNDLED=OFF -DUSE_BUNDLED_LUV=ON -DUSE_BUNDLED_TS=ON -DUSE_BUNDLED_LIBVTERM=ON -DUSE_BUNDLED_LIBUV=ON"
|
||||
```
|
||||
|
||||
## Build prerequisites
|
||||
|
||||
General requirements (see [#1469](https://github.com/neovim/neovim/issues/1469#issuecomment-63058312)):
|
||||
|
||||
- Clang or GCC version 4.9+
|
||||
- CMake version 3.13+, built with TLS/SSL support
|
||||
- Optional: Get the latest CMake from an [installer](https://github.com/Kitware/CMake/releases) or the [Python package](https://pypi.org/project/cmake/) (`pip install cmake`)
|
||||
|
||||
Platform-specific requirements are listed below.
|
||||
|
||||
### Ubuntu / Debian
|
||||
|
||||
```sh
|
||||
sudo apt-get install ninja-build gettext cmake unzip curl build-essential
|
||||
```
|
||||
|
||||
### RHEL / Fedora
|
||||
|
||||
```
|
||||
sudo dnf -y install ninja-build cmake gcc make unzip gettext curl glibc-gconv-extra
|
||||
```
|
||||
|
||||
### openSUSE
|
||||
|
||||
```
|
||||
sudo zypper install ninja cmake gcc-c++ gettext-tools curl
|
||||
```
|
||||
|
||||
### Arch Linux
|
||||
|
||||
```
|
||||
sudo pacman -S base-devel cmake unzip ninja curl
|
||||
```
|
||||
|
||||
### Alpine Linux
|
||||
|
||||
```
|
||||
apk add build-base cmake coreutils curl unzip gettext-tiny-dev
|
||||
```
|
||||
|
||||
### Void Linux
|
||||
|
||||
```
|
||||
xbps-install base-devel cmake curl git
|
||||
```
|
||||
|
||||
### NixOS / Nix
|
||||
|
||||
Starting from NixOS 18.03, the Neovim binary resides in the `neovim-unwrapped` Nix package (the `neovim` package being just a wrapper to setup runtime options like Ruby/Python support):
|
||||
|
||||
```sh
|
||||
cd path/to/neovim/src
|
||||
```
|
||||
|
||||
Drop into `nix-shell` to pull in the Neovim dependencies:
|
||||
|
||||
```
|
||||
nix-shell '<nixpkgs>' -A neovim-unwrapped
|
||||
```
|
||||
|
||||
Configure and build:
|
||||
|
||||
```sh
|
||||
rm -rf build && cmakeConfigurePhase
|
||||
buildPhase
|
||||
```
|
||||
|
||||
Tests are not available by default, because of some unfixed failures. You can enable them via adding this package in your overlay:
|
||||
```
|
||||
neovim-dev = (super.pkgs.neovim-unwrapped.override {
|
||||
doCheck=true;
|
||||
}).overrideAttrs(oa:{
|
||||
cmakeBuildType="debug";
|
||||
|
||||
nativeBuildInputs = oa.nativeBuildInputs ++ [ self.pkgs.valgrind ];
|
||||
shellHook = ''
|
||||
export NVIM_PYTHON_LOG_LEVEL=DEBUG
|
||||
export NVIM_LOG_FILE=/tmp/log
|
||||
export VALGRIND_LOG="$PWD/valgrind.log"
|
||||
'';
|
||||
});
|
||||
```
|
||||
and replacing `neovim-unwrapped` with `neovim-dev`:
|
||||
```
|
||||
nix-shell '<nixpkgs>' -A neovim-dev
|
||||
```
|
||||
|
||||
Neovim contains a Nix flake in the `contrib` folder, with 3 packages:
|
||||
- `neovim` to run the nightly
|
||||
- `neovim-debug` to run the package with debug symbols
|
||||
- `neovim-developer` to get all the tools to develop on `neovim`
|
||||
|
||||
Thus you can run Neovim nightly with `nix run github:neovim/neovim?dir=contrib`.
|
||||
Similarly to develop on Neovim: `nix develop github:neovim/neovim?dir=contrib#neovim-developer`.
|
||||
|
||||
### FreeBSD
|
||||
|
||||
```
|
||||
sudo pkg install cmake gmake sha unzip wget gettext curl
|
||||
```
|
||||
|
||||
If you get an error regarding a `sha256sum` mismatch, where the actual SHA-256 hash is `e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855`, then this is your issue (that's the `sha256sum` of an empty file).
|
||||
|
||||
### OpenBSD
|
||||
|
||||
```sh
|
||||
doas pkg_add gmake cmake unzip curl gettext-tools
|
||||
```
|
||||
|
||||
Build can sometimes fail when using the top level `Makefile`, apparently due to some third-party component (see [#2445-comment](https://github.com/neovim/neovim/issues/2445#issuecomment-108124236)). The following instructions use CMake:
|
||||
|
||||
```sh
|
||||
mkdir .deps
|
||||
cd .deps
|
||||
cmake ../cmake.deps/
|
||||
gmake
|
||||
cd ..
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
gmake
|
||||
```
|
||||
|
||||
### macOS
|
||||
|
||||
#### macOS / Homebrew
|
||||
|
||||
1. Install Xcode Command Line Tools: `xcode-select --install`
|
||||
2. Install [Homebrew](http://brew.sh)
|
||||
3. Install Neovim build dependencies:
|
||||
```
|
||||
brew install ninja cmake gettext curl
|
||||
```
|
||||
- **Note**: If you see Wget certificate errors (for older macOS versions less than 10.10):
|
||||
```sh
|
||||
brew install curl-ca-bundle
|
||||
echo CA_CERTIFICATE=$(brew --prefix curl-ca-bundle)/share/ca-bundle.crt >> ~/.wgetrc
|
||||
```
|
||||
- **Note**: If you see `'stdio.h' file not found`, try the following:
|
||||
```
|
||||
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
|
||||
```
|
||||
|
||||
#### macOS / MacPorts
|
||||
|
||||
1. Install Xcode Command Line Tools: `xcode-select --install`
|
||||
2. Install [MacPorts](http://www.macports.org)
|
||||
3. Install Neovim build dependencies:
|
||||
```
|
||||
sudo port install ninja cmake gettext
|
||||
```
|
||||
- **Note**: If you see Wget certificate errors (for older macOS versions less than 10.10):
|
||||
```sh
|
||||
sudo port install curl-ca-bundle
|
||||
echo CA_CERTIFICATE=/opt/local/share/curl/curl-ca-bundle.crt >> ~/.wgetrc
|
||||
```
|
||||
- **Note**: If you see `'stdio.h' file not found`, try the following:
|
||||
```
|
||||
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
|
||||
```
|
||||
|
||||
#### Building for older macOS versions
|
||||
|
||||
From a newer macOS version, to build for older macOS versions, you will have to set the macOS deployment target:
|
||||
|
||||
```
|
||||
make CMAKE_BUILD_TYPE=Release MACOSX_DEPLOYMENT_TARGET=10.13 DEPS_CMAKE_FLAGS="-DCMAKE_CXX_COMPILER=$(xcrun -find c++)"
|
||||
```
|
||||
|
||||
Note that the C++ compiler is explicitly set so that it can be found when the deployment target is set.
|
||||
|
205
CMakeLists.txt
205
CMakeLists.txt
@@ -1,12 +1,10 @@
|
||||
# CMAKE REFERENCE
|
||||
# - intro: https://codingnest.com/basic-cmake/
|
||||
# - best practices (3.0+): https://gist.github.com/mbinna/c61dbb39bca0e4fb7d1f73b0d66a4fd1
|
||||
# - pitfalls: https://izzys.casa/2019/02/everything-you-never-wanted-to-know-about-cmake/
|
||||
# - troubleshooting:
|
||||
# - variable_watch https://cmake.org/cmake/help/latest/command/variable_watch.html
|
||||
# intro: https://codingnest.com/basic-cmake/
|
||||
# best practices (3.0+): https://gist.github.com/mbinna/c61dbb39bca0e4fb7d1f73b0d66a4fd1
|
||||
# pitfalls: https://izzys.casa/2019/02/everything-you-never-wanted-to-know-about-cmake/
|
||||
|
||||
# Version should match the tested CMAKE_URL in .github/workflows/build.yml.
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
# Can be removed once minimum version is at least 3.15
|
||||
if(POLICY CMP0092)
|
||||
@@ -15,12 +13,8 @@ endif()
|
||||
|
||||
project(nvim C)
|
||||
|
||||
if(POLICY CMP0135)
|
||||
cmake_policy(SET CMP0135 NEW)
|
||||
endif()
|
||||
|
||||
if(XCODE)
|
||||
message(FATAL_ERROR [[Xcode generator is not supported. Use "Ninja" or "Unix Makefiles" instead]])
|
||||
if(POLICY CMP0075)
|
||||
cmake_policy(SET CMP0075 NEW)
|
||||
endif()
|
||||
|
||||
# Point CMake at any custom modules we may ship
|
||||
@@ -28,45 +22,23 @@ list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
|
||||
|
||||
include(CheckCCompilerFlag)
|
||||
include(CheckCSourceCompiles)
|
||||
include(CheckLibraryExists)
|
||||
include(ExternalProject)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
include(Deps)
|
||||
include(Find)
|
||||
include(InstallHelpers)
|
||||
include(LuaHelpers)
|
||||
include(PreventInTreeBuilds)
|
||||
include(Util)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# User settings
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
set(DEPS_IGNORE_SHA FALSE)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Variables
|
||||
#-------------------------------------------------------------------------------
|
||||
set(FUNCS_DATA ${PROJECT_BINARY_DIR}/funcs_data.mpack)
|
||||
set(TOUCHES_DIR ${PROJECT_BINARY_DIR}/touches)
|
||||
|
||||
file(GLOB DOCFILES CONFIGURE_DEPENDS ${PROJECT_SOURCE_DIR}/runtime/doc/*.txt)
|
||||
find_program(CCACHE_PRG ccache)
|
||||
if(CCACHE_PRG)
|
||||
set(CMAKE_C_COMPILER_LAUNCHER ${CMAKE_COMMAND} -E env CCACHE_SLOPPINESS=pch_defines,time_macros ${CCACHE_PRG})
|
||||
endif()
|
||||
|
||||
if(NOT CI_BUILD)
|
||||
set(CMAKE_INSTALL_MESSAGE NEVER)
|
||||
endif()
|
||||
|
||||
if(${CMAKE_VERSION} VERSION_LESS 3.20)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
endif()
|
||||
|
||||
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.26)
|
||||
set(COPY_DIRECTORY copy_directory_if_different)
|
||||
else()
|
||||
set(COPY_DIRECTORY copy_directory)
|
||||
endif()
|
||||
|
||||
# Prefer our bundled versions of dependencies.
|
||||
if(DEFINED ENV{DEPS_BUILD_DIR})
|
||||
set(DEPS_PREFIX "$ENV{DEPS_BUILD_DIR}/usr" CACHE PATH "Path prefix for finding dependencies")
|
||||
@@ -129,31 +101,31 @@ if (MINGW)
|
||||
else()
|
||||
option(ENABLE_LTO "enable link time optimization" ON)
|
||||
endif()
|
||||
option(ENABLE_LIBINTL "enable libintl" ON)
|
||||
|
||||
message(STATUS "CMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}")
|
||||
|
||||
set_default_buildtype(Debug)
|
||||
get_property(isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
||||
if(NOT isMultiConfig)
|
||||
# Unlike build dependencies in cmake.deps, we assume we want dev dependencies
|
||||
# such as Uncrustify to always be built with Release.
|
||||
list(APPEND DEPS_CMAKE_ARGS -D CMAKE_BUILD_TYPE=Release)
|
||||
endif()
|
||||
set_default_buildtype()
|
||||
|
||||
# If not in a git repo (e.g., a tarball) these tokens define the complete
|
||||
# version string, else they are combined with the result of `git describe`.
|
||||
set(NVIM_VERSION_MAJOR 0)
|
||||
set(NVIM_VERSION_MINOR 10)
|
||||
set(NVIM_VERSION_PATCH 5)
|
||||
set(NVIM_VERSION_PRERELEASE "-dev") # for package maintainers
|
||||
set(NVIM_VERSION_MINOR 9)
|
||||
set(NVIM_VERSION_PATCH 4)
|
||||
set(NVIM_VERSION_PRERELEASE "") # for package maintainers
|
||||
|
||||
# API level
|
||||
set(NVIM_API_LEVEL 12) # Bump this after any API change.
|
||||
set(NVIM_API_LEVEL 11) # Bump this after any API change.
|
||||
set(NVIM_API_LEVEL_COMPAT 0) # Adjust this after a _breaking_ API change.
|
||||
set(NVIM_API_PRERELEASE false)
|
||||
|
||||
# Default to -O2 on release builds.
|
||||
if(CMAKE_C_FLAGS_RELEASE MATCHES "-O3")
|
||||
message(STATUS "Replacing -O3 in CMAKE_C_FLAGS_RELEASE with -O2")
|
||||
string(REPLACE "-O3" "-O2" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
|
||||
endif()
|
||||
|
||||
# Build-type: RelWithDebInfo
|
||||
|
||||
# /Og means something different in MSVC
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "GNU" OR CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -Og -g")
|
||||
@@ -165,9 +137,11 @@ if(CMAKE_C_FLAGS_RELWITHDEBINFO MATCHES DNDEBUG)
|
||||
string(REPLACE " " " " CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}") # Remove duplicate whitespace
|
||||
endif()
|
||||
|
||||
option(LOG_LIST_ACTIONS "Add list actions logging" OFF)
|
||||
|
||||
option(ENABLE_ASAN_UBSAN "Enable Clang address & undefined behavior sanitizer for nvim binary." OFF)
|
||||
option(LOG_DEBUG "Enable debug log messages even in a release build" OFF)
|
||||
option(ENABLE_MSAN "Enable Clang memory sanitizer for nvim binary." OFF)
|
||||
# TSAN exists to test Luv threads.
|
||||
option(ENABLE_TSAN "Enable Clang thread sanitizer for nvim binary." OFF)
|
||||
|
||||
if((ENABLE_ASAN_UBSAN AND ENABLE_MSAN)
|
||||
@@ -176,6 +150,12 @@ if((ENABLE_ASAN_UBSAN AND ENABLE_MSAN)
|
||||
message(FATAL_ERROR "Sanitizers cannot be enabled simultaneously")
|
||||
endif()
|
||||
|
||||
if(ENABLE_ASAN_UBSAN OR ENABLE_MSAN OR ENABLE_TSAN)
|
||||
if(NOT CMAKE_C_COMPILER_ID MATCHES "Clang" AND NOT CMAKE_C_COMPILER_ID MATCHES "GNU")
|
||||
message(FATAL_ERROR "Sanitizers are only supported for Clang and GCC")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Place targets in bin/ or lib/ for all build configurations
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||
@@ -187,13 +167,30 @@ foreach(CFGNAME ${CMAKE_CONFIGURATION_TYPES})
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CFGNAME} ${CMAKE_BINARY_DIR}/lib)
|
||||
endforeach()
|
||||
|
||||
if(NOT PREFER_LUA)
|
||||
find_program(LUA_PRG NAMES luajit)
|
||||
endif()
|
||||
find_program(LUA_PRG NAMES lua5.1 lua5.2 lua)
|
||||
set(LUA_DEPENDENCIES lpeg mpack bit)
|
||||
if(NOT LUA_PRG)
|
||||
foreach(CURRENT_LUA_PRG luajit lua5.1 lua5.2 lua)
|
||||
unset(_CHECK_LUA_PRG CACHE)
|
||||
unset(LUA_PRG_WORKS)
|
||||
find_program(_CHECK_LUA_PRG ${CURRENT_LUA_PRG})
|
||||
|
||||
if(_CHECK_LUA_PRG)
|
||||
check_lua_deps(${_CHECK_LUA_PRG} "${LUA_DEPENDENCIES}" LUA_PRG_WORKS)
|
||||
if(LUA_PRG_WORKS)
|
||||
set(LUA_PRG "${_CHECK_LUA_PRG}" CACHE FILEPATH "Path to a program.")
|
||||
break()
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
unset(_CHECK_LUA_PRG CACHE)
|
||||
else()
|
||||
check_lua_deps(${LUA_PRG} "${LUA_DEPENDENCIES}" LUA_PRG_WORKS)
|
||||
endif()
|
||||
|
||||
if(NOT LUA_PRG_WORKS)
|
||||
message(FATAL_ERROR "Failed to find a Lua 5.1-compatible interpreter")
|
||||
endif()
|
||||
|
||||
message(STATUS "Using Lua interpreter: ${LUA_PRG}")
|
||||
|
||||
# Some of the code generation still relies on stable table ordering in order to
|
||||
@@ -204,9 +201,11 @@ message(STATUS "Using Lua interpreter: ${LUA_PRG}")
|
||||
if(NOT LUA_GEN_PRG)
|
||||
set(LUA_GEN_PRG "${LUA_PRG}" CACHE FILEPATH "Path to the lua used for code generation.")
|
||||
endif()
|
||||
|
||||
message(STATUS "Using Lua interpreter for code generation: ${LUA_GEN_PRG}")
|
||||
|
||||
option(COMPILE_LUA "Pre-compile Lua sources into bytecode (for sources that are included in the binary)" ON)
|
||||
|
||||
if(COMPILE_LUA AND NOT WIN32)
|
||||
if(PREFER_LUA)
|
||||
foreach(CURRENT_LUAC_PRG luac5.1 luac)
|
||||
@@ -223,36 +222,37 @@ if(COMPILE_LUA AND NOT WIN32)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(LUAC_PRG)
|
||||
message(STATUS "Using Lua compiler: ${LUAC_PRG}")
|
||||
endif()
|
||||
|
||||
#
|
||||
# Lint
|
||||
option(CI_LINT "Abort if lint programs not found" OFF)
|
||||
if(CI_LINT)
|
||||
set(LINT_REQUIRED "REQUIRED")
|
||||
endif()
|
||||
find_program(SHELLCHECK_PRG shellcheck ${LINT_REQUIRED})
|
||||
find_program(STYLUA_PRG stylua ${LINT_REQUIRED})
|
||||
|
||||
set(STYLUA_DIRS runtime scripts src test contrib)
|
||||
#
|
||||
find_program(LUACHECK_PRG luacheck)
|
||||
find_program(SHELLCHECK_PRG shellcheck)
|
||||
find_program(STYLUA_PRG stylua)
|
||||
find_program(UNCRUSTIFY_PRG uncrustify)
|
||||
|
||||
add_glob_target(
|
||||
REQUIRED
|
||||
TARGET lintlua-luacheck
|
||||
COMMAND $<TARGET_FILE:nvim_bin>
|
||||
FLAGS -ll ${PROJECT_SOURCE_DIR}/test/lua_runner.lua ${CMAKE_BINARY_DIR}/usr luacheck -q
|
||||
GLOB_DIRS runtime scripts src test
|
||||
COMMAND ${LUACHECK_PRG}
|
||||
FLAGS -q
|
||||
GLOB_DIRS runtime/ scripts/ src/ test/
|
||||
GLOB_PAT *.lua
|
||||
TOUCH_STRATEGY PER_DIR)
|
||||
add_dependencies(lintlua-luacheck lua_dev_deps)
|
||||
TOUCH_STRATEGY SINGLE)
|
||||
|
||||
add_glob_target(
|
||||
TARGET lintlua-stylua
|
||||
COMMAND ${STYLUA_PRG}
|
||||
FLAGS --color=always --check --respect-ignores
|
||||
GLOB_DIRS ${STYLUA_DIRS}
|
||||
FLAGS --color=always --check
|
||||
GLOB_DIRS runtime/
|
||||
GLOB_PAT *.lua
|
||||
TOUCH_STRATEGY PER_DIR)
|
||||
EXCLUDE
|
||||
/runtime/lua/vim/re.lua
|
||||
TOUCH_STRATEGY SINGLE)
|
||||
|
||||
add_custom_target(lintlua)
|
||||
add_dependencies(lintlua lintlua-luacheck lintlua-stylua)
|
||||
@@ -263,23 +263,28 @@ add_glob_target(
|
||||
FLAGS -x -a
|
||||
GLOB_DIRS scripts
|
||||
GLOB_PAT *.sh
|
||||
TOUCH_STRATEGY PER_DIR)
|
||||
EXCLUDE
|
||||
scripts/pvscheck.sh
|
||||
TOUCH_STRATEGY SINGLE)
|
||||
|
||||
add_custom_target(lintcommit
|
||||
COMMAND $<TARGET_FILE:nvim_bin> -u NONE -l ${PROJECT_SOURCE_DIR}/scripts/lintcommit.lua main)
|
||||
add_dependencies(lintcommit nvim_bin)
|
||||
COMMAND ${PROJECT_BINARY_DIR}/bin/nvim -u NONE -es -c [[lua require('scripts.lintcommit').main({trace=false})]]
|
||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||
VERBATIM)
|
||||
add_dependencies(lintcommit nvim)
|
||||
|
||||
add_custom_target(lint)
|
||||
add_dependencies(lint lintc lintlua lintsh lintcommit)
|
||||
add_dependencies(lint clang-tidy lintc lintlua lintsh lintcommit)
|
||||
|
||||
#
|
||||
# Format
|
||||
add_glob_target(
|
||||
TARGET formatlua
|
||||
COMMAND ${STYLUA_PRG}
|
||||
FLAGS --respect-ignores
|
||||
GLOB_DIRS ${STYLUA_DIRS}
|
||||
GLOB_PAT *.lua
|
||||
TOUCH_STRATEGY PER_DIR)
|
||||
#
|
||||
add_custom_target(formatlua
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-D FORMAT_PRG=${STYLUA_PRG}
|
||||
-D LANG=lua
|
||||
-P ${PROJECT_SOURCE_DIR}/cmake/Format.cmake
|
||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
|
||||
|
||||
add_custom_target(format)
|
||||
add_dependencies(format formatc formatlua)
|
||||
@@ -288,13 +293,21 @@ install_helper(
|
||||
FILES ${CMAKE_SOURCE_DIR}/src/man/nvim.1
|
||||
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
|
||||
|
||||
add_custom_target(nvim ALL)
|
||||
add_dependencies(nvim nvim_bin nvim_runtime_deps nvim_runtime)
|
||||
if(EXISTS "${DEPS_PREFIX}/share/nvim-qt")
|
||||
option(USE_BUNDLED_NVIMQT "Bundle neovim-qt" ON)
|
||||
else()
|
||||
option(USE_BUNDLED_NVIMQT "Bundle neovim-qt" OFF)
|
||||
endif()
|
||||
|
||||
add_subdirectory(src/nvim)
|
||||
add_subdirectory(cmake.config)
|
||||
add_subdirectory(runtime)
|
||||
add_subdirectory(test)
|
||||
if(WIN32 AND USE_BUNDLED_NVIMQT)
|
||||
install_helper(
|
||||
FILES ${DEPS_PREFIX}/share/nvim-qt/runtime/plugin/nvim_gui_shim.vim
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/nvim-qt/runtime/plugin)
|
||||
endif()
|
||||
|
||||
add_custom_target(uninstall
|
||||
COMMAND ${CMAKE_COMMAND} -P ${PROJECT_SOURCE_DIR}/cmake/UninstallHelper.cmake)
|
||||
@@ -302,25 +315,3 @@ add_custom_target(uninstall
|
||||
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
add_subdirectory(cmake.packaging)
|
||||
endif()
|
||||
|
||||
get_externalproject_options(uncrustify ${DEPS_IGNORE_SHA})
|
||||
ExternalProject_Add(uncrustify
|
||||
DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/uncrustify
|
||||
CMAKE_ARGS ${DEPS_CMAKE_ARGS}
|
||||
EXCLUDE_FROM_ALL TRUE
|
||||
${EXTERNALPROJECT_OPTIONS})
|
||||
|
||||
option(USE_BUNDLED_BUSTED "Use bundled busted" ON)
|
||||
if(USE_BUNDLED_BUSTED)
|
||||
get_externalproject_options(lua_dev_deps ${DEPS_IGNORE_SHA})
|
||||
ExternalProject_Add(lua_dev_deps
|
||||
DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/lua_dev_deps
|
||||
SOURCE_DIR ${DEPS_SHARE_DIR}
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
EXCLUDE_FROM_ALL TRUE
|
||||
${EXTERNALPROJECT_OPTIONS})
|
||||
else()
|
||||
add_custom_target(lua_dev_deps)
|
||||
endif()
|
||||
|
@@ -35,20 +35,64 @@
|
||||
"inherits": ["base"]
|
||||
},
|
||||
{
|
||||
"name": "iwyu",
|
||||
"displayName": "IWYU",
|
||||
"description": "Run include-what-you-use",
|
||||
"name": "windows-default",
|
||||
"displayName": "Windows x64 RelWithDebInfo",
|
||||
"description": "Sets Ninja generator, enables optimizations with debug information for x64",
|
||||
"generator": "Ninja",
|
||||
"cacheVariables": {
|
||||
"ENABLE_IWYU": "ON"
|
||||
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
|
||||
},
|
||||
"architecture": {
|
||||
"value": "x64",
|
||||
"strategy": "external"
|
||||
},
|
||||
"vendor": {
|
||||
"microsoft.com/VisualStudioSettings/CMake/1.0": {
|
||||
"hostOS": ["Windows"]
|
||||
}
|
||||
},
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Windows"
|
||||
},
|
||||
"inherits": ["base"]
|
||||
},
|
||||
{
|
||||
"name": "ci",
|
||||
"name": "iwyu",
|
||||
"displayName": "IWYU",
|
||||
"description": "Run include-what-you-use with the compiler",
|
||||
"cacheVariables": {
|
||||
"CI_BUILD": "ON"
|
||||
"ENABLE_IWYU": "ON"
|
||||
},
|
||||
"inherits": ["base"]
|
||||
}
|
||||
],
|
||||
"buildPresets": [
|
||||
{
|
||||
"name": "default",
|
||||
"configurePreset": "default"
|
||||
},
|
||||
{
|
||||
"name": "debug",
|
||||
"configurePreset": "debug"
|
||||
},
|
||||
{
|
||||
"name": "release",
|
||||
"configurePreset": "release"
|
||||
},
|
||||
{
|
||||
"name": "windows-default",
|
||||
"configurePreset": "windows-default",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Windows"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "iwyu",
|
||||
"configurePreset": "iwyu"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
289
CONTRIBUTING.md
289
CONTRIBUTING.md
@@ -8,11 +8,12 @@ If you want to help but don't know where to start, here are some
|
||||
low-risk/isolated tasks:
|
||||
|
||||
- Try a [complexity:low] issue.
|
||||
- Fix bugs found by [Coverity](#coverity).
|
||||
- Fix bugs found by [Clang](#clang-scan-build), [PVS](#pvs-studio) or
|
||||
[Coverity](#coverity).
|
||||
- [Improve documentation](#documenting)
|
||||
- [Merge a Vim patch] (requires strong familiarity with Vim)
|
||||
- NOTE: read the above link before sending improvements to "runtime files" (anything in `runtime/`).
|
||||
- Vimscript and documentation files are (mostly) maintained by [Vim], not Nvim.
|
||||
- Nvim's [filetype detection](https://github.com/neovim/neovim/blob/master/runtime/lua/vim/filetype.lua) behavior matches Vim, so changes to filetype detection should be submitted to [Vim] first.
|
||||
- Vimscript and documentation files are (mostly) maintained by [Vim](https://github.com/vim/vim), not Nvim.
|
||||
- Lua files are maintained by Nvim.
|
||||
|
||||
Reporting problems
|
||||
@@ -22,29 +23,28 @@ Reporting problems
|
||||
- [Search existing issues][github-issues] (including closed!)
|
||||
- Update Neovim to the latest version to see if your problem persists.
|
||||
- Try to reproduce with `nvim --clean` ("factory defaults").
|
||||
- If a specific configuration or plugin is necessary to recreate the problem, use the minimal template in `contrib/minimal.lua` with `nvim --clean -u contrib/minimal.lua` after making the necessary changes.
|
||||
- [Bisect](https://neovim.io/doc/user/starting.html#bisect) your config: disable plugins incrementally, to narrow down the cause of the issue.
|
||||
- [Bisect][git-bisect] Neovim's source code to find the cause of a regression, if you can. This is _extremely_ helpful.
|
||||
- When reporting a crash, [include a stacktrace](https://neovim.io/doc/user/dev_tools.html#dev-tools-backtrace).
|
||||
- Use [ASAN/UBSAN](#sanitizers-asan-and-ubsan) to get detailed errors for segfaults and undefined behavior.
|
||||
- When reporting a crash, [include a stacktrace](https://github.com/neovim/neovim/wiki/FAQ#backtrace-linux).
|
||||
- Use [ASAN/UBSAN](#clang-sanitizers-asan-and-ubsan) to get detailed errors for segfaults and undefined behavior.
|
||||
- Check the logs. `:edit $NVIM_LOG_FILE`
|
||||
- Include `cmake --system-information` for build-related issues.
|
||||
|
||||
Developer guidelines
|
||||
--------------------
|
||||
|
||||
- Read [:help dev](https://neovim.io/doc/user/develop.html#dev) and [:help dev-doc][dev-doc-guide] if you are working on Nvim core.
|
||||
- Read [:help dev](https://neovim.io/doc/user/develop.html#dev) if you are working on Nvim core.
|
||||
- Read [:help dev-ui](https://neovim.io/doc/user/develop.html#dev-ui) if you are developing a UI.
|
||||
- Read [:help dev-api-client](https://neovim.io/doc/user/develop.html#dev-api-client) if you are developing an API client.
|
||||
- Install `ninja` for faster builds of Nvim.
|
||||
```bash
|
||||
```
|
||||
sudo apt-get install ninja-build
|
||||
make distclean
|
||||
make # Nvim build system uses ninja automatically, if available.
|
||||
```
|
||||
- Install `ccache` for faster rebuilds of Nvim. Nvim will use it automatically
|
||||
if it's found. To disable caching use:
|
||||
```bash
|
||||
```
|
||||
CCACHE_DISABLE=true make
|
||||
```
|
||||
|
||||
@@ -55,8 +55,12 @@ Pull requests (PRs)
|
||||
- Your PR must include [test coverage][run-tests].
|
||||
- Avoid cosmetic changes to unrelated files in the same commit.
|
||||
- Use a [feature branch][git-feature-branch] instead of the master branch.
|
||||
- Use a _rebase workflow_ for all PRs.
|
||||
- Use a _rebase workflow_ for small PRs.
|
||||
- After addressing review comments, it's fine to force-push.
|
||||
- Use a _merge workflow_ (as opposed to "rebase") for big, high-risk PRs.
|
||||
- Merge `master` into your PR when there are conflicts or when master
|
||||
introduces breaking changes.
|
||||
- Do not edit commits that come before the merge commit.
|
||||
|
||||
### Merging to master
|
||||
|
||||
@@ -83,36 +87,33 @@ a comment.
|
||||
### Commit messages
|
||||
|
||||
Follow the [conventional commits guidelines][conventional_commits] to *make reviews easier* and to make
|
||||
the VCS/git logs more valuable. The structure of a commit message is:
|
||||
the VCS/git logs more valuable. The general structure of a commit message is:
|
||||
|
||||
type(scope): subject
|
||||
```
|
||||
<type>([optional scope]): <description>
|
||||
|
||||
Problem:
|
||||
...
|
||||
[optional body]
|
||||
|
||||
Solution:
|
||||
...
|
||||
[optional footer(s)]
|
||||
```
|
||||
|
||||
- Commit message **subject** (you can **ignore this for "fixup" commits** or any commits you expect to be squashed):
|
||||
- Prefix with a [_type_](https://github.com/commitizen/conventional-commit-types/blob/master/index.json):
|
||||
- `build ci docs feat fix perf refactor revert test vim-patch`
|
||||
- Append an optional `(scope)` such as `(lsp)`, `(treesitter)`, `(float)`, …
|
||||
- Use the _imperative voice_: "Fix bug" rather than "Fixed bug" or "Fixes bug."
|
||||
- Keep it short (under 72 characters).
|
||||
- Commit message **body** (detail):
|
||||
- Concisely describe the Problem/Solution in the commit **body**. [Describing the problem](https://lamport.azurewebsites.net/pubs/state-the-problem.pdf)
|
||||
_independently of the solution_ often leads to a better understanding for you, reviewers, and future readers.
|
||||
```
|
||||
Problem:
|
||||
- Prefix the commit subject with one of these [_types_](https://github.com/commitizen/conventional-commit-types/blob/master/index.json):
|
||||
- `build`, `ci`, `docs`, `feat`, `fix`, `perf`, `refactor`, `revert`, `test`, `vim-patch`
|
||||
- You can **ignore this for "fixup" commits** or any commits you expect to be squashed.
|
||||
- Append optional scope to _type_ such as `(lsp)`, `(treesitter)`, `(float)`, …
|
||||
- _Description_ shouldn't start with a capital letter or end in a period.
|
||||
- Use the _imperative voice_: "Fix bug" rather than "Fixed bug" or "Fixes bug."
|
||||
- Try to keep the first line under 72 characters.
|
||||
- A blank line must follow the subject.
|
||||
- Breaking API changes must be indicated by
|
||||
1. "!" after the type/scope, and
|
||||
2. a "BREAKING CHANGE" footer describing the change.
|
||||
Example:
|
||||
```
|
||||
refactor(provider)!: drop support for Python 2
|
||||
|
||||
Solution:
|
||||
```
|
||||
- Indicate breaking API changes with "!" after the type, and a "BREAKING CHANGE" footer. Example:
|
||||
```
|
||||
refactor(provider)!: drop support for Python 2
|
||||
|
||||
BREAKING CHANGE: refactor to use Python 3 features since Python 2 is no longer supported.
|
||||
```
|
||||
BREAKING CHANGE: refactor to use Python 3 features since Python 2 is no longer supported.
|
||||
```
|
||||
|
||||
### Automated builds (CI)
|
||||
|
||||
@@ -123,20 +124,48 @@ Each pull request must pass the automated builds on [Cirrus CI] and [GitHub Acti
|
||||
- If any tests fail, the build will fail. See [test/README.md#running-tests][run-tests] to run tests locally.
|
||||
- CI runs [ASan] and other analyzers.
|
||||
- To run valgrind locally: `VALGRIND=1 make test`
|
||||
- To run ASan/UBSan locally: `CC=clang make CMAKE_FLAGS="-DENABLE_ASAN_UBSAN=ON"`.
|
||||
Note that MSVC requires Release or RelWithDebInfo build type to work properly.
|
||||
- The [lint](#lint) build checks that the code is formatted correctly and
|
||||
passes various linter checks.
|
||||
- To run Clang ASan/UBSan locally: `CC=clang make CMAKE_FLAGS="-DENABLE_ASAN_UBSAN=ON"`
|
||||
- The [lint](#lint) build checks modified lines _and their immediate
|
||||
neighbors_, to encourage incrementally updating the legacy style to meet our
|
||||
[style](#style). (See [#3174][3174] for background.)
|
||||
- CI for FreeBSD runs on [Cirrus CI].
|
||||
- To see CI results faster in your PR, you can temporarily set `TEST_FILE` in
|
||||
[test.yml](https://github.com/neovim/neovim/blob/e35b9020b16985eee26e942f9a3f6b045bc3809b/.github/workflows/test.yml#L29).
|
||||
|
||||
### Clang scan-build
|
||||
|
||||
View the [Clang report] to see potential bugs found by the Clang
|
||||
[scan-build](https://clang-analyzer.llvm.org/scan-build.html) analyzer.
|
||||
|
||||
- Search the Neovim commit history to find examples:
|
||||
```
|
||||
git log --oneline --no-merges --grep clang
|
||||
```
|
||||
- To verify a fix locally, run `scan-build` like this:
|
||||
```
|
||||
rm -rf build/
|
||||
scan-build --use-analyzer=/usr/bin/clang make
|
||||
```
|
||||
|
||||
### PVS-Studio
|
||||
|
||||
View the [PVS report](https://neovim.io/doc/reports/pvs/PVS-studio.html.d/) to
|
||||
see potential bugs found by [PVS Studio](https://www.viva64.com/en/pvs-studio/).
|
||||
|
||||
- Use this format for commit messages (where `{id}` is the PVS warning-id)):
|
||||
```
|
||||
fix(PVS/V{id}): {description}
|
||||
```
|
||||
- Search the Neovim commit history to find examples:
|
||||
```
|
||||
git log --oneline --no-merges --grep PVS
|
||||
```
|
||||
- Try `./scripts/pvscheck.sh` to run PVS locally.
|
||||
|
||||
### Coverity
|
||||
|
||||
Coverity runs against the master build. To view the defects you must
|
||||
[request access](https://scan.coverity.com/projects/neovim-neovim) (Coverity
|
||||
does not have a "public" view), then you will be approved as soon as
|
||||
a maintainer sees the email.
|
||||
[Coverity](https://scan.coverity.com/projects/neovim-neovim) runs against the
|
||||
master build. To view the defects, just request access; you will be approved.
|
||||
|
||||
- Use this format for commit messages (where `{id}` is the CID (Coverity ID);
|
||||
([example](https://github.com/neovim/neovim/pull/804))):
|
||||
@@ -144,11 +173,11 @@ a maintainer sees the email.
|
||||
fix(coverity/{id}): {description}
|
||||
```
|
||||
- Search the Neovim commit history to find examples:
|
||||
```bash
|
||||
```
|
||||
git log --oneline --no-merges --grep coverity
|
||||
```
|
||||
|
||||
### Sanitizers (ASAN and UBSAN)
|
||||
### Clang sanitizers (ASAN and UBSAN)
|
||||
|
||||
ASAN/UBSAN can be used to detect memory errors and other common forms of undefined behavior at runtime in debug builds.
|
||||
|
||||
@@ -158,7 +187,7 @@ a maintainer sees the email.
|
||||
```
|
||||
- When running Neovim, use
|
||||
```
|
||||
ASAN_OPTIONS=log_path=/tmp/nvim_asan nvim args...
|
||||
UBSAN_OPTIONS=print_stacktrace=1 ASAN_OPTIONS=log_path=/tmp/nvim_asan,handle_abort=1,handle_sigill=1 nvim args...
|
||||
```
|
||||
- If Neovim exits unexpectedly, check `/tmp/nvim_asan.{PID}` (or your preferred `log_path`) for log files with error messages.
|
||||
|
||||
@@ -170,27 +199,33 @@ Coding
|
||||
|
||||
You can run the linter locally by:
|
||||
|
||||
```bash
|
||||
make lint
|
||||
```
|
||||
make lint
|
||||
|
||||
The lint step downloads the [master error list] and excludes them, so only lint
|
||||
errors related to the local changes are reported.
|
||||
|
||||
You can lint a single file (but this will _not_ exclude legacy errors):
|
||||
|
||||
./src/clint.py src/nvim/ops.c
|
||||
|
||||
### Style
|
||||
|
||||
- You can format files by using:
|
||||
```bash
|
||||
make format # or formatc, formatlua
|
||||
```
|
||||
make format
|
||||
```
|
||||
This will format changed Lua and C files with all appropriate flags set.
|
||||
- Style rules are (mostly) defined by `src/uncrustify.cfg` which tries to match
|
||||
the [style-guide]. To use the Nvim `gq` command with `uncrustify`:
|
||||
```vim
|
||||
```
|
||||
if !empty(findfile('src/uncrustify.cfg', ';'))
|
||||
setlocal formatprg=uncrustify\ -q\ -l\ C\ -c\ src/uncrustify.cfg\ --no-backup
|
||||
endif
|
||||
```
|
||||
The required version of `uncrustify` is specified in `uncrustify.cfg`.
|
||||
- There is also `.clang-format` which has drifted from the [style-guide], but
|
||||
is available for reference. To use the Nvim `gq` command with `clang-format`:
|
||||
```vim
|
||||
```
|
||||
if !empty(findfile('.clang-format', ';'))
|
||||
setlocal formatprg=clang-format\ -style=file
|
||||
endif
|
||||
@@ -198,14 +233,18 @@ make lint
|
||||
|
||||
### Navigate
|
||||
|
||||
- Set `blame.ignoreRevsFile` to ignore [noisy commits](https://github.com/neovim/neovim/commit/2d240024acbd68c2d3f82bc72cb12b1a4928c6bf) in git blame:
|
||||
```bash
|
||||
- Set `blame.ignoreRevsFile` to ignore [noise commits](https://github.com/neovim/neovim/commit/2d240024acbd68c2d3f82bc72cb12b1a4928c6bf) in git blame:
|
||||
```
|
||||
git config blame.ignoreRevsFile .git-blame-ignore-revs
|
||||
```
|
||||
|
||||
- Recommendation is to use **[clangd]**.
|
||||
Can use the maintained config in [nvim-lspconfig/clangd].
|
||||
- Explore the source code [on the web](https://sourcegraph.com/github.com/neovim/neovim).
|
||||
- If using [lua-language-server], symlink `contrib/luarc.json` into the
|
||||
project root:
|
||||
|
||||
$ ln -s contrib/luarc.json .luarc.json
|
||||
|
||||
### Includes
|
||||
|
||||
@@ -213,128 +252,63 @@ For managing includes in C files, use [include-what-you-use].
|
||||
|
||||
- [Install include-what-you-use][include-what-you-use-install]
|
||||
- To see which includes needs fixing use the cmake preset `iwyu`:
|
||||
```bash
|
||||
```
|
||||
cmake --preset iwyu
|
||||
cmake --build build
|
||||
cmake --build --preset iwyu
|
||||
```
|
||||
- There's also a make target that automatically fixes the suggestions from
|
||||
IWYU:
|
||||
```bash
|
||||
```
|
||||
make iwyu
|
||||
```
|
||||
|
||||
See [#549][549] for more details.
|
||||
|
||||
### Lua runtime files
|
||||
Documenting
|
||||
-----------
|
||||
|
||||
Most of the Lua core [`runtime/`](./runtime) modules are precompiled to
|
||||
bytecode, so changes to those files won't get used unless you rebuild Nvim or
|
||||
by passing `--luamod-dev` and `$VIMRUNTIME`. For example, try adding a function
|
||||
to `runtime/lua/vim/_editor.lua` then:
|
||||
Many parts of the `:help` documentation are autogenerated from C or Lua docstrings using the `./scripts/gen_vimdoc.py` script.
|
||||
You can filter the regeneration based on the target (api, lua, or lsp), or the file you changed, that need a doc refresh using `./scripts/gen_vimdoc.py -t <target>`.
|
||||
|
||||
```bash
|
||||
VIMRUNTIME=./runtime ./build/bin/nvim --luamod-dev
|
||||
## Lua docstrings
|
||||
|
||||
Lua documentation uses a subset of [EmmyLua] annotations. A rough outline of a function documentation is
|
||||
|
||||
```lua
|
||||
--- {Brief}
|
||||
---
|
||||
--- {Long explanation}
|
||||
---
|
||||
---@param arg1 type {description}
|
||||
---@param arg2 type {description}
|
||||
{...}
|
||||
---
|
||||
---@return type {description}
|
||||
```
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
If possible, always add type information (`table`, `string`, `number`, ...). Multiple valid types are separated by a bar (`string|table`). Indicate optional parameters via `type|nil`.
|
||||
|
||||
Read [:help dev-doc][dev-doc-guide] to understand the expected documentation style and conventions.
|
||||
If a function in your Lua module should not be documented (e.g. internal function or local function), you should set the doc comment to:
|
||||
|
||||
### Generating :help
|
||||
|
||||
Many `:help` docs are autogenerated from (C or Lua) docstrings. To generate the documentation run:
|
||||
|
||||
```bash
|
||||
make doc
|
||||
```
|
||||
---@private
|
||||
```
|
||||
|
||||
To validate the documentation files, run:
|
||||
|
||||
```bash
|
||||
make lintdoc
|
||||
Mark functions that are deprecated as
|
||||
```
|
||||
|
||||
If you need to modify or debug the documentation flow, these are the main files:
|
||||
- `./scripts/gen_vimdoc.lua`:
|
||||
Main doc generator. Parses C and Lua files to render vimdoc files.
|
||||
- `./scripts/luacats_parser.lua`:
|
||||
Documentation parser for Lua files.
|
||||
- `./scripts/cdoc_parser.lua`:
|
||||
Documentation parser for C files.
|
||||
- `./scripts/luacats_grammar.lua`:
|
||||
Lpeg grammar for LuaCATS
|
||||
- `./scripts/cdoc_grammar.lua`:
|
||||
Lpeg grammar for C doc comments
|
||||
- `./scripts/gen_eval_files.lua`:
|
||||
Generates documentation and Lua type files from metadata files:
|
||||
```
|
||||
runtime/lua/vim/* => runtime/doc/lua.txt
|
||||
runtime/lua/vim/* => runtime/doc/lua.txt
|
||||
runtime/lua/vim/lsp/ => runtime/doc/lsp.txt
|
||||
src/nvim/api/* => runtime/doc/api.txt
|
||||
src/nvim/eval.lua => runtime/doc/builtin.txt
|
||||
src/nvim/options.lua => runtime/doc/options.txt
|
||||
```
|
||||
|
||||
- `./scripts/lintdoc.lua`: Validation and linting of documentation files.
|
||||
|
||||
### Lua docstrings
|
||||
|
||||
Use [LuaLS] annotations in Lua docstrings to annotate parameter types, return
|
||||
types, etc. See [:help dev-lua-doc][dev-lua-doc].
|
||||
|
||||
- The template for function documentation is:
|
||||
```lua
|
||||
--- {Brief}
|
||||
---
|
||||
--- {Long explanation}
|
||||
---
|
||||
--- @param arg1 type {description}
|
||||
--- @param arg2 type {description}
|
||||
--- ...
|
||||
---
|
||||
--- @return type {description}
|
||||
```
|
||||
- If possible, add type information (`table`, `string`, `number`, ...). Multiple valid types are separated by a bar (`string|table`). Indicate optional parameters via `type|nil`.
|
||||
- If a function in your Lua module should _not_ be documented, add `@nodoc`.
|
||||
- If the function is internal or otherwise non-public add `@private`.
|
||||
- Private functions usually should be underscore-prefixed (named "_foo", not "foo").
|
||||
- Mark deprecated functions with `@deprecated`.
|
||||
|
||||
Third-party dependencies
|
||||
------------------------
|
||||
|
||||
To build Nvim using a different commit of a dependency change the appropriate
|
||||
URL in `cmake.deps/deps.txt`. For example, to use a different version of luajit
|
||||
replace the value in `LUAJIT_URL` with the wanted commit hash:
|
||||
|
||||
```bash
|
||||
LUAJIT_URL https://github.com/LuaJIT/LuaJIT/archive/<sha>.tar.gz
|
||||
```
|
||||
|
||||
Set `DEPS_IGNORE_SHA` to `TRUE` in `cmake.deps/CMakeLists.txt` to skip hash
|
||||
check from cmake.
|
||||
|
||||
Alternatively, you may point the URL as a local path where the repository is.
|
||||
This is convenient when bisecting a problem in a dependency with `git bisect`.
|
||||
This may require running `make distclean` between each build. Hash checking is
|
||||
always skipped in this case regardless of `DEPS_IGNORE_SHA`.
|
||||
|
||||
```bash
|
||||
LUAJIT_URL /home/user/luajit
|
||||
---@deprecated
|
||||
```
|
||||
|
||||
Reviewing
|
||||
---------
|
||||
|
||||
To help review pull requests, start with [this checklist][review-checklist].
|
||||
|
||||
Reviewing can be done on GitHub, but you may find it easier to do locally.
|
||||
Using [GitHub CLI][gh], you can create a new branch with the contents of a pull
|
||||
request, e.g. [#1820][1820]:
|
||||
|
||||
```bash
|
||||
gh pr checkout https://github.com/neovim/neovim/pull/1820
|
||||
```
|
||||
gh pr checkout https://github.com/neovim/neovim/pull/1820
|
||||
|
||||
Use [`git log -p master..FETCH_HEAD`][git-history-filtering] to list all
|
||||
commits in the feature branch which aren't in the `master` branch; `-p`
|
||||
@@ -348,26 +322,29 @@ as context, use the `-W` argument as well.
|
||||
[Cirrus CI]: https://cirrus-ci.com/github/neovim/neovim
|
||||
[Clang report]: https://neovim.io/doc/reports/clang/
|
||||
[GitHub Actions]: https://github.com/neovim/neovim/actions
|
||||
[Vim]: https://github.com/vim/vim
|
||||
[clangd]: https://clangd.llvm.org
|
||||
[Merge a Vim patch]: https://neovim.io/doc/user/dev_vimpatch.html
|
||||
[Merge a Vim patch]: https://github.com/neovim/neovim/wiki/Merging-patches-from-upstream-Vim
|
||||
[complexity:low]: https://github.com/neovim/neovim/issues?q=is%3Aopen+is%3Aissue+label%3Acomplexity%3Alow
|
||||
[conventional_commits]: https://www.conventionalcommits.org
|
||||
[dev-doc-guide]: https://neovim.io/doc/user/develop.html#dev-doc
|
||||
[dev-lua-doc]: https://neovim.io/doc/user/develop.html#dev-lua-doc
|
||||
[LuaLS]: https://luals.github.io/wiki/annotations/
|
||||
[EmmyLua]: https://github.com/sumneko/lua-language-server/wiki/Annotations
|
||||
[gcc-warnings]: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
|
||||
[gh]: https://cli.github.com/
|
||||
[git-bisect]: http://git-scm.com/book/en/v2/Git-Tools-Debugging-with-Git
|
||||
[git-feature-branch]: https://www.atlassian.com/git/tutorials/comparing-workflows
|
||||
[git-history-filtering]: https://www.atlassian.com/git/tutorials/git-log/filtering-the-commit-history
|
||||
[git-history-rewriting]: http://git-scm.com/book/en/v2/Git-Tools-Rewriting-History
|
||||
[git-rebasing]: http://git-scm.com/book/en/v2/Git-Branching-Rebasing
|
||||
[github-issues]: https://github.com/neovim/neovim/issues
|
||||
[include-what-you-use-install]: https://github.com/include-what-you-use/include-what-you-use#how-to-install
|
||||
[include-what-you-use]: https://github.com/include-what-you-use/include-what-you-use#using-with-cmake
|
||||
[lua-language-server]: https://github.com/sumneko/lua-language-server/
|
||||
[master error list]: https://raw.githubusercontent.com/neovim/doc/gh-pages/reports/clint/errors.json
|
||||
[nvim-lspconfig/clangd]: https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#clangd
|
||||
[pr-draft]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request
|
||||
[pr-ready]: https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-stage-of-a-pull-request
|
||||
[review-checklist]: https://github.com/neovim/neovim/wiki/Code-review-checklist
|
||||
[run-tests]: https://github.com/neovim/neovim/blob/master/test/README.md#running-tests
|
||||
[style-guide]: https://neovim.io/doc/user/dev_style.html#dev-style
|
||||
[wiki-faq]: https://neovim.io/doc/user/faq.html
|
||||
[uncrustify]: http://uncrustify.sourceforge.net/
|
||||
[wiki-contribute-help]: https://github.com/neovim/neovim/wiki/contribute-%3Ahelp
|
||||
[wiki-faq]: https://github.com/neovim/neovim/wiki/FAQ
|
||||
|
426
INSTALL.md
426
INSTALL.md
@@ -1,426 +0,0 @@
|
||||
You can install Neovim from [download](#install-from-download), [package](#install-from-package), or [source](#install-from-source) in just a few seconds.
|
||||
|
||||
---
|
||||
|
||||
- To start Neovim, run `nvim` (not `neovim`).
|
||||
- [Discover plugins](https://github.com/neovim/neovim/wiki/Related-projects#plugins).
|
||||
- Before upgrading to a new version, **check [Breaking Changes](https://neovim.io/doc/user/news.html#news-breaking).**
|
||||
- For config (vimrc) see [the FAQ](https://neovim.io/doc/user/faq.html#faq-general).
|
||||
|
||||
---
|
||||
|
||||
Install from download
|
||||
=====================
|
||||
|
||||
Downloads are available on the [Releases](https://github.com/neovim/neovim/releases) page.
|
||||
|
||||
* Latest [stable release](https://github.com/neovim/neovim/releases/latest)
|
||||
* [macOS x86_64](https://github.com/neovim/neovim/releases/latest/download/nvim-macos-x86_64.tar.gz)
|
||||
* [macOS arm64](https://github.com/neovim/neovim/releases/latest/download/nvim-macos-arm64.tar.gz)
|
||||
* [Linux x86_64](https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz)
|
||||
* [Linux arm64](https://github.com/neovim/neovim/releases/latest/download/nvim-linux-arm64.tar.gz)
|
||||
* [Windows](https://github.com/neovim/neovim/releases/latest/download/nvim-win64.msi)
|
||||
* Latest [development prerelease](https://github.com/neovim/neovim/releases/nightly)
|
||||
|
||||
|
||||
Install from package
|
||||
====================
|
||||
|
||||
Packages are listed below. (You can also [build Neovim from source](#install-from-source).)
|
||||
|
||||
## Windows
|
||||
|
||||
Windows 8+ is required. Windows 7 or older is not supported.
|
||||
|
||||
### [Winget](https://docs.microsoft.com/en-us/windows/package-manager/winget/)
|
||||
|
||||
- **Release:** `winget install Neovim.Neovim`
|
||||
|
||||
### [Chocolatey](https://chocolatey.org)
|
||||
|
||||
- **Latest Release:** `choco install neovim` (use -y for automatically skipping confirmation messages)
|
||||
- **Development (pre-release):** `choco install neovim --pre`
|
||||
|
||||
### [Scoop](https://scoop.sh/)
|
||||
```
|
||||
scoop bucket add main
|
||||
scoop install neovim
|
||||
```
|
||||
- **Release:** `scoop install neovim`
|
||||
|
||||
Several Neovim GUIs are available from scoop (extras): [scoop.sh/#/apps?q=neovim](https://scoop.sh/#/apps?q=neovim)
|
||||
|
||||
### Pre-built archives
|
||||
|
||||
0. If you are missing `VCRUNTIME140.dll`, install the [Visual Studio 2015 C++ redistributable](https://support.microsoft.com/en-us/kb/2977003) (choose x86_64 or x86 depending on your system).
|
||||
1. Choose a package (**nvim-winXX.zip**) from the [releases page](https://github.com/neovim/neovim/releases).
|
||||
2. Unzip the package. Any location is fine, administrator privileges are _not_ required.
|
||||
- `$VIMRUNTIME` will be set to that location automatically.
|
||||
3. Run `nvim.exe` from a terminal.
|
||||
|
||||
**Optional** steps:
|
||||
|
||||
- Add the `bin` folder (e.g. `C:\Program Files\nvim\bin`) to your PATH.
|
||||
- This makes it easy to run `nvim` from anywhere.
|
||||
- If `:set spell` does not work, create the `C:/Users/foo/AppData/Local/nvim/site/spell` folder.
|
||||
You can then copy your spell files over (for English, located
|
||||
[here](https://github.com/vim/vim/blob/master/runtime/spell/en.utf-8.spl) and
|
||||
[here](https://github.com/vim/vim/blob/master/runtime/spell/en.utf-8.sug));
|
||||
- For Python plugins you need the `pynvim` module. "Virtual envs" are recommended. After activating the virtual env do `pip install pynvim` (in *both*). Edit your `init.vim` so that it contains the path to the env's Python executable:
|
||||
```vim
|
||||
let g:python3_host_prog='C:/Users/foo/Envs/neovim3/Scripts/python.exe'
|
||||
```
|
||||
- Run `:checkhealth` and read `:help provider-python`.
|
||||
- **init.vim ("vimrc"):** If you already have Vim installed you can copy `%userprofile%\_vimrc` to `%userprofile%\AppData\Local\nvim\init.vim` to use your Vim config with Neovim.
|
||||
|
||||
|
||||
## macOS / OS X
|
||||
|
||||
### Pre-built archives
|
||||
|
||||
The [Releases](https://github.com/neovim/neovim/releases) page provides pre-built binaries for macOS 10.15+.
|
||||
|
||||
For x86_64:
|
||||
|
||||
curl -LO https://github.com/neovim/neovim/releases/download/nightly/nvim-macos-x86_64.tar.gz
|
||||
tar xzf nvim-macos-x86_64.tar.gz
|
||||
./nvim-macos-x86_64/bin/nvim
|
||||
|
||||
For arm64:
|
||||
|
||||
curl -LO https://github.com/neovim/neovim/releases/download/nightly/nvim-macos-arm64.tar.gz
|
||||
tar xzf nvim-macos-arm64.tar.gz
|
||||
./nvim-macos-arm64/bin/nvim
|
||||
|
||||
### [Homebrew](https://brew.sh) on macOS or Linux
|
||||
|
||||
brew install neovim
|
||||
|
||||
### [MacPorts](https://www.macports.org/)
|
||||
|
||||
sudo port selfupdate
|
||||
sudo port install neovim
|
||||
|
||||
## Linux
|
||||
|
||||
### Pre-built archives
|
||||
|
||||
The [Releases](https://github.com/neovim/neovim/releases) page provides pre-built binaries for Linux systems.
|
||||
|
||||
```sh
|
||||
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz
|
||||
sudo rm -rf /opt/nvim
|
||||
sudo tar -C /opt -xzf nvim-linux64.tar.gz
|
||||
```
|
||||
|
||||
After this step add this to `~/.bashrc`:
|
||||
|
||||
export PATH="$PATH:/opt/nvim-linux64/bin"
|
||||
|
||||
### AppImage ("universal" Linux package)
|
||||
|
||||
The [Releases](https://github.com/neovim/neovim/releases) page provides an [AppImage](https://appimage.org) that runs on most Linux systems. No installation is needed, just download `nvim-linux-x86_64.appimage` and run it. (It might not work if your Linux distribution is more than 4 years old.) The following instructions assume an `x86_64` architecture; on ARM Linux replace with `arm64`.
|
||||
|
||||
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-86_64.appimage
|
||||
chmod u+x nvim-linux-x86_64.appimage
|
||||
./nvim-linux-x86_64.appimage
|
||||
|
||||
To expose nvim globally:
|
||||
|
||||
mkdir -p /opt/nvim
|
||||
mv nvim-linux-x86_64.appimage /opt/nvim/nvim
|
||||
|
||||
And the following line to `~/.bashrc`:
|
||||
|
||||
export PATH="$PATH:/opt/nvim/"
|
||||
|
||||
If the `./nvim-linux-x86_64.appimage` command fails, try:
|
||||
```sh
|
||||
./nvim-linux-x86_64.appimage --appimage-extract
|
||||
./squashfs-root/AppRun --version
|
||||
|
||||
# Optional: exposing nvim globally.
|
||||
sudo mv squashfs-root /
|
||||
sudo ln -s /squashfs-root/AppRun /usr/bin/nvim
|
||||
nvim
|
||||
```
|
||||
|
||||
### Arch Linux
|
||||
|
||||
Neovim can be installed from the community repository:
|
||||
|
||||
sudo pacman -S neovim
|
||||
|
||||
Alternatively, Neovim can be also installed using the PKGBUILD [`neovim-git`](https://aur.archlinux.org/packages/neovim-git), available on the [AUR](https://wiki.archlinux.org/index.php/Arch_User_Repository).
|
||||
|
||||
Alternatively, Neovim Nightly builds can be also installed using the PKGBUILD [`neovim-nightly-bin`](https://aur.archlinux.org/packages/neovim-nightly-bin), available on the [AUR](https://wiki.archlinux.org/index.php/Arch_User_Repository).
|
||||
|
||||
The Python module is available from the community repository:
|
||||
|
||||
sudo pacman -S python-pynvim
|
||||
|
||||
Ruby modules (currently only supported in `neovim-git`) are available from the AUR as [`ruby-neovim`](https://aur.archlinux.org/packages/ruby-neovim).
|
||||
|
||||
### CentOS 8 / RHEL 8
|
||||
|
||||
Neovim is available through [EPEL (Extra Packages for Enterprise Linux)](https://fedoraproject.org/wiki/EPEL)
|
||||
|
||||
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
|
||||
yum install -y neovim python3-neovim
|
||||
|
||||
### Clear Linux OS
|
||||
|
||||
Neovim is available through the [neovim bundle](https://github.com/clearlinux/clr-bundles/blob/master/bundles/neovim)
|
||||
|
||||
sudo swupd bundle-add neovim
|
||||
|
||||
Python (`:python`) support is available if the [python-basic bundle](https://github.com/clearlinux/clr-bundles/blob/master/bundles/python-basic) is installed.
|
||||
|
||||
sudo swupd bundle-add python-basic
|
||||
|
||||
### Debian
|
||||
|
||||
Neovim is in [Debian](https://packages.debian.org/search?keywords=neovim).
|
||||
|
||||
sudo apt-get install neovim
|
||||
|
||||
Python (`:python`) support is installable via the package manager on Debian unstable.
|
||||
|
||||
sudo apt-get install python3-neovim
|
||||
|
||||
### Exherbo Linux
|
||||
|
||||
Exhereses for scm and released versions are currently available in repository `::medvid`. Python client (with GTK+ GUI included) and Qt5 GUI are also available as suggestions:
|
||||
|
||||
cave resolve app-editors/neovim --take dev-python/neovim-python --take app-editors/neovim-qt
|
||||
|
||||
### Fedora
|
||||
|
||||
Neovim is in [Fedora](https://src.fedoraproject.org/rpms/neovim) starting with Fedora 25:
|
||||
|
||||
sudo dnf install -y neovim python3-neovim
|
||||
|
||||
You can also get nightly builds of git master from the [Copr automated build system](https://copr.fedoraproject.org/coprs/agriffis/neovim-nightly/):
|
||||
|
||||
dnf copr enable agriffis/neovim-nightly
|
||||
dnf install -y neovim python3-neovim
|
||||
|
||||
See the [blog post](https://arongriffis.com/2019/03/02/neovim-nightly-builds) for information on how these are built.
|
||||
|
||||
### Flatpak
|
||||
|
||||
You can find Neovim on [Flathub](https://flathub.org/apps/details/io.neovim.nvim). Providing you have Flatpak [set up](https://flatpak.org/setup/):
|
||||
|
||||
flatpak install flathub io.neovim.nvim
|
||||
flatpak run io.neovim.nvim
|
||||
|
||||
You can add `/var/lib/flatpak/exports/bin` (or `~/.local/share/flatpak/exports/bin` if you used `--user`) to the `$PATH` and run it with `io.neovim.nvim`.
|
||||
|
||||
Note that Flatpak'ed Neovim will look for `init.vim` in `~/.var/app/io.neovim.nvim/config/nvim` instead of `~/.config/nvim`.
|
||||
|
||||
### Gentoo Linux
|
||||
|
||||
An ebuild is available in Gentoo's official portage repository:
|
||||
|
||||
emerge -a app-editors/neovim
|
||||
|
||||
### GNU Guix
|
||||
|
||||
Neovim can be installed with:
|
||||
|
||||
guix install neovim
|
||||
|
||||
### GoboLinux
|
||||
|
||||
Neovim can be installed with:
|
||||
|
||||
sudo -H Compile NeoVim
|
||||
|
||||
### Nix / NixOS
|
||||
|
||||
Neovim can be installed with:
|
||||
|
||||
nix-env -iA nixpkgs.neovim
|
||||
|
||||
Or alternatively, if you use flakes:
|
||||
|
||||
nix profile install nixpkgs#neovim
|
||||
|
||||
### Mageia 7
|
||||
|
||||
urpmi neovim
|
||||
|
||||
To install the Python modules:
|
||||
|
||||
urpmi python3-pynvim
|
||||
|
||||
### makedeb Package Repository (MPR)
|
||||
|
||||
Neovim is available inside the [MPR](https://mpr.makedeb.org/packages/neovim). You can install it with:
|
||||
|
||||
git clone https://mpr.makedeb.org/neovim
|
||||
cd neovim/
|
||||
makedeb -si
|
||||
|
||||
### OpenSUSE
|
||||
|
||||
Neovim can be installed with:
|
||||
|
||||
sudo zypper in neovim
|
||||
|
||||
To install the Python modules:
|
||||
|
||||
sudo zypper in python-neovim python3-neovim
|
||||
|
||||
### PLD Linux
|
||||
|
||||
Neovim is in [PLD Linux](https://github.com/pld-linux/neovim):
|
||||
|
||||
poldek -u neovim
|
||||
poldek -u python-neovim python3-neovim
|
||||
poldek -u python-neovim-gui python3-neovim-gui
|
||||
|
||||
### Slackware
|
||||
|
||||
See [neovim on SlackBuilds](https://slackbuilds.org/apps/neovim/).
|
||||
|
||||
### Source Mage
|
||||
|
||||
Neovim can be installed using the Sorcery package manager:
|
||||
|
||||
cast neovim
|
||||
|
||||
### Solus
|
||||
|
||||
Neovim can be installed using the default package manager in Solus (eopkg):
|
||||
|
||||
sudo eopkg install neovim
|
||||
|
||||
### Snap
|
||||
|
||||
Neovim nightly and stable are available on the [snap store](https://snapcraft.io/nvim).
|
||||
|
||||
**Stable Builds**
|
||||
|
||||
```sh
|
||||
sudo snap install --beta nvim --classic
|
||||
```
|
||||
|
||||
**Nightly Builds**
|
||||
|
||||
```sh
|
||||
sudo snap install --edge nvim --classic
|
||||
```
|
||||
|
||||
### Ubuntu
|
||||
As in Debian, Neovim is in [Ubuntu](https://packages.ubuntu.com/search?keywords=neovim).
|
||||
|
||||
sudo apt install neovim
|
||||
|
||||
Python (`:python`) support seems to be automatically installed
|
||||
|
||||
sudo apt install python3-neovim
|
||||
|
||||
Neovim has been added to a "Personal Package Archive" (PPA). This allows you to install it with `apt-get`. Follow the links to the PPAs to see which versions of Ubuntu are currently available via the PPA. Choose **stable** or **unstable**:
|
||||
|
||||
- [https://launchpad.net/~neovim-ppa/+archive/ubuntu/**stable**](https://launchpad.net/~neovim-ppa/+archive/ubuntu/stable)
|
||||
- [https://launchpad.net/~neovim-ppa/+archive/ubuntu/**unstable**](https://launchpad.net/~neovim-ppa/+archive/ubuntu/unstable)
|
||||
|
||||
**Important:** The Neovim team does not maintain the PPA packages. For problems or questions about the PPA specifically contact https://launchpad.net/~neovim-ppa.
|
||||
|
||||
To be able to use **add-apt-repository** you may need to install software-properties-common:
|
||||
|
||||
sudo apt-get install software-properties-common
|
||||
|
||||
If you're using an older version Ubuntu you must use:
|
||||
|
||||
sudo apt-get install python-software-properties
|
||||
|
||||
Run the following commands:
|
||||
|
||||
sudo add-apt-repository ppa:neovim-ppa/stable
|
||||
sudo apt-get update
|
||||
sudo apt-get install neovim
|
||||
|
||||
Prerequisites for the Python modules:
|
||||
|
||||
sudo apt-get install python-dev python-pip python3-dev python3-pip
|
||||
|
||||
If you're using an older version Ubuntu you must use:
|
||||
|
||||
sudo apt-get install python-dev python-pip python3-dev
|
||||
sudo apt-get install python3-setuptools
|
||||
sudo easy_install3 pip
|
||||
|
||||
### Void-Linux
|
||||
|
||||
Neovim can be installed using the xbps package manager
|
||||
|
||||
sudo xbps-install -S neovim
|
||||
|
||||
### Alpine Linux
|
||||
|
||||
Neovim can be installed using the apk package manager
|
||||
|
||||
sudo apk add neovim
|
||||
|
||||
## BSD
|
||||
|
||||
### FreeBSD
|
||||
|
||||
Neovim can be installed using [`pkg(8)`](https://www.freebsd.org/cgi/man.cgi?query=pkg&sektion=8&n=1):
|
||||
|
||||
pkg install neovim
|
||||
|
||||
or [from the ports tree](https://www.freshports.org/editors/neovim/):
|
||||
|
||||
cd /usr/ports/editors/neovim/ && make install clean
|
||||
|
||||
To install the pynvim Python modules using [`pkg(8)`](https://www.freebsd.org/cgi/man.cgi?query=pkg&sektion=8&n=1) run:
|
||||
|
||||
pkg install py36-pynvim
|
||||
|
||||
### OpenBSD
|
||||
|
||||
Neovim can be installed using [`pkg_add(1)`](https://man.openbsd.org/pkg_add):
|
||||
|
||||
pkg_add neovim
|
||||
|
||||
or [from the ports tree](https://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/editors/neovim/):
|
||||
|
||||
cd /usr/ports/editors/neovim/ && make install
|
||||
|
||||
## Android
|
||||
|
||||
[Termux](https://github.com/termux/termux-app) offers a Neovim package.
|
||||
|
||||
|
||||
Install from source
|
||||
===================
|
||||
|
||||
If a package is not provided for your platform, you can build Neovim from source. See [BUILD.md](./BUILD.md) for details. If you have the [prerequisites](./BUILD.md#build-prerequisites) then building is easy:
|
||||
|
||||
make CMAKE_BUILD_TYPE=Release
|
||||
sudo make install
|
||||
|
||||
For Unix-like systems this installs Neovim to `/usr/local`, while for Windows to `C:\Program Files`. Note, however, that this can complicate uninstallation. The following example avoids this by isolating an installation under `$HOME/neovim`:
|
||||
|
||||
rm -r build/ # clear the CMake cache
|
||||
make CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX=$HOME/neovim"
|
||||
make install
|
||||
export PATH="$HOME/neovim/bin:$PATH"
|
||||
|
||||
## Uninstall
|
||||
|
||||
There is a CMake target to _uninstall_ after `make install`:
|
||||
|
||||
```sh
|
||||
sudo cmake --build build/ --target uninstall
|
||||
```
|
||||
|
||||
Alternatively, just delete the `CMAKE_INSTALL_PREFIX` artifacts:
|
||||
|
||||
```sh
|
||||
sudo rm /usr/local/bin/nvim
|
||||
sudo rm -r /usr/local/share/nvim/
|
||||
```
|
@@ -233,8 +233,8 @@ II) It is allowed to distribute a modified (or extended) version of Vim,
|
||||
maintainer will do with your changes and under what license they
|
||||
will be distributed is negotiable. If there has been no negotiation
|
||||
then this license, or a later version, also applies to your changes.
|
||||
The current maintainers are listed here: https://github.com/orgs/vim/people.
|
||||
If this changes it will be announced in appropriate places (most likely
|
||||
The current maintainer is Bram Moolenaar <Bram@vim.org>. If this
|
||||
changes it will be announced in appropriate places (most likely
|
||||
vim.sf.net, www.vim.org and/or comp.editors). When it is completely
|
||||
impossible to contact the maintainer, the obligation to send him
|
||||
your changes ceases. Once the maintainer has confirmed that he has
|
||||
|
180
MAINTAIN.md
180
MAINTAIN.md
@@ -22,10 +22,10 @@ In practice we haven't found a way to forecast more precisely than "next" and
|
||||
* Next feature-release (1.x.0)
|
||||
|
||||
The forecasting problem might be solved with an explicit priority system (like
|
||||
Vim's todo.txt). Meanwhile the Neovim priority system is defined by:
|
||||
Bram's todo.txt). Meanwhile the Neovim priority system is defined by:
|
||||
|
||||
* PRs nearing completion.
|
||||
* Issue labels. E.g. the `has:plan` label increases the ticket's priority merely
|
||||
* Issue labels. E.g. the `+plan` label increases the ticket's priority merely
|
||||
for having a plan written down: it is _closer to completion_ than tickets
|
||||
without a plan.
|
||||
* Comment activity or new information.
|
||||
@@ -50,76 +50,20 @@ has a major bug:
|
||||
1. Fix the bug on `master`.
|
||||
2. Cherry-pick the fix to `release-x.y`.
|
||||
3. Cut a release from `release-x.y`.
|
||||
* Run `./scripts/release.sh` (requires [git cliff](https://github.com/orhun/git-cliff))
|
||||
* Run `./scripts/release.sh`
|
||||
* Update (force-push) the remote `stable` tag.
|
||||
* The [CI job](https://github.com/neovim/neovim/blob/3d45706478cd030c3ee05b4f336164bb96138095/.github/workflows/release.yml#L11-L13)
|
||||
will update the release assets and [force-push to the "stable" tag](https://github.com/neovim/neovim/blob/cdd87222c86c5b2274a13d36f23de0637462e317/.github/workflows/release.yml#L229).
|
||||
will update the release assets and force-push to the `stable` tag.
|
||||
|
||||
### Release automation
|
||||
|
||||
Neovim automation includes a [backport bot](https://github.com/korthout/backport-action).
|
||||
Trigger the action by labeling a PR with `ci:backport release-x.y`. See `.github/workflows/backport.yml`.
|
||||
|
||||
Deprecating and removing features
|
||||
---------------------------------
|
||||
|
||||
Neovim inherits many features and design decisions from Vim, not all of which
|
||||
align with the goals of this project. It is sometimes desired or necessary to
|
||||
remove existing features, or refactor parts of the code that would change
|
||||
user's workflow. In these cases, a deprecation policy is needed to properly
|
||||
inform users of the change.
|
||||
|
||||
When a (non-experimental) feature is slated to be removed it should:
|
||||
|
||||
1. Be _soft_ deprecated in the _next_ release
|
||||
- Use of the deprecated feature will still work.
|
||||
- This means deprecating via documentation and annotation (`@deprecated`).
|
||||
- Include a note in `deprecated.txt`.
|
||||
- For Lua features, use `vim.deprecate()`. The specified version is the
|
||||
current minor version + 2. For example, if the current version is
|
||||
`v0.10.0-dev-1957+gd676746c33` then use `0.12`.
|
||||
- For Vimscript features, use `v:lua.vim.deprecate()`. Use the same version
|
||||
as described for Lua features.
|
||||
2. Be _hard_ deprecated in a following a release in which it was soft deprecated.
|
||||
- Use of the deprecated feature will still work but should issue a warning.
|
||||
- Features implemented in C will need bespoke implementations to communicate
|
||||
to users that the feature is deprecated.
|
||||
3. Be removed in a release following the release in which it was hard deprecated
|
||||
- Usually this will be the next release, but it may be a later release if
|
||||
a longer deprecation cycle is desired
|
||||
- If possible, keep the feature as a stub (e.g. function API) and issue an
|
||||
error when it is accessed.
|
||||
|
||||
Example:
|
||||
|
||||
Deprecation Removal
|
||||
┆ ┆ ┆
|
||||
┆ Soft ┆ Hard ┆
|
||||
┆ Deprecation ┆ Deprecation ┆
|
||||
┆ Period ┆ Period ┆
|
||||
────────────────────────────────────────────────────────────
|
||||
Version: 0.10 0.11 0.12
|
||||
────────────────────────────────────────────────────────────
|
||||
Old code Old code Old code
|
||||
+ +
|
||||
New code New code New code
|
||||
|
||||
Feature removals which may benefit from community input or further discussion
|
||||
should also have a tracking issue (which should be linked to in the release
|
||||
notes).
|
||||
|
||||
Exceptions to this policy may be made (for experimental subsystems or when
|
||||
there is broad consensus among maintainers). The rationale for the exception
|
||||
should be stated explicitly and publicly.
|
||||
Neovim automation includes a [backport bot](https://github.com/zeebe-io/backport-action).
|
||||
Trigger the action by labeling a PR with `backport release-X.Y`. See `.github/workflows/backport.yml`.
|
||||
|
||||
Third-party dependencies
|
||||
------------------------
|
||||
|
||||
For some dependencies we maintain temporary "forks", which are simply private
|
||||
branches with a few extra patches, while we wait for the upstream project to
|
||||
merge the patches. This is done instead of maintaining the patches as (fragile)
|
||||
CMake `PATCH_COMMAND` steps.
|
||||
|
||||
These "bundled" dependencies can be updated by bumping their versions in `cmake.deps/deps.txt`.
|
||||
These "bundled" dependencies can be updated by bumping their versions in `cmake.deps/CMakeLists.txt`.
|
||||
Some can be auto-bumped by `scripts/bump_deps.lua`.
|
||||
|
||||
* [LuaJIT](https://github.com/LuaJIT/LuaJIT)
|
||||
@@ -128,14 +72,14 @@ Some can be auto-bumped by `scripts/bump_deps.lua`.
|
||||
* When bumping, also sync [our bundled documentation](https://github.com/neovim/neovim/blob/master/runtime/doc/luvref.txt) with [the upstream documentation](https://github.com/luvit/luv/blob/master/docs.md).
|
||||
* [gettext](https://ftp.gnu.org/pub/gnu/gettext/)
|
||||
* [libiconv](https://ftp.gnu.org/pub/gnu/libiconv)
|
||||
* [libtermkey](https://github.com/neovim/libtermkey)
|
||||
* [libuv](https://github.com/libuv/libuv)
|
||||
* [libvterm](https://www.leonerd.org.uk/code/libvterm/)
|
||||
* Downloading from the original source is unreliable, so we use our [mirror](https://github.com/neovim/libvterm) instead.
|
||||
* [libvterm](http://www.leonerd.org.uk/code/libvterm/)
|
||||
* [lua-compat](https://github.com/keplerproject/lua-compat-5.3)
|
||||
* [msys2](https://github.com/msys2/MINGW-packages) (for mingw Windows build)
|
||||
* Changes to mingw can [break our mingw build](https://github.com/msys2/MINGW-packages/issues/9946).
|
||||
* [tree-sitter](https://github.com/tree-sitter/tree-sitter)
|
||||
* [unibilium](https://github.com/neovim/unibilium)
|
||||
* The original project [was abandoned](https://github.com/neovim/neovim/issues/10302), so the [neovim/unibilium](https://github.com/neovim/unibilium) fork is considered "upstream" and is maintained on the `master` branch.
|
||||
* [treesitter parsers](https://github.com/neovim/neovim/blob/7e97c773e3ba78fcddbb2a0b9b0d572c8210c83e/cmake.deps/deps.txt#L47-L62)
|
||||
|
||||
### Vendored dependencies
|
||||
|
||||
@@ -145,93 +89,47 @@ These dependencies are "vendored" (inlined), we must update the sources manually
|
||||
* send improvements upstream!
|
||||
* `src/xdiff/`: [xdiff](https://github.com/git/git/tree/master/xdiff)
|
||||
* `src/cjson/`: [lua-cjson](https://github.com/openresty/lua-cjson)
|
||||
* `src/klib/`: [Klib](https://github.com/attractivechaos/klib)
|
||||
* `src/nvim/lib/`: [Klib](https://github.com/attractivechaos/klib)
|
||||
* `runtime/lua/vim/inspect.lua`: [inspect.lua](https://github.com/kikito/inspect.lua)
|
||||
* `src/nvim/tui/terminfo_defs.h`: terminfo definitions
|
||||
* Run `scripts/update_terminfo.sh` to update these definitions.
|
||||
* `runtime/lua/vim/lsp/_meta/protocol.lua`: LSP specification
|
||||
* Run `scripts/gen_lsp.lua` to update.
|
||||
* `runtime/lua/vim/_meta/lpeg.lua`: LPeg definitions.
|
||||
* Refer to [`LuaCATS/lpeg`](https://github.com/LuaCATS/lpeg) for updates.
|
||||
* Update the git SHA revision from which the documentation was taken.
|
||||
* `runtime/lua/vim/re.lua`: LPeg regex module.
|
||||
* Vendored from LPeg. Needs to be updated when LPeg is updated.
|
||||
* `runtime/lua/vim/_meta/re.lua`: docs for LPeg regex module.
|
||||
* Needs to be updated when LPeg is updated.
|
||||
* `src/bit.c`: only for PUC lua: port of `require'bit'` from luajit https://bitop.luajit.org/
|
||||
* `runtime/lua/coxpcall.lua`: coxpcall (only needed for PUC lua, builtin to luajit)
|
||||
* `src/termkey`: [libtermkey](https://github.com/neovim/libtermkey)
|
||||
* [treesitter parsers](https://github.com/neovim/neovim/blob/fcc24e43e0b5f9d801a01ff2b8f78ce8c16dd551/cmake.deps/CMakeLists.txt#L197-L210)
|
||||
|
||||
Other dependencies
|
||||
--------------------------
|
||||
### Forks
|
||||
|
||||
* GitHub users:
|
||||
* https://github.com/marvim
|
||||
* https://github.com/nvim-winget
|
||||
* Org secrets/tokens:
|
||||
* `CODECOV_TOKEN`
|
||||
* Domain names (held in https://namecheap.com):
|
||||
* neovim.org
|
||||
* neovim.io
|
||||
* packspec.org
|
||||
* pkgjson.org
|
||||
* DNS for the above domains is managed in https://cloudflare.com (not the domain registrar)
|
||||
We may maintain forks, if we are waiting on upstream changes: https://github.com/neovim/neovim/wiki/Deps
|
||||
|
||||
CI
|
||||
--------------
|
||||
|
||||
Refactoring
|
||||
-----------
|
||||
### General
|
||||
|
||||
### Frozen legacy modules
|
||||
As our CI is primarily dependent on GitHub Actions at the moment, then so will
|
||||
our CI strategy be. The following guidelines have worked well for us so far:
|
||||
|
||||
Refactoring Vim structurally and aesthetically is an important goal of Neovim.
|
||||
But there are some modules that should not be changed significantly, because
|
||||
they are maintained Vim, at present. Until someone takes "ownership" of these
|
||||
modules, the cost of any significant changes (including style or structural
|
||||
changes that re-arrange the code) to these modules outweighs the benefit. The
|
||||
modules are:
|
||||
* Never use a macOS runner if an Ubuntu or a Windows runner can be used
|
||||
instead. This is because macOS runners have a [tighter restrictions on the
|
||||
number of concurrent jobs](https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration#usage-limits).
|
||||
|
||||
- `regexp.c`
|
||||
- `indent_c.c`
|
||||
### Runner versions
|
||||
|
||||
Automation (CI)
|
||||
---------------
|
||||
* For special-purpose jobs where the runner version doesn't really matter,
|
||||
prefer `-latest` tags so we don't need to manually bump the versions. An
|
||||
example of a special-purpose workflow is `labeler.yml`.
|
||||
|
||||
### Backup
|
||||
* For our testing jobs, which are in `test.yml` and `build.yml`, prefer to use
|
||||
the latest stable (i.e. non-beta) version explicitly. Avoid using the
|
||||
`-latest` tags here as it makes it difficult to determine from an unrelated
|
||||
PR if a failure is due to the PR itself or due to GitHub bumping the
|
||||
`-latest` tag without our knowledge. There's also a high risk that automatic
|
||||
bumping the CI versions will fail due to manual work being required from
|
||||
experience.
|
||||
|
||||
Discussions from issues and PRs are backed up here:
|
||||
https://github.com/neovim/neovim-backup
|
||||
|
||||
### Development guidelines
|
||||
|
||||
* CI and automation jobs are primarily driven by GitHub Actions.
|
||||
* Avoid macOS if an Ubuntu or a Windows runner can be used instead. This is
|
||||
because macOS runners have [tighter restrictions on the number of concurrent
|
||||
jobs](https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration#usage-limits).
|
||||
* Runner versions:
|
||||
* For special-purpose jobs where the runner version doesn't really matter,
|
||||
prefer `-latest` tags so we don't need to manually bump the versions. An
|
||||
example of a special-purpose workflow is `labeler_pr.yml`.
|
||||
* For our testing job `test.yml`, prefer to use the latest version
|
||||
explicitly. Avoid using the `-latest` tags here as it makes it difficult
|
||||
to determine from an unrelated PR if a failure is due to the PR itself or
|
||||
due to GitHub bumping the `-latest` tag without our knowledge. There's
|
||||
also a high risk that automatically bumping the CI versions will fail due
|
||||
to manual work being required from experience.
|
||||
* For our release job, which is `release.yml`, prefer to use the oldest
|
||||
stable (i.e. non-deprecated) versions available. The reason is that we're
|
||||
trying to produce images that work in the broadest number of environments,
|
||||
and therefore want to use older releases.
|
||||
|
||||
### Special labels
|
||||
|
||||
Some github labels are used to trigger certain jobs:
|
||||
|
||||
* `ci:backport release-x.y` - backport to branch `release-x.y`
|
||||
* `ci:s390x` - enable s390x CI
|
||||
* `ci:skip-news` - skip news.yml workflows
|
||||
* `ci:windows-asan` - test windows with ASAN enabled
|
||||
* `needs:response` - close PR after a certain amount of time if author doesn't
|
||||
respond
|
||||
* For our release job, which is `release.yml`, prefer to use the oldest stable
|
||||
(i.e. non-deprecated) versions available. The reason is that we're trying to
|
||||
produce images that work in the broadest number of environments, and
|
||||
therefore want to use older releases.
|
||||
|
||||
See also
|
||||
--------
|
||||
|
128
Makefile
128
Makefile
@@ -1,26 +1,3 @@
|
||||
ifeq ($(OS),Windows_NT)
|
||||
SHELL := powershell.exe
|
||||
.SHELLFLAGS := -NoProfile -NoLogo
|
||||
MKDIR := @$$null = new-item -itemtype directory -force
|
||||
TOUCH := @$$null = new-item -force
|
||||
RM := remove-item -force
|
||||
CMAKE := cmake
|
||||
CMAKE_GENERATOR := Ninja
|
||||
define rmdir
|
||||
if (Test-Path $1) { remove-item -recurse $1 }
|
||||
endef
|
||||
else
|
||||
MKDIR := mkdir -p
|
||||
TOUCH := touch
|
||||
RM := rm -rf
|
||||
CMAKE := $(shell (command -v cmake3 || command -v cmake || echo cmake))
|
||||
CMAKE_GENERATOR ?= "$(shell (command -v ninja > /dev/null 2>&1 && echo "Ninja") || echo "Unix Makefiles")"
|
||||
GENERATOR_CMD ?= "$(shell (command -v ninja > /dev/null 2>&1 && echo "ninja") || echo "make")"
|
||||
define rmdir
|
||||
rm -rf $1
|
||||
endef
|
||||
endif
|
||||
|
||||
MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
|
||||
MAKEFILE_DIR := $(dir $(MAKEFILE_PATH))
|
||||
|
||||
@@ -32,6 +9,8 @@ filter-true = $(strip $(filter-out 1 on ON true TRUE,$1))
|
||||
|
||||
all: nvim
|
||||
|
||||
CMAKE_PRG ?= $(shell (command -v cmake3 || echo cmake))
|
||||
CMAKE_BUILD_TYPE ?= Debug
|
||||
CMAKE_FLAGS := -DCMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE)
|
||||
# Extra CMake flags which extend the default set
|
||||
CMAKE_EXTRA_FLAGS ?=
|
||||
@@ -49,7 +28,7 @@ override CMAKE_EXTRA_FLAGS += -DCMAKE_INSTALL_PREFIX=$(CMAKE_INSTALL_PREFIX)
|
||||
|
||||
checkprefix:
|
||||
@if [ -f build/.ran-cmake ]; then \
|
||||
cached_prefix=$(shell $(CMAKE) -L -N build | 2>/dev/null grep 'CMAKE_INSTALL_PREFIX' | cut -d '=' -f2); \
|
||||
cached_prefix=$(shell $(CMAKE_PRG) -L -N build | 2>/dev/null grep 'CMAKE_INSTALL_PREFIX' | cut -d '=' -f2); \
|
||||
if ! [ "$(CMAKE_INSTALL_PREFIX)" = "$$cached_prefix" ]; then \
|
||||
printf "Re-running CMake: CMAKE_INSTALL_PREFIX '$(CMAKE_INSTALL_PREFIX)' does not match cached value '%s'.\n" "$$cached_prefix"; \
|
||||
$(RM) build/.ran-cmake; \
|
||||
@@ -59,11 +38,32 @@ else
|
||||
checkprefix: ;
|
||||
endif
|
||||
|
||||
DEPS_BUILD_DIR ?= ".deps"
|
||||
CMAKE_GENERATOR ?= $(shell (command -v ninja > /dev/null 2>&1 && echo "Ninja") || \
|
||||
echo "Unix Makefiles")
|
||||
DEPS_BUILD_DIR ?= .deps
|
||||
ifneq (1,$(words [$(DEPS_BUILD_DIR)]))
|
||||
$(error DEPS_BUILD_DIR must not contain whitespace)
|
||||
endif
|
||||
|
||||
ifeq (,$(BUILD_TOOL))
|
||||
ifeq (Ninja,$(CMAKE_GENERATOR))
|
||||
BUILD_TOOL = ninja
|
||||
else
|
||||
BUILD_TOOL = $(MAKE)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Only need to handle Ninja here. Make will inherit the VERBOSE variable, and the -j, -l, and -n flags.
|
||||
ifeq ($(CMAKE_GENERATOR),Ninja)
|
||||
ifneq ($(VERBOSE),)
|
||||
BUILD_TOOL += -v
|
||||
endif
|
||||
BUILD_TOOL += $(shell printf '%s' '$(MAKEFLAGS)' | grep -o -- ' *-[jl][0-9]\+ *')
|
||||
ifeq (n,$(findstring n,$(firstword -$(MAKEFLAGS))))
|
||||
BUILD_TOOL += -n
|
||||
endif
|
||||
endif
|
||||
|
||||
DEPS_CMAKE_FLAGS ?=
|
||||
USE_BUNDLED ?=
|
||||
|
||||
@@ -73,7 +73,7 @@ endif
|
||||
|
||||
ifneq (,$(findstring functionaltest-lua,$(MAKECMDGOALS)))
|
||||
BUNDLED_LUA_CMAKE_FLAG := -DUSE_BUNDLED_LUA=ON
|
||||
$(shell [ -x $(DEPS_BUILD_DIR)/usr/bin/lua ] || $(RM) build/.ran-*)
|
||||
$(shell [ -x $(DEPS_BUILD_DIR)/usr/bin/lua ] || rm build/.ran-*)
|
||||
endif
|
||||
|
||||
# For use where we want to make sure only a single job is run. This does issue
|
||||
@@ -81,84 +81,78 @@ endif
|
||||
SINGLE_MAKE = export MAKEFLAGS= ; $(MAKE)
|
||||
|
||||
nvim: build/.ran-cmake deps
|
||||
$(CMAKE) --build build
|
||||
+$(BUILD_TOOL) -C build
|
||||
|
||||
libnvim: build/.ran-cmake deps
|
||||
$(CMAKE) --build build --target libnvim
|
||||
+$(BUILD_TOOL) -C build libnvim
|
||||
|
||||
cmake:
|
||||
$(TOUCH) CMakeLists.txt
|
||||
touch CMakeLists.txt
|
||||
$(MAKE) build/.ran-cmake
|
||||
|
||||
build/.ran-cmake: | deps
|
||||
$(CMAKE) -B build -G $(CMAKE_GENERATOR) $(CMAKE_FLAGS) $(CMAKE_EXTRA_FLAGS) $(MAKEFILE_DIR)
|
||||
$(TOUCH) $@
|
||||
cd build && $(CMAKE_PRG) -G '$(CMAKE_GENERATOR)' $(CMAKE_FLAGS) $(CMAKE_EXTRA_FLAGS) $(MAKEFILE_DIR)
|
||||
touch $@
|
||||
|
||||
deps: | build/.ran-deps-cmake
|
||||
ifeq ($(call filter-true,$(USE_BUNDLED)),)
|
||||
$(CMAKE) --build $(DEPS_BUILD_DIR)
|
||||
+$(BUILD_TOOL) -C $(DEPS_BUILD_DIR)
|
||||
endif
|
||||
|
||||
ifeq ($(call filter-true,$(USE_BUNDLED)),)
|
||||
$(DEPS_BUILD_DIR):
|
||||
$(MKDIR) $@
|
||||
mkdir -p "$@"
|
||||
build/.ran-deps-cmake:: $(DEPS_BUILD_DIR)
|
||||
$(CMAKE) -S $(MAKEFILE_DIR)/cmake.deps -B $(DEPS_BUILD_DIR) -G $(CMAKE_GENERATOR) $(BUNDLED_CMAKE_FLAG) $(BUNDLED_LUA_CMAKE_FLAG) $(DEPS_CMAKE_FLAGS)
|
||||
cd $(DEPS_BUILD_DIR) && \
|
||||
$(CMAKE_PRG) -G '$(CMAKE_GENERATOR)' $(BUNDLED_CMAKE_FLAG) $(BUNDLED_LUA_CMAKE_FLAG) \
|
||||
$(DEPS_CMAKE_FLAGS) $(MAKEFILE_DIR)/cmake.deps
|
||||
endif
|
||||
build/.ran-deps-cmake::
|
||||
$(MKDIR) build
|
||||
$(TOUCH) "$@"
|
||||
mkdir -p build
|
||||
touch $@
|
||||
|
||||
# TODO: cmake 3.2+ add_custom_target() has a USES_TERMINAL flag.
|
||||
oldtest: | nvim
|
||||
$(SINGLE_MAKE) -C test/old/testdir clean
|
||||
oldtest: | nvim build/runtime/doc/tags
|
||||
+$(SINGLE_MAKE) -C test/old/testdir clean
|
||||
ifeq ($(strip $(TEST_FILE)),)
|
||||
$(SINGLE_MAKE) -C test/old/testdir NVIM_PRG=$(NVIM_PRG) $(MAKEOVERRIDES)
|
||||
+$(SINGLE_MAKE) -C test/old/testdir NVIM_PRG=$(NVIM_PRG) $(MAKEOVERRIDES)
|
||||
else
|
||||
@# Handle TEST_FILE=test_foo{,.res,.vim}.
|
||||
$(SINGLE_MAKE) -C test/old/testdir NVIM_PRG=$(NVIM_PRG) SCRIPTS= $(MAKEOVERRIDES) $(patsubst %.vim,%,$(patsubst %.res,%,$(TEST_FILE)))
|
||||
+$(SINGLE_MAKE) -C test/old/testdir NVIM_PRG=$(NVIM_PRG) SCRIPTS= $(MAKEOVERRIDES) $(patsubst %.vim,%,$(patsubst %.res,%,$(TEST_FILE)))
|
||||
endif
|
||||
# Build oldtest by specifying the relative .vim filename.
|
||||
.PHONY: phony_force
|
||||
test/old/testdir/%.vim: phony_force nvim
|
||||
$(SINGLE_MAKE) -C test/old/testdir NVIM_PRG=$(NVIM_PRG) SCRIPTS= $(MAKEOVERRIDES) $(patsubst test/old/testdir/%.vim,%,$@)
|
||||
test/old/testdir/%.vim: phony_force
|
||||
+$(SINGLE_MAKE) -C test/old/testdir NVIM_PRG=$(NVIM_PRG) SCRIPTS= $(MAKEOVERRIDES) $(patsubst test/old/testdir/%.vim,%,$@)
|
||||
|
||||
functionaltest-lua: | nvim
|
||||
$(CMAKE) --build build --target functionaltest
|
||||
$(BUILD_TOOL) -C build $@
|
||||
|
||||
FORMAT=formatc formatlua format
|
||||
LINT=lintlua lintsh lintc clang-analyzer lintcommit lintdoc lint
|
||||
LINT=lintlua lintsh lintc clang-tidy lintcommit lint
|
||||
TEST=functionaltest unittest
|
||||
generated-sources benchmark $(FORMAT) $(LINT) $(TEST) doc: | build/.ran-cmake
|
||||
$(CMAKE) --build build --target $@
|
||||
generated-sources benchmark uninstall $(FORMAT) $(LINT) $(TEST): | build/.ran-cmake
|
||||
$(CMAKE_PRG) --build build --target $@
|
||||
|
||||
test: $(TEST)
|
||||
|
||||
iwyu: build/.ran-cmake
|
||||
$(CMAKE) --preset iwyu
|
||||
$(CMAKE) --build build > build/iwyu.log
|
||||
iwyu-fix-includes --only_re="src/nvim" --ignore_re="(src/nvim/eval/encode.c\
|
||||
|src/nvim/auto/\
|
||||
|src/nvim/os/lang.c\
|
||||
|src/nvim/map.c\
|
||||
)" --nosafe_headers < build/iwyu.log
|
||||
$(CMAKE) -B build -U ENABLE_IWYU
|
||||
$(CMAKE) --build build
|
||||
cmake --preset iwyu
|
||||
cmake --build --preset iwyu > build/iwyu.log
|
||||
iwyu-fix-includes --only_re="src/nvim" --ignore_re="src/nvim/(auto|map.h|eval/encode.c)" --safe_headers < build/iwyu.log
|
||||
cmake -B build -U ENABLE_IWYU
|
||||
|
||||
clean:
|
||||
ifneq ($(wildcard build),)
|
||||
$(CMAKE) --build build --target clean
|
||||
endif
|
||||
+test -d build && $(BUILD_TOOL) -C build clean || true
|
||||
$(MAKE) -C test/old/testdir clean
|
||||
$(MAKE) -C runtime/indent clean
|
||||
|
||||
distclean:
|
||||
$(call rmdir, $(DEPS_BUILD_DIR))
|
||||
$(call rmdir, build)
|
||||
rm -rf $(DEPS_BUILD_DIR) build
|
||||
$(MAKE) clean
|
||||
|
||||
install: checkprefix nvim
|
||||
$(GENERATOR_CMD) -C build install
|
||||
+$(BUILD_TOOL) -C build install
|
||||
|
||||
appimage:
|
||||
bash scripts/genappimage.sh
|
||||
@@ -169,4 +163,14 @@ appimage:
|
||||
appimage-%:
|
||||
bash scripts/genappimage.sh $*
|
||||
|
||||
.PHONY: test clean distclean nvim libnvim cmake deps install appimage checkprefix benchmark $(FORMAT) $(LINT) $(TEST)
|
||||
# Generic pattern rules, allowing for `make build/bin/nvim` etc.
|
||||
# Does not work with "Unix Makefiles".
|
||||
ifeq ($(CMAKE_GENERATOR),Ninja)
|
||||
build/%: phony_force
|
||||
$(BUILD_TOOL) -C build $(patsubst build/%,%,$@)
|
||||
|
||||
$(DEPS_BUILD_DIR)/%: phony_force
|
||||
$(BUILD_TOOL) -C $(DEPS_BUILD_DIR) $(patsubst $(DEPS_BUILD_DIR)/%,%,$@)
|
||||
endif
|
||||
|
||||
.PHONY: test clean distclean nvim libnvim cmake deps install appimage checkprefix benchmark uninstall $(FORMAT) $(LINT) $(TEST)
|
||||
|
10
README.md
10
README.md
@@ -6,6 +6,8 @@
|
||||
</h1>
|
||||
|
||||
[](https://scan.coverity.com/projects/2227)
|
||||
[](https://neovim.io/doc/reports/clang)
|
||||
[](https://neovim.io/doc/reports/pvs/PVS-studio.html.d)
|
||||
[](https://repology.org/metapackage/neovim)
|
||||
[](https://buildd.debian.org/neovim)
|
||||
[](https://github.com/neovim/neovim/releases/)
|
||||
@@ -15,7 +17,7 @@ Neovim is a project that seeks to aggressively refactor [Vim](https://www.vim.or
|
||||
- Simplify maintenance and encourage [contributions](CONTRIBUTING.md)
|
||||
- Split the work between multiple developers
|
||||
- Enable [advanced UIs] without modifications to the core
|
||||
- Maximize [extensibility](https://neovim.io/doc/user/ui.html)
|
||||
- Maximize [extensibility](https://github.com/neovim/neovim/wiki/Plugin-UI-architecture)
|
||||
|
||||
See the [Introduction](https://github.com/neovim/neovim/wiki/Introduction) wiki page and [Roadmap]
|
||||
for more information.
|
||||
@@ -46,7 +48,7 @@ Pre-built packages for Windows, macOS, and Linux are found on the
|
||||
Install from source
|
||||
-------------------
|
||||
|
||||
See [BUILD.md](./BUILD.md) and [supported platforms](https://neovim.io/doc/user/support.html#supported-platforms) for details.
|
||||
See the [Building Neovim](https://github.com/neovim/neovim/wiki/Building-Neovim) wiki page and [supported platforms](https://neovim.io/doc/user/support.html#supported-platforms) for details.
|
||||
|
||||
The build is CMake-based, but a Makefile is provided as a convenience.
|
||||
After installing the dependencies, run the following command.
|
||||
@@ -79,7 +81,7 @@ Project layout
|
||||
├─ runtime/ plugins and docs
|
||||
├─ src/nvim/ application source code (see src/nvim/README.md)
|
||||
│ ├─ api/ API subsystem
|
||||
│ ├─ eval/ Vimscript subsystem
|
||||
│ ├─ eval/ VimL subsystem
|
||||
│ ├─ event/ event-loop subsystem
|
||||
│ ├─ generators/ code generation (pre-compilation)
|
||||
│ ├─ lib/ generic data structures
|
||||
@@ -112,7 +114,7 @@ Apache 2.0 license, except for contributions copied from Vim (identified by the
|
||||
[nvim-news]: https://neovim.io/doc/user/news.html
|
||||
[Roadmap]: https://neovim.io/roadmap/
|
||||
[advanced UIs]: https://github.com/neovim/neovim/wiki/Related-projects#gui
|
||||
[Managed packages]: ./INSTALL.md#install-from-package
|
||||
[Managed packages]: https://github.com/neovim/neovim/wiki/Installing-Neovim#install-from-package
|
||||
[Debian]: https://packages.debian.org/testing/neovim
|
||||
[Ubuntu]: https://packages.ubuntu.com/search?keywords=neovim
|
||||
[Fedora]: https://packages.fedoraproject.org/pkgs/neovim/neovim/
|
||||
|
@@ -4,7 +4,6 @@ include(CheckFunctionExists)
|
||||
include(CheckIncludeFiles)
|
||||
include(CheckCSourceRuns)
|
||||
include(CheckCSourceCompiles)
|
||||
include(TestBigEndian)
|
||||
|
||||
check_c_source_compiles("
|
||||
#include <execinfo.h>
|
||||
@@ -41,9 +40,6 @@ check_include_files(sys/utsname.h HAVE_SYS_UTSNAME_H)
|
||||
check_include_files(termios.h HAVE_TERMIOS_H)
|
||||
check_include_files(sys/uio.h HAVE_SYS_UIO_H)
|
||||
check_include_files(sys/sdt.h HAVE_SYS_SDT_H)
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
check_include_files(sys/xattr.h HAVE_XATTR)
|
||||
endif()
|
||||
|
||||
# Functions
|
||||
check_function_exists(fseeko HAVE_FSEEKO)
|
||||
@@ -79,17 +75,6 @@ int main(void)
|
||||
}
|
||||
" HAVE_PWD_FUNCS)
|
||||
|
||||
check_c_source_compiles("
|
||||
#include <intrin.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
unsigned long index;
|
||||
unsigned char mask = 0x8000;
|
||||
_BitScanForward64(&index, mask);
|
||||
return 0;
|
||||
}
|
||||
" HAVE_BITSCANFORWARD64)
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
|
||||
check_c_source_compiles("
|
||||
@@ -142,58 +127,43 @@ endif()
|
||||
if("${HAVE_BE64TOH_MACROS}" OR "${HAVE_BE64TOH_FUNC}")
|
||||
set(HAVE_BE64TOH 1)
|
||||
endif()
|
||||
|
||||
test_big_endian(ORDER_BIG_ENDIAN)
|
||||
if (NOT "${HAVE_BE64TOH}")
|
||||
if (NOT "${CMAKE_CROSSCOMPILING}")
|
||||
# It is safe to make ORDER_BIG_ENDIAN not defined if
|
||||
# - HAVE_BE64TOH is true. In this case be64toh will be used unconditionally in
|
||||
# any case and ORDER_BIG_ENDIAN will not be examined.
|
||||
# - CMAKE_CROSSCOMPILING *and* HAVE_BE64TOH are both false. In this case
|
||||
# be64toh function which uses cycle and arithmetic operations is used which
|
||||
# will work regardless of endianness. Function is sub-optimal though.
|
||||
check_c_source_runs("
|
||||
${SI}
|
||||
${MS}
|
||||
char *s = (char *) &i;
|
||||
return (
|
||||
s[0] == 0x01
|
||||
&& s[1] == 0x02
|
||||
&& s[2] == 0x03
|
||||
&& s[3] == 0x04
|
||||
&& s[4] == 0x05
|
||||
&& s[5] == 0x06
|
||||
&& s[6] == 0x07
|
||||
&& s[7] == 0x08) ? 0 : 1;
|
||||
${ME}"
|
||||
ORDER_BIG_ENDIAN)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
configure_file (
|
||||
"${PROJECT_SOURCE_DIR}/cmake.config/config.h.in"
|
||||
"${PROJECT_BINARY_DIR}/cmake.config/auto/config.h"
|
||||
)
|
||||
|
||||
set(VERSION_STRING "${CMAKE_C_COMPILER} ${CMAKE_C_FLAGS} ")
|
||||
|
||||
foreach(BUILD_TYPE Debug Release RelWithDebInfo MinSizeRel)
|
||||
string(TOUPPER ${BUILD_TYPE} BUILD_TYPE_UPPER)
|
||||
set(GEN_CONFIG "$<CONFIG:${BUILD_TYPE}>")
|
||||
|
||||
set(GEN_RHS "${CMAKE_C_FLAGS_${BUILD_TYPE_UPPER}} ")
|
||||
string(APPEND VERSION_STRING "$<${GEN_CONFIG}:${GEN_RHS}>")
|
||||
|
||||
set(GEN_RHS "$<$<BOOL:$<TARGET_PROPERTY:nvim_bin,INTERPROCEDURAL_OPTIMIZATION_${BUILD_TYPE_UPPER}>>:${CMAKE_C_COMPILE_OPTIONS_IPO}>")
|
||||
string(APPEND VERSION_STRING "$<${GEN_CONFIG}:${GEN_RHS}>")
|
||||
endforeach()
|
||||
|
||||
string(APPEND VERSION_STRING " ")
|
||||
|
||||
function(append_target_expression)
|
||||
cmake_parse_arguments(ARG
|
||||
""
|
||||
"PREFIX;PROPERTY"
|
||||
""
|
||||
${ARGN})
|
||||
|
||||
set(TARGET_EXPRESSION "$<TARGET_PROPERTY:nvim_bin,${ARG_PROPERTY}>")
|
||||
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.15)
|
||||
set(TARGET_EXPRESSION "$<REMOVE_DUPLICATES:${TARGET_EXPRESSION}>")
|
||||
endif()
|
||||
set(TARGET_EXPRESSION "${ARG_PREFIX}$<JOIN:${TARGET_EXPRESSION}, ${ARG_PREFIX}>")
|
||||
|
||||
set(VERSION_STRING "${VERSION_STRING} ${TARGET_EXPRESSION} " PARENT_SCOPE)
|
||||
endfunction()
|
||||
append_target_expression(PROPERTY COMPILE_OPTIONS)
|
||||
append_target_expression(PROPERTY LINK_OPTIONS)
|
||||
append_target_expression(PREFIX "-D" PROPERTY COMPILE_DEFINITIONS)
|
||||
append_target_expression(PREFIX "-I" PROPERTY INCLUDE_DIRECTORIES)
|
||||
string(REPLACE ";" " " VERSION_STRING "${VERSION_STRING}")
|
||||
string(REPLACE " " " " VERSION_STRING "${VERSION_STRING}")
|
||||
|
||||
configure_file(versiondef.h.in auto/versiondef.h.gen)
|
||||
|
||||
file(GENERATE
|
||||
OUTPUT "${PROJECT_BINARY_DIR}/cmake.config/auto/versiondef-$<CONFIG>.h"
|
||||
INPUT "${PROJECT_BINARY_DIR}/cmake.config/auto/versiondef.h.gen")
|
||||
|
||||
configure_file (
|
||||
"${PROJECT_SOURCE_DIR}/cmake.config/pathdef.h.in"
|
||||
"${PROJECT_BINARY_DIR}/cmake.config/auto/pathdef.h"
|
||||
"${PROJECT_SOURCE_DIR}/cmake.config/pathdef.c.in"
|
||||
"${PROJECT_BINARY_DIR}/cmake.config/auto/pathdef.c"
|
||||
ESCAPE_QUOTES)
|
||||
|
@@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
#ifndef AUTO_CONFIG_H
|
||||
#define AUTO_CONFIG_H
|
||||
|
||||
#cmakedefine SIZEOF_INT @SIZEOF_INT@
|
||||
#cmakedefine SIZEOF_INTMAX_T @SIZEOF_INTMAX_T@
|
||||
@@ -26,7 +27,6 @@
|
||||
#cmakedefine HAVE_STRINGS_H
|
||||
#cmakedefine HAVE_STRNCASECMP
|
||||
#cmakedefine HAVE_STRPTIME
|
||||
#cmakedefine HAVE_XATTR
|
||||
#cmakedefine HAVE_SYS_SDT_H
|
||||
#cmakedefine HAVE_SYS_UTSNAME_H
|
||||
#cmakedefine HAVE_SYS_WAIT_H
|
||||
@@ -45,6 +45,10 @@
|
||||
#cmakedefine HAVE_DIRFD_AND_FLOCK
|
||||
#cmakedefine HAVE_FORKPTY
|
||||
|
||||
#ifndef UNIT_TESTING
|
||||
#cmakedefine LOG_LIST_ACTIONS
|
||||
#endif
|
||||
|
||||
#cmakedefine HAVE_BE64TOH
|
||||
#cmakedefine ORDER_BIG_ENDIAN
|
||||
#define ENDIAN_INCLUDE_FILE <@ENDIAN_INCLUDE_FILE@>
|
||||
@@ -52,4 +56,5 @@
|
||||
#cmakedefine HAVE_EXECINFO_BACKTRACE
|
||||
#cmakedefine HAVE_BUILTIN_ADD_OVERFLOW
|
||||
#cmakedefine HAVE_WIMPLICIT_FALLTHROUGH_FLAG
|
||||
#cmakedefine HAVE_BITSCANFORWARD64
|
||||
|
||||
#endif // AUTO_CONFIG_H
|
||||
|
File diff suppressed because it is too large
Load Diff
226
cmake.config/iwyu/gcc.libc.imp
Normal file
226
cmake.config/iwyu/gcc.libc.imp
Normal file
@@ -0,0 +1,226 @@
|
||||
# This was initially taken from the IWYU repository:
|
||||
# github.com/include-what-you-use/include-what-you-use/blob/164b8fe7597805ae55f029ecf6580dc46a74c7ed/gcc.libc.imp
|
||||
# It has useful mappings that are normally enabled by default, but there are
|
||||
# other default mappings that conflict with our builds. The best solution seems
|
||||
# to be to disable all defaults, import the defaults from the IWYU
|
||||
# repo and modify the rules that conflict with our build.
|
||||
#
|
||||
# TODO(dundargoc): Check if there is a way to disable specific builtin maps as
|
||||
# to avoid this file entirely.
|
||||
|
||||
# Mappings for GNU libc
|
||||
# ( cd /usr/include && grep '^ *# *include' {sys/,net/,}* | perl -nle 'm/^([^:]+).*<([^>]+)>/ && print qq@ { include: [ "<$2>", private, "<$1>", public ] },@' | grep bits/ | sort )
|
||||
# When I saw more than one mapping for these, I typically picked
|
||||
# what I thought was the "best" one.
|
||||
[
|
||||
{ include: [ "<bits/a.out.h>", private, "<a.out.h>", public ] },
|
||||
{ include: [ "<bits/auxv.h>", private, "<sys/auxv.h>", public ] },
|
||||
{ include: [ "<bits/byteswap.h>", private, "<byteswap.h>", public ] },
|
||||
{ include: [ "<bits/cmathcalls.h>", private, "<complex.h>", public ] },
|
||||
{ include: [ "<bits/confname.h>", private, "<unistd.h>", private ] },
|
||||
{ include: [ "<bits/dirent.h>", private, "<dirent.h>", public ] },
|
||||
{ include: [ "<bits/dlfcn.h>", private, "<dlfcn.h>", public ] },
|
||||
{ include: [ "<bits/elfclass.h>", private, "<link.h>", public ] },
|
||||
{ include: [ "<bits/endian.h>", private, "<endian.h>", public ] },
|
||||
{ include: [ "<bits/environments.h>", private, "<unistd.h>", private ] },
|
||||
{ include: [ "<bits/epoll.h>", private, "<sys/epoll.h>", public ] },
|
||||
{ include: [ "<bits/errno.h>", private, "<errno.h>", public ] },
|
||||
{ include: [ "<bits/error.h>", private, "<error.h>", public ] },
|
||||
{ include: [ "<bits/eventfd.h>", private, "<sys/eventfd.h>", public ] },
|
||||
{ include: [ "<bits/fcntl.h>", private, "<fcntl.h>", public ] },
|
||||
{ include: [ "<bits/fcntl2.h>", private, "<fcntl.h>", public ] },
|
||||
{ include: [ "<bits/fenv.h>", private, "<fenv.h>", public ] },
|
||||
{ include: [ "<bits/fenvinline.h>", private, "<fenv.h>", public ] },
|
||||
{ include: [ "<bits/huge_val.h>", private, "<math.h>", public ] },
|
||||
{ include: [ "<bits/huge_valf.h>", private, "<math.h>", public ] },
|
||||
{ include: [ "<bits/huge_vall.h>", private, "<math.h>", public ] },
|
||||
{ include: [ "<bits/hwcap.h>", private, "<sys/auxv.h>", public ] },
|
||||
{ include: [ "<bits/inf.h>", private, "<math.h>", public ] },
|
||||
{ include: [ "<bits/inotify.h>", private, "<sys/inotify.h>", public ] },
|
||||
{ include: [ "<bits/ioctl-types.h>", private, "<sys/ioctl.h>", public ] },
|
||||
{ include: [ "<bits/ioctls.h>", private, "<sys/ioctl.h>", public ] },
|
||||
{ include: [ "<bits/ipc.h>", private, "<sys/ipc.h>", public ] },
|
||||
{ include: [ "<bits/ipctypes.h>", private, "<sys/ipc.h>", public ] },
|
||||
{ include: [ "<bits/libio-ldbl.h>", private, "<libio.h>", public ] },
|
||||
{ include: [ "<bits/link.h>", private, "<link.h>", public ] },
|
||||
{ include: [ "<bits/locale.h>", private, "<locale.h>", public ] },
|
||||
{ include: [ "<bits/math-finite.h>", private, "<math.h>", public ] },
|
||||
{ include: [ "<bits/mathcalls.h>", private, "<math.h>", public ] },
|
||||
{ include: [ "<bits/mathdef.h>", private, "<math.h>", public ] },
|
||||
{ include: [ "<bits/mathinline.h>", private, "<math.h>", public ] },
|
||||
{ include: [ "<bits/mman.h>", private, "<sys/mman.h>", public ] },
|
||||
{ include: [ "<bits/mman-shared.h>", private, "<sys/mman.h>", public ] },
|
||||
{ include: [ "<bits/monetary-ldbl.h>", private, "<monetary.h>", public ] },
|
||||
{ include: [ "<bits/mqueue.h>", private, "<mqueue.h>", public ] },
|
||||
{ include: [ "<bits/mqueue2.h>", private, "<mqueue.h>", public ] },
|
||||
{ include: [ "<bits/msq.h>", private, "<sys/msg.h>", public ] },
|
||||
{ include: [ "<bits/nan.h>", private, "<math.h>", public ] },
|
||||
{ include: [ "<bits/netdb.h>", private, "<netdb.h>", private ] },
|
||||
{ include: [ "<bits/param.h>", private, "<sys/param.h>", public ] },
|
||||
{ include: [ "<bits/poll.h>", private, "<sys/poll.h>", private ] },
|
||||
{ include: [ "<bits/poll2.h>", private, "<sys/poll.h>", private ] },
|
||||
{ include: [ "<bits/posix1_lim.h>", private, "<limits.h>", public ] },
|
||||
{ include: [ "<bits/posix2_lim.h>", private, "<limits.h>", public ] },
|
||||
{ include: [ "<bits/posix_opt.h>", private, "<unistd.h>", private ] },
|
||||
{ include: [ "<bits/printf-ldbl.h>", private, "<printf.h>", public ] },
|
||||
{ include: [ "<bits/pthreadtypes.h>", private, "<pthread.h>", private ] },
|
||||
{ include: [ "<bits/resource.h>", private, "<sys/resource.h>", public ] },
|
||||
{ include: [ "<bits/sched.h>", private, "<sched.h>", public ] },
|
||||
{ include: [ "<bits/select.h>", private, "<sys/select.h>", public ] },
|
||||
{ include: [ "<bits/select2.h>", private, "<sys/select.h>", public ] },
|
||||
{ include: [ "<bits/sem.h>", private, "<sys/sem.h>", public ] },
|
||||
{ include: [ "<bits/semaphore.h>", private, "<semaphore.h>", public ] },
|
||||
{ include: [ "<bits/setjmp.h>", private, "<setjmp.h>", public ] },
|
||||
{ include: [ "<bits/setjmp2.h>", private, "<setjmp.h>", public ] },
|
||||
{ include: [ "<bits/shm.h>", private, "<sys/shm.h>", public ] },
|
||||
{ include: [ "<bits/sigaction.h>", private, "<signal.h>", public ] },
|
||||
{ include: [ "<bits/sigcontext.h>", private, "<signal.h>", public ] },
|
||||
{ include: [ "<bits/siginfo.h>", private, "<signal.h>", public ] },
|
||||
{ include: [ "<bits/signum.h>", private, "<signal.h>", public ] },
|
||||
{ include: [ "<bits/sigset.h>", private, "<signal.h>", public ] },
|
||||
{ include: [ "<bits/sigstack.h>", private, "<signal.h>", public ] },
|
||||
{ include: [ "<bits/sigthread.h>", private, "<signal.h>", public ] },
|
||||
{ include: [ "<bits/sockaddr.h>", private, "<sys/un.h>", public ] },
|
||||
{ include: [ "<bits/socket.h>", private, "<sys/socket.h>", private ] },
|
||||
{ include: [ "<bits/socket2.h>", private, "<sys/socket.h>", private ] },
|
||||
{ include: [ "<bits/socket_type.h>", private, "<sys/socket.h>", private ] },
|
||||
{ include: [ "<bits/stab.def>", private, "<stab.h>", public ] },
|
||||
{ include: [ "<bits/stat.h>", private, "<sys/stat.h>", public ] },
|
||||
{ include: [ "<bits/statfs.h>", private, "<sys/statfs.h>", public ] },
|
||||
{ include: [ "<bits/statvfs.h>", private, "<sys/statvfs.h>", public ] },
|
||||
{ include: [ "<bits/stdio-ldbl.h>", private, "<stdio.h>", public ] },
|
||||
{ include: [ "<bits/stdio-lock.h>", private, "<libio.h>", public ] },
|
||||
{ include: [ "<bits/stdio.h>", private, "<stdio.h>", public ] },
|
||||
{ include: [ "<bits/stdio2.h>", private, "<stdio.h>", public ] },
|
||||
{ include: [ "<bits/stdio_lim.h>", private, "<stdio.h>", public ] },
|
||||
{ include: [ "<bits/stdlib-bsearch.h>", private, "<stdlib.h>", public ] },
|
||||
{ include: [ "<bits/stdlib-float.h>", private, "<stdlib.h>", public ] },
|
||||
{ include: [ "<bits/stdlib-ldbl.h>", private, "<stdlib.h>", public ] },
|
||||
{ include: [ "<bits/stdlib.h>", private, "<stdlib.h>", public ] },
|
||||
{ include: [ "<bits/string.h>", private, "<string.h>", public ] },
|
||||
{ include: [ "<bits/string2.h>", private, "<string.h>", public ] },
|
||||
{ include: [ "<bits/string3.h>", private, "<string.h>", public ] },
|
||||
{ include: [ "<bits/stropts.h>", private, "<stropts.h>", public ] },
|
||||
{ include: [ "<bits/struct_stat.h>", private, "<sys/stat.h>", public ] },
|
||||
{ include: [ "<bits/struct_stat.h>", private, "<ftw.h>", public ] },
|
||||
{ include: [ "<bits/sys_errlist.h>", private, "<stdio.h>", public ] },
|
||||
{ include: [ "<bits/syscall.h>", private, "<sys/syscall.h>", public ] },
|
||||
{ include: [ "<bits/sysctl.h>", private, "<sys/sysctl.h>", public ] },
|
||||
{ include: [ "<bits/syslog-ldbl.h>", private, "<sys/syslog.h>", private ] },
|
||||
{ include: [ "<bits/syslog-path.h>", private, "<sys/syslog.h>", private ] },
|
||||
{ include: [ "<bits/syslog.h>", private, "<sys/syslog.h>", private ] },
|
||||
{ include: [ "<bits/termios.h>", private, "<termios.h>", private ] },
|
||||
{ include: [ "<bits/termios-c_lflag.h>", private, "<termios.h>", private ] },
|
||||
{ include: [ "<bits/termios-struct.h>", private, "<termios.h>", private ] },
|
||||
{ include: [ "<bits/termios-tcflow.h>", private, "<termios.h>", private ] },
|
||||
{ include: [ "<bits/time.h>", private, "<time.h>", public ] },
|
||||
{ include: [ "<bits/time.h>", private, "<sys/time.h>", public ] },
|
||||
{ include: [ "<bits/timerfd.h>", private, "<sys/timerfd.h>", public ] },
|
||||
{ include: [ "<bits/timex.h>", private, "<sys/timex.h>", public ] },
|
||||
{ include: [ "<bits/types.h>", private, "<sys/types.h>", public ] },
|
||||
{ include: [ "<bits/types/siginfo_t.h>", private, "<signal.h>", public ] },
|
||||
{ include: [ "<bits/types/siginfo_t.h>", private, "<sys/wait.h>", public ] },
|
||||
{ include: [ "<bits/uio.h>", private, "<sys/uio.h>", public ] },
|
||||
{ include: [ "<bits/unistd.h>", private, "<unistd.h>", private ] },
|
||||
{ include: [ "<bits/ustat.h>", private, "<sys/ustat.h>", private ] },
|
||||
{ include: [ "<bits/utmp.h>", private, "<utmp.h>", public ] },
|
||||
{ include: [ "<bits/utmpx.h>", private, "<utmpx.h>", public ] },
|
||||
{ include: [ "<bits/utsname.h>", private, "<sys/utsname.h>", public ] },
|
||||
{ include: [ "<bits/waitflags.h>", private, "<sys/wait.h>", public ] },
|
||||
{ include: [ "<bits/waitstatus.h>", private, "<sys/wait.h>", public ] },
|
||||
{ include: [ "<bits/wchar-ldbl.h>", private, "<wchar.h>", public ] },
|
||||
{ include: [ "<bits/wchar.h>", private, "<wchar.h>", public ] },
|
||||
{ include: [ "<bits/wchar2.h>", private, "<wchar.h>", public ] },
|
||||
{ include: [ "<bits/wordsize.h>", private, "<limits.h>", public ] },
|
||||
{ include: [ "<bits/xopen_lim.h>", private, "<limits.h>", public ] },
|
||||
{ include: [ "<bits/xtitypes.h>", private, "<stropts.h>", public ] },
|
||||
# Sometimes libc tells you what mapping to do via an '#error':
|
||||
# # error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead."
|
||||
# or
|
||||
# # error "Never include <bits/socket_type.h> directly; use <sys/socket.h> instead."
|
||||
# ( cd /usr/include && grep -R '^ *# *error "Never use\|include' * | perl -nle 'm/<([^>]+).*directly.*<([^>]+)/ && print qq@ { include: [ "<$1>", private, "<$2>", public ] },@' | sort )
|
||||
{ include: [ "<bits/a.out.h>", private, "<a.out.h>", public ] },
|
||||
{ include: [ "<bits/byteswap-16.h>", private, "<byteswap.h>", public ] },
|
||||
{ include: [ "<bits/byteswap.h>", private, "<byteswap.h>", public ] },
|
||||
{ include: [ "<bits/cmathcalls.h>", private, "<complex.h>", public ] },
|
||||
{ include: [ "<bits/confname.h>", private, "<unistd.h>", private ] },
|
||||
{ include: [ "<bits/dirent.h>", private, "<dirent.h>", public ] },
|
||||
{ include: [ "<bits/dlfcn.h>", private, "<dlfcn.h>", public ] },
|
||||
{ include: [ "<bits/elfclass.h>", private, "<link.h>", public ] },
|
||||
{ include: [ "<bits/endian.h>", private, "<endian.h>", public ] },
|
||||
{ include: [ "<bits/epoll.h>", private, "<sys/epoll.h>", public ] },
|
||||
{ include: [ "<bits/eventfd.h>", private, "<sys/eventfd.h>", public ] },
|
||||
{ include: [ "<bits/fcntl-linux.h>", private, "<fcntl.h>", public ] },
|
||||
{ include: [ "<bits/fcntl.h>", private, "<fcntl.h>", public ] },
|
||||
{ include: [ "<bits/fenv.h>", private, "<fenv.h>", public ] },
|
||||
{ include: [ "<bits/huge_val.h>", private, "<math.h>", public ] },
|
||||
{ include: [ "<bits/huge_valf.h>", private, "<math.h>", public ] },
|
||||
{ include: [ "<bits/huge_vall.h>", private, "<math.h>", public ] },
|
||||
{ include: [ "<bits/in.h>", private, "<netinet/in.h>", private ] },
|
||||
{ include: [ "<bits/inf.h>", private, "<math.h>", public ] },
|
||||
{ include: [ "<bits/inotify.h>", private, "<sys/inotify.h>", public ] },
|
||||
{ include: [ "<bits/ioctl-types.h>", private, "<sys/ioctl.h>", public ] },
|
||||
{ include: [ "<bits/ioctls.h>", private, "<sys/ioctl.h>", public ] },
|
||||
{ include: [ "<bits/ipc.h>", private, "<sys/ipc.h>", public ] },
|
||||
{ include: [ "<bits/ipctypes.h>", private, "<sys/ipc.h>", public ] },
|
||||
{ include: [ "<bits/locale.h>", private, "<locale.h>", public ] },
|
||||
{ include: [ "<bits/math-finite.h>", private, "<math.h>", public ] },
|
||||
{ include: [ "<bits/mathdef.h>", private, "<math.h>", public ] },
|
||||
{ include: [ "<bits/mathinline.h>", private, "<math.h>", public ] },
|
||||
{ include: [ "<bits/mman-linux.h>", private, "<sys/mman.h>", public ] },
|
||||
{ include: [ "<bits/mman.h>", private, "<sys/mman.h>", public ] },
|
||||
{ include: [ "<bits/mqueue.h>", private, "<mqueue.h>", public ] },
|
||||
{ include: [ "<bits/msq.h>", private, "<sys/msg.h>", public ] },
|
||||
{ include: [ "<bits/nan.h>", private, "<math.h>", public ] },
|
||||
{ include: [ "<bits/param.h>", private, "<sys/param.h>", public ] },
|
||||
{ include: [ "<bits/poll.h>", private, "<sys/poll.h>", private ] },
|
||||
{ include: [ "<bits/predefs.h>", private, "<features.h>", public ] },
|
||||
{ include: [ "<bits/resource.h>", private, "<sys/resource.h>", public ] },
|
||||
{ include: [ "<bits/select.h>", private, "<sys/select.h>", public ] },
|
||||
{ include: [ "<bits/semaphore.h>", private, "<semaphore.h>", public ] },
|
||||
{ include: [ "<bits/sigcontext.h>", private, "<signal.h>", public ] },
|
||||
{ include: [ "<bits/signalfd.h>", private, "<sys/signalfd.h>", public ] },
|
||||
{ include: [ "<bits/stdlib-float.h>", private, "<stdlib.h>", public ] },
|
||||
{ include: [ "<bits/string.h>", private, "<string.h>", public ] },
|
||||
{ include: [ "<bits/string2.h>", private, "<string.h>", public ] },
|
||||
{ include: [ "<bits/string3.h>", private, "<string.h>", public ] },
|
||||
{ include: [ "<bits/timerfd.h>", private, "<sys/timerfd.h>", public ] },
|
||||
{ include: [ "<bits/typesizes.h>", private, "<sys/types.h>", public ] },
|
||||
# Top-level #includes that just forward to another file:
|
||||
# $ for i in /usr/include/*; do [ -f $i ] } && [ `wc -l < $i` = 1 ] } && echo $i; done
|
||||
# (poll.h, syscall.h, syslog.h, ustat.h, wait.h).
|
||||
# For each file, I looked at the list of canonical header files --
|
||||
# http://www.opengroup.org/onlinepubs/9699919799/idx/head.html --
|
||||
# to decide which of the two files is canonical. If neither is
|
||||
# on the POSIX.1 1998 list, I just choose the top-level one.
|
||||
{ include: [ "<sys/poll.h>", private, "<poll.h>", public ] },
|
||||
{ include: [ "<sys/syslog.h>", private, "<syslog.h>", public ] },
|
||||
{ include: [ "<sys/ustat.h>", private, "<ustat.h>", public ] },
|
||||
{ include: [ "<wait.h>", private, "<sys/wait.h>", public ] },
|
||||
# These are all files in bits/ that delegate to asm/ and linux/ to
|
||||
# do all (or lots) of the work. Note these are private->private.
|
||||
# $ for i in /usr/include/bits/*; do for dir in asm linux; do grep -H -e $dir/`basename $i` $i; done; done
|
||||
{ include: [ "<linux/errno.h>", private, "<bits/errno.h>", private ] },
|
||||
{ include: [ "<asm/ioctls.h>", private, "<bits/ioctls.h>", private ] },
|
||||
{ include: [ "<asm/socket.h>", private, "<bits/socket.h>", private ] },
|
||||
{ include: [ "<linux/socket.h>", private, "<bits/socket.h>", private ] },
|
||||
# Some asm files have 32- and 64-bit variants:
|
||||
# $ ls /usr/include/asm/*_{32,64}.h
|
||||
{ include: [ "<asm/posix_types_32.h>", private, "<asm/posix_types.h>", public ] },
|
||||
{ include: [ "<asm/posix_types_64.h>", private, "<asm/posix_types.h>", public ] },
|
||||
{ include: [ "<asm/unistd_32.h>", private, "<asm/unistd.h>", private ] },
|
||||
{ include: [ "<asm/unistd_64.h>", private, "<asm/unistd.h>", private ] },
|
||||
# I don't know what grep would have found these. I found them
|
||||
# via user report.
|
||||
{ include: [ "<asm/errno.h>", private, "<errno.h>", public ] },
|
||||
{ include: [ "<asm/errno-base.h>", private, "<errno.h>", public ] },
|
||||
{ include: [ "<asm/ptrace-abi.h>", private, "<asm/ptrace.h>", public ] },
|
||||
{ include: [ "<asm/unistd.h>", private, "<sys/syscall.h>", public ] },
|
||||
{ include: [ "<linux/limits.h>", private, "<limits.h>", public ] }, # PATH_MAX
|
||||
{ include: [ "<linux/prctl.h>", private, "<sys/prctl.h>", public ] },
|
||||
{ include: [ "<sys/ucontext.h>", private, "<ucontext.h>", public ] },
|
||||
# Exports guaranteed by the C standard
|
||||
{ include: [ "<stdint.h>", public, "<inttypes.h>", public ] },
|
||||
]
|
||||
|
||||
# vim: set ft=toml:
|
305
cmake.config/iwyu/gcc.symbols.imp
Normal file
305
cmake.config/iwyu/gcc.symbols.imp
Normal file
@@ -0,0 +1,305 @@
|
||||
# This was initially taken from the IWYU repository:
|
||||
# github.com/include-what-you-use/include-what-you-use/blob/164b8fe7597805ae55f029ecf6580dc46a74c7ed/gcc.symbols.imp
|
||||
# It has useful mappings that are normally enabled by default, but there are
|
||||
# other default mappings that conflict with our builds. The best solution seems
|
||||
# to be to disable all defaults, import the defaults from the IWYU repo and
|
||||
# modify the rules that conflict with our build.
|
||||
#
|
||||
# TODO(dundargoc): Check if there is a way to disable specific builtin maps as
|
||||
# to avoid this file entirely.
|
||||
|
||||
# For library symbols that can be defined in more than one header
|
||||
# file, maps from symbol-name to legitimate header files.
|
||||
# This list was generated via
|
||||
# grep -R '__.*_defined' /usr/include | perl -nle 'm,/usr/include/([^:]*):#\s*\S+ __(.*)_defined, and print qq@ { symbol: [ "$2", public, "<$1>", public ] },@' | sort -u
|
||||
# I ignored all entries that only appeared once on the list (eg uint32_t).
|
||||
# I then added in NULL, which according to [diff.null] C.2.2.3, can
|
||||
# be defined in <clocale>, <cstddef>, <cstdio>, <cstdlib>,
|
||||
# <cstring>, <ctime>, or <cwchar>. We also allow their C
|
||||
# equivalents.
|
||||
# In each case, I ordered them so <sys/types.h> was first, if it was
|
||||
# an option for this type. That's the preferred #include all else
|
||||
# equal. The same goes for <stdint.h>. The visibility on the
|
||||
# symbol-name is ignored; by convention we always set it to private.
|
||||
[
|
||||
{ symbol: [ "aiocb", private, "<aio.h>", public ] },
|
||||
{ symbol: [ "blkcnt_t", private, "<sys/types.h>", public ] },
|
||||
{ symbol: [ "blkcnt_t", private, "<sys/stat.h>", public ] },
|
||||
{ symbol: [ "blksize_t", private, "<sys/types.h>", public ] },
|
||||
{ symbol: [ "blksize_t", private, "<sys/stat.h>", public ] },
|
||||
{ symbol: [ "cc_t", private, "<termios.h>", private ] },
|
||||
{ symbol: [ "clock_t", private, "<sys/types.h>", public ] },
|
||||
{ symbol: [ "clock_t", private, "<sys/time.h>", public ] },
|
||||
{ symbol: [ "clock_t", private, "<time.h>", public ] },
|
||||
{ symbol: [ "clockid_t", private, "<sys/types.h>", public ] },
|
||||
{ symbol: [ "clockid_t", private, "<time.h>", public ] },
|
||||
{ symbol: [ "daddr_t", private, "<sys/types.h>", public ] },
|
||||
{ symbol: [ "daddr_t", private, "<rpc/types.h>", public ] },
|
||||
{ symbol: [ "dev_t", private, "<sys/types.h>", public ] },
|
||||
{ symbol: [ "dev_t", private, "<sys/stat.h>", public ] },
|
||||
{ symbol: [ "div_t", private, "<stdlib.h>", public ] },
|
||||
{ symbol: [ "double_t", private, "<math.h>", public ] },
|
||||
{ symbol: [ "error_t", private, "<errno.h>", public ] },
|
||||
{ symbol: [ "error_t", private, "<argp.h>", public ] },
|
||||
{ symbol: [ "error_t", private, "<argz.h>", public ] },
|
||||
{ symbol: [ "fd_set", private, "<sys/select.h>", public ] },
|
||||
{ symbol: [ "fd_set", private, "<sys/time.h>", public ] },
|
||||
{ symbol: [ "fenv_t", private, "<fenv.h>", public ] },
|
||||
{ symbol: [ "fexcept_t", private, "<fenv.h>", public ] },
|
||||
{ symbol: [ "FILE", private, "<stdio.h>", public ] },
|
||||
{ symbol: [ "FILE", private, "<wchar.h>", public ] },
|
||||
{ symbol: [ "float_t", private, "<math.h>", public ] },
|
||||
{ symbol: [ "fsblkcnt_t", private, "<sys/types.h>", public ] },
|
||||
{ symbol: [ "fsblkcnt_t", private, "<sys/statvfs.h>", public ] },
|
||||
{ symbol: [ "fsfilcnt_t", private, "<sys/types.h>", public ] },
|
||||
{ symbol: [ "fsfilcnt_t", private, "<sys/statvfs.h>", public ] },
|
||||
{ symbol: [ "getopt", private, "<unistd.h>", private ] },
|
||||
{ symbol: [ "gid_t", private, "<sys/types.h>", public ] },
|
||||
{ symbol: [ "gid_t", private, "<grp.h>", public ] },
|
||||
{ symbol: [ "gid_t", private, "<pwd.h>", public ] },
|
||||
{ symbol: [ "gid_t", private, "<signal.h>", public ] },
|
||||
{ symbol: [ "gid_t", private, "<stropts.h>", public ] },
|
||||
{ symbol: [ "gid_t", private, "<sys/ipc.h>", public ] },
|
||||
{ symbol: [ "gid_t", private, "<sys/stat.h>", public ] },
|
||||
{ symbol: [ "gid_t", private, "<unistd.h>", private ] },
|
||||
{ symbol: [ "htonl", private, "<arpa/inet.h>", private ] },
|
||||
{ symbol: [ "htons", private, "<arpa/inet.h>", private ] },
|
||||
{ symbol: [ "id_t", private, "<sys/types.h>", public ] },
|
||||
{ symbol: [ "id_t", private, "<sys/resource.h>", public ] },
|
||||
{ symbol: [ "imaxdiv_t", private, "<inttypes.h>", public ] },
|
||||
{ symbol: [ "intmax_t", private, "<stdint.h>", public ] },
|
||||
{ symbol: [ "uintmax_t", private, "<stdint.h>", public ] },
|
||||
{ symbol: [ "ino64_t", private, "<sys/types.h>", public ] },
|
||||
{ symbol: [ "ino64_t", private, "<dirent.h>", public ] },
|
||||
{ symbol: [ "ino_t", private, "<sys/types.h>", public ] },
|
||||
{ symbol: [ "ino_t", private, "<dirent.h>", public ] },
|
||||
{ symbol: [ "ino_t", private, "<sys/stat.h>", public ] },
|
||||
{ symbol: [ "int8_t", private, "<stdint.h>", public ] },
|
||||
{ symbol: [ "int16_t", private, "<stdint.h>", public ] },
|
||||
{ symbol: [ "int32_t", private, "<stdint.h>", public ] },
|
||||
{ symbol: [ "int64_t", private, "<stdint.h>", public ] },
|
||||
{ symbol: [ "uint8_t", private, "<stdint.h>", public ] },
|
||||
{ symbol: [ "uint16_t", private, "<stdint.h>", public ] },
|
||||
{ symbol: [ "uint32_t", private, "<stdint.h>", public ] },
|
||||
{ symbol: [ "uint64_t", private, "<stdint.h>", public ] },
|
||||
{ symbol: [ "intptr_t", private, "<stdint.h>", public ] },
|
||||
{ symbol: [ "uintptr_t", private, "<stdint.h>", public ] },
|
||||
{ symbol: [ "iovec", private, "<sys/uio.h>", public ] },
|
||||
{ symbol: [ "iovec", private, "<sys/socket.h>", private ] },
|
||||
{ symbol: [ "itimerspec", private, "<time.h>", public ] },
|
||||
{ symbol: [ "itimerspec", private, "<sys/timerfd.h>", public ] },
|
||||
{ symbol: [ "key_t", private, "<sys/types.h>", public ] },
|
||||
{ symbol: [ "key_t", private, "<sys/ipc.h>", public ] },
|
||||
{ symbol: [ "lconv", private, "<locale.h>", public ] },
|
||||
{ symbol: [ "ldiv_t", private, "<stdlib.h>", public ] },
|
||||
{ symbol: [ "lldiv_t", private, "<stdlib.h>", public ] },
|
||||
{ symbol: [ "max_align_t", private, "<stddef.h>", public ] },
|
||||
{ symbol: [ "mode_t", private, "<sys/types.h>", public ] },
|
||||
{ symbol: [ "mode_t", private, "<fcntl.h>", public ] },
|
||||
{ symbol: [ "mode_t", private, "<ndbm.h>", public ] },
|
||||
{ symbol: [ "mode_t", private, "<spawn.h>", public ] },
|
||||
{ symbol: [ "mode_t", private, "<sys/ipc.h>", public ] },
|
||||
{ symbol: [ "mode_t", private, "<sys/mman.h>", public ] },
|
||||
{ symbol: [ "mode_t", private, "<sys/stat.h>", public ] },
|
||||
{ symbol: [ "nlink_t", private, "<sys/types.h>", public ] },
|
||||
{ symbol: [ "nlink_t", private, "<sys/stat.h>", public ] },
|
||||
{ symbol: [ "ntohl", private, "<arpa/inet.h>", private ] },
|
||||
{ symbol: [ "ntohs", private, "<arpa/inet.h>", private ] },
|
||||
{ symbol: [ "off64_t", private, "<sys/types.h>", public ] },
|
||||
{ symbol: [ "off64_t", private, "<unistd.h>", private ] },
|
||||
{ symbol: [ "off_t", private, "<sys/types.h>", public ] },
|
||||
{ symbol: [ "off_t", private, "<aio.h>", public ] },
|
||||
{ symbol: [ "off_t", private, "<fcntl.h>", public ] },
|
||||
{ symbol: [ "off_t", private, "<stdio.h>", public ] },
|
||||
{ symbol: [ "off_t", private, "<sys/mman.h>", public ] },
|
||||
{ symbol: [ "off_t", private, "<sys/stat.h>", public ] },
|
||||
{ symbol: [ "off_t", private, "<unistd.h>", private ] },
|
||||
{ symbol: [ "optarg", private, "<unistd.h>", private ] },
|
||||
{ symbol: [ "opterr", private, "<unistd.h>", private ] },
|
||||
{ symbol: [ "optind", private, "<unistd.h>", private ] },
|
||||
{ symbol: [ "optopt", private, "<unistd.h>", private ] },
|
||||
{ symbol: [ "pid_t", private, "<sys/types.h>", public ] },
|
||||
{ symbol: [ "pid_t", private, "<fcntl.h>", public ] },
|
||||
{ symbol: [ "pid_t", private, "<sched.h>", public ] },
|
||||
{ symbol: [ "pid_t", private, "<signal.h>", public ] },
|
||||
{ symbol: [ "pid_t", private, "<spawn.h>", public ] },
|
||||
{ symbol: [ "pid_t", private, "<sys/msg.h>", public ] },
|
||||
{ symbol: [ "pid_t", private, "<sys/sem.h>", public ] },
|
||||
{ symbol: [ "pid_t", private, "<sys/shm.h>", public ] },
|
||||
{ symbol: [ "pid_t", private, "<sys/wait.h>", public ] },
|
||||
{ symbol: [ "pid_t", private, "<termios.h>", private ] },
|
||||
{ symbol: [ "pid_t", private, "<time.h>", public ] },
|
||||
{ symbol: [ "pid_t", private, "<unistd.h>", private ] },
|
||||
{ symbol: [ "pid_t", private, "<utmpx.h>", public ] },
|
||||
{ symbol: [ "ptrdiff_t", private, "<stddef.h>", public ] },
|
||||
{ symbol: [ "regex_t", private, "<regex.h>", public ] },
|
||||
{ symbol: [ "regmatch_t", private, "<regex.h>", public ] },
|
||||
{ symbol: [ "regoff_t", private, "<regex.h>", public ] },
|
||||
{ symbol: [ "sigevent", private, "<signal.h>", public ] },
|
||||
{ symbol: [ "sigevent", private, "<aio.h>", public ] },
|
||||
{ symbol: [ "sigevent", private, "<mqueue.h>", public ] },
|
||||
{ symbol: [ "sigevent", private, "<time.h>", public ] },
|
||||
{ symbol: [ "siginfo_t", private, "<signal.h>", public ] },
|
||||
{ symbol: [ "siginfo_t", private, "<sys/wait.h>", public ] },
|
||||
{ symbol: [ "sigset_t", private, "<signal.h>", public ] },
|
||||
{ symbol: [ "sigset_t", private, "<spawn.h>", public ] },
|
||||
{ symbol: [ "sigset_t", private, "<sys/select.h>", public ] },
|
||||
{ symbol: [ "sigval", private, "<signal.h>", public ] },
|
||||
{ symbol: [ "sockaddr", private, "<sys/socket.h>", private ] },
|
||||
{ symbol: [ "socklen_t", private, "<sys/socket.h>", private ] },
|
||||
{ symbol: [ "socklen_t", private, "<netdb.h>", private ] },
|
||||
{ symbol: [ "ssize_t", private, "<sys/types.h>", public ] },
|
||||
{ symbol: [ "ssize_t", private, "<aio.h>", public ] },
|
||||
{ symbol: [ "ssize_t", private, "<monetary.h>", public ] },
|
||||
{ symbol: [ "ssize_t", private, "<mqueue.h>", public ] },
|
||||
{ symbol: [ "ssize_t", private, "<stdio.h>", public ] },
|
||||
{ symbol: [ "ssize_t", private, "<sys/msg.h>", public ] },
|
||||
{ symbol: [ "ssize_t", private, "<sys/socket.h>", private ] },
|
||||
{ symbol: [ "ssize_t", private, "<sys/uio.h>", public ] },
|
||||
{ symbol: [ "ssize_t", private, "<unistd.h>", private ] },
|
||||
{ symbol: [ "stat", private, "<sys/stat.h>", public ] },
|
||||
{ symbol: [ "stat", private, "<ftw.h>", public ] },
|
||||
{ symbol: [ "suseconds_t", private, "<sys/types.h>", public ] },
|
||||
{ symbol: [ "suseconds_t", private, "<sys/select.h>", public ] },
|
||||
{ symbol: [ "suseconds_t", private, "<sys/time.h>", public ] },
|
||||
{ symbol: [ "time_t", private, "<time.h>", public ] },
|
||||
{ symbol: [ "time_t", private, "<sched.h>", public ] },
|
||||
{ symbol: [ "time_t", private, "<sys/msg.h>", public ] },
|
||||
{ symbol: [ "time_t", private, "<sys/select.h>", public ] },
|
||||
{ symbol: [ "time_t", private, "<sys/sem.h>", public ] },
|
||||
{ symbol: [ "time_t", private, "<sys/shm.h>", public ] },
|
||||
{ symbol: [ "time_t", private, "<sys/stat.h>", public ] },
|
||||
{ symbol: [ "time_t", private, "<sys/time.h>", public ] },
|
||||
{ symbol: [ "time_t", private, "<sys/types.h>", public ] },
|
||||
{ symbol: [ "time_t", private, "<utime.h>", public ] },
|
||||
{ symbol: [ "timer_t", private, "<sys/types.h>", public ] },
|
||||
{ symbol: [ "timer_t", private, "<time.h>", public ] },
|
||||
{ symbol: [ "timespec", private, "<time.h>", public ] },
|
||||
{ symbol: [ "timespec", private, "<aio.h>", public ] },
|
||||
{ symbol: [ "timespec", private, "<mqueue.h>", public ] },
|
||||
{ symbol: [ "timespec", private, "<sched.h>", public ] },
|
||||
{ symbol: [ "timespec", private, "<signal.h>", public ] },
|
||||
{ symbol: [ "timespec", private, "<sys/select.h>", public ] },
|
||||
{ symbol: [ "timespec", private, "<sys/stat.h>", public ] },
|
||||
{ symbol: [ "timeval", private, "<sys/time.h>", public ] },
|
||||
{ symbol: [ "timeval", private, "<sys/resource.h>", public ] },
|
||||
{ symbol: [ "timeval", private, "<sys/select.h>", public ] },
|
||||
{ symbol: [ "timeval", private, "<utmpx.h>", public ] },
|
||||
{ symbol: [ "tm", private, "<time.h>", public ] },
|
||||
{ symbol: [ "u_char", private, "<sys/types.h>", public ] },
|
||||
{ symbol: [ "u_char", private, "<rpc/types.h>", public ] },
|
||||
{ symbol: [ "uid_t", private, "<sys/types.h>", public ] },
|
||||
{ symbol: [ "uid_t", private, "<pwd.h>", public ] },
|
||||
{ symbol: [ "uid_t", private, "<signal.h>", public ] },
|
||||
{ symbol: [ "uid_t", private, "<stropts.h>", public ] },
|
||||
{ symbol: [ "uid_t", private, "<sys/ipc.h>", public ] },
|
||||
{ symbol: [ "uid_t", private, "<sys/stat.h>", public ] },
|
||||
{ symbol: [ "uid_t", private, "<unistd.h>", private ] },
|
||||
{ symbol: [ "useconds_t", private, "<sys/types.h>", public ] },
|
||||
{ symbol: [ "useconds_t", private, "<unistd.h>", private ] },
|
||||
{ symbol: [ "wchar_t", private, "<stddef.h>", public ] },
|
||||
{ symbol: [ "wchar_t", private, "<stdlib.h>", public ] },
|
||||
{ symbol: [ "size_t", private, "<stddef.h>", public ] },
|
||||
{ symbol: [ "size_t", private, "<aio.h>", public ] },
|
||||
{ symbol: [ "size_t", private, "<glob.h>", public ] },
|
||||
{ symbol: [ "size_t", private, "<grp.h>", public ] },
|
||||
{ symbol: [ "size_t", private, "<iconv.h>", public ] },
|
||||
{ symbol: [ "size_t", private, "<monetary.h>", public ] },
|
||||
{ symbol: [ "size_t", private, "<mqueue.h>", public ] },
|
||||
{ symbol: [ "size_t", private, "<ndbm.h>", public ] },
|
||||
{ symbol: [ "size_t", private, "<pwd.h>", public ] },
|
||||
{ symbol: [ "size_t", private, "<regex.h>", public ] },
|
||||
{ symbol: [ "size_t", private, "<search.h>", public ] },
|
||||
{ symbol: [ "size_t", private, "<signal.h>", public ] },
|
||||
{ symbol: [ "size_t", private, "<stdio.h>", public ] },
|
||||
{ symbol: [ "size_t", private, "<stdlib.h>", public ] },
|
||||
{ symbol: [ "size_t", private, "<string.h>", public ] },
|
||||
{ symbol: [ "size_t", private, "<strings.h>", public ] },
|
||||
{ symbol: [ "size_t", private, "<sys/mman.h>", public ] },
|
||||
{ symbol: [ "size_t", private, "<sys/msg.h>", public ] },
|
||||
{ symbol: [ "size_t", private, "<sys/sem.h>", public ] },
|
||||
{ symbol: [ "size_t", private, "<sys/shm.h>", public ] },
|
||||
{ symbol: [ "size_t", private, "<sys/socket.h>", private ] },
|
||||
{ symbol: [ "size_t", private, "<sys/types.h>", public ] },
|
||||
{ symbol: [ "size_t", private, "<sys/uio.h>", public ] },
|
||||
{ symbol: [ "size_t", private, "<time.h>", public ] },
|
||||
{ symbol: [ "size_t", private, "<uchar.h>", public ] },
|
||||
{ symbol: [ "size_t", private, "<unistd.h>", private ] },
|
||||
{ symbol: [ "size_t", private, "<wchar.h>", public ] },
|
||||
{ symbol: [ "size_t", private, "<wordexp.h>", public ] },
|
||||
# Macros that can be defined in more than one file, don't have the
|
||||
# same __foo_defined guard that other types do, so the grep above
|
||||
# doesn't discover them. Until I figure out a better way, I just
|
||||
# add them in by hand as I discover them.
|
||||
{ symbol: [ "EOF", private, "<stdio.h>", public ] },
|
||||
{ symbol: [ "EOF", private, "<libio.h>", public ] },
|
||||
{ symbol: [ "FILE", private, "<stdio.h>", public ] },
|
||||
{ symbol: [ "MAP_POPULATE", private, "<sys/mman.h>", public ] },
|
||||
{ symbol: [ "MAP_POPULATE", private, "<linux/mman.h>", public ] },
|
||||
{ symbol: [ "MAP_STACK", private, "<sys/mman.h>", public ] },
|
||||
{ symbol: [ "MAP_STACK", private, "<linux/mman.h>", public ] },
|
||||
{ symbol: [ "MAXHOSTNAMELEN", private, "<sys/param.h>", public ] },
|
||||
{ symbol: [ "MAXHOSTNAMELEN", private, "<protocols/timed.h>", public ] },
|
||||
{ symbol: [ "SIGABRT", private, "<signal.h>", public ] },
|
||||
{ symbol: [ "SIGCHLD", private, "<signal.h>", public ] },
|
||||
{ symbol: [ "SIGCHLD", private, "<linux/signal.h>", public ] },
|
||||
{ symbol: [ "va_list", private, "<stdarg.h>", public ] },
|
||||
{ symbol: [ "va_list", private, "<stdio.h>", public ] },
|
||||
{ symbol: [ "va_list", private, "<wchar.h>", public ] },
|
||||
# These are symbols that could be defined in either stdlib.h or
|
||||
# malloc.h, but we always want the stdlib location.
|
||||
{ symbol: [ "malloc", private, "<stdlib.h>", public ] },
|
||||
{ symbol: [ "calloc", private, "<stdlib.h>", public ] },
|
||||
{ symbol: [ "realloc", private, "<stdlib.h>", public ] },
|
||||
{ symbol: [ "free", private, "<stdlib.h>", public ] },
|
||||
# Entries for NULL
|
||||
{ symbol: [ "NULL", private, "<stddef.h>", public ] }, # 'canonical' location for NULL
|
||||
{ symbol: [ "NULL", private, "<clocale>", public ] },
|
||||
{ symbol: [ "NULL", private, "<cstddef>", public ] },
|
||||
{ symbol: [ "NULL", private, "<cstdio>", public ] },
|
||||
{ symbol: [ "NULL", private, "<cstdlib>", public ] },
|
||||
{ symbol: [ "NULL", private, "<cstring>", public ] },
|
||||
{ symbol: [ "NULL", private, "<ctime>", public ] },
|
||||
{ symbol: [ "NULL", private, "<cwchar>", public ] },
|
||||
{ symbol: [ "NULL", private, "<locale.h>", public ] },
|
||||
{ symbol: [ "NULL", private, "<stdio.h>", public ] },
|
||||
{ symbol: [ "NULL", private, "<stdlib.h>", public ] },
|
||||
{ symbol: [ "NULL", private, "<string.h>", public ] },
|
||||
{ symbol: [ "NULL", private, "<time.h>", public ] },
|
||||
{ symbol: [ "NULL", private, "<unistd.h>", private ] },
|
||||
{ symbol: [ "NULL", private, "<wchar.h>", public ] },
|
||||
|
||||
# Kludge time: almost all STL types take an allocator, but they
|
||||
# almost always use the default value. Usually we detect that
|
||||
# and don't try to do IWYU, but sometimes it passes through.
|
||||
# For instance, when adding two strings, we end up calling
|
||||
# template<_CharT,_Traits,_Alloc> ... operator+(
|
||||
# basic_string<_CharT,_Traits,_Alloc>, ...)
|
||||
# These look like normal template args to us, so we see they're
|
||||
# used and declare an iwyu dependency, even though we don't need
|
||||
# to #include the traits or alloc type ourselves. The surest way
|
||||
# to deal with this is to just say that everyone provides
|
||||
# std::allocator. We can add more here at need.
|
||||
{ symbol: [ "std::allocator", private, "<memory>", public ] },
|
||||
{ symbol: [ "std::allocator", private, "<string>", public ] },
|
||||
{ symbol: [ "std::allocator", private, "<vector>", public ] },
|
||||
{ symbol: [ "std::allocator", private, "<map>", public ] },
|
||||
{ symbol: [ "std::allocator", private, "<set>", public ] },
|
||||
# A similar kludge for std::char_traits. basic_string,
|
||||
# basic_ostream and basic_istream have this as a default template
|
||||
# argument, and sometimes it bleeds through when clang desugars the
|
||||
# string/ostream/istream type.
|
||||
{ symbol: [ "std::char_traits", private, "<string>", public ] },
|
||||
{ symbol: [ "std::char_traits", private, "<ostream>", public ] },
|
||||
{ symbol: [ "std::char_traits", private, "<istream>", public ] },
|
||||
|
||||
{ symbol: [ "std::size_t", private, "<cstddef>", public ] },
|
||||
{ symbol: [ "std::size_t", private, "<cstdio>", public ] },
|
||||
{ symbol: [ "std::size_t", private, "<cstdlib>", public ] },
|
||||
{ symbol: [ "std::size_t", private, "<cstring>", public ] },
|
||||
{ symbol: [ "std::size_t", private, "<ctime>", public ] },
|
||||
{ symbol: [ "std::size_t", private, "<cuchar>", public ] },
|
||||
{ symbol: [ "std::size_t", private, "<cwchar>", public ] }
|
||||
]
|
||||
|
||||
# vim: set ft=toml:
|
@@ -1,30 +1,238 @@
|
||||
[
|
||||
{ ref: "c99.imp" },
|
||||
{ ref: "posix.imp" },
|
||||
# Generated to normal headers: header.h.generated.h -> nvim/header.h
|
||||
{ include: [ '"api/autocmd.h.generated.h"', private, '"nvim/api/autocmd.h"', public ] },
|
||||
{ include: [ '"api/buffer.h.generated.h"', private, '"nvim/api/buffer.h"', public ] },
|
||||
{ include: [ '"api/command.h.generated.h"', private, '"nvim/api/command.h"', public ] },
|
||||
{ include: [ '"api/deprecated.h.generated.h"', private, '"nvim/api/deprecated.h"', public ] },
|
||||
{ include: [ '"api/extmark.h.generated.h"', private, '"nvim/api/extmark.h"', public ] },
|
||||
{ include: [ '"api/options.h.generated.h"', private, '"nvim/api/options.h"', public ] },
|
||||
{ include: [ '"api/private/converter.h.generated.h"', private, '"nvim/api/private/converter.h"', public ] },
|
||||
{ include: [ '"api/private/dispatch.h.generated.h"', private, '"nvim/api/private/dispatch.h"', public ] },
|
||||
{ include: [ '"api/private/helpers.h.generated.h"', private, '"nvim/api/private/helpers.h"', public ] },
|
||||
{ include: [ '"api/tabpage.h.generated.h"', private, '"nvim/api/tabpage.h"', public ] },
|
||||
{ include: [ '"api/ui.h.generated.h"', private, '"nvim/api/ui.h"', public ] },
|
||||
{ include: [ '"api/vim.h.generated.h"', private, '"nvim/api/vim.h"', public ] },
|
||||
{ include: [ '"api/vimscript.h.generated.h"', private, '"nvim/api/vimscript.h"', public ] },
|
||||
{ include: [ '"api/win_config.h.generated.h"', private, '"nvim/api/win_config.h"', public ] },
|
||||
{ include: [ '"api/window.h.generated.h"', private, '"nvim/api/window.h"', public ] },
|
||||
{ include: [ '"arabic.h.generated.h"', private, '"nvim/arabic.h"', public ] },
|
||||
{ include: [ '"arglist.h.generated.h"', private, '"nvim/arglist.h"', public ] },
|
||||
{ include: [ '"autocmd.h.generated.h"', private, '"nvim/autocmd.h"', public ] },
|
||||
{ include: [ '"buffer.h.generated.h"', private, '"nvim/buffer.h"', public ] },
|
||||
{ include: [ '"buffer_updates.h.generated.h"', private, '"nvim/buffer_updates.h"', public ] },
|
||||
{ include: [ '"change.h.generated.h"', private, '"nvim/change.h"', public ] },
|
||||
{ include: [ '"channel.h.generated.h"', private, '"nvim/channel.h"', public ] },
|
||||
{ include: [ '"charset.h.generated.h"', private, '"nvim/charset.h"', public ] },
|
||||
{ include: [ '"cmdexpand.h.generated.h"', private, '"nvim/cmdexpand.h"', public ] },
|
||||
{ include: [ '"cmdhist.h.generated.h"', private, '"nvim/cmdhist.h"', public ] },
|
||||
{ include: [ '"context.h.generated.h"', private, '"nvim/context.h"', public ] },
|
||||
{ include: [ '"cursor.h.generated.h"', private, '"nvim/cursor.h"', public ] },
|
||||
{ include: [ '"cursor_shape.h.generated.h"', private, '"nvim/cursor_shape.h"', public ] },
|
||||
{ include: [ '"debugger.h.generated.h"', private, '"nvim/debugger.h"', public ] },
|
||||
{ include: [ '"decoration.h.generated.h"', private, '"nvim/decoration.h"', public ] },
|
||||
{ include: [ '"decoration_provider.h.generated.h"', private, '"nvim/decoration_provider.h"', public ] },
|
||||
{ include: [ '"diff.h.generated.h"', private, '"nvim/diff.h"', public ] },
|
||||
{ include: [ '"digraph.h.generated.h"', private, '"nvim/digraph.h"', public ] },
|
||||
{ include: [ '"drawline.h.generated.h"', private, '"nvim/drawline.h"', public ] },
|
||||
{ include: [ '"drawscreen.h.generated.h"', private, '"nvim/drawscreen.h"', public ] },
|
||||
{ include: [ '"edit.h.generated.h"', private, '"nvim/edit.h"', public ] },
|
||||
{ include: [ '"eval.h.generated.h"', private, '"nvim/eval.h"', public ] },
|
||||
{ include: [ '"eval/buffer.h.generated.h"', private, '"nvim/eval/buffer.h"', public ] },
|
||||
{ include: [ '"eval/decode.h.generated.h"', private, '"nvim/eval/decode.h"', public ] },
|
||||
{ include: [ '"eval/encode.h.generated.h"', private, '"nvim/eval/encode.h"', public ] },
|
||||
{ include: [ '"eval/executor.h.generated.h"', private, '"nvim/eval/executor.h"', public ] },
|
||||
{ include: [ '"eval/funcs.h.generated.h"', private, '"nvim/eval/funcs.h"', public ] },
|
||||
{ include: [ '"eval/typval.h.generated.h"', private, '"nvim/eval/typval.h"', public ] },
|
||||
{ include: [ '"eval/userfunc.h.generated.h"', private, '"nvim/eval/userfunc.h"', public ] },
|
||||
{ include: [ '"eval/vars.h.generated.h"', private, '"nvim/eval/vars.h"', public ] },
|
||||
{ include: [ '"eval/window.h.generated.h"', private, '"nvim/eval/window.h"', public ] },
|
||||
{ include: [ '"event/libuv_process.h.generated.h"', private, '"nvim/event/libuv_process.h"', public ] },
|
||||
{ include: [ '"event/loop.h.generated.h"', private, '"nvim/event/loop.h"', public ] },
|
||||
{ include: [ '"event/multiqueue.h.generated.h"', private, '"nvim/event/multiqueue.h"', public ] },
|
||||
{ include: [ '"event/process.h.generated.h"', private, '"nvim/event/process.h"', public ] },
|
||||
{ include: [ '"event/rstream.h.generated.h"', private, '"nvim/event/rstream.h"', public ] },
|
||||
{ include: [ '"event/signal.h.generated.h"', private, '"nvim/event/signal.h"', public ] },
|
||||
{ include: [ '"event/socket.h.generated.h"', private, '"nvim/event/socket.h"', public ] },
|
||||
{ include: [ '"event/stream.h.generated.h"', private, '"nvim/event/stream.h"', public ] },
|
||||
{ include: [ '"event/time.h.generated.h"', private, '"nvim/event/time.h"', public ] },
|
||||
{ include: [ '"event/wstream.h.generated.h"', private, '"nvim/event/wstream.h"', public ] },
|
||||
{ include: [ '"ex_cmds.h.generated.h"', private, '"nvim/ex_cmds.h"', public ] },
|
||||
{ include: [ '"ex_cmds2.h.generated.h"', private, '"nvim/ex_cmds2.h"', public ] },
|
||||
{ include: [ '"ex_docmd.h.generated.h"', private, '"nvim/ex_docmd.h"', public ] },
|
||||
{ include: [ '"ex_eval.h.generated.h"', private, '"nvim/ex_eval.h"', public ] },
|
||||
{ include: [ '"ex_getln.h.generated.h"', private, '"nvim/ex_getln.h"', public ] },
|
||||
{ include: [ '"ex_session.h.generated.h"', private, '"nvim/ex_session.h"', public ] },
|
||||
{ include: [ '"extmark.h.generated.h"', private, '"nvim/extmark.h"', public ] },
|
||||
{ include: [ '"file_search.h.generated.h"', private, '"nvim/file_search.h"', public ] },
|
||||
{ include: [ '"fileio.h.generated.h"', private, '"nvim/fileio.h"', public ] },
|
||||
{ include: [ '"fold.h.generated.h"', private, '"nvim/fold.h"', public ] },
|
||||
{ include: [ '"garray.h.generated.h"', private, '"nvim/garray.h"', public ] },
|
||||
{ include: [ '"getchar.h.generated.h"', private, '"nvim/getchar.h"', public ] },
|
||||
{ include: [ '"grid.h.generated.h"', private, '"nvim/grid.h"', public ] },
|
||||
{ include: [ '"hashtab.h.generated.h"', private, '"nvim/hashtab.h"', public ] },
|
||||
{ include: [ '"help.h.generated.h"', private, '"nvim/help.h"', public ] },
|
||||
{ include: [ '"highlight.h.generated.h"', private, '"nvim/highlight.h"', public ] },
|
||||
{ include: [ '"highlight_group.h.generated.h"', private, '"nvim/highlight_group.h"', public ] },
|
||||
{ include: [ '"if_cscope.h.generated.h"', private, '"nvim/if_cscope.h"', public ] },
|
||||
{ include: [ '"indent.h.generated.h"', private, '"nvim/indent.h"', public ] },
|
||||
{ include: [ '"indent_c.h.generated.h"', private, '"nvim/indent_c.h"', public ] },
|
||||
{ include: [ '"input.h.generated.h"', private, '"nvim/input.h"', public ] },
|
||||
{ include: [ '"insexpand.h.generated.h"', private, '"nvim/insexpand.h"', public ] },
|
||||
{ include: [ '"keycodes.h.generated.h"', private, '"nvim/keycodes.h"', public ] },
|
||||
{ include: [ '"linematch.h.generated.h"', private, '"nvim/linematch.h"', public ] },
|
||||
{ include: [ '"locale.h.generated.h"', private, '"nvim/locale.h"', public ] },
|
||||
{ include: [ '"log.h.generated.h"', private, '"nvim/log.h"', public ] },
|
||||
{ include: [ '"lua/converter.h.generated.h"', private, '"nvim/lua/converter.h"', public ] },
|
||||
{ include: [ '"lua/executor.h.generated.h"', private, '"nvim/lua/executor.h"', public ] },
|
||||
{ include: [ '"lua/spell.h.generated.h"', private, '"nvim/lua/spell.h"', public ] },
|
||||
{ include: [ '"lua/stdlib.h.generated.h"', private, '"nvim/lua/stdlib.h"', public ] },
|
||||
{ include: [ '"lua/treesitter.h.generated.h"', private, '"nvim/lua/treesitter.h"', public ] },
|
||||
{ include: [ '"lua/xdiff.h.generated.h"', private, '"nvim/lua/xdiff.h"', public ] },
|
||||
{ include: [ '"main.h.generated.h"', private, '"nvim/main.h"', public ] },
|
||||
{ include: [ '"mapping.h.generated.h"', private, '"nvim/mapping.h"', public ] },
|
||||
{ include: [ '"mark.h.generated.h"', private, '"nvim/mark.h"', public ] },
|
||||
{ include: [ '"marktree.h.generated.h"', private, '"nvim/marktree.h"', public ] },
|
||||
{ include: [ '"match.h.generated.h"', private, '"nvim/match.h"', public ] },
|
||||
{ include: [ '"math.h.generated.h"', private, '"nvim/math.h"', public ] },
|
||||
{ include: [ '"mbyte.h.generated.h"', private, '"nvim/mbyte.h"', public ] },
|
||||
{ include: [ '"memfile.h.generated.h"', private, '"nvim/memfile.h"', public ] },
|
||||
{ include: [ '"memline.h.generated.h"', private, '"nvim/memline.h"', public ] },
|
||||
{ include: [ '"memory.h.generated.h"', private, '"nvim/memory.h"', public ] },
|
||||
{ include: [ '"menu.h.generated.h"', private, '"nvim/menu.h"', public ] },
|
||||
{ include: [ '"message.h.generated.h"', private, '"nvim/message.h"', public ] },
|
||||
{ include: [ '"mouse.h.generated.h"', private, '"nvim/mouse.h"', public ] },
|
||||
{ include: [ '"move.h.generated.h"', private, '"nvim/move.h"', public ] },
|
||||
{ include: [ '"msgpack_rpc/channel.h.generated.h"', private, '"nvim/msgpack_rpc/channel.h"', public ] },
|
||||
{ include: [ '"msgpack_rpc/helpers.h.generated.h"', private, '"nvim/msgpack_rpc/helpers.h"', public ] },
|
||||
{ include: [ '"msgpack_rpc/server.h.generated.h"', private, '"nvim/msgpack_rpc/server.h"', public ] },
|
||||
{ include: [ '"msgpack_rpc/unpacker.h.generated.h"', private, '"nvim/msgpack_rpc/unpacker.h"', public ] },
|
||||
{ include: [ '"normal.h.generated.h"', private, '"nvim/normal.h"', public ] },
|
||||
{ include: [ '"ops.h.generated.h"', private, '"nvim/ops.h"', public ] },
|
||||
{ include: [ '"option.h.generated.h"', private, '"nvim/option.h"', public ] },
|
||||
{ include: [ '"optionstr.h.generated.h"', private, '"nvim/optionstr.h"', public ] },
|
||||
{ include: [ '"os/dl.h.generated.h"', private, '"nvim/os/dl.h"', public ] },
|
||||
{ include: [ '"os/fileio.h.generated.h"', private, '"nvim/os/fileio.h"', public ] },
|
||||
{ include: [ '"os/fs.h.generated.h"', private, '"nvim/os/fs.h"', public ] },
|
||||
{ include: [ '"os/input.h.generated.h"', private, '"nvim/os/input.h"', public ] },
|
||||
{ include: [ '"os/lang.h.generated.h"', private, '"nvim/os/lang.h"', public ] },
|
||||
{ include: [ '"os/process.h.generated.h"', private, '"nvim/os/process.h"', public ] },
|
||||
{ include: [ '"os/pty_process_unix.h.generated.h"', private, '"nvim/os/pty_process_unix.h"', private ] },
|
||||
{ include: [ '"os/shell.h.generated.h"', private, '"nvim/os/shell.h"', public ] },
|
||||
{ include: [ '"os/signal.h.generated.h"', private, '"nvim/os/signal.h"', public ] },
|
||||
{ include: [ '"os/time.h.generated.h"', private, '"nvim/os/time.h"', public ] },
|
||||
{ include: [ '"path.h.generated.h"', private, '"nvim/path.h"', public ] },
|
||||
{ include: [ '"plines.h.generated.h"', private, '"nvim/plines.h"', public ] },
|
||||
{ include: [ '"popupmenu.h.generated.h"', private, '"nvim/popupmenu.h"', public ] },
|
||||
{ include: [ '"profile.h.generated.h"', private, '"nvim/profile.h"', public ] },
|
||||
{ include: [ '"quickfix.h.generated.h"', private, '"nvim/quickfix.h"', public ] },
|
||||
{ include: [ '"rbuffer.h.generated.h"', private, '"nvim/rbuffer.h"', public ] },
|
||||
{ include: [ '"regexp.h.generated.h"', private, '"nvim/regexp.h"', public ] },
|
||||
{ include: [ '"runtime.h.generated.h"', private, '"nvim/runtime.h"', public ] },
|
||||
{ include: [ '"screen.h.generated.h"', private, '"nvim/screen.h"', public ] },
|
||||
{ include: [ '"search.h.generated.h"', private, '"nvim/search.h"', public ] },
|
||||
{ include: [ '"sha256.h.generated.h"', private, '"nvim/sha256.h"', public ] },
|
||||
{ include: [ '"shada.h.generated.h"', private, '"nvim/shada.h"', public ] },
|
||||
{ include: [ '"sign.h.generated.h"', private, '"nvim/sign.h"', public ] },
|
||||
{ include: [ '"spell.h.generated.h"', private, '"nvim/spell.h"', public ] },
|
||||
{ include: [ '"spellfile.h.generated.h"', private, '"nvim/spellfile.h"', public ] },
|
||||
{ include: [ '"spellsuggest.h.generated.h"', private, '"nvim/spellsuggest.h"', public ] },
|
||||
{ include: [ '"state.h.generated.h"', private, '"nvim/state.h"', public ] },
|
||||
{ include: [ '"statusline.h.generated.h"', private, '"nvim/statusline.h"', public ] },
|
||||
{ include: [ '"strings.h.generated.h"', private, '"nvim/strings.h"', public ] },
|
||||
{ include: [ '"syntax.h.generated.h"', private, '"nvim/syntax.h"', public ] },
|
||||
{ include: [ '"tag.h.generated.h"', private, '"nvim/tag.h"', public ] },
|
||||
{ include: [ '"terminal.h.generated.h"', private, '"nvim/terminal.h"', public ] },
|
||||
{ include: [ '"testing.h.generated.h"', private, '"nvim/testing.h"', public ] },
|
||||
{ include: [ '"textformat.h.generated.h"', private, '"nvim/textformat.h"', public ] },
|
||||
{ include: [ '"textobject.h.generated.h"', private, '"nvim/textobject.h"', public ] },
|
||||
{ include: [ '"tui/input.h.generated.h"', private, '"nvim/tui/input.h"', public ] },
|
||||
{ include: [ '"tui/terminfo.h.generated.h"', private, '"nvim/tui/terminfo.h"', public ] },
|
||||
{ include: [ '"tui/tui.h.generated.h"', private, '"nvim/tui/tui.h"', public ] },
|
||||
{ include: [ '"ugrid.h.generated.h"', private, '"nvim/ugrid.h"', public ] },
|
||||
{ include: [ '"ui.h.generated.h"', private, '"nvim/ui.h"', public ] },
|
||||
{ include: [ '"ui_bridge.h.generated.h"', private, '"nvim/ui_bridge.h"', public ] },
|
||||
{ include: [ '"ui_client.h.generated.h"', private, '"nvim/ui_client.h"', public ] },
|
||||
{ include: [ '"ui_compositor.h.generated.h"', private, '"nvim/ui_compositor.h"', public ] },
|
||||
{ include: [ '"undo.h.generated.h"', private, '"nvim/undo.h"', public ] },
|
||||
{ include: [ '"usercmd.h.generated.h"', private, '"nvim/usercmd.h"', public ] },
|
||||
{ include: [ '"version.h.generated.h"', private, '"nvim/version.h"', public ] },
|
||||
{ include: [ '"viml/parser/expressions.h.generated.h"', private, '"nvim/viml/parser/expressions.h"', public ] },
|
||||
{ include: [ '"viml/parser/parser.h.generated.h"', private, '"nvim/viml/parser/parser.h"', public ] },
|
||||
{ include: [ '"window.h.generated.h"', private, '"nvim/window.h"', public ] },
|
||||
|
||||
{ symbol: [ "FUNC_ATTR_ALLOC_ALIGN", private, '"nvim/func_attr.h"', public ] },
|
||||
{ symbol: [ "FUNC_ATTR_ALLOC_SIZE", private, '"nvim/func_attr.h"', public ] },
|
||||
{ symbol: [ "FUNC_ATTR_ALLOC_SIZE_PROD", private, '"nvim/func_attr.h"', public ] },
|
||||
{ symbol: [ "FUNC_ATTR_ALWAYS_INLINE", private, '"nvim/func_attr.h"', public ] },
|
||||
{ symbol: [ "FUNC_ATTR_CONST", private, '"nvim/func_attr.h"', public ] },
|
||||
{ symbol: [ "FUNC_ATTR_MALLOC", private, '"nvim/func_attr.h"', public ] },
|
||||
{ symbol: [ "FUNC_ATTR_NONNULL_ALL", private, '"nvim/func_attr.h"', public ] },
|
||||
{ symbol: [ "FUNC_ATTR_NONNULL_ARG", private, '"nvim/func_attr.h"', public ] },
|
||||
{ symbol: [ "FUNC_ATTR_NONNULL_RET", private, '"nvim/func_attr.h"', public ] },
|
||||
{ symbol: [ "FUNC_ATTR_NORETURN", private, '"nvim/func_attr.h"', public ] },
|
||||
{ symbol: [ "FUNC_ATTR_NO_SANITIZE_ADDRESS", private, '"nvim/func_attr.h"', public ] },
|
||||
{ symbol: [ "FUNC_ATTR_NO_SANITIZE_UNDEFINED", private, '"nvim/func_attr.h"', public ] },
|
||||
{ symbol: [ "FUNC_ATTR_PRINTF", private, '"nvim/func_attr.h"', public ] },
|
||||
{ symbol: [ "FUNC_ATTR_PURE", private, '"nvim/func_attr.h"', public ] },
|
||||
{ symbol: [ "FUNC_ATTR_UNUSED", private, '"nvim/func_attr.h"', public ] },
|
||||
{ symbol: [ "FUNC_ATTR_WARN_UNUSED_RESULT", private, '"nvim/func_attr.h"', public ] },
|
||||
{ symbol: [ "MAX", private, '"nvim/macros_defs.h"', public ] },
|
||||
{ symbol: [ "MIN", private, '"nvim/macros_defs.h"', public ] },
|
||||
{ symbol: [ "extern_proc", private, '<uv.h>', public ] },
|
||||
{ symbol: [ "iovec", private, '<sys/uio.h>', public ] },
|
||||
{ symbol: [ "ssize_t", private, '<uv.h>', public ] },
|
||||
# Generated to normal headers with a different name: header.h.generated.h -> nvim/some_other_header.h
|
||||
{ include: [ '"api/private/dispatch_wrappers.h.generated.h"', private, '"nvim/api/private/dispatch.h"', public ] },
|
||||
{ include: [ '"auevents_enum.generated.h"', private, '"nvim/autocmd.h"', public ] },
|
||||
{ include: [ '"ex_cmds_enum.generated.h"', private, '"nvim/ex_cmds_defs.h"', public ] },
|
||||
{ include: [ '"keysets.h.generated.h"', private, '"nvim/api/private/helpers.h"', public ] },
|
||||
{ include: [ '"keysets_defs.generated.h"', private, '"nvim/api/private/defs.h"', public ] },
|
||||
{ include: [ '"nvim/os/pty_process_unix.h"', private, '"nvim/os/pty_process.h"', public ] },
|
||||
{ include: [ '"nvim/os/pty_process_win.h"', private, '"nvim/os/pty_process.h"', public ] },
|
||||
{ include: [ '"nvim/os/unix_defs.h"', private, '"nvim/os/os_defs.h"', public ] },
|
||||
{ include: [ '"nvim/os/win_defs.h"', private, '"nvim/os/os_defs.h"', public ] },
|
||||
{ include: [ '"os/env.h.generated.h"', private, '"nvim/os/os.h"', public ] },
|
||||
{ include: [ '"os/fs.h.generated.h"', private, '"nvim/os/os.h"', public ] },
|
||||
{ include: [ '"os/mem.h.generated.h"', private, '"nvim/os/os.h"', public ] },
|
||||
{ include: [ '"os/stdpaths.h.generated.h"', private, '"nvim/os/os.h"', public ] },
|
||||
{ include: [ '"os/users.h.generated.h"', private, '"nvim/os/os.h"', public ] },
|
||||
{ include: [ '"regexp_bt.h.generated.h"', private, '"nvim/regexp.h"', public ] },
|
||||
{ include: [ '"ui_events_call.h.generated.h"', private, '"nvim/ui.h"', public ] },
|
||||
{ include: [ '"ui_events_client.h.generated.h"', private, '"nvim/ui_client.h"', public ] },
|
||||
{ include: [ '"ui_events_remote.generated.h"', private, '"nvim/api/ui.h"', public ] },
|
||||
{ include: [ '"ui_events_remote.h.generated.h"', private, '"nvim/api/ui.h"', public ] },
|
||||
|
||||
# Def to normal headers: nvim/header_defs.h -> nvim/header.h
|
||||
#
|
||||
# This is a public to public mapping, meaning that while IWYU can use the
|
||||
# headers on the left, it will use the headers on the right if possible. This
|
||||
# isn't explicitly mentioned in the IWYU docs, this is just my interpretation
|
||||
# of its behavior.
|
||||
{ include: [ '"nvim/buffer_defs.h"', public, '"nvim/buffer.h"', public ] },
|
||||
{ include: [ '"nvim/ex_cmds_defs.h"', public, '"nvim/ex_cmds.h"', public ] },
|
||||
{ include: [ '"nvim/ex_eval_defs.h"', public, '"nvim/ex_eval.h"', public ] },
|
||||
{ include: [ '"nvim/extmark_defs.h"', public, '"nvim/extmark.h"', public ] },
|
||||
{ include: [ '"nvim/grid_defs.h"', public, '"nvim/grid.h"', public ] },
|
||||
{ include: [ '"nvim/highlight_defs.h"', public, '"nvim/highlight.h"', public ] },
|
||||
{ include: [ '"nvim/map_defs.h"', public, '"nvim/map.h"', public ] },
|
||||
{ include: [ '"nvim/mark_defs.h"', public, '"nvim/mark.h"', public ] },
|
||||
{ include: [ '"nvim/mbyte_defs.h"', public, '"nvim/mbyte.h"', public ] },
|
||||
{ include: [ '"nvim/memfile_defs.h"', public, '"nvim/memfile.h"', public ] },
|
||||
{ include: [ '"nvim/memline_defs.h"', public, '"nvim/memline.h"', public ] },
|
||||
{ include: [ '"nvim/menu_defs.h"', public, '"nvim/menu.h"', public ] },
|
||||
{ include: [ '"nvim/msgpack/channel_defs.h"', public, '"nvim/msgpack/channel.h"', public ] },
|
||||
{ include: [ '"nvim/option_defs.h"', public, '"nvim/option.h"', public ] },
|
||||
{ include: [ '"nvim/os/fs_defs.h"', public, '"nvim/os/fs.h"', public ] },
|
||||
{ include: [ '"nvim/os/os_defs.h"', public, '"nvim/os/os.h"', public ] },
|
||||
{ include: [ '"nvim/regexp_defs.h"', public, '"nvim/regexp.h"', public ] },
|
||||
{ include: [ '"nvim/sign_defs.h"', public, '"nvim/sign.h"', public ] },
|
||||
{ include: [ '"nvim/spell_defs.h"', public, '"nvim/spell.h"', public ] },
|
||||
{ include: [ '"nvim/statusline_defs.h"', public, '"nvim/statusline.h"', public ] },
|
||||
{ include: [ '"nvim/syntax_defs.h"', public, '"nvim/syntax.h"', public ] },
|
||||
{ include: [ '"nvim/tui/input_defs.h"', public, '"nvim/tui/input.h"', public ] },
|
||||
{ include: [ '"nvim/undo_defs.h"', public, '"nvim/undo.h"', public ] },
|
||||
|
||||
# Third party headers
|
||||
{ include: [ "<bits/types/wint_t.h>", private, "<wchar.h>", public ] },
|
||||
{ include: [ '<arpa/inet.h>', private, '<uv/unix.h>', private ] },
|
||||
{ include: [ '<bits/termios-c_cc.h>', private, '<termios.h>', private ] },
|
||||
{ include: [ '<bits/termios-c_cflag.h>', private, '<termios.h>', private ] },
|
||||
{ include: [ '<bits/termios-c_iflag.h>', private, '<termios.h>', private ] },
|
||||
{ include: [ '<bits/termios-c_oflag.h>', private, '<termios.h>', private ] },
|
||||
{ include: [ '<libintl.h>', private, '"nvim/gettext.h"', public ] },
|
||||
{ include: [ '<netdb.h>', private, '<uv/unix.h>', private ] },
|
||||
{ include: [ '<netinet/in.h>', private, '<uv/unix.h>', private ] },
|
||||
{ include: [ '<pthread.h>', private, '"nvim/os/unix_defs.h"', private ] },
|
||||
{ include: [ '<sys/socket.h>', private, '<uv/unix.h>', private ] },
|
||||
{ include: [ '<termios.h>', private, '"nvim/os/unix_defs.h"', private ] },
|
||||
{ include: [ '<unistd.h>', private, '"nvim/os/unix_defs.h"', private ] },
|
||||
{ include: [ '<uv/unix.h>', private, '<uv.h>', public ] },
|
||||
|
||||
# Symbols
|
||||
{ symbol: [ "MAX", private, '"nvim/macros.h"', public ] },
|
||||
{ symbol: [ "MIN", private, '"nvim/macros.h"', public ] },
|
||||
{ symbol: [ "SEEK_END", private, '<stdio.h>', public ] },
|
||||
{ symbol: [ "SEEK_SET", private, '<stdio.h>', public ] },
|
||||
{ symbol: [ "time_fd", private, '"nvim/globals.h"', public ] },
|
||||
]
|
||||
|
||||
# vim: set ft=toml:
|
||||
|
@@ -1,33 +0,0 @@
|
||||
[
|
||||
{ include: [ "<arm/limits.h>", private, "<limits.h>", public ] },
|
||||
{ include: [ "<asm/ioctls.h>", private, "<bits/ioctls.h>", private ] },
|
||||
{ include: [ "<bits/termios-c_lflag.h>", private, "<termios.h>", public ] },
|
||||
{ include: [ "<bits/termios-struct.h>", private, "<termios.h>", public ] },
|
||||
{ include: [ "<sys/errno.h>", private, "<errno.h>", public ] },
|
||||
{ include: [ "<sys/fcntl.h>", private, "<fcntl.h>", public ] },
|
||||
{ include: [ "<sys/signal.h>", private, "<signal.h>", public ] },
|
||||
{ include: [ "<sys/termios.h>", private, "<termios.h>", public ] },
|
||||
{ include: [ '<asm/errno-base.h>', private, '<errno.h>', public ] },
|
||||
{ include: [ '<asm/errno.h>', private, '<errno.h>', public ] },
|
||||
{ include: [ '<bits/termios-c_cc.h>', private, '<termios.h>', public ] },
|
||||
{ include: [ '<bits/termios-c_cflag.h>', private, '<termios.h>', public ] },
|
||||
{ include: [ '<bits/termios-c_iflag.h>', private, '<termios.h>', public ] },
|
||||
{ include: [ '<bits/termios-c_oflag.h>', private, '<termios.h>', public ] },
|
||||
{ include: [ '<sys/ttycom.h>', private, '<sys/ioctl.h>', public ] },
|
||||
{ include: [ '<sys/unistd.h>', private, '<unistd.h>', private ] },
|
||||
|
||||
{ symbol: ["SOCK_STREAM", private, "<sys/socket.h>", public ] },
|
||||
{ symbol: ["SSIZE_MAX", private, "<limits.h>", public ] },
|
||||
{ symbol: ["S_IREAD", private, "<sys/stat.h>", public ] },
|
||||
{ symbol: ["S_IWRITE", private, "<sys/stat.h>", public ] },
|
||||
{ symbol: ["_POSIX_VDISABLE", private, "<unistd.h>", private ] },
|
||||
{ symbol: ["flock", private, "<sys/file.h>", public ] },
|
||||
{ symbol: ["iovec", private, "<sys/uio.h>", public ] },
|
||||
{ symbol: ["mode_t", private, "<sys/types.h>", public ] },
|
||||
{ symbol: ["ntohs", private, "<arpa/inet.h>", public ] },
|
||||
{ symbol: ["pthread_sigmask", private, "<signal.h>", public ] },
|
||||
{ symbol: ["sigset_t", private, "<signal.h>", public ] },
|
||||
{ symbol: ["uid_t", private, "<sys/types.h>", public ] },
|
||||
]
|
||||
|
||||
# vim: set ft=toml:
|
6
cmake.config/pathdef.c.in
Normal file
6
cmake.config/pathdef.c.in
Normal file
@@ -0,0 +1,6 @@
|
||||
// This is an open source non-commercial project. Dear PVS-Studio, please check
|
||||
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
|
||||
#include "${PROJECT_SOURCE_DIR}/src/nvim/vim.h"
|
||||
char *default_vim_dir = "${CMAKE_INSTALL_FULL_DATAROOTDIR}/nvim";
|
||||
char *default_vimruntime_dir = "";
|
||||
char *default_lib_dir = "${CMAKE_INSTALL_FULL_LIBDIR}/nvim";
|
@@ -1,3 +0,0 @@
|
||||
char *default_vim_dir = "${CMAKE_INSTALL_FULL_DATAROOTDIR}/nvim";
|
||||
char *default_vimruntime_dir = "";
|
||||
char *default_lib_dir = "${CMAKE_INSTALL_FULL_LIBDIR}/nvim";
|
@@ -11,7 +11,11 @@
|
||||
# include "auto/versiondef_git.h"
|
||||
#endif
|
||||
|
||||
#define NVIM_VERSION_CFLAGS "${VERSION_STRING}"
|
||||
#define NVIM_API_LEVEL @NVIM_API_LEVEL@
|
||||
#define NVIM_API_LEVEL_COMPAT @NVIM_API_LEVEL_COMPAT@
|
||||
#define NVIM_API_PRERELEASE @NVIM_API_PRERELEASE@
|
||||
|
||||
#define NVIM_VERSION_CFLAGS "${CMAKE_C_COMPILER} $<$<CONFIG:Debug>:${CMAKE_C_FLAGS_DEBUG}>$<$<CONFIG:Release>:${CMAKE_C_FLAGS_RELEASE}>$<$<CONFIG:RelWithDebInfo>:${CMAKE_C_FLAGS_RELWITHDEBINFO}>$<$<CONFIG:MinSizeRel>:${CMAKE_C_FLAGS_MINSIZEREL}> $<JOIN:$<TARGET_PROPERTY:nvim,COMPILE_OPTIONS>, > -D$<JOIN:$<TARGET_PROPERTY:nvim,COMPILE_DEFINITIONS>, -D> -I$<JOIN:$<TARGET_PROPERTY:nvim,INCLUDE_DIRECTORIES>, -I>"
|
||||
#define NVIM_VERSION_BUILD_TYPE "$<CONFIG>"
|
||||
|
||||
#endif // AUTO_VERSIONDEF_H
|
||||
|
@@ -1,5 +1,5 @@
|
||||
# This is not meant to be included by the top-level.
|
||||
cmake_minimum_required (VERSION 3.13)
|
||||
cmake_minimum_required (VERSION 3.10)
|
||||
project(NVIM_DEPS C)
|
||||
|
||||
if(POLICY CMP0135)
|
||||
@@ -10,44 +10,19 @@ endif()
|
||||
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" "${PROJECT_SOURCE_DIR}/../cmake")
|
||||
|
||||
include(CheckCCompilerFlag)
|
||||
include(ExternalProject)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
include(Deps)
|
||||
include(Find)
|
||||
include(Util)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# User settings
|
||||
#-------------------------------------------------------------------------------
|
||||
set(DEPS_CMAKE_ARGS
|
||||
-D CMAKE_C_COMPILER=${CMAKE_C_COMPILER}
|
||||
-D CMAKE_C_STANDARD=99
|
||||
-D CMAKE_GENERATOR=${CMAKE_GENERATOR}
|
||||
-D CMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM}
|
||||
-D CMAKE_POSITION_INDEPENDENT_CODE=ON)
|
||||
|
||||
set(DEPS_IGNORE_SHA FALSE)
|
||||
set(DEPS_CMAKE_CACHE_ARGS -DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES})
|
||||
|
||||
# Options
|
||||
option(USE_BUNDLED "Use bundled dependencies." ON)
|
||||
set_default_buildtype()
|
||||
|
||||
option(USE_BUNDLED_LIBUV "Use the bundled libuv." ${USE_BUNDLED})
|
||||
option(USE_BUNDLED_LIBVTERM "Use the bundled libvterm." ${USE_BUNDLED})
|
||||
option(USE_BUNDLED_LPEG "Use the bundled lpeg." ${USE_BUNDLED})
|
||||
# PUC Lua is only used for tests, unless explicitly requested.
|
||||
option(USE_BUNDLED_LUA "Use the bundled version of lua." OFF)
|
||||
option(USE_BUNDLED_LUAJIT "Use the bundled version of luajit." ${USE_BUNDLED})
|
||||
option(USE_BUNDLED_LUV "Use the bundled version of luv." ${USE_BUNDLED})
|
||||
option(USE_BUNDLED_MSGPACK "Use the bundled msgpack." ${USE_BUNDLED})
|
||||
option(USE_BUNDLED_TS "Use the bundled treesitter runtime." ${USE_BUNDLED})
|
||||
option(USE_BUNDLED_TS_PARSERS "Use the bundled treesitter parsers." ${USE_BUNDLED})
|
||||
option(USE_BUNDLED_UNIBILIUM "Use the bundled unibilium." ${USE_BUNDLED})
|
||||
if(USE_BUNDLED AND MSVC)
|
||||
option(USE_BUNDLED_GETTEXT "Use the bundled version of gettext." ON)
|
||||
option(USE_BUNDLED_LIBICONV "Use the bundled version of libiconv." ON)
|
||||
else()
|
||||
option(USE_BUNDLED_GETTEXT "Use the bundled version of gettext." OFF)
|
||||
option(USE_BUNDLED_LIBICONV "Use the bundled version of libiconv." OFF)
|
||||
endif()
|
||||
|
||||
option(USE_EXISTING_SRC_DIR "Skip download of deps sources in case of existing source directory." OFF)
|
||||
|
||||
set_default_buildtype(Release)
|
||||
get_property(isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
||||
if(NOT isMultiConfig)
|
||||
list(APPEND DEPS_CMAKE_ARGS -D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})
|
||||
@@ -60,7 +35,87 @@ if(HAS_OG_FLAG)
|
||||
set(DEFAULT_MAKE_CFLAGS CFLAGS+=-Og ${DEFAULT_MAKE_CFLAGS})
|
||||
endif()
|
||||
|
||||
set(DEPS_INCLUDE_FLAGS "-I${DEPS_INSTALL_DIR}/include -I${DEPS_INSTALL_DIR}/include/luajit-2.1")
|
||||
set(DEPS_INSTALL_DIR "${CMAKE_BINARY_DIR}/usr")
|
||||
set(DEPS_BIN_DIR "${DEPS_INSTALL_DIR}/bin")
|
||||
set(DEPS_LIB_DIR "${DEPS_INSTALL_DIR}/lib")
|
||||
set(DEPS_BUILD_DIR "${CMAKE_BINARY_DIR}/build")
|
||||
set(DEPS_DOWNLOAD_DIR "${DEPS_BUILD_DIR}/downloads")
|
||||
|
||||
list(APPEND DEPS_CMAKE_ARGS -D CMAKE_INSTALL_PREFIX=${DEPS_INSTALL_DIR})
|
||||
|
||||
option(USE_BUNDLED "Use bundled dependencies." ON)
|
||||
|
||||
option(USE_BUNDLED_UNIBILIUM "Use the bundled unibilium." ${USE_BUNDLED})
|
||||
option(USE_BUNDLED_LIBTERMKEY "Use the bundled libtermkey." ${USE_BUNDLED})
|
||||
option(USE_BUNDLED_LIBVTERM "Use the bundled libvterm." ${USE_BUNDLED})
|
||||
option(USE_BUNDLED_LIBUV "Use the bundled libuv." ${USE_BUNDLED})
|
||||
option(USE_BUNDLED_MSGPACK "Use the bundled msgpack." ${USE_BUNDLED})
|
||||
option(USE_BUNDLED_LUAJIT "Use the bundled version of luajit." ${USE_BUNDLED})
|
||||
option(USE_BUNDLED_LUAROCKS "Use the bundled version of luarocks." ${USE_BUNDLED})
|
||||
option(USE_BUNDLED_LUV "Use the bundled version of luv." ${USE_BUNDLED})
|
||||
#XXX(tarruda): Lua is only used for debugging the functional test client, don't
|
||||
# build it unless explicitly requested
|
||||
option(USE_BUNDLED_LUA "Use the bundled version of lua." OFF)
|
||||
option(USE_BUNDLED_TS_PARSERS "Use the bundled treesitter parsers." ${USE_BUNDLED})
|
||||
option(USE_BUNDLED_TS "Use the bundled treesitter runtime." ${USE_BUNDLED})
|
||||
|
||||
if(USE_BUNDLED AND MSVC)
|
||||
option(USE_BUNDLED_GETTEXT "Use the bundled version of gettext." ON)
|
||||
option(USE_BUNDLED_LIBICONV "Use the bundled version of libiconv." ON)
|
||||
else()
|
||||
option(USE_BUNDLED_GETTEXT "Use the bundled version of gettext." OFF)
|
||||
option(USE_BUNDLED_LIBICONV "Use the bundled version of libiconv." OFF)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
option(USE_BUNDLED_NVIMQT "Bundle neovim-qt" ON)
|
||||
endif()
|
||||
|
||||
option(USE_EXISTING_SRC_DIR "Skip download of deps sources in case of existing source directory." OFF)
|
||||
|
||||
find_package(Git)
|
||||
if(NOT Git_FOUND)
|
||||
message(FATAL_ERROR "Git is required to apply patches.")
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
find_program(MAKE_PRG NAMES gmake make)
|
||||
if(NOT MAKE_PRG)
|
||||
message(FATAL_ERROR "GNU Make is required to build the dependencies.")
|
||||
else()
|
||||
message(STATUS "Found GNU Make at ${MAKE_PRG}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# When using make, use the $(MAKE) variable to avoid warning about the job
|
||||
# server.
|
||||
if(CMAKE_GENERATOR MATCHES "Makefiles")
|
||||
set(MAKE_PRG "$(MAKE)")
|
||||
endif()
|
||||
|
||||
if(MINGW AND CMAKE_GENERATOR MATCHES "Ninja")
|
||||
find_program(MAKE_PRG NAMES mingw32-make)
|
||||
if(NOT MAKE_PRG)
|
||||
message(FATAL_ERROR "GNU Make for mingw32 is required to build the dependencies.")
|
||||
else()
|
||||
message(STATUS "Found GNU Make for mingw32: ${MAKE_PRG}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(DEPS_C_COMPILER "${CMAKE_C_COMPILER}")
|
||||
|
||||
if(CMAKE_OSX_SYSROOT)
|
||||
set(DEPS_C_COMPILER "${DEPS_C_COMPILER} -isysroot${CMAKE_OSX_SYSROOT}")
|
||||
endif()
|
||||
|
||||
if(CMAKE_OSX_ARCHITECTURES)
|
||||
# The LuaJIT build does not like being passed multiple `-arch` flags
|
||||
# so we handle a universal build the old-fashioned way.
|
||||
set(LUAJIT_C_COMPILER "${DEPS_C_COMPILER}")
|
||||
foreach(ARCH IN LISTS CMAKE_OSX_ARCHITECTURES)
|
||||
set(DEPS_C_COMPILER "${DEPS_C_COMPILER} -arch ${ARCH}")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# If the macOS deployment target is not set manually (via $MACOSX_DEPLOYMENT_TARGET),
|
||||
# fall back to local system version. Needs to be done here and in top-level CMakeLists.txt.
|
||||
@@ -74,28 +129,95 @@ if(APPLE)
|
||||
message(STATUS "Using deployment target ${CMAKE_OSX_DEPLOYMENT_TARGET}")
|
||||
endif()
|
||||
|
||||
if(USE_BUNDLED_LUAJIT)
|
||||
set(LUA_ENGINE LuaJit)
|
||||
elseif(USE_BUNDLED_LUA)
|
||||
set(LUA_ENGINE Lua)
|
||||
else()
|
||||
find_package(Luajit)
|
||||
find_package(Lua 5.1 EXACT)
|
||||
if(LUAJIT_FOUND)
|
||||
set(LUA_ENGINE LuaJit)
|
||||
string(APPEND DEPS_INCLUDE_FLAGS " -I${LUAJIT_INCLUDE_DIR}")
|
||||
elseif(LUA_FOUND)
|
||||
set(LUA_ENGINE Lua)
|
||||
string(APPEND DEPS_INCLUDE_FLAGS " -I${LUA_INCLUDE_DIR}")
|
||||
else()
|
||||
message(FATAL_ERROR "Could not find system lua or luajit")
|
||||
endif()
|
||||
include(ExternalProject)
|
||||
set_directory_properties(PROPERTIES EP_PREFIX "${DEPS_BUILD_DIR}")
|
||||
|
||||
set(LIBUV_URL https://github.com/libuv/libuv/archive/v1.46.0.tar.gz)
|
||||
set(LIBUV_SHA256 7aa66be3413ae10605e1f5c9ae934504ffe317ef68ea16fdaa83e23905c681bd)
|
||||
|
||||
set(MSGPACK_URL https://github.com/msgpack/msgpack-c/releases/download/c-6.0.0/msgpack-c-6.0.0.tar.gz)
|
||||
set(MSGPACK_SHA256 3654f5e2c652dc52e0a993e270bb57d5702b262703f03771c152bba51602aeba)
|
||||
|
||||
# https://github.com/LuaJIT/LuaJIT/tree/v2.1
|
||||
set(LUAJIT_URL https://github.com/LuaJIT/LuaJIT/archive/03c31124cc3b521ef54fe398e10fa55660a5057d.tar.gz)
|
||||
set(LUAJIT_SHA256 61dcc7ae3f543ae3cc30e66db060e31e2a77e4be34ee65e370c953d112b4d60c)
|
||||
|
||||
set(LUA_URL https://www.lua.org/ftp/lua-5.1.5.tar.gz)
|
||||
set(LUA_SHA256 2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333)
|
||||
|
||||
set(LUAROCKS_URL https://github.com/luarocks/luarocks/archive/v3.9.2.tar.gz)
|
||||
set(LUAROCKS_SHA256 a0b36cd68586cd79966d0106bb2e5a4f5523327867995fd66bee4237062b3e3b)
|
||||
|
||||
set(UNIBILIUM_URL https://github.com/neovim/unibilium/archive/d72c3598e7ac5d1ebf86ee268b8b4ed95c0fa628.tar.gz)
|
||||
set(UNIBILIUM_SHA256 9c4747c862ab5e3076dcf8fa8f0ea7a6b50f20ec5905618b9536655596797487)
|
||||
|
||||
set(LIBTERMKEY_URL https://github.com/neovim/deps/raw/aa004f1b2b6470a92363cba8e1cc1874141dacc4/opt/libtermkey-0.22.tar.gz)
|
||||
set(LIBTERMKEY_SHA256 6945bd3c4aaa83da83d80a045c5563da4edd7d0374c62c0d35aec09eb3014600)
|
||||
|
||||
set(LIBVTERM_URL https://github.com/neovim/deps/raw/12c9dcf1d823ac4acbccf494c93c4774a87db11d/opt/libvterm-0.3.3.tar.gz)
|
||||
set(LIBVTERM_SHA256 09156f43dd2128bd347cbeebe50d9a571d32c64e0cf18d211197946aff7226e0)
|
||||
|
||||
set(LUV_URL https://github.com/luvit/luv/archive/1.45.0-0.tar.gz)
|
||||
set(LUV_SHA256 97e89940f9eeaa8dfb34f1c19f80dd373299c42719d15228ec790f415d4e4965)
|
||||
|
||||
set(LUA_COMPAT53_URL https://github.com/keplerproject/lua-compat-5.3/archive/v0.9.tar.gz)
|
||||
set(LUA_COMPAT53_SHA256 ad05540d2d96a48725bb79a1def35cf6652a4e2ec26376e2617c8ce2baa6f416)
|
||||
|
||||
# Windows only: cat.exe diff.exe tee.exe xxd.exe
|
||||
set(CAT_URL https://github.com/neovim/deps/raw/21c5e8bdda33521a6ed497b315e03265a2785cbc/opt/cat.exe)
|
||||
set(CAT_SHA256 93b8d307bb15af3968920bdea3beb869a49d166f9164853c58a4e6ffdcae61c6)
|
||||
set(DIFF_URL https://github.com/neovim/deps/raw/21c5e8bdda33521a6ed497b315e03265a2785cbc/opt/diff.exe)
|
||||
set(DIFF_SHA256 4ceceebc8150422c6d8d9a06c2e9686d5a5d90f1033f60ad92ab81fe810e2a28)
|
||||
set(TEE_URL https://github.com/neovim/deps/raw/21c5e8bdda33521a6ed497b315e03265a2785cbc/opt/tee.exe)
|
||||
set(TEE_SHA256 950eea4e17fa3a7e89fa2c55374037b5797b3f1a54fea1304634884ab42ec14d)
|
||||
set(XXD_URL https://github.com/neovim/deps/raw/21c5e8bdda33521a6ed497b315e03265a2785cbc/opt/xxd.exe)
|
||||
set(XXD_SHA256 7a581e3882d28161cc52850f9a11d634b3eaf2c029276f093c1ed4c90e45a10c)
|
||||
|
||||
set(WINGUI_URL https://github.com/equalsraf/neovim-qt/releases/download/v0.2.17/neovim-qt.zip)
|
||||
set(WINGUI_SHA256 502e386eef677c2c2e0c11d8cbb27f3e12b4d96818369417e8da4129c4580c25)
|
||||
|
||||
set(WIN32YANK_X86_64_URL https://github.com/equalsraf/win32yank/releases/download/v0.1.1/win32yank-x64.zip)
|
||||
set(WIN32YANK_X86_64_SHA256 247c9a05b94387a884b49d3db13f806b1677dfc38020f955f719be6902260cd6)
|
||||
|
||||
set(GETTEXT_URL https://ftp.gnu.org/pub/gnu/gettext/gettext-0.20.1.tar.gz)
|
||||
set(GETTEXT_SHA256 66415634c6e8c3fa8b71362879ec7575e27da43da562c798a8a2f223e6e47f5c)
|
||||
|
||||
set(LIBICONV_URL https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.15.tar.gz)
|
||||
set(LIBICONV_SHA256 ccf536620a45458d26ba83887a983b96827001e92a13847b45e4925cc8913178)
|
||||
|
||||
set(TREESITTER_C_URL https://github.com/tree-sitter/tree-sitter-c/archive/v0.20.5.tar.gz)
|
||||
set(TREESITTER_C_SHA256 694a5408246ee45d535df9df025febecdb50bee764df64a94346b9805a5f349b )
|
||||
set(TREESITTER_LUA_URL https://github.com/MunifTanjim/tree-sitter-lua/archive/v0.0.18.tar.gz)
|
||||
set(TREESITTER_LUA_SHA256 659beef871a7fa1d9a02c23f5ebf55019aa3adce6d7f5441947781e128845256)
|
||||
set(TREESITTER_VIM_URL https://github.com/neovim/tree-sitter-vim/archive/v0.3.0.tar.gz)
|
||||
set(TREESITTER_VIM_SHA256 403acec3efb7cdb18ff3d68640fc823502a4ffcdfbb71cec3f98aa786c21cbe2)
|
||||
set(TREESITTER_VIMDOC_URL https://github.com/neovim/tree-sitter-vimdoc/archive/v2.0.0.tar.gz)
|
||||
set(TREESITTER_VIMDOC_SHA256 1ff8f4afd3a9599dd4c3ce87c155660b078c1229704d1a254433e33794b8f274)
|
||||
set(TREESITTER_QUERY_URL https://github.com/nvim-treesitter/tree-sitter-query/archive/v0.1.0.tar.gz)
|
||||
set(TREESITTER_QUERY_SHA256 e2b806f80e8bf1c4f4e5a96248393fe6622fc1fc6189d6896d269658f67f914c)
|
||||
set(TREESITTER_URL https://github.com/tree-sitter/tree-sitter/archive/v0.20.8.tar.gz)
|
||||
set(TREESITTER_SHA256 6181ede0b7470bfca37e293e7d5dc1d16469b9485d13f13a605baec4a8b1f791)
|
||||
|
||||
if(USE_EXISTING_SRC_DIR)
|
||||
get_cmake_property(VARS VARIABLES)
|
||||
foreach (VAR ${VARS})
|
||||
if(VAR MATCHES "^.*URL$")
|
||||
unset(${VAR})
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(USE_BUNDLED_UNIBILIUM)
|
||||
include(BuildUnibilium)
|
||||
endif()
|
||||
|
||||
if(USE_BUNDLED_LIBTERMKEY)
|
||||
include(BuildLibtermkey)
|
||||
if(USE_BUNDLED_UNIBILIUM)
|
||||
add_dependencies(libtermkey unibilium)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(USE_BUNDLED_LIBVTERM)
|
||||
include(BuildLibvterm)
|
||||
endif()
|
||||
@@ -116,12 +238,12 @@ if(USE_BUNDLED_LUA)
|
||||
include(BuildLua)
|
||||
endif()
|
||||
|
||||
if(USE_BUNDLED_LUV)
|
||||
include(BuildLuv)
|
||||
if(USE_BUNDLED_LUAROCKS)
|
||||
include(BuildLuarocks)
|
||||
endif()
|
||||
|
||||
if(USE_BUNDLED_LPEG)
|
||||
include(BuildLpeg)
|
||||
if(USE_BUNDLED_LUV)
|
||||
include(BuildLuv)
|
||||
endif()
|
||||
|
||||
if(USE_BUNDLED_GETTEXT)
|
||||
@@ -144,9 +266,16 @@ if(WIN32)
|
||||
include(GetBinaryDeps)
|
||||
|
||||
GetExecutable(TARGET cat)
|
||||
GetExecutable(TARGET diff)
|
||||
GetExecutable(TARGET tee)
|
||||
GetExecutable(TARGET xxd)
|
||||
|
||||
if(USE_BUNDLED_NVIMQT)
|
||||
GetBinaryDep(TARGET wingui
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory bin ${DEPS_BIN_DIR}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory share ${DEPS_INSTALL_DIR}/share)
|
||||
endif()
|
||||
|
||||
GetBinaryDep(TARGET win32yank_X86_64
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy win32yank.exe ${DEPS_BIN_DIR})
|
||||
endif()
|
||||
|
@@ -1,25 +0,0 @@
|
||||
{
|
||||
"version": 3,
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "base",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/../.deps",
|
||||
"hidden": true
|
||||
},
|
||||
{
|
||||
"name": "ci",
|
||||
"inherits": ["base"]
|
||||
},
|
||||
{
|
||||
"name": "external_deps",
|
||||
"description": "Build neovim with external deps on ubuntu",
|
||||
"cacheVariables": {
|
||||
"USE_BUNDLED":"OFF",
|
||||
"USE_BUNDLED_LIBVTERM":"ON",
|
||||
"USE_BUNDLED_TS":"ON"
|
||||
},
|
||||
"inherits": ["base"]
|
||||
}
|
||||
]
|
||||
}
|
@@ -1,6 +1,8 @@
|
||||
if(MSVC)
|
||||
get_externalproject_options(gettext ${DEPS_IGNORE_SHA})
|
||||
ExternalProject_Add(gettext
|
||||
URL ${GETTEXT_URL}
|
||||
URL_HASH SHA256=${GETTEXT_SHA256}
|
||||
DOWNLOAD_NO_PROGRESS TRUE
|
||||
DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/gettext
|
||||
PATCH_COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmake/GettextCMakeLists.txt
|
||||
@@ -8,7 +10,7 @@ if(MSVC)
|
||||
CMAKE_ARGS ${DEPS_CMAKE_ARGS}
|
||||
-D LIBICONV_INCLUDE_DIRS=${DEPS_INSTALL_DIR}/include
|
||||
-D LIBICONV_LIBRARIES=${DEPS_LIB_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}libcharset${CMAKE_STATIC_LIBRARY_SUFFIX}$<SEMICOLON>${DEPS_LIB_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}libiconv${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
${EXTERNALPROJECT_OPTIONS})
|
||||
CMAKE_CACHE_ARGS ${DEPS_CMAKE_CACHE_ARGS})
|
||||
else()
|
||||
message(FATAL_ERROR "Trying to build gettext in an unsupported system ${CMAKE_SYSTEM_NAME}/${CMAKE_C_COMPILER_ID}")
|
||||
endif()
|
||||
|
@@ -1,12 +1,14 @@
|
||||
if(MSVC)
|
||||
get_externalproject_options(libiconv ${DEPS_IGNORE_SHA})
|
||||
ExternalProject_Add(libiconv
|
||||
URL ${LIBICONV_URL}
|
||||
URL_HASH SHA256=${LIBICONV_SHA256}
|
||||
DOWNLOAD_NO_PROGRESS TRUE
|
||||
DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/libiconv
|
||||
PATCH_COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmake/LibiconvCMakeLists.txt
|
||||
${DEPS_BUILD_DIR}/src/libiconv/CMakeLists.txt
|
||||
CMAKE_ARGS ${DEPS_CMAKE_ARGS}
|
||||
${EXTERNALPROJECT_OPTIONS})
|
||||
CMAKE_CACHE_ARGS ${DEPS_CMAKE_CACHE_ARGS})
|
||||
else()
|
||||
message(FATAL_ERROR "Trying to build libiconv in an unsupported system ${CMAKE_SYSTEM_NAME}/${CMAKE_C_COMPILER_ID}")
|
||||
endif()
|
||||
|
13
cmake.deps/cmake/BuildLibtermkey.cmake
Normal file
13
cmake.deps/cmake/BuildLibtermkey.cmake
Normal file
@@ -0,0 +1,13 @@
|
||||
ExternalProject_Add(libtermkey
|
||||
URL ${LIBTERMKEY_URL}
|
||||
URL_HASH SHA256=${LIBTERMKEY_SHA256}
|
||||
DOWNLOAD_NO_PROGRESS TRUE
|
||||
DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/libtermkey
|
||||
PATCH_COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmake/LibtermkeyCMakeLists.txt
|
||||
${DEPS_BUILD_DIR}/src/libtermkey/CMakeLists.txt
|
||||
CMAKE_ARGS ${DEPS_CMAKE_ARGS}
|
||||
-D CMAKE_SHARED_LIBRARY_LINK_C_FLAGS="" # Hack to avoid -rdynamic in Mingw
|
||||
-D UNIBILIUM_INCLUDE_DIRS=${DEPS_INSTALL_DIR}/include
|
||||
-D UNIBILIUM_LIBRARIES=${DEPS_LIB_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}unibilium${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
CMAKE_CACHE_ARGS ${DEPS_CMAKE_CACHE_ARGS})
|
@@ -1,9 +1,10 @@
|
||||
get_externalproject_options(libuv ${DEPS_IGNORE_SHA})
|
||||
ExternalProject_Add(libuv
|
||||
URL ${LIBUV_URL}
|
||||
URL_HASH SHA256=${LIBUV_SHA256}
|
||||
DOWNLOAD_NO_PROGRESS TRUE
|
||||
DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/libuv
|
||||
CMAKE_ARGS ${DEPS_CMAKE_ARGS}
|
||||
-D CMAKE_INSTALL_LIBDIR=lib
|
||||
-D BUILD_TESTING=OFF
|
||||
-D LIBUV_BUILD_SHARED=OFF
|
||||
-D UV_LINT_W4=OFF
|
||||
${EXTERNALPROJECT_OPTIONS})
|
||||
CMAKE_CACHE_ARGS ${DEPS_CMAKE_CACHE_ARGS})
|
||||
|
@@ -1,8 +1,10 @@
|
||||
get_externalproject_options(libvterm ${DEPS_IGNORE_SHA})
|
||||
ExternalProject_Add(libvterm
|
||||
URL ${LIBVTERM_URL}
|
||||
URL_HASH SHA256=${LIBVTERM_SHA256}
|
||||
DOWNLOAD_NO_PROGRESS TRUE
|
||||
DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/libvterm
|
||||
PATCH_COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmake/LibvtermCMakeLists.txt
|
||||
${DEPS_BUILD_DIR}/src/libvterm/CMakeLists.txt
|
||||
CMAKE_ARGS ${DEPS_CMAKE_ARGS}
|
||||
${EXTERNALPROJECT_OPTIONS})
|
||||
CMAKE_CACHE_ARGS ${DEPS_CMAKE_CACHE_ARGS})
|
||||
|
@@ -1,14 +0,0 @@
|
||||
get_externalproject_options(lpeg ${DEPS_IGNORE_SHA})
|
||||
ExternalProject_Add(lpeg
|
||||
DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/lpeg
|
||||
PATCH_COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmake/LpegCMakeLists.txt
|
||||
${DEPS_BUILD_DIR}/src/lpeg/CMakeLists.txt
|
||||
CMAKE_ARGS ${DEPS_CMAKE_ARGS} -DCMAKE_C_FLAGS=${DEPS_INCLUDE_FLAGS}
|
||||
${EXTERNALPROJECT_OPTIONS})
|
||||
|
||||
if(USE_BUNDLED_LUAJIT)
|
||||
add_dependencies(lpeg luajit)
|
||||
elseif(USE_BUNDLED_LUA)
|
||||
add_dependencies(lpeg lua)
|
||||
endif()
|
@@ -5,9 +5,9 @@ elseif(APPLE)
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
||||
set(LUA_TARGET freebsd)
|
||||
elseif(CMAKE_SYSTEM_NAME MATCHES "BSD")
|
||||
set(LUA_TARGET bsd)
|
||||
set(CMAKE_LUA_TARGET bsd)
|
||||
elseif(CMAKE_SYSTEM_NAME MATCHES "^MINGW")
|
||||
set(LUA_TARGET mingw)
|
||||
set(CMAKE_LUA_TARGET mingw)
|
||||
else()
|
||||
if(UNIX)
|
||||
set(LUA_TARGET posix)
|
||||
@@ -16,7 +16,7 @@ else()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(LUA_CFLAGS "-O2 -g3 -fPIC")
|
||||
set(LUA_CFLAGS "-O0 -g3 -fPIC")
|
||||
set(LUA_LDFLAGS "")
|
||||
|
||||
if(ENABLE_ASAN_UBSAN)
|
||||
@@ -40,11 +40,23 @@ set(LUA_CONFIGURE_COMMAND
|
||||
-i ${DEPS_BUILD_DIR}/src/lua/src/luaconf.h)
|
||||
set(LUA_INSTALL_TOP_ARG "INSTALL_TOP=${DEPS_INSTALL_DIR}")
|
||||
|
||||
get_externalproject_options(lua ${DEPS_IGNORE_SHA})
|
||||
message(STATUS "Lua target is ${LUA_TARGET}")
|
||||
|
||||
ExternalProject_Add(lua
|
||||
URL ${LUA_URL}
|
||||
URL_HASH SHA256=${LUA_SHA256}
|
||||
DOWNLOAD_NO_PROGRESS TRUE
|
||||
DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/lua
|
||||
CONFIGURE_COMMAND "${LUA_CONFIGURE_COMMAND}"
|
||||
BUILD_IN_SOURCE 1
|
||||
BUILD_COMMAND ${MAKE_PRG} ${LUA_INSTALL_TOP_ARG} ${LUA_TARGET}
|
||||
INSTALL_COMMAND ${MAKE_PRG} ${LUA_INSTALL_TOP_ARG} install
|
||||
${EXTERNALPROJECT_OPTIONS})
|
||||
INSTALL_COMMAND ${MAKE_PRG} ${LUA_INSTALL_TOP_ARG} install)
|
||||
|
||||
set(BUSTED ${DEPS_BIN_DIR}/busted)
|
||||
set(BUSTED_LUA ${BUSTED}-lua)
|
||||
|
||||
add_custom_command(OUTPUT ${BUSTED_LUA}
|
||||
COMMAND sed -e 's/^exec/exec $$LUA_DEBUGGER/' -e 's/jit//g' < ${BUSTED} > ${BUSTED_LUA} && chmod +x ${BUSTED_LUA}
|
||||
DEPENDS lua busted ${BUSTED})
|
||||
add_custom_target(busted-lua ALL
|
||||
DEPENDS ${DEPS_BIN_DIR}/busted-lua)
|
||||
|
@@ -1,19 +1,30 @@
|
||||
# BuildLuajit(TARGET targetname CONFIGURE_COMMAND ... BUILD_COMMAND ... INSTALL_COMMAND ...)
|
||||
# Reusable function to build luajit, wraps ExternalProject_Add.
|
||||
# Failing to pass a command argument will result in no command being run
|
||||
function(BuildLuajit)
|
||||
cmake_parse_arguments(_luajit
|
||||
""
|
||||
""
|
||||
"TARGET"
|
||||
"CONFIGURE_COMMAND;BUILD_COMMAND;INSTALL_COMMAND;DEPENDS"
|
||||
${ARGN})
|
||||
if(NOT _luajit_CONFIGURE_COMMAND AND NOT _luajit_BUILD_COMMAND
|
||||
AND NOT _luajit_INSTALL_COMMAND)
|
||||
message(FATAL_ERROR "Must pass at least one of CONFIGURE_COMMAND, BUILD_COMMAND, INSTALL_COMMAND")
|
||||
endif()
|
||||
if(NOT _luajit_TARGET)
|
||||
set(_luajit_TARGET "luajit")
|
||||
endif()
|
||||
|
||||
get_externalproject_options(luajit ${DEPS_IGNORE_SHA})
|
||||
ExternalProject_Add(luajit
|
||||
ExternalProject_Add(${_luajit_TARGET}
|
||||
URL ${LUAJIT_URL}
|
||||
URL_HASH SHA256=${LUAJIT_SHA256}
|
||||
DOWNLOAD_NO_PROGRESS TRUE
|
||||
DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/luajit
|
||||
CONFIGURE_COMMAND "${_luajit_CONFIGURE_COMMAND}"
|
||||
BUILD_IN_SOURCE 1
|
||||
BUILD_COMMAND "${_luajit_BUILD_COMMAND}"
|
||||
INSTALL_COMMAND "${_luajit_INSTALL_COMMAND}"
|
||||
DEPENDS "${_luajit_DEPENDS}"
|
||||
${EXTERNALPROJECT_OPTIONS})
|
||||
DEPENDS "${_luajit_DEPENDS}")
|
||||
endfunction()
|
||||
|
||||
check_c_compiler_flag(-fno-stack-check HAS_NO_STACK_CHECK)
|
||||
@@ -41,11 +52,44 @@ if(APPLE)
|
||||
set(DEPLOYMENT_TARGET "MACOSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}")
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
if((UNIX AND NOT APPLE) OR (APPLE AND NOT CMAKE_OSX_ARCHITECTURES))
|
||||
BuildLuaJit(INSTALL_COMMAND ${BUILDCMD_UNIX}
|
||||
CC=${DEPS_C_COMPILER} PREFIX=${DEPS_INSTALL_DIR}
|
||||
${DEPLOYMENT_TARGET} install)
|
||||
|
||||
elseif(CMAKE_OSX_ARCHITECTURES AND APPLE)
|
||||
|
||||
# Passing multiple `-arch` flags to the LuaJIT build will cause it to fail.
|
||||
# To get a working universal build, we build each requested architecture slice
|
||||
# individually then `lipo` them all up.
|
||||
set(LUAJIT_SRC_DIR "${DEPS_BUILD_DIR}/src/luajit")
|
||||
foreach(ARCH IN LISTS CMAKE_OSX_ARCHITECTURES)
|
||||
set(STATIC_CC "${LUAJIT_C_COMPILER} -arch ${ARCH}")
|
||||
set(DYNAMIC_CC "${LUAJIT_C_COMPILER} -arch ${ARCH} -fPIC")
|
||||
set(TARGET_LD "${LUAJIT_C_COMPILER} -arch ${ARCH}")
|
||||
list(APPEND LUAJIT_THIN_EXECUTABLES "${LUAJIT_SRC_DIR}-${ARCH}/src/luajit")
|
||||
list(APPEND LUAJIT_THIN_STATIC_LIBS "${LUAJIT_SRC_DIR}-${ARCH}/src/libluajit.a")
|
||||
list(APPEND LUAJIT_THIN_DYLIBS "${LUAJIT_SRC_DIR}-${ARCH}/src/libluajit.so")
|
||||
list(APPEND LUAJIT_THIN_TARGETS "luajit-${ARCH}")
|
||||
|
||||
# See https://luajit.org/install.html#cross.
|
||||
BuildLuaJit(TARGET "luajit-${ARCH}"
|
||||
BUILD_COMMAND ${BUILDCMD_UNIX}
|
||||
CC=${LUAJIT_C_COMPILER} STATIC_CC=${STATIC_CC}
|
||||
DYNAMIC_CC=${DYNAMIC_CC} TARGET_LD=${TARGET_LD}
|
||||
PREFIX=${DEPS_INSTALL_DIR}
|
||||
${DEPLOYMENT_TARGET})
|
||||
endforeach()
|
||||
BuildLuaJit(
|
||||
CONFIGURE_COMMAND ${BUILDCMD_UNIX} CC=${LUAJIT_C_COMPILER} PREFIX=${DEPS_INSTALL_DIR} ${DEPLOYMENT_TARGET}
|
||||
COMMAND ${CMAKE_COMMAND} -E rm -f ${LUAJIT_SRC_DIR}/src/luajit ${LUAJIT_SRC_DIR}/src/libluajit.so ${LUAJIT_SRC_DIR}/src/libluajit.a
|
||||
BUILD_COMMAND lipo ${LUAJIT_THIN_EXECUTABLES} -create -output ${LUAJIT_SRC_DIR}/src/luajit
|
||||
COMMAND lipo ${LUAJIT_THIN_STATIC_LIBS} -create -output ${LUAJIT_SRC_DIR}/src/libluajit.a
|
||||
COMMAND lipo ${LUAJIT_THIN_DYLIBS} -create -output ${LUAJIT_SRC_DIR}/src/libluajit.so
|
||||
INSTALL_COMMAND ${BUILDCMD_UNIX} CC=${LUAJIT_C_COMPILER} PREFIX=${DEPS_INSTALL_DIR} ${DEPLOYMENT_TARGET} install
|
||||
DEPENDS ${LUAJIT_THIN_TARGETS}
|
||||
)
|
||||
|
||||
elseif(MINGW)
|
||||
|
||||
if(CMAKE_GENERATOR MATCHES "Ninja")
|
||||
@@ -92,3 +136,11 @@ elseif(MSVC)
|
||||
else()
|
||||
message(FATAL_ERROR "Trying to build luajit in an unsupported system ${CMAKE_SYSTEM_NAME}/${CMAKE_C_COMPILER_ID}")
|
||||
endif()
|
||||
|
||||
if (NOT MSVC)
|
||||
add_custom_target(clean_shared_libraries_luajit ALL
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-D REMOVE_FILE_GLOB=${DEPS_LIB_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}*${CMAKE_SHARED_LIBRARY_SUFFIX}*
|
||||
-P ${PROJECT_SOURCE_DIR}/cmake/RemoveFiles.cmake)
|
||||
add_dependencies(clean_shared_libraries_luajit luajit)
|
||||
endif()
|
||||
|
160
cmake.deps/cmake/BuildLuarocks.cmake
Normal file
160
cmake.deps/cmake/BuildLuarocks.cmake
Normal file
@@ -0,0 +1,160 @@
|
||||
# Luarocks recipe. Luarocks is only required when building Neovim.
|
||||
# NOTE: LuaRocks rocks need to "DEPENDS" on the previous module, because
|
||||
# running luarocks in parallel will break, e.g. when some rocks have
|
||||
# the same dependency..
|
||||
|
||||
option(USE_BUNDLED_BUSTED "Use the bundled version of busted to run tests." ON)
|
||||
|
||||
# The luarocks binary location
|
||||
set(LUAROCKS_BINARY ${DEPS_BIN_DIR}/luarocks)
|
||||
|
||||
# Arguments for calls to 'luarocks build'
|
||||
if(NOT MSVC)
|
||||
# In MSVC don't pass the compiler/linker to luarocks, the bundled
|
||||
# version already knows, and passing them here breaks the build
|
||||
set(LUAROCKS_BUILDARGS CC=${DEPS_C_COMPILER} LD=${DEPS_C_COMPILER})
|
||||
endif()
|
||||
|
||||
# Lua version, used with rocks directories.
|
||||
# Defaults to 5.1 for bundled LuaJIT/Lua.
|
||||
set(LUA_VERSION "5.1")
|
||||
|
||||
if(UNIX)
|
||||
|
||||
if(USE_BUNDLED_LUAJIT)
|
||||
list(APPEND LUAROCKS_OPTS
|
||||
--with-lua=${DEPS_INSTALL_DIR}
|
||||
--with-lua-include=${DEPS_INSTALL_DIR}/include/luajit-2.1
|
||||
--with-lua-interpreter=luajit)
|
||||
elseif(USE_BUNDLED_LUA)
|
||||
list(APPEND LUAROCKS_OPTS
|
||||
--with-lua=${DEPS_INSTALL_DIR})
|
||||
else()
|
||||
find_package(Luajit)
|
||||
if(LUAJIT_FOUND)
|
||||
list(APPEND LUAROCKS_OPTS
|
||||
--with-lua-include=${LUAJIT_INCLUDE_DIRS}
|
||||
--with-lua-interpreter=luajit)
|
||||
endif()
|
||||
|
||||
# Get LUA_VERSION used with rocks output.
|
||||
if(LUAJIT_FOUND)
|
||||
set(LUA_EXE "luajit")
|
||||
else()
|
||||
set(LUA_EXE "lua")
|
||||
endif()
|
||||
execute_process(
|
||||
COMMAND ${LUA_EXE} -e "print(string.sub(_VERSION, 5))"
|
||||
OUTPUT_VARIABLE LUA_VERSION
|
||||
ERROR_VARIABLE ERR
|
||||
RESULT_VARIABLE RES)
|
||||
if(NOT RES EQUAL 0)
|
||||
message(FATAL_ERROR "Could not get LUA_VERSION with ${LUA_EXE}: ${ERR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(LUAROCKS_CONFIGURE_COMMAND ${DEPS_BUILD_DIR}/src/luarocks/configure
|
||||
--prefix=${DEPS_INSTALL_DIR} --force-config ${LUAROCKS_OPTS})
|
||||
set(LUAROCKS_INSTALL_COMMAND ${MAKE_PRG} -j1 bootstrap)
|
||||
elseif(MSVC OR MINGW)
|
||||
|
||||
if(MINGW)
|
||||
set(COMPILER_FLAG /MW)
|
||||
elseif(MSVC)
|
||||
set(COMPILER_FLAG /MSVC)
|
||||
endif()
|
||||
|
||||
# Ignore USE_BUNDLED_LUAJIT - always ON for native Win32
|
||||
set(LUAROCKS_INSTALL_COMMAND install.bat /FORCECONFIG /NOREG /NOADMIN /Q /F
|
||||
/LUA ${DEPS_INSTALL_DIR}
|
||||
/LIB ${DEPS_LIB_DIR}
|
||||
/BIN ${DEPS_BIN_DIR}
|
||||
/INC ${DEPS_INSTALL_DIR}/include/luajit-2.1
|
||||
/P ${DEPS_INSTALL_DIR}/luarocks /TREE ${DEPS_INSTALL_DIR}
|
||||
/SCRIPTS ${DEPS_BIN_DIR}
|
||||
/CMOD ${DEPS_BIN_DIR}
|
||||
${COMPILER_FLAG}
|
||||
/LUAMOD ${DEPS_BIN_DIR}/lua)
|
||||
|
||||
set(LUAROCKS_BINARY ${DEPS_INSTALL_DIR}/luarocks/luarocks.bat)
|
||||
else()
|
||||
message(FATAL_ERROR "Trying to build luarocks in an unsupported system ${CMAKE_SYSTEM_NAME}/${CMAKE_C_COMPILER_ID}")
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(luarocks
|
||||
URL ${LUAROCKS_URL}
|
||||
URL_HASH SHA256=${LUAROCKS_SHA256}
|
||||
DOWNLOAD_NO_PROGRESS TRUE
|
||||
DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/luarocks
|
||||
BUILD_IN_SOURCE 1
|
||||
CONFIGURE_COMMAND "${LUAROCKS_CONFIGURE_COMMAND}"
|
||||
BUILD_COMMAND ""
|
||||
INSTALL_COMMAND "${LUAROCKS_INSTALL_COMMAND}")
|
||||
|
||||
if(USE_BUNDLED_LUAJIT)
|
||||
add_dependencies(luarocks luajit)
|
||||
elseif(USE_BUNDLED_LUA)
|
||||
add_dependencies(luarocks lua)
|
||||
endif()
|
||||
set(ROCKS_DIR ${DEPS_LIB_DIR}/luarocks/rocks-${LUA_VERSION})
|
||||
|
||||
if(MSVC)
|
||||
# Workaround for luarocks failing to find the md5sum.exe it is shipped with.
|
||||
list(APPEND LUAROCKS_BUILDARGS MD5SUM=md5sum)
|
||||
set(PATH PATH=${DEPS_INSTALL_DIR}/luarocks/tools;$ENV{PATH})
|
||||
endif()
|
||||
|
||||
# mpack
|
||||
add_custom_command(OUTPUT ${ROCKS_DIR}/mpack
|
||||
COMMAND ${CMAKE_COMMAND} -E env "${PATH}" ${LUAROCKS_BINARY} build mpack 1.0.10-0 ${LUAROCKS_BUILDARGS}
|
||||
DEPENDS luarocks)
|
||||
add_custom_target(mpack ALL DEPENDS ${ROCKS_DIR}/mpack)
|
||||
|
||||
# lpeg
|
||||
add_custom_command(OUTPUT ${ROCKS_DIR}/lpeg
|
||||
COMMAND ${CMAKE_COMMAND} -E env "${PATH}" ${LUAROCKS_BINARY} build lpeg 1.0.2-1 ${LUAROCKS_BUILDARGS}
|
||||
DEPENDS mpack)
|
||||
add_custom_target(lpeg ALL DEPENDS ${ROCKS_DIR}/lpeg)
|
||||
|
||||
if((NOT USE_BUNDLED_LUAJIT) AND USE_BUNDLED_LUA)
|
||||
# luabitop
|
||||
add_custom_command(OUTPUT ${ROCKS_DIR}/luabitop
|
||||
COMMAND ${CMAKE_COMMAND} -E env "${PATH}" ${LUAROCKS_BINARY} build luabitop 1.0.2-3 ${LUAROCKS_BUILDARGS}
|
||||
DEPENDS lpeg)
|
||||
add_custom_target(luabitop ALL DEPENDS ${ROCKS_DIR}/luabitop)
|
||||
endif()
|
||||
|
||||
if(USE_BUNDLED_BUSTED)
|
||||
if((NOT USE_BUNDLED_LUAJIT) AND USE_BUNDLED_LUA)
|
||||
set(BUSTED_DEPENDS luabitop)
|
||||
else()
|
||||
set(BUSTED_DEPENDS lpeg)
|
||||
endif()
|
||||
|
||||
# busted
|
||||
if(WIN32)
|
||||
set(BUSTED_EXE "${DEPS_BIN_DIR}/busted.bat")
|
||||
set(LUACHECK_EXE "${DEPS_BIN_DIR}/luacheck.bat")
|
||||
else()
|
||||
set(BUSTED_EXE "${DEPS_BIN_DIR}/busted")
|
||||
set(LUACHECK_EXE "${DEPS_BIN_DIR}/luacheck")
|
||||
endif()
|
||||
add_custom_command(OUTPUT ${BUSTED_EXE}
|
||||
COMMAND ${CMAKE_COMMAND} -E env "${PATH}" ${LUAROCKS_BINARY} build busted 2.1.1 ${LUAROCKS_BUILDARGS}
|
||||
DEPENDS ${BUSTED_DEPENDS})
|
||||
add_custom_target(busted ALL DEPENDS ${BUSTED_EXE})
|
||||
|
||||
# luacheck
|
||||
add_custom_command(OUTPUT ${LUACHECK_EXE}
|
||||
COMMAND ${CMAKE_COMMAND} -E env "${PATH}" ${LUAROCKS_BINARY} build luacheck 1.1.0-1 ${LUAROCKS_BUILDARGS}
|
||||
DEPENDS busted)
|
||||
add_custom_target(luacheck ALL DEPENDS ${LUACHECK_EXE})
|
||||
|
||||
if (USE_BUNDLED_LUA OR NOT USE_BUNDLED_LUAJIT)
|
||||
# coxpcall
|
||||
add_custom_command(OUTPUT ${ROCKS_DIR}/coxpcall
|
||||
COMMAND ${CMAKE_COMMAND} -E env "${PATH}" ${LUAROCKS_BINARY} build coxpcall 1.17.0-1 ${LUAROCKS_BUILDARGS}
|
||||
DEPENDS luarocks)
|
||||
add_custom_target(coxpcall ALL DEPENDS ${ROCKS_DIR}/coxpcall)
|
||||
endif()
|
||||
endif()
|
@@ -1,43 +1,62 @@
|
||||
set(LUV_INCLUDE_FLAGS
|
||||
"-I${DEPS_INSTALL_DIR}/include -I${DEPS_INSTALL_DIR}/include/luajit-2.1")
|
||||
|
||||
set(LUV_CMAKE_ARGS
|
||||
-D LUA_BUILD_TYPE=System
|
||||
-D LUA_COMPAT53_DIR=${DEPS_BUILD_DIR}/src/lua_compat53
|
||||
-D LUA_COMPAT53_DIR=${DEPS_BUILD_DIR}/src/lua-compat-5.3
|
||||
-D WITH_SHARED_LIBUV=ON
|
||||
-D BUILD_SHARED_LIBS=OFF
|
||||
-D BUILD_STATIC_LIBS=ON
|
||||
-D BUILD_MODULE=OFF)
|
||||
|
||||
list(APPEND LUV_CMAKE_ARGS -D WITH_LUA_ENGINE=${LUA_ENGINE})
|
||||
if(USE_BUNDLED_LUAJIT)
|
||||
list(APPEND LUV_CMAKE_ARGS -D WITH_LUA_ENGINE=LuaJit)
|
||||
elseif(USE_BUNDLED_LUA)
|
||||
list(APPEND LUV_CMAKE_ARGS -D WITH_LUA_ENGINE=Lua)
|
||||
else()
|
||||
find_package(Luajit)
|
||||
if(LUAJIT_FOUND)
|
||||
list(APPEND LUV_CMAKE_ARGS -D WITH_LUA_ENGINE=LuaJit)
|
||||
else()
|
||||
list(APPEND LUV_CMAKE_ARGS -D WITH_LUA_ENGINE=Lua)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(USE_BUNDLED_LIBUV)
|
||||
list(APPEND LUV_CMAKE_ARGS -D CMAKE_PREFIX_PATH=${DEPS_INSTALL_DIR})
|
||||
endif()
|
||||
|
||||
list(APPEND LUV_CMAKE_ARGS "-DCMAKE_C_FLAGS:STRING=${DEPS_INCLUDE_FLAGS} -w")
|
||||
list(APPEND LUV_CMAKE_ARGS
|
||||
"-DCMAKE_C_FLAGS:STRING=${LUV_INCLUDE_FLAGS}")
|
||||
if(CMAKE_GENERATOR MATCHES "Unix Makefiles" AND
|
||||
(CMAKE_SYSTEM_NAME MATCHES ".*BSD" OR CMAKE_SYSTEM_NAME MATCHES "DragonFly"))
|
||||
list(APPEND LUV_CMAKE_ARGS -D CMAKE_MAKE_PROGRAM=gmake)
|
||||
endif()
|
||||
|
||||
get_externalproject_options(lua_compat53 ${DEPS_IGNORE_SHA})
|
||||
ExternalProject_Add(lua_compat53
|
||||
DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/lua_compat53
|
||||
ExternalProject_Add(lua-compat-5.3
|
||||
URL ${LUA_COMPAT53_URL}
|
||||
URL_HASH SHA256=${LUA_COMPAT53_SHA256}
|
||||
DOWNLOAD_NO_PROGRESS TRUE
|
||||
DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/lua-compat-5.3
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
${EXTERNALPROJECT_OPTIONS})
|
||||
INSTALL_COMMAND "")
|
||||
|
||||
get_externalproject_options(luv ${DEPS_IGNORE_SHA})
|
||||
ExternalProject_Add(luv
|
||||
DEPENDS lua_compat53
|
||||
ExternalProject_Add(luv-static
|
||||
DEPENDS lua-compat-5.3
|
||||
URL ${LUV_URL}
|
||||
URL_HASH SHA256=${LUV_SHA256}
|
||||
DOWNLOAD_NO_PROGRESS TRUE
|
||||
DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/luv
|
||||
SOURCE_DIR ${DEPS_BUILD_DIR}/src/luv
|
||||
CMAKE_ARGS ${DEPS_CMAKE_ARGS} ${LUV_CMAKE_ARGS}
|
||||
${EXTERNALPROJECT_OPTIONS})
|
||||
CMAKE_CACHE_ARGS ${DEPS_CMAKE_CACHE_ARGS})
|
||||
|
||||
if(USE_BUNDLED_LUAJIT)
|
||||
add_dependencies(luv luajit)
|
||||
add_dependencies(luv-static luajit)
|
||||
elseif(USE_BUNDLED_LUA)
|
||||
add_dependencies(luv lua)
|
||||
add_dependencies(luv-static lua)
|
||||
endif()
|
||||
if(USE_BUNDLED_LIBUV)
|
||||
add_dependencies(luv libuv)
|
||||
add_dependencies(luv-static libuv)
|
||||
endif()
|
||||
|
@@ -1,7 +1,17 @@
|
||||
get_externalproject_options(msgpack ${DEPS_IGNORE_SHA})
|
||||
ExternalProject_Add(msgpack
|
||||
URL ${MSGPACK_URL}
|
||||
URL_HASH SHA256=${MSGPACK_SHA256}
|
||||
DOWNLOAD_NO_PROGRESS TRUE
|
||||
DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/msgpack
|
||||
CMAKE_ARGS ${DEPS_CMAKE_ARGS}
|
||||
-D MSGPACK_BUILD_TESTS=OFF
|
||||
-D MSGPACK_BUILD_EXAMPLES=OFF
|
||||
${EXTERNALPROJECT_OPTIONS})
|
||||
CMAKE_CACHE_ARGS ${DEPS_CMAKE_CACHE_ARGS})
|
||||
|
||||
if (NOT MSVC)
|
||||
add_custom_target(clean_shared_libraries_msgpack ALL
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-D REMOVE_FILE_GLOB=${DEPS_LIB_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}*${CMAKE_SHARED_LIBRARY_SUFFIX}*
|
||||
-P ${PROJECT_SOURCE_DIR}/cmake/RemoveFiles.cmake)
|
||||
add_dependencies(clean_shared_libraries_msgpack msgpack)
|
||||
endif()
|
||||
|
@@ -1,8 +1,11 @@
|
||||
get_externalproject_options(treesitter ${DEPS_IGNORE_SHA})
|
||||
ExternalProject_Add(treesitter
|
||||
URL ${TREESITTER_URL}
|
||||
URL_HASH SHA256=${TREESITTER_SHA256}
|
||||
DOWNLOAD_NO_PROGRESS TRUE
|
||||
DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/treesitter
|
||||
INSTALL_DIR ${DEPS_INSTALL_DIR}
|
||||
PATCH_COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmake/TreesitterCMakeLists.txt
|
||||
${DEPS_BUILD_DIR}/src/treesitter/CMakeLists.txt
|
||||
CMAKE_ARGS ${DEPS_CMAKE_ARGS}
|
||||
${EXTERNALPROJECT_OPTIONS})
|
||||
CMAKE_CACHE_ARGS ${DEPS_CMAKE_CACHE_ARGS})
|
||||
|
@@ -15,20 +15,25 @@ function(BuildTSParser)
|
||||
set(TS_CMAKE_FILE TreesitterParserCMakeLists.txt)
|
||||
endif()
|
||||
|
||||
set(NAME treesitter_${TS_LANG})
|
||||
set(NAME treesitter-${TS_LANG})
|
||||
string(TOUPPER "TREESITTER_${TS_LANG}_URL" URL_VARNAME)
|
||||
set(URL ${${URL_VARNAME}})
|
||||
string(TOUPPER "TREESITTER_${TS_LANG}_SHA256" HASH_VARNAME)
|
||||
set(HASH ${${HASH_VARNAME}})
|
||||
|
||||
get_externalproject_options(${NAME} ${DEPS_IGNORE_SHA})
|
||||
ExternalProject_Add(${NAME}
|
||||
URL ${URL}
|
||||
URL_HASH SHA256=${HASH}
|
||||
DOWNLOAD_NO_PROGRESS TRUE
|
||||
DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/${NAME}
|
||||
PATCH_COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmake/${TS_CMAKE_FILE}
|
||||
${DEPS_BUILD_DIR}/src/${NAME}/CMakeLists.txt
|
||||
CMAKE_ARGS ${DEPS_CMAKE_ARGS}
|
||||
-D PARSERLANG=${TS_LANG}
|
||||
${EXTERNALPROJECT_OPTIONS})
|
||||
CMAKE_CACHE_ARGS ${DEPS_CMAKE_CACHE_ARGS})
|
||||
endfunction()
|
||||
|
||||
foreach(lang c lua vim vimdoc query)
|
||||
BuildTSParser(LANG ${lang})
|
||||
endforeach()
|
||||
BuildTSParser(LANG markdown CMAKE_FILE MarkdownParserCMakeLists.txt)
|
||||
|
@@ -1,5 +1,7 @@
|
||||
get_externalproject_options(unibilium ${DEPS_IGNORE_SHA})
|
||||
ExternalProject_Add(unibilium
|
||||
URL ${UNIBILIUM_URL}
|
||||
URL_HASH SHA256=${UNIBILIUM_SHA256}
|
||||
DOWNLOAD_NO_PROGRESS TRUE
|
||||
DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/unibilium
|
||||
CMAKE_ARGS ${DEPS_CMAKE_ARGS}
|
||||
${EXTERNALPROJECT_OPTIONS})
|
||||
CMAKE_CACHE_ARGS ${DEPS_CMAKE_CACHE_ARGS})
|
||||
|
@@ -14,7 +14,7 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${TO})
|
||||
file(GLOB files ${FROM_GLOB})
|
||||
foreach(file ${files})
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${file} ${TO} RESULT_VARIABLE rv)
|
||||
if(rv)
|
||||
if(NOT rv EQUAL 0)
|
||||
message(FATAL_ERROR "Error copying ${file}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
@@ -5,7 +5,7 @@
|
||||
# install root.
|
||||
function(GetBinaryDep)
|
||||
cmake_parse_arguments(_gettool
|
||||
""
|
||||
"BUILD_IN_SOURCE"
|
||||
"TARGET"
|
||||
"INSTALL_COMMAND"
|
||||
${ARGN})
|
||||
@@ -18,13 +18,13 @@ function(GetBinaryDep)
|
||||
ExternalProject_Add(${_gettool_TARGET}
|
||||
URL ${URL}
|
||||
URL_HASH SHA256=${HASH}
|
||||
DOWNLOAD_NO_PROGRESS TRUE
|
||||
DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_IN_SOURCE 1
|
||||
BUILD_COMMAND ""
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} -E make_directory ${DEPS_BIN_DIR}
|
||||
COMMAND "${_gettool_INSTALL_COMMAND}"
|
||||
DOWNLOAD_NO_PROGRESS TRUE)
|
||||
COMMAND "${_gettool_INSTALL_COMMAND}")
|
||||
endfunction()
|
||||
|
||||
# Download executable and move it to DEPS_BIN_DIR
|
||||
@@ -43,11 +43,11 @@ function(GetExecutable)
|
||||
ExternalProject_Add(${ARG_TARGET}
|
||||
URL ${URL}
|
||||
URL_HASH SHA256=${HASH}
|
||||
DOWNLOAD_NO_PROGRESS TRUE
|
||||
DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}
|
||||
DOWNLOAD_NO_EXTRACT TRUE
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND ""
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} -E make_directory ${DEPS_BIN_DIR}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy <DOWNLOADED_FILE> ${DEPS_BIN_DIR}
|
||||
DOWNLOAD_NO_PROGRESS TRUE)
|
||||
COMMAND ${CMAKE_COMMAND} -E copy <DOWNLOADED_FILE> ${DEPS_BIN_DIR})
|
||||
endfunction()
|
||||
|
@@ -1,9 +1,6 @@
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(gettext C)
|
||||
|
||||
add_compile_options(-w)
|
||||
set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /ignore:4006")
|
||||
|
||||
# Adds PREFIX to each item in LIST
|
||||
macro(PREFIX_LIST_ITEMS LIST PREFIX)
|
||||
string(REPLACE ";" ";${PREFIX}" ${LIST} ";${${LIST}}")
|
||||
@@ -15,20 +12,15 @@ string(REPLACE "#undef HAVE_LONG_LONG_INT" "#define HAVE_LONG_LONG_INT 1" CONFIG
|
||||
string(REPLACE "#undef HAVE_ICONV_H" "#define HAVE_ICONV_H 1" CONFIG_CONTENT ${CONFIG_CONTENT})
|
||||
string(REPLACE "#undef HAVE_ICONV" "#define HAVE_ICONV 1" CONFIG_CONTENT ${CONFIG_CONTENT})
|
||||
string(REPLACE "#undef ICONV_CONST" "#define ICONV_CONST const" CONFIG_CONTENT ${CONFIG_CONTENT})
|
||||
if(MSVC)
|
||||
string(REPLACE "#undef HAVE_STDINT_H_WITH_UINTMAX" "#define HAVE_STDINT_H_WITH_UINTMAX 1" CONFIG_CONTENT ${CONFIG_CONTENT})
|
||||
string(REPLACE "#undef HAVE_STDINT_H" "#define HAVE_STDINT_H 1" CONFIG_CONTENT ${CONFIG_CONTENT})
|
||||
else()
|
||||
string(REPLACE "#undef uintmax_t" "
|
||||
#if _WIN64
|
||||
# define intmax_t long long
|
||||
# define uintmax_t unsigned long long
|
||||
#elif _WIN32
|
||||
# define intmax_t long
|
||||
# define uintmax_t unsigned long
|
||||
#endif"
|
||||
CONFIG_CONTENT ${CONFIG_CONTENT})
|
||||
endif()
|
||||
string(REPLACE "#undef uintmax_t" "
|
||||
#if _WIN64
|
||||
# define intmax_t long long
|
||||
# define uintmax_t unsigned long long
|
||||
#elif _WIN32
|
||||
# define intmax_t long
|
||||
# define uintmax_t unsigned long
|
||||
#endif"
|
||||
CONFIG_CONTENT ${CONFIG_CONTENT})
|
||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/gettext-runtime/config.h ${CONFIG_CONTENT})
|
||||
|
||||
set(HAVE_NEWLOCALE 0)
|
||||
@@ -81,7 +73,8 @@ set_property(TARGET libintl APPEND PROPERTY COMPILE_DEFINITIONS
|
||||
NO_XMALLOC
|
||||
set_relocation_prefix=libintl_set_relocation_prefix
|
||||
relocate=libintl_relocate
|
||||
HAVE_CONFIG_H)
|
||||
HAVE_CONFIG_H
|
||||
_CRT_SECURE_NO_WARNINGS)
|
||||
|
||||
|
||||
file(READ gettext-tools/config.h.in CONFIG_CONTENT)
|
||||
|
@@ -1,8 +1,6 @@
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(libiconv C)
|
||||
|
||||
add_compile_options(-w)
|
||||
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/srclib
|
||||
@@ -33,7 +31,7 @@ set(USE_MBSTATE_T 0)
|
||||
configure_file(libcharset/include/localcharset.h.build.in localcharset.h)
|
||||
configure_file(include/iconv.h.build.in iconv.h)
|
||||
|
||||
add_definitions(-DLIBDIR)
|
||||
add_definitions(-DLIBDIR -D_CRT_SECURE_NO_WARNINGS)
|
||||
|
||||
add_library(libcharset libcharset/lib/localcharset.c)
|
||||
|
||||
|
20
cmake.deps/cmake/LibtermkeyCMakeLists.txt
Normal file
20
cmake.deps/cmake/LibtermkeyCMakeLists.txt
Normal file
@@ -0,0 +1,20 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(libtermkey C)
|
||||
|
||||
add_definitions(-D _CRT_SECURE_NO_WARNINGS)
|
||||
add_definitions(-DHAVE_UNIBILIUM)
|
||||
|
||||
include_directories(${PROJECT_BINARY_DIR}/t)
|
||||
include_directories(SYSTEM ${UNIBILIUM_INCLUDE_DIRS})
|
||||
|
||||
add_library(termkey termkey.c driver-csi.c driver-ti.c)
|
||||
set_target_properties(termkey PROPERTIES
|
||||
PUBLIC_HEADER ${PROJECT_SOURCE_DIR}/termkey.h)
|
||||
target_link_libraries(termkey ${UNIBILIUM_LIBRARIES})
|
||||
|
||||
include(GNUInstallDirs)
|
||||
install(TARGETS termkey
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
|
||||
# vim: set ft=cmake:
|
@@ -1,10 +1,12 @@
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(libvterm C)
|
||||
|
||||
add_compile_options(-w)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
if(MSVC)
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE)
|
||||
endif()
|
||||
|
||||
include_directories(${CMAKE_SOURCE_DIR}/include)
|
||||
include_directories(${CMAKE_BINARY_DIR})
|
||||
|
||||
|
@@ -1,13 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
project (lpeg C)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
file(GLOB LPEG_SOURCES ${CMAKE_SOURCE_DIR}/*.c)
|
||||
add_library(lpeg ${LPEG_SOURCES})
|
||||
|
||||
target_compile_options(lpeg PRIVATE -w)
|
||||
|
||||
install(TARGETS lpeg ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
|
||||
# vim: set ft=cmake:
|
@@ -1,28 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
project(${PARSERLANG} C)
|
||||
|
||||
add_compile_options(-w)
|
||||
|
||||
add_library(markdown MODULE
|
||||
tree-sitter-markdown/src/parser.c
|
||||
tree-sitter-markdown/src/scanner.c)
|
||||
target_include_directories(markdown
|
||||
PRIVATE
|
||||
tree-sitter-markdown/src)
|
||||
|
||||
add_library(markdown_inline MODULE
|
||||
tree-sitter-markdown-inline/src/parser.c
|
||||
tree-sitter-markdown-inline/src/scanner.c)
|
||||
target_include_directories(markdown_inline
|
||||
PRIVATE
|
||||
tree-sitter-markdown-inline/src)
|
||||
|
||||
set_target_properties(
|
||||
markdown markdown_inline
|
||||
PROPERTIES
|
||||
PREFIX ""
|
||||
)
|
||||
|
||||
install(TARGETS markdown markdown_inline LIBRARY DESTINATION lib/nvim/parser)
|
||||
|
||||
# vim: set ft=cmake:
|
5
cmake.deps/cmake/RemoveFiles.cmake
Normal file
5
cmake.deps/cmake/RemoveFiles.cmake
Normal file
@@ -0,0 +1,5 @@
|
||||
file(GLOB_RECURSE FILES_TO_REMOVE ${REMOVE_FILE_GLOB})
|
||||
|
||||
if(FILES_TO_REMOVE)
|
||||
file(REMOVE ${FILES_TO_REMOVE})
|
||||
endif()
|
@@ -1,14 +1,13 @@
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(treesitter C)
|
||||
|
||||
add_compile_options(-w)
|
||||
|
||||
add_library(tree-sitter lib/src/lib.c)
|
||||
target_include_directories(tree-sitter
|
||||
PRIVATE lib/src lib/include)
|
||||
|
||||
install(FILES
|
||||
lib/include/tree_sitter/api.h
|
||||
lib/include/tree_sitter/parser.h
|
||||
DESTINATION include/tree_sitter)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
@@ -1,8 +1,6 @@
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(parser C)
|
||||
|
||||
add_compile_options(-w)
|
||||
|
||||
file(GLOB source_files src/*.c)
|
||||
|
||||
add_library(parser
|
||||
|
@@ -1,62 +0,0 @@
|
||||
LIBUV_URL https://github.com/libuv/libuv/archive/v1.48.0.tar.gz
|
||||
LIBUV_SHA256 8c253adb0f800926a6cbd1c6576abae0bc8eb86a4f891049b72f9e5b7dc58f33
|
||||
|
||||
MSGPACK_URL https://github.com/msgpack/msgpack-c/archive/c-6.0.1.tar.gz
|
||||
MSGPACK_SHA256 58d5fe49d0ee2b374d60a61aabf8028b2c92004e6f11bff04e74b639fc8ad541
|
||||
|
||||
LUAJIT_URL https://github.com/LuaJIT/LuaJIT/archive/75e92777988017fe47c5eb290998021bbf972d1f.tar.gz
|
||||
LUAJIT_SHA256 0f69288190024d732c67645e40ed5b137d67aa950fedf0f44a9ad0f3dba6d5d2
|
||||
|
||||
LUA_URL https://www.lua.org/ftp/lua-5.1.5.tar.gz
|
||||
LUA_SHA256 2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333
|
||||
|
||||
UNIBILIUM_URL https://github.com/neovim/unibilium/archive/d72c3598e7ac5d1ebf86ee268b8b4ed95c0fa628.tar.gz
|
||||
UNIBILIUM_SHA256 9c4747c862ab5e3076dcf8fa8f0ea7a6b50f20ec5905618b9536655596797487
|
||||
|
||||
LIBVTERM_URL https://github.com/neovim/libvterm/archive/0a15c6e983b0db7ef8276e0792414a805d01bdaf.tar.gz
|
||||
LIBVTERM_SHA256 c4683e7a2d71c04781fd0ab7719a94202800e97a9e091514c16983bb732b0fa7
|
||||
|
||||
LUV_URL https://github.com/luvit/luv/releases/download/1.48.0-2/luv-1.48.0-2.tar.gz
|
||||
LUV_SHA256 2c3a1ddfebb4f6550293a40ee789f7122e97647eede51511f57203de48c03b7a
|
||||
|
||||
LPEG_URL https://github.com/neovim/deps/raw/d495ee6f79e7962a53ad79670cb92488abe0b9b4/opt/lpeg-1.1.0.tar.gz
|
||||
LPEG_SHA256 4b155d67d2246c1ffa7ad7bc466c1ea899bbc40fef0257cc9c03cecbaed4352a
|
||||
|
||||
LUA_COMPAT53_URL https://github.com/lunarmodules/lua-compat-5.3/archive/v0.13.tar.gz
|
||||
LUA_COMPAT53_SHA256 f5dc30e7b1fda856ee4d392be457642c1f0c259264a9b9bfbcb680302ce88fc2
|
||||
|
||||
CAT_URL https://github.com/neovim/deps/raw/21c5e8bdda33521a6ed497b315e03265a2785cbc/opt/cat.exe
|
||||
CAT_SHA256 93b8d307bb15af3968920bdea3beb869a49d166f9164853c58a4e6ffdcae61c6
|
||||
TEE_URL https://github.com/neovim/deps/raw/21c5e8bdda33521a6ed497b315e03265a2785cbc/opt/tee.exe
|
||||
TEE_SHA256 950eea4e17fa3a7e89fa2c55374037b5797b3f1a54fea1304634884ab42ec14d
|
||||
XXD_URL https://github.com/neovim/deps/raw/21c5e8bdda33521a6ed497b315e03265a2785cbc/opt/xxd.exe
|
||||
XXD_SHA256 7a581e3882d28161cc52850f9a11d634b3eaf2c029276f093c1ed4c90e45a10c
|
||||
|
||||
WIN32YANK_X86_64_URL https://github.com/equalsraf/win32yank/releases/download/v0.1.1/win32yank-x64.zip
|
||||
WIN32YANK_X86_64_SHA256 247c9a05b94387a884b49d3db13f806b1677dfc38020f955f719be6902260cd6
|
||||
|
||||
GETTEXT_URL https://github.com/neovim/deps/raw/b9bf36eb31f27e8136d907da38fa23518927737e/opt/gettext-0.20.1.tar.gz
|
||||
GETTEXT_SHA256 66415634c6e8c3fa8b71362879ec7575e27da43da562c798a8a2f223e6e47f5c
|
||||
|
||||
LIBICONV_URL https://github.com/neovim/deps/raw/b9bf36eb31f27e8136d907da38fa23518927737e/opt/libiconv-1.17.tar.gz
|
||||
LIBICONV_SHA256 8f74213b56238c85a50a5329f77e06198771e70dd9a739779f4c02f65d971313
|
||||
|
||||
TREESITTER_C_URL https://github.com/tree-sitter/tree-sitter-c/archive/v0.21.3.tar.gz
|
||||
TREESITTER_C_SHA256 75a3780df6114cd37496761c4a7c9fd900c78bee3a2707f590d78c0ca3a24368
|
||||
TREESITTER_LUA_URL https://github.com/tree-sitter-grammars/tree-sitter-lua/archive/v0.1.0.tar.gz
|
||||
TREESITTER_LUA_SHA256 230cfcbfa74ed1f7b8149e9a1f34c2efc4c589a71fe0f5dc8560622f8020d722
|
||||
TREESITTER_VIM_URL https://github.com/neovim/tree-sitter-vim/archive/v0.4.0.tar.gz
|
||||
TREESITTER_VIM_SHA256 9f856f8b4a10ab43348550fa2d3cb2846ae3d8e60f45887200549c051c66f9d5
|
||||
TREESITTER_VIMDOC_URL https://github.com/neovim/tree-sitter-vimdoc/archive/v3.0.0.tar.gz
|
||||
TREESITTER_VIMDOC_SHA256 a639bf92bf57bfa1cdc90ca16af27bfaf26a9779064776dd4be34c1ef1453f6c
|
||||
TREESITTER_QUERY_URL https://github.com/tree-sitter-grammars/tree-sitter-query/archive/v0.4.0.tar.gz
|
||||
TREESITTER_QUERY_SHA256 d3a423ab66dc62b2969625e280116678a8a22582b5ff087795222108db2f6a6e
|
||||
TREESITTER_MARKDOWN_URL https://github.com/MDeiml/tree-sitter-markdown/archive/v0.2.3.tar.gz
|
||||
TREESITTER_MARKDOWN_SHA256 4909d6023643f1afc3ab219585d4035b7403f3a17849782ab803c5f73c8a31d5
|
||||
TREESITTER_URL https://github.com/tree-sitter/tree-sitter/archive/v0.22.6.tar.gz
|
||||
TREESITTER_SHA256 e2b687f74358ab6404730b7fb1a1ced7ddb3780202d37595ecd7b20a8f41861f
|
||||
|
||||
UNCRUSTIFY_URL https://github.com/uncrustify/uncrustify/archive/uncrustify-0.79.0.tar.gz
|
||||
UNCRUSTIFY_SHA256 e7afaeabf636b7f0ce4e3e9747b95f7bd939613a8db49579755dddf44fedca5f
|
||||
LUA_DEV_DEPS_URL https://github.com/neovim/deps/raw/5a1f71cceb24990a0b15fd9a472a5f549f019248/opt/lua-dev-deps.tar.gz
|
||||
LUA_DEV_DEPS_SHA256 27db2495f5eddc7fc191701ec9b291486853530c6125609d3197d03481e8d5a2
|
@@ -1,7 +1,3 @@
|
||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
|
||||
set(CMAKE_SYSTEM_PROCESSOR arm64)
|
||||
endif()
|
||||
|
||||
set(CPACK_PACKAGE_NAME "Neovim")
|
||||
set(CPACK_PACKAGE_VENDOR "neovim.io")
|
||||
set(CPACK_PACKAGE_FILE_NAME "nvim")
|
||||
@@ -41,19 +37,20 @@ if(WIN32)
|
||||
|
||||
# Create start menu and desktop shortcuts
|
||||
set(CPACK_WIX_PROGRAM_MENU_FOLDER "${CPACK_PACKAGE_NAME}")
|
||||
set(CPACK_PACKAGE_EXECUTABLES "nvim" "Neovim")
|
||||
set(CPACK_WIX_INSTALL_SCOPE "perMachine")
|
||||
set(CPACK_PACKAGE_EXECUTABLES "nvim" "Neovim" "nvim-qt" "Neovim Qt")
|
||||
set(CPACK_CREATE_DESKTOP_LINKS "nvim-qt")
|
||||
|
||||
# We use a wix patch to add further options to the installer.
|
||||
# We use a wix patch to add further options to the installer. At present, it just adds neovim to the path
|
||||
# on installation and defines per-user installation, however, it can be extended.
|
||||
# See: https://cmake.org/cmake/help/v3.7/module/CPackWIX.html#variable:CPACK_WIX_PATCH_FILE
|
||||
list(APPEND CPACK_WIX_EXTENSIONS WixUtilExtension)
|
||||
list(APPEND CPACK_WIX_PATCH_FILE ${CMAKE_CURRENT_LIST_DIR}/WixPatch.xml)
|
||||
elseif(APPLE)
|
||||
set(CPACK_PACKAGE_FILE_NAME "nvim-macos-${CMAKE_SYSTEM_PROCESSOR}")
|
||||
set(CPACK_PACKAGE_FILE_NAME "nvim-macos")
|
||||
set(CPACK_GENERATOR TGZ)
|
||||
set(CPACK_PACKAGE_ICON ${CMAKE_CURRENT_LIST_DIR}/neovim.icns)
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
set(CPACK_PACKAGE_FILE_NAME "nvim-linux-${CMAKE_SYSTEM_PROCESSOR}")
|
||||
set(CPACK_PACKAGE_FILE_NAME "nvim-linux64")
|
||||
set(CPACK_GENERATOR TGZ DEB)
|
||||
set(CPACK_DEBIAN_PACKAGE_NAME "Neovim") # required
|
||||
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Neovim.io") # required
|
||||
|
@@ -6,7 +6,7 @@
|
||||
Name='PATH'
|
||||
Action='set'
|
||||
Permanent='no'
|
||||
System='yes'
|
||||
System='no'
|
||||
Part='last'
|
||||
Value='[INSTALL_ROOT]bin'
|
||||
/>
|
||||
|
13
cmake/CheckUncrustifyVersion.cmake
Normal file
13
cmake/CheckUncrustifyVersion.cmake
Normal file
@@ -0,0 +1,13 @@
|
||||
if(UNCRUSTIFY_PRG)
|
||||
execute_process(COMMAND uncrustify --version
|
||||
OUTPUT_VARIABLE user_version
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
string(REGEX REPLACE "[A-Za-z_#-]" "" user_version ${user_version})
|
||||
|
||||
file(STRINGS ${CONFIG_FILE} required_version LIMIT_COUNT 1)
|
||||
string(REGEX REPLACE "[A-Za-z_# -]" "" required_version ${required_version})
|
||||
|
||||
if(NOT user_version STREQUAL required_version)
|
||||
message(FATAL_ERROR "Wrong uncrustify version! Required version is ${required_version} but found ${user_version}")
|
||||
endif()
|
||||
endif()
|
@@ -6,7 +6,7 @@ execute_process(
|
||||
OUTPUT_VARIABLE trans
|
||||
ERROR_VARIABLE err
|
||||
RESULT_VARIABLE res)
|
||||
if(res)
|
||||
if(NOT res EQUAL 0)
|
||||
message(FATAL_ERROR "iconv failed to run correctly: ${err}")
|
||||
endif()
|
||||
|
||||
|
101
cmake/Deps.cmake
101
cmake/Deps.cmake
@@ -1,101 +0,0 @@
|
||||
set(DEPS_INSTALL_DIR "${CMAKE_BINARY_DIR}/usr")
|
||||
set(DEPS_BIN_DIR "${DEPS_INSTALL_DIR}/bin")
|
||||
set(DEPS_LIB_DIR "${DEPS_INSTALL_DIR}/lib")
|
||||
set(DEPS_SHARE_DIR "${DEPS_INSTALL_DIR}/share/lua/5.1")
|
||||
|
||||
set(DEPS_BUILD_DIR "${CMAKE_BINARY_DIR}/build")
|
||||
set(DEPS_DOWNLOAD_DIR "${DEPS_BUILD_DIR}/downloads")
|
||||
|
||||
set(DEPS_CMAKE_ARGS
|
||||
-D CMAKE_C_COMPILER=${CMAKE_C_COMPILER}
|
||||
-D CMAKE_C_STANDARD=99
|
||||
-D CMAKE_GENERATOR=${CMAKE_GENERATOR}
|
||||
-D CMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM}
|
||||
-D BUILD_SHARED_LIBS=OFF
|
||||
-D CMAKE_POSITION_INDEPENDENT_CODE=ON
|
||||
-D CMAKE_INSTALL_PREFIX=${DEPS_INSTALL_DIR})
|
||||
if(APPLE)
|
||||
list(APPEND DEPS_CMAKE_ARGS -D CMAKE_FIND_FRAMEWORK=${CMAKE_FIND_FRAMEWORK})
|
||||
endif()
|
||||
|
||||
# Can be removed once minimum version is at least 3.15
|
||||
if(POLICY CMP0092)
|
||||
list(APPEND DEPS_CMAKE_ARGS -D CMAKE_POLICY_DEFAULT_CMP0092=NEW)
|
||||
endif()
|
||||
|
||||
find_program(CACHE_PRG NAMES ccache sccache)
|
||||
if(CACHE_PRG)
|
||||
set(CMAKE_C_COMPILER_LAUNCHER ${CMAKE_COMMAND} -E env CCACHE_SLOPPINESS=pch_defines,time_macros ${CACHE_PRG})
|
||||
list(APPEND DEPS_CMAKE_CACHE_ARGS -DCMAKE_C_COMPILER_LAUNCHER:STRING=${CMAKE_C_COMPILER_LAUNCHER})
|
||||
endif()
|
||||
|
||||
# MAKE_PRG
|
||||
if(UNIX)
|
||||
find_program(MAKE_PRG NAMES gmake make)
|
||||
if(NOT MAKE_PRG)
|
||||
message(FATAL_ERROR "GNU Make is required to build the dependencies.")
|
||||
else()
|
||||
message(STATUS "Found GNU Make at ${MAKE_PRG}")
|
||||
endif()
|
||||
endif()
|
||||
# When using make, use the $(MAKE) variable to avoid warning about the job
|
||||
# server.
|
||||
if(CMAKE_GENERATOR MATCHES "Makefiles")
|
||||
set(MAKE_PRG "$(MAKE)")
|
||||
endif()
|
||||
if(MINGW AND CMAKE_GENERATOR MATCHES "Ninja")
|
||||
find_program(MAKE_PRG NAMES mingw32-make)
|
||||
if(NOT MAKE_PRG)
|
||||
message(FATAL_ERROR "GNU Make for mingw32 is required to build the dependencies.")
|
||||
else()
|
||||
message(STATUS "Found GNU Make for mingw32: ${MAKE_PRG}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# DEPS_C_COMPILER
|
||||
set(DEPS_C_COMPILER "${CMAKE_C_COMPILER}")
|
||||
if(CMAKE_OSX_SYSROOT)
|
||||
set(DEPS_C_COMPILER "${DEPS_C_COMPILER} -isysroot${CMAKE_OSX_SYSROOT}")
|
||||
endif()
|
||||
|
||||
get_filename_component(rootdir ${PROJECT_SOURCE_DIR} NAME)
|
||||
if(${rootdir} MATCHES "cmake.deps")
|
||||
set(depsfile ${PROJECT_SOURCE_DIR}/deps.txt)
|
||||
else()
|
||||
set(depsfile ${PROJECT_SOURCE_DIR}/cmake.deps/deps.txt)
|
||||
endif()
|
||||
|
||||
set_directory_properties(PROPERTIES
|
||||
EP_PREFIX "${DEPS_BUILD_DIR}"
|
||||
CMAKE_CONFIGURE_DEPENDS ${depsfile})
|
||||
|
||||
file(READ ${depsfile} DEPENDENCIES)
|
||||
STRING(REGEX REPLACE "\n" ";" DEPENDENCIES "${DEPENDENCIES}")
|
||||
foreach(dep ${DEPENDENCIES})
|
||||
STRING(REGEX REPLACE " " ";" dep "${dep}")
|
||||
list(GET dep 0 name)
|
||||
list(GET dep 1 value)
|
||||
if(NOT ${name})
|
||||
# _URL variables must NOT be set when USE_EXISTING_SRC_DIR is set,
|
||||
# otherwise ExternalProject will try to re-download the sources.
|
||||
if(NOT USE_EXISTING_SRC_DIR)
|
||||
set(${name} ${value})
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
function(get_externalproject_options name DEPS_IGNORE_SHA)
|
||||
string(TOUPPER ${name} name_allcaps)
|
||||
set(url ${${name_allcaps}_URL})
|
||||
|
||||
set(EXTERNALPROJECT_OPTIONS
|
||||
DOWNLOAD_NO_PROGRESS TRUE
|
||||
EXTERNALPROJECT_OPTIONS URL ${${name_allcaps}_URL}
|
||||
CMAKE_CACHE_ARGS ${DEPS_CMAKE_CACHE_ARGS})
|
||||
|
||||
if(NOT ${DEPS_IGNORE_SHA})
|
||||
list(APPEND EXTERNALPROJECT_OPTIONS URL_HASH SHA256=${${name_allcaps}_SHA256})
|
||||
endif()
|
||||
|
||||
set(EXTERNALPROJECT_OPTIONS ${EXTERNALPROJECT_OPTIONS} PARENT_SCOPE)
|
||||
endfunction()
|
@@ -1,39 +0,0 @@
|
||||
# Functions to aid the built-in find_ functions
|
||||
|
||||
# Same as find_path, but always search in .deps directory first and then everything else.
|
||||
function(find_path2)
|
||||
find_path_nvim(${ARGV})
|
||||
find_path(${ARGV})
|
||||
endfunction()
|
||||
|
||||
function(find_path_nvim)
|
||||
set(CMAKE_FIND_FRAMEWORK NEVER)
|
||||
set(CMAKE_FIND_APPBUNDLE NEVER)
|
||||
find_path(${ARGV} NO_CMAKE_SYSTEM_PATH NO_CMAKE_ENVIRONMENT_PATH NO_SYSTEM_ENVIRONMENT_PATH)
|
||||
endfunction()
|
||||
|
||||
# Same as find_library, but with the following search order:
|
||||
# 1. Only search in .deps directory. Only search for static libraries.
|
||||
# 2. Only search in .deps directory. Search all libraries
|
||||
# 3. Search everywhere, all libraries
|
||||
function(find_library2)
|
||||
find_library_nvim(STATIC ${ARGV})
|
||||
find_library_nvim(${ARGV})
|
||||
find_library(${ARGV})
|
||||
endfunction()
|
||||
|
||||
function(find_library_nvim)
|
||||
cmake_parse_arguments(ARG
|
||||
"STATIC"
|
||||
""
|
||||
""
|
||||
${ARGN})
|
||||
list(REMOVE_ITEM ARGN STATIC)
|
||||
|
||||
if(ARG_STATIC)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX})
|
||||
endif()
|
||||
set(CMAKE_FIND_FRAMEWORK NEVER)
|
||||
set(CMAKE_FIND_APPBUNDLE NEVER)
|
||||
find_library(${ARGN} NO_CMAKE_SYSTEM_PATH NO_CMAKE_ENVIRONMENT_PATH NO_SYSTEM_ENVIRONMENT_PATH)
|
||||
endfunction()
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user