mirror of
https://github.com/neovim/neovim
synced 2025-07-22 14:21:58 +00:00
Compare commits
2194 Commits
v0.3.8
...
release-0.
Author | SHA1 | Date | |
---|---|---|---|
d9dd30a955 | |||
b2cef8b665 | |||
1de33ce2cd | |||
1c3afe4e25 | |||
b92399d008 | |||
20070310a4 | |||
c685a2ef48 | |||
018ec2172b | |||
87a88c8e42 | |||
47b84599df | |||
e813ec79c2 | |||
40dc1ba85c | |||
ee77d8665f | |||
a09b3cbcb1 | |||
23c99bb78f | |||
fd02e63513 | |||
0547b4cdad | |||
052337ddfc | |||
82283a3d10 | |||
704151c8a2 | |||
3e3002b90c | |||
e4629f203f | |||
ce3db4648a | |||
f558af8b18 | |||
cda119055a | |||
8399f73574 | |||
faaf83a49e | |||
0493fa00fa | |||
6b38b9e4c6 | |||
047e36695f | |||
e1cc8e8e09 | |||
49469ec6b9 | |||
5e47cf27b4 | |||
dd0a3cd22f | |||
10590e4b20 | |||
b4a10dd9b2 | |||
dd7206af37 | |||
92e80f18a8 | |||
5d41bfccec | |||
641e229132 | |||
f225028a0d | |||
02dae63bf7 | |||
6274f06aba | |||
47bd62c15c | |||
d2730365ef | |||
284b398eb9 | |||
2645669c89 | |||
b5cee56757 | |||
d56f6fed9c | |||
910cdac22c | |||
23a64c95d8 | |||
1b2666cd21 | |||
1bf90bf9d3 | |||
fafd636267 | |||
ef71c89129 | |||
9c4223215f | |||
972dd758cb | |||
d379db428b | |||
4c48cf3020 | |||
2cd1ff762e | |||
941dc1b0ca | |||
b99dad7b4c | |||
1def94597b | |||
b678d33dd3 | |||
a012387074 | |||
599ad5d3b8 | |||
924fa143cc | |||
327e8ddb18 | |||
a1f557690f | |||
f2f37712a4 | |||
4f452a6744 | |||
9571a87d3d | |||
3817518ab4 | |||
56d9412999 | |||
ddd3363a42 | |||
d453d2c484 | |||
c5d1b0f3da | |||
e0622b4c65 | |||
b781f2b072 | |||
e63fdf63ba | |||
eef3809067 | |||
43f4955f70 | |||
6f693be1ee | |||
36e2846b49 | |||
60b56ed458 | |||
8250d6795b | |||
38d02d58b2 | |||
7d6aa82b69 | |||
6c65f8f182 | |||
6cb5ffc075 | |||
baa5263b56 | |||
2abdb89522 | |||
e2cc5fe09d | |||
45f23ef9d6 | |||
b9d035a39c | |||
a0f13095aa | |||
36a1670151 | |||
c65dd2d114 | |||
86e819d492 | |||
ffdf8c4c12 | |||
f2c75ef9b4 | |||
2e0e592ea2 | |||
db550ac995 | |||
fc27dc98d7 | |||
cccfc1b603 | |||
ce3d9503b2 | |||
7be7ec98a2 | |||
67bede0b27 | |||
232cce9abe | |||
c971a231e2 | |||
1a718f4fae | |||
27fd4f31fd | |||
8c88d98df9 | |||
9cf8cf605d | |||
6aae0e7c94 | |||
3344cffe7b | |||
0a24a2c314 | |||
427cf16e44 | |||
4cee0e0731 | |||
5a3c86205f | |||
4b7d8e6b87 | |||
77594d55f7 | |||
3afb397407 | |||
35341b34b8 | |||
5f95b35c7a | |||
47357270ae | |||
fba9c72495 | |||
4ef9ad0514 | |||
8ba492e4e2 | |||
3855204f58 | |||
492ac04f7e | |||
589f612adf | |||
44d45e29ea | |||
6dd56d0902 | |||
e9cf515888 | |||
426399c2c4 | |||
500c344790 | |||
e3c67755b8 | |||
6508215b5c | |||
11fe132dd9 | |||
108763171f | |||
b78be5bd08 | |||
7652904f79 | |||
c8223e1618 | |||
ffa029ad1c | |||
6aed19b2bb | |||
06bfb07e35 | |||
1adbdb397d | |||
b735583377 | |||
2ed7cda8cd | |||
b8a338ee6a | |||
f81619aafe | |||
4a6ab3494a | |||
7bb858c39c | |||
e11dd1110f | |||
0bb466f0fc | |||
d57250ae64 | |||
2a590e2293 | |||
477113d1ae | |||
a2c98a2938 | |||
a84366439f | |||
66e7a6c9fd | |||
0809533b88 | |||
853683e72a | |||
e5d5fc0857 | |||
a3849abc31 | |||
456f1d4bdd | |||
225941ddd0 | |||
4b2a2c332c | |||
81c3fa6c9d | |||
05c668f684 | |||
9e0ce1a158 | |||
8dde9b58e5 | |||
74c362cec0 | |||
a9e2bae0eb | |||
acd2729573 | |||
0dea44f93c | |||
ccd947ca4a | |||
d91f4cd7d0 | |||
77a93957d3 | |||
554566ccea | |||
958ca938b4 | |||
288526ae73 | |||
83632022f8 | |||
c705e3fb0b | |||
19993bca4a | |||
bf9ff5148a | |||
f72c7b0b3a | |||
e6b7613e89 | |||
fa90f6cdaa | |||
55b1126a22 | |||
3dbd94dafa | |||
dd7355358e | |||
6692c0958f | |||
15459f9255 | |||
4add2f4f89 | |||
a96b3677c6 | |||
8f2557ad19 | |||
0430a1ba88 | |||
c044ea0909 | |||
158b78062e | |||
7e1c959861 | |||
af946046b9 | |||
638f2b6dee | |||
1f119d4153 | |||
16b64c339e | |||
754ea8d27e | |||
8db62ac57d | |||
fd4636f1b9 | |||
837f31c0b4 | |||
1fc6489f30 | |||
5c8a57da81 | |||
72d7099abd | |||
d04a43fcaf | |||
fd8b00bacd | |||
1dab52f878 | |||
64caeb13e6 | |||
fecbafb29e | |||
1a783b5ad6 | |||
8b06231612 | |||
096212d52c | |||
81eb0d3644 | |||
607d610d06 | |||
79ea47d478 | |||
dd18cc4b40 | |||
93deb1a062 | |||
632ee8d2ed | |||
d5162afa2a | |||
d401539012 | |||
83c5701fe6 | |||
d7aea13fee | |||
bd1158f3ab | |||
7023131223 | |||
3468a466ed | |||
fe60013fb9 | |||
540360a775 | |||
9cc8064864 | |||
e7e2c8d7ff | |||
ac6fd11fa1 | |||
4556bb90fa | |||
e867ac3e52 | |||
1838f6ba76 | |||
9d50d033bc | |||
d3f1eb3024 | |||
7876f4f218 | |||
9db60b06a1 | |||
e4a4786241 | |||
0e11a106c5 | |||
2926a36d91 | |||
4f6df65f02 | |||
a2e48b556b | |||
38806f23ed | |||
8b8ecf44f2 | |||
b8f2436feb | |||
6242bac904 | |||
58318af718 | |||
a00eb23c27 | |||
7233433f65 | |||
03be64ce2a | |||
dcc8fcf0b9 | |||
d000f02bc0 | |||
7199f0b3b3 | |||
c0cb7585cc | |||
02f126a275 | |||
07b209b1fe | |||
6434a0bf99 | |||
7e07efaff4 | |||
d3c17d50d8 | |||
4a60818071 | |||
55c66d6c19 | |||
cb339ca0fb | |||
66f4e8aee0 | |||
099445cc07 | |||
7bb029eeef | |||
ead39d6ce6 | |||
7d20907724 | |||
605f05f635 | |||
78ec7981c8 | |||
c062149d5b | |||
b64af88c84 | |||
299331490e | |||
5f23a3dbcf | |||
d1bed81ad8 | |||
fb19aeeb33 | |||
b10d703213 | |||
8560bafc6c | |||
976c6667e1 | |||
938be1e0ab | |||
801fe799ff | |||
b447bdb68c | |||
2d3f39c729 | |||
7844501c2b | |||
9df3a676e7 | |||
2f37c24348 | |||
78a2bbaa4b | |||
14615f7f67 | |||
2c1749ce44 | |||
f63d952ca2 | |||
641c5b3f08 | |||
53b7f60805 | |||
57327bb483 | |||
8a187aee8c | |||
8495e50273 | |||
8e1adedb26 | |||
e04b9e7c78 | |||
b51ba122c1 | |||
9cec097ffa | |||
27786df6a3 | |||
e29b89ca54 | |||
25e0a449bb | |||
2c605d1f22 | |||
dff06a90e4 | |||
f8b5d6e124 | |||
7a85792884 | |||
8a03acb8da | |||
16c289f217 | |||
6024fb5267 | |||
ab560739ac | |||
e03a4f965e | |||
dd025a18c1 | |||
1ab442db90 | |||
06e693cdc9 | |||
f5fd699c52 | |||
b6192a9920 | |||
4b8a16153e | |||
7d53887352 | |||
56e570f8af | |||
bf85023005 | |||
b3ab7ba1d6 | |||
7732976918 | |||
7ad1d00eaa | |||
97c1775646 | |||
f575b71449 | |||
9f81acc076 | |||
00d46f6328 | |||
0ec80d5f64 | |||
71a9653194 | |||
6cc76194b2 | |||
1d59575450 | |||
82d52b229d | |||
3c9c64d9dd | |||
3157baed83 | |||
09cbd6769b | |||
46aa254bf3 | |||
17f768ee9e | |||
87389c6a57 | |||
ed60015266 | |||
4344ac1111 | |||
5b41070c63 | |||
bfc5a18f4b | |||
eacc70fb3e | |||
c95f5d166f | |||
5ae6849517 | |||
93e5f0235b | |||
613296936b | |||
1fdae25b2b | |||
517bf99ddb | |||
0221a9220a | |||
d303790ee7 | |||
5a2894d677 | |||
e1177be363 | |||
9e25a36467 | |||
4cc56905cb | |||
f99caa755c | |||
abd55be19a | |||
4389401a7c | |||
68ea9a7c8a | |||
6d277f43a2 | |||
7df566060c | |||
0a4ef38e43 | |||
9a92ba88dd | |||
75663aaf0f | |||
21f0f7bca5 | |||
a851090dec | |||
4cedc8444e | |||
41ec296640 | |||
f667a0e02a | |||
f3cb529774 | |||
7d56c90dff | |||
6a21fe9fd1 | |||
b069a20910 | |||
b12b01a828 | |||
f790799474 | |||
233597152a | |||
b2d6a6891e | |||
ebc3070b7d | |||
e3e0574cb3 | |||
bec2336231 | |||
c8fc285db6 | |||
2e621553c0 | |||
66c06dad62 | |||
1dc088ea7d | |||
01b5499eea | |||
4fedef51b0 | |||
34e4166673 | |||
82aaac5baa | |||
2a1887c2df | |||
c58054c231 | |||
7e6a2f2bed | |||
9358979d09 | |||
79ea7709b7 | |||
c6eb1f42be | |||
ed28668392 | |||
bb50eadc84 | |||
42f492ac99 | |||
86d88076ce | |||
376d394981 | |||
356f5fc6e2 | |||
6970225af6 | |||
542fbb34a1 | |||
72f453d149 | |||
9e24bbb52f | |||
77729b0800 | |||
3223dedfc3 | |||
86c182c9df | |||
fc12ada4f1 | |||
450a68b7cc | |||
396772c73b | |||
332d844e5e | |||
3c28d75652 | |||
0e8ee37efd | |||
e5b2423fa1 | |||
3bf0d54bc1 | |||
d993ec5db8 | |||
47e27a4f5b | |||
7adea68c1e | |||
09397e5d05 | |||
2755403429 | |||
e097e4704b | |||
222717c95c | |||
6bb24b45f8 | |||
7ed2122622 | |||
b2c354bb07 | |||
9e04e19574 | |||
57e19ea846 | |||
ec9b57cb6e | |||
419c946f03 | |||
7fa49627e5 | |||
46cb85691c | |||
47d679c0c2 | |||
cb11de18a2 | |||
a5b915e56c | |||
2963533fe1 | |||
ce9367c254 | |||
9bbac874f9 | |||
628f8f3dfd | |||
d351f1c871 | |||
c5efa9c352 | |||
b7ce589cb8 | |||
3453a2ccb0 | |||
454adf15db | |||
eb3ec78c63 | |||
0a1807ea25 | |||
6b2d67eb59 | |||
3397b8c51a | |||
e2ccf47b5e | |||
cc903210c9 | |||
44b3488db2 | |||
737074c8bf | |||
861a7604d4 | |||
619f136075 | |||
505d5fb960 | |||
d7b642cadb | |||
03bba32565 | |||
ae95a62675 | |||
0455af00e6 | |||
4aa3473b88 | |||
e56f62e9a7 | |||
282ffc840d | |||
bfbc1a7872 | |||
a9bea8c104 | |||
6fe2d24cef | |||
1f5eac1115 | |||
66528f2475 | |||
812ed53724 | |||
85edb33fd1 | |||
e82fc20f23 | |||
ae60172106 | |||
1852dfdf9a | |||
e79ea696a2 | |||
abfc8b3257 | |||
8109690530 | |||
18fb4dcbf9 | |||
28219534eb | |||
6261d2658f | |||
eb9f3308bc | |||
975be7e5dc | |||
c9a0875ea8 | |||
07cc72ad5d | |||
8727f7a6a4 | |||
fc60d92795 | |||
7d92c391a1 | |||
9bf3fab60b | |||
ae31de32ee | |||
7c0ae06664 | |||
48b43352b0 | |||
ab842fb8b8 | |||
ebcb9adcc4 | |||
5cc45bb419 | |||
0c952c1c8b | |||
f9f238b21a | |||
ba0aaf012a | |||
5ad67af3c1 | |||
2fafed6bb8 | |||
8fda095b6d | |||
7668f04392 | |||
a690bf8116 | |||
c285ebfa73 | |||
f2377e3575 | |||
02c52a18f5 | |||
cbfd18c85a | |||
c649e18131 | |||
db41d02e48 | |||
4e6c596431 | |||
947bd293c9 | |||
5e1acd412b | |||
90e44ecf11 | |||
a336a05e7e | |||
2037028b50 | |||
ad4eb18e43 | |||
71378a4030 | |||
feee862064 | |||
48dc6344d6 | |||
6b028ec5f2 | |||
ef1c100174 | |||
6616d1d3e5 | |||
2193e68837 | |||
143b02c573 | |||
0a98765b44 | |||
7d664837e1 | |||
e5d388f23a | |||
c190415dc2 | |||
d8d3719941 | |||
67664c74f8 | |||
ac395411cd | |||
4109ee8ef4 | |||
5f243fc68a | |||
278c5d452c | |||
0062c65ba8 | |||
396a3945c4 | |||
43a8242cd5 | |||
06d9cc734b | |||
5aa97937e7 | |||
e2d6e67bbc | |||
939d9053bd | |||
fa0c677a63 | |||
642e7daed5 | |||
3c0d637592 | |||
8a56bd944a | |||
47b7b471fa | |||
a48896c6e7 | |||
4bb728dfa0 | |||
480794146f | |||
d1ce15f696 | |||
18888c15fc | |||
25fff17d19 | |||
1f54f68732 | |||
ce628e1187 | |||
e4bd31dbac | |||
0288ba6e38 | |||
38a3af5dff | |||
2e01e7ce8a | |||
1896c72a54 | |||
6ebe476675 | |||
0167c2e0c9 | |||
564838159e | |||
e269c1028b | |||
0e3b9ea74d | |||
aa6aa732e9 | |||
dfe8cab0c1 | |||
f7fac33a1f | |||
41fa6079b2 | |||
be08d52e11 | |||
33e6cffb9b | |||
2f225886b0 | |||
b706b1f049 | |||
e454dce5e4 | |||
0b3ee2e8ac | |||
75598927f2 | |||
c0f71ef826 | |||
664b6adebe | |||
1117592f64 | |||
f717deea06 | |||
b353d8599b | |||
83d35e62f2 | |||
d9f2d53239 | |||
c2cd9178ca | |||
ac6671946a | |||
53210c16d1 | |||
0e5314f56e | |||
a822b3e547 | |||
2a421e52e4 | |||
e8cd2bcf37 | |||
4a8a87c3a9 | |||
e4395e8e47 | |||
3a0505f83e | |||
1d6e368159 | |||
935ae63a48 | |||
4f148edd75 | |||
95e1ce24e8 | |||
d75fc87dec | |||
6fb0020df4 | |||
c0993ed343 | |||
dc1359bf8e | |||
8218d474fa | |||
e85b4e749e | |||
b0e26199ec | |||
d6f15ccc3c | |||
11a6dac8c9 | |||
ce7bcdec23 | |||
067a39ba85 | |||
a29358dc58 | |||
d55b12ea50 | |||
fd66ad2262 | |||
b09e03c64d | |||
512f24f71d | |||
f6c9412436 | |||
330a6713bf | |||
7086751c5e | |||
f5d1e0e7b1 | |||
88938634e7 | |||
e6d77993d1 | |||
d3a7bdefb0 | |||
51440204e7 | |||
d4a0b6c4e1 | |||
eec529cf9e | |||
94afc201bc | |||
c516586dc3 | |||
6871445dfe | |||
45c34bd84a | |||
01ddb39699 | |||
a724209b5a | |||
4c35e6fe67 | |||
05712d4b20 | |||
96be8a2c4d | |||
2141dc2262 | |||
e952b7fc2f | |||
5e6a08f2e6 | |||
241956720d | |||
66938b928c | |||
2cfe4748e5 | |||
2860453c4f | |||
0bb1008e7f | |||
5dd860fd73 | |||
01b2dac727 | |||
a49cf51269 | |||
ae27406db2 | |||
7e8dbb5958 | |||
620a906406 | |||
12fe0cf5f9 | |||
d827a750f7 | |||
cdd8540a20 | |||
24fb7eefaa | |||
a270c33b3a | |||
e2e220256e | |||
df636003bf | |||
9bc4f275b3 | |||
7c19a4e518 | |||
1e4e890a76 | |||
0d852bdc69 | |||
bd23fefb39 | |||
ad9b781bba | |||
0414a33868 | |||
c6e4a29ad2 | |||
4ea8323667 | |||
bf6919f26b | |||
1aedb9ed00 | |||
7cf0119c68 | |||
b92a5bc3c4 | |||
532ee54a42 | |||
f379eac1ef | |||
4d830ca31b | |||
7f5402899b | |||
31a5ec23eb | |||
2cdbbe50a4 | |||
41fe644124 | |||
a14fc7b159 | |||
47b4eb110d | |||
87140f234a | |||
5342342426 | |||
1f6c9fd822 | |||
41bb68b8e8 | |||
c708567262 | |||
7995a5e964 | |||
28946c285b | |||
309296545c | |||
65578693b2 | |||
208f56d3b9 | |||
6fc0a9f557 | |||
6e01ed6a4c | |||
da87b67812 | |||
7f6ff829aa | |||
be6bf75d79 | |||
b117754a8b | |||
08ed3d6523 | |||
213b6b5c28 | |||
35ec60f73a | |||
11ed7377f9 | |||
d651710de1 | |||
d7b04ae7a7 | |||
97ce776e7b | |||
bae02eb396 | |||
62b5f25b6b | |||
57fa9add79 | |||
b5cb6c743a | |||
6fed505100 | |||
ef1f1907cc | |||
4cab90ad8c | |||
b3d4e2d6dc | |||
aa680f6acb | |||
c8f34a9a3e | |||
ab2cfd24e7 | |||
28a681d37d | |||
80dda68926 | |||
f64486b6b6 | |||
6e03f87e09 | |||
454902d663 | |||
ea14d8d493 | |||
696334181f | |||
d6b31721bf | |||
b388f46266 | |||
01e3690ca8 | |||
4c50f0dc76 | |||
00e882e6f6 | |||
c53e78e125 | |||
3cf4b0d5e5 | |||
1c74c7c446 | |||
ed5f891e83 | |||
caa8c06bae | |||
505f47403b | |||
16727dcf1e | |||
7cc2b723d4 | |||
4213492231 | |||
00d915d021 | |||
b457a58e34 | |||
f5b5f60b86 | |||
98d389ce55 | |||
fe2ada7375 | |||
3b82c075b3 | |||
6953e151bb | |||
cfa2759df6 | |||
10fd5ae277 | |||
48884ac3b3 | |||
05fa1cb3f4 | |||
256608a13b | |||
b5c44b66eb | |||
f4942a63f9 | |||
e0f2c36667 | |||
ce59a70f5b | |||
5b47ee5b7a | |||
32a6b5601b | |||
08c7e206cc | |||
dedcd3ad1e | |||
7f5a113f65 | |||
8e6b0a73c9 | |||
b6278bbf12 | |||
0e23ee3cc7 | |||
691deca2e8 | |||
a80f691a6a | |||
411a06c8b6 | |||
0364e47ccb | |||
997601d966 | |||
7be85ed0f5 | |||
0b4123668a | |||
709e87792f | |||
af01b347d8 | |||
e1a5c29b93 | |||
809613c952 | |||
53d1801b49 | |||
2906c702f9 | |||
2b731a388a | |||
0fb05b2c7d | |||
cbda383efe | |||
b42bfa599b | |||
2731080212 | |||
bb3a0099c6 | |||
8a9c9a9963 | |||
36622014c6 | |||
0925afcfcf | |||
98fcf66b7a | |||
52488ea6fb | |||
fb059a1741 | |||
a77e5b3606 | |||
8e490b98cc | |||
33ce6a7f62 | |||
43f4e5d5be | |||
9ea449085d | |||
80487b59c9 | |||
2385039623 | |||
d1faf900b1 | |||
b8fcf62da9 | |||
3566267e75 | |||
8404e8df20 | |||
431cf56e2f | |||
06547cdfc0 | |||
451f6046b0 | |||
733e1a0e73 | |||
e134cc9d4a | |||
8fc93241d6 | |||
b59a1f7b52 | |||
f08d10a0df | |||
5cccfa7c5a | |||
465a0a3c09 | |||
f6e779d939 | |||
0d5f629208 | |||
4aabe4a0d5 | |||
d7274f2417 | |||
324dc0dbc0 | |||
1e2af5e39d | |||
184b87ee31 | |||
39549159fe | |||
f8684bf6b9 | |||
66149ecffe | |||
8d66b6091b | |||
27fb8933f5 | |||
1fde79eedf | |||
b08dc3ec19 | |||
9d0f8224c9 | |||
a63b95b315 | |||
54d9ea61ab | |||
526dbcafd1 | |||
d20bbc8022 | |||
b764120ee7 | |||
02e7ef4978 | |||
d19d9e4d9e | |||
6b45e12d67 | |||
7935f6ce35 | |||
643ba06d4d | |||
7f66fdb54d | |||
f55c1e4233 | |||
afef973262 | |||
d5f7099be2 | |||
7e4fd045f9 | |||
1745e59ac1 | |||
f42bb50392 | |||
f1127a33f1 | |||
91bbd07417 | |||
aa28e070e9 | |||
75928101f8 | |||
a46fe2e615 | |||
6614543316 | |||
d4e93fedf1 | |||
281d422e71 | |||
572ecdfeed | |||
a04e0c8db2 | |||
ba7ec994ae | |||
9412dcb6ae | |||
fdfdc0a228 | |||
aa681df25f | |||
3d356c14df | |||
8499e18615 | |||
452ec4ed31 | |||
4fc91fe365 | |||
353b3852fd | |||
b41507927b | |||
58dd5fcc01 | |||
f96dec4a2c | |||
34c6e5beaf | |||
3a1d3e9ef1 | |||
bab24a88ab | |||
f31f2d0b22 | |||
1eea2d236f | |||
56bc0a8bed | |||
b53b3f7dac | |||
b35ad86024 | |||
b9a2b3f014 | |||
96e87c5a63 | |||
6262d82d2f | |||
583c35714c | |||
6316247da3 | |||
8a3f8589a3 | |||
6aab5715c5 | |||
64f4ee39aa | |||
bf919454eb | |||
5be40b9aad | |||
eace147bb0 | |||
e95945a157 | |||
1c2cfdba88 | |||
066ef812c2 | |||
71018924fc | |||
5b8d378923 | |||
9108256ad4 | |||
df6354c223 | |||
d27175aa28 | |||
5d933310c8 | |||
263d62f628 | |||
9a5183f22d | |||
31d256892e | |||
990f99658b | |||
0156e6b810 | |||
ec81cfb406 | |||
8df20ff562 | |||
dc0d021d9f | |||
b06f29318d | |||
046deeeaa1 | |||
de3e2f051e | |||
31f879983f | |||
519382646b | |||
be949d6c9d | |||
63ecfc97ef | |||
5a32db9ad4 | |||
78f36fcf8c | |||
47d53d66bd | |||
37e7e7d56d | |||
c38862acea | |||
452112ae38 | |||
857b29bdd8 | |||
1e47e3f599 | |||
4c6e62d056 | |||
c2b3cc970c | |||
b3140fa594 | |||
6f944d36cf | |||
cb9e0a051f | |||
4013f67053 | |||
e1fae8f1fe | |||
06826139e1 | |||
4731027447 | |||
108eb4201f | |||
e682d799fa | |||
ec66d2eecd | |||
dd94165f4e | |||
6eab3b9250 | |||
777cc6f98a | |||
564d415d20 | |||
c515b5c1f1 | |||
03a0226221 | |||
7cf7c0a0b8 | |||
48a5897ec4 | |||
0da7b67ef9 | |||
2c2f160a27 | |||
4af1ada9ef | |||
06af88cd72 | |||
652be3cb00 | |||
13fbeda0e5 | |||
42bdccdf6c | |||
d11a146516 | |||
c07f266c5b | |||
44e150bd46 | |||
71e0768e08 | |||
524fe6205d | |||
28a86608a8 | |||
ef3e32d57e | |||
38342d75f6 | |||
b53c483a4a | |||
eb2509aef9 | |||
8c8961d9a2 | |||
6012e4a52c | |||
5dc5db1557 | |||
1b99aa8c53 | |||
b7ca478e10 | |||
b9474b0641 | |||
85164b28cb | |||
5f7e0531c1 | |||
3f6346b732 | |||
6f924880c7 | |||
255d189089 | |||
18ce2d3039 | |||
8062e6ff88 | |||
3c860e25e9 | |||
7535f843cd | |||
48efafc81c | |||
e7d49dcfb3 | |||
51a451570d | |||
399eb49baf | |||
0d82aaf586 | |||
7836925c3b | |||
c67315c7b5 | |||
8eac3f63a2 | |||
84c1d3aede | |||
68c594b10c | |||
0c639e8777 | |||
05a17e419a | |||
5835398152 | |||
f668f0afb2 | |||
fd8d26a713 | |||
efc6d9951b | |||
32361a1245 | |||
571b2c5e7b | |||
99b870d61c | |||
f6298aba82 | |||
0dc73b87f1 | |||
e48257e63e | |||
d42bbf363e | |||
61790c7b3c | |||
5b94a2977a | |||
1c45ba462b | |||
66f7e8e8e6 | |||
2afaf175f1 | |||
097f85ae6c | |||
ff95e62ff8 | |||
5e4b93a38f | |||
6c5a6ab92d | |||
6d2b11d76c | |||
6ee05536ca | |||
b98d1cf68b | |||
740fb337dd | |||
6e06f4795a | |||
10a533e9d4 | |||
3b504e7c8d | |||
fdd8dcae01 | |||
99f24dfbed | |||
d33aaa0f5f | |||
7030d7daf1 | |||
0480e991d2 | |||
72ae0a6e5e | |||
0364f517bb | |||
75be0f0bbb | |||
2ef6f28e11 | |||
52fced6090 | |||
9875372607 | |||
5031e32986 | |||
2d4a37ebab | |||
c207095445 | |||
39ba35b38d | |||
e9f1bdabb8 | |||
e2ce5ff9d6 | |||
23a9794920 | |||
489d3b084f | |||
bddc4dc0ed | |||
805d6e450a | |||
c696fcdcaa | |||
6765bbc651 | |||
9f64e4b73f | |||
35b959c600 | |||
31dbc6f63e | |||
04f559dc05 | |||
d555e44219 | |||
2b400daca3 | |||
58cf81914d | |||
59b35d6a10 | |||
a924650d98 | |||
c62690ccc4 | |||
ac013d7147 | |||
469726d3c5 | |||
8b263c7a68 | |||
48b4ecc96d | |||
4bf05ba399 | |||
2a2d288228 | |||
619a86cb1e | |||
2d6c91ab99 | |||
62c7fcbdab | |||
10c983fabe | |||
788bcbba24 | |||
b0c1e2ab5a | |||
4c4d964eeb | |||
3e6f06f5d2 | |||
e13ae7cae6 | |||
027ebb23da | |||
ace7e4e11b | |||
56a96d8f82 | |||
e7901301d3 | |||
dfd050867b | |||
615fc68263 | |||
79450f2da9 | |||
8cd87af8d6 | |||
5ae57b7e57 | |||
8c7e41f596 | |||
8d4a655ace | |||
f2e3849100 | |||
6cb4460207 | |||
280938d932 | |||
d265054394 | |||
f9694de9f1 | |||
2db189f57c | |||
1e4673d167 | |||
45bb1757bf | |||
433c136a8a | |||
93297cfc6f | |||
ed2d651b50 | |||
28456e96f3 | |||
87d6b1eccb | |||
d4de2cd7c7 | |||
162bc62f56 | |||
287f7a46a4 | |||
69eb4fa0c5 | |||
c4739345fe | |||
f96a2dabac | |||
3dcf2d5c16 | |||
3e8bc4a13f | |||
7d604a1e61 | |||
3d5a800278 | |||
bd0615590b | |||
1c90c19f62 | |||
fa3db26f10 | |||
9fd4a0b526 | |||
4653b5943f | |||
2813c83ea1 | |||
6558e02b95 | |||
ca6b42d7fd | |||
25f99dde94 | |||
450d9e6bdf | |||
1935cc2639 | |||
3a49fa8f8b | |||
bb02ca6def | |||
98801ec7ae | |||
ff244a1309 | |||
f99e314da0 | |||
3abffe7015 | |||
f0d6695e7c | |||
6eae28f090 | |||
efdc0f6a69 | |||
8bc365c886 | |||
83ef740e15 | |||
0bdeec8ef0 | |||
9ce34050e5 | |||
de2e51439e | |||
098fd36235 | |||
bc10a15ea7 | |||
f1f9a2f97b | |||
058a8ed6ec | |||
aa090f9801 | |||
e28a7a366d | |||
954df0ea03 | |||
487eaf8d45 | |||
3f48b3a92f | |||
516eb9bf9d | |||
5c2feb690e | |||
a6707f5791 | |||
8bea8d7b47 | |||
315076a26d | |||
352d5a9713 | |||
59b2b1c955 | |||
c6ce40bf37 | |||
149dcbf2c7 | |||
d4938743e6 | |||
25e04c1d98 | |||
d0e1417254 | |||
d43cf02186 | |||
8db93d0d83 | |||
9485061baa | |||
4946751906 | |||
5edced0a86 | |||
bd3242a70f | |||
185fc775b9 | |||
755e94801f | |||
3dab5f625f | |||
b98b1168d8 | |||
04d03b0cbc | |||
c6602df015 | |||
3d8e8cb889 | |||
d32b92e265 | |||
491a3210a9 | |||
d792d4ec06 | |||
3d6e48a941 | |||
e39d217592 | |||
41f31ca90d | |||
cb01925eb4 | |||
b837c56576 | |||
c6c5754a86 | |||
1abfeff978 | |||
5a96161e86 | |||
b60c986a49 | |||
5d5e16c2ed | |||
26a9d2cef1 | |||
d3d25f957d | |||
2f1a653a84 | |||
64cdf9f78a | |||
93f8c2793c | |||
fdbb5a8f72 | |||
18b031ea1d | |||
6efa3bff09 | |||
47a5456670 | |||
e6a1bea1eb | |||
a0496e3b76 | |||
dd21cd2a4d | |||
21cf4b0ce6 | |||
cc4d463cad | |||
424ddd01f5 | |||
66613ace48 | |||
5db3be092a | |||
6f27f5ef91 | |||
babcf641ef | |||
22d58ab664 | |||
005316ae41 | |||
f8d0e41b28 | |||
432f69fc09 | |||
304861e0ee | |||
76506ca0a3 | |||
6fe430f582 | |||
ce90a19abd | |||
04e2ba85b1 | |||
c83926cd0a | |||
3e58e60568 | |||
7612dd3f8a | |||
84ba37fbcb | |||
aecbbb0b11 | |||
1ce28d7d9b | |||
6c96c3b3f5 | |||
b397a3f397 | |||
b74da2ff3e | |||
a2bb63c182 | |||
2fbeea8326 | |||
6cbcca775e | |||
da8f7141ce | |||
1fbc01f4ab | |||
2d6e440877 | |||
f66ffc64f6 | |||
6fad1736fb | |||
53551d823e | |||
9609f327da | |||
0b4c53fc23 | |||
93afb34712 | |||
bf3e12ac85 | |||
644a725725 | |||
3dd31b2b65 | |||
7d70166e77 | |||
7823b35781 | |||
0206f279ba | |||
b868f87310 | |||
a64e0e6a58 | |||
a597ea7bcc | |||
de16b6dc7a | |||
b398b1eedd | |||
a11fb248ef | |||
d646fe73ac | |||
d486ea37b2 | |||
766657320a | |||
230e75b63f | |||
bf16b14f46 | |||
25ec0c8805 | |||
192460e6b6 | |||
40dee0c82e | |||
7810c7ab76 | |||
ce1b4f95fe | |||
faec6fcc6a | |||
78df9eb51d | |||
7d542b5900 | |||
b6eeb40d19 | |||
5972ff0056 | |||
17528fff0c | |||
bb24fec333 | |||
f6f9e4a231 | |||
d583b7c2fa | |||
e653f39f4f | |||
bb4e0deaf9 | |||
7d345a7294 | |||
fb2b0fa5ba | |||
0234d579a7 | |||
427140048b | |||
773c488140 | |||
2a4e8a427e | |||
5263828614 | |||
8e8c7d7544 | |||
3305769eae | |||
b684bd05b5 | |||
81e1dbca99 | |||
ec671c7048 | |||
2d567ac47e | |||
68202520c6 | |||
287fc076e1 | |||
e8ca281d3b | |||
6cee73195f | |||
777c2a25ce | |||
16ee24082f | |||
3adb8a10b1 | |||
e50aa2a6c6 | |||
f5c56f03bb | |||
db415bde5f | |||
2ae5427b3c | |||
58f505dc74 | |||
5f41ca4013 | |||
233a173226 | |||
485972dd64 | |||
7ad621b6d9 | |||
4719fdb3a4 | |||
89c2747eed | |||
e4c85c362d | |||
402b4e8fbe | |||
5fced444bb | |||
fcf6bfd360 | |||
16b1e8f9c0 | |||
49733df939 | |||
dc4fa0b24d | |||
c06504687d | |||
27b684b83f | |||
4841c46e33 | |||
7ac3c311ee | |||
3273e39db6 | |||
3d24bb48e7 | |||
c96aed2ba7 | |||
d19ff73b39 | |||
559401ebe5 | |||
f0078c26c2 | |||
5a4e7af77d | |||
73a2922413 | |||
7443da6f6e | |||
8de5d64169 | |||
f046f3a239 | |||
c0134660ab | |||
40218d1180 | |||
8a33cb32ba | |||
b65a7b7f66 | |||
cbe45a303e | |||
370ad05229 | |||
2e171a6fd1 | |||
ed24a297e5 | |||
95ece7d046 | |||
ef33500e17 | |||
afcfb7bd58 | |||
2d002100b3 | |||
a51f24fda3 | |||
c6cd6081b8 | |||
bfc44a91ac | |||
f3dc63a6ff | |||
d46aaa0746 | |||
18c2ae7284 | |||
f8f63393c1 | |||
c423ec65dc | |||
69b3d5acd3 | |||
3c3b7844b9 | |||
b2a11515b2 | |||
2393611588 | |||
21f160746a | |||
fb4d5a1846 | |||
1ca84897a0 | |||
0bbaef8a99 | |||
80f40f0203 | |||
0b9e57aca1 | |||
897431c486 | |||
237cecd81b | |||
8df9213d1b | |||
51563b70d7 | |||
7d43943e4e | |||
f2341164c6 | |||
93e18e698e | |||
fb4cf05e44 | |||
c5f3dbab35 | |||
fa07cc215d | |||
e09f3baed8 | |||
f43900f686 | |||
35fbb4e1ca | |||
e70609cfac | |||
54c4567564 | |||
83025f0028 | |||
ce021baea0 | |||
88720c626e | |||
09c236ba5c | |||
3ee55edd2e | |||
4f844c587c | |||
fb9abd7d99 | |||
fc7861f0fa | |||
aabda31d54 | |||
2b4c0181ba | |||
52215f5752 | |||
8ed54bbec3 | |||
58d6e2d3cc | |||
f60af8694b | |||
08aa9b0023 | |||
55419a6904 | |||
68de7e7244 | |||
06d9fa2e0c | |||
f2f625c984 | |||
55a88bcb1e | |||
b41ebe3e81 | |||
0422cbae6b | |||
e664c2a158 | |||
e0348c610c | |||
5d6a18f238 | |||
e6c48ecef2 | |||
6fae460867 | |||
bf10cdfcc0 | |||
5e048baa5f | |||
2f023f40b2 | |||
eddd1bff3e | |||
51a59a0f62 | |||
138110e082 | |||
c4f56c4134 | |||
ae846b41df | |||
a9d7ec4587 | |||
4769deb36a | |||
d51f132cb1 | |||
f1464d0d80 | |||
4ed654d9e8 | |||
83c9d1df1b | |||
9c43743945 | |||
b87a1db5ac | |||
66d127957e | |||
55fa966a92 | |||
7905f5df99 | |||
62d5137c83 | |||
1de77bbcec | |||
7187020783 | |||
7c979f972e | |||
ca1ce59025 | |||
5b04a4fa09 | |||
646c3423dd | |||
7cc01c704c | |||
783aa6b507 | |||
b9ba1295b4 | |||
60710dee82 | |||
7ea350456d | |||
91c1737de6 | |||
bd885d878f | |||
854073f1db | |||
4aad4c0533 | |||
d6d9596b38 | |||
41828a7302 | |||
83aed410b6 | |||
8c842b39ba | |||
766cc60337 | |||
16cac1d5f5 | |||
5c13f368c6 | |||
8b3c0b87ff | |||
8e941c59ec | |||
fab81cfb04 | |||
e4c2d85c77 | |||
e628c011bf | |||
53576dfb35 | |||
b102c11e38 | |||
974b43fd79 | |||
1cbe014569 | |||
9d7aaf7149 | |||
aa610690bf | |||
d07a6e2b45 | |||
f286af170d | |||
a33010d1e1 | |||
3574126b89 | |||
e8beea204b | |||
fd04877eb0 | |||
7669fc1e9b | |||
bba75eb184 | |||
2b87485c22 | |||
8e22c4510e | |||
b247c6fd22 | |||
5625c7d8e1 | |||
9420a2127f | |||
3a699a790c | |||
94f78ccf89 | |||
5020daa6e5 | |||
9e0982a1a2 | |||
74751117eb | |||
e882460e52 | |||
60aaae1c86 | |||
f35d233e07 | |||
fbf2c414ad | |||
24f9dd73d5 | |||
ab7d9ae193 | |||
a0f775c4d3 | |||
3d1ed7c959 | |||
7c9d4d971c | |||
da3c0e4962 | |||
c82c5d7570 | |||
92f39762af | |||
a541c681f6 | |||
d818135e3f | |||
b9ad12e6c2 | |||
b6ad206024 | |||
98398ff93f | |||
924f1173cb | |||
8330cc22af | |||
d36ef9339f | |||
bc395b4fd4 | |||
4423759d03 | |||
32059526de | |||
f4e5cd200a | |||
400ee59247 | |||
f76792a10b | |||
b3adfa03b7 | |||
ac1fbc2860 | |||
b5539c2044 | |||
53d99b9657 | |||
210d803777 | |||
5a714c53f2 | |||
d83a7dc687 | |||
df9059d1a8 | |||
b0e3b5cf2e | |||
91547a80b6 | |||
e7a8908b11 | |||
fe299a82a6 | |||
a52e93dfd8 | |||
c08ca29649 | |||
5faed57ac7 | |||
4658e9c1d9 | |||
4b65a0059a | |||
8a1880f041 | |||
9d6c205a33 | |||
fb02e9f1e9 | |||
9c6476d81e | |||
5f903a1648 | |||
720cb36cea | |||
1eda387951 | |||
daa82cbf69 | |||
446bfdd49f | |||
e6c21c4bc0 | |||
ce0e083094 | |||
ced3598a96 | |||
98a8187764 | |||
f75c48146a | |||
0673b0d251 | |||
246807b8f4 | |||
49b0d41c3c | |||
624dbfdd44 | |||
06b70bf1d6 | |||
dc5f4a3cc2 | |||
37d666bc80 | |||
6d314484d4 | |||
f3b88013a8 | |||
6891d8aeca | |||
96a8b0ab78 | |||
4b287119fe | |||
56bae9b7d9 | |||
049321c357 | |||
31755783e3 | |||
9d58a58980 | |||
660fe979c1 | |||
49c51f839b | |||
fd0fd752c8 | |||
53cef34f16 | |||
c11e618133 | |||
afd947e0c3 | |||
e22c475156 | |||
8342b4486b | |||
0e7048ae05 | |||
c3edbf813a | |||
3a8ebda10a | |||
0cecf9f121 | |||
63526f2eee | |||
aac731c22b | |||
a01246c275 | |||
7032562faf | |||
7f8f6ac8d7 | |||
8cf7daaaa8 | |||
3033b5a70a | |||
04f0bc97b7 | |||
035a41c218 | |||
3a92040b44 | |||
39e3783c69 | |||
24b7462b3c | |||
a0d723db55 | |||
8aca932aa0 | |||
fb6ff2a593 | |||
c76c798bf6 | |||
33b20ce7de | |||
fbd6666a06 | |||
924dd6f14a | |||
8072f085d2 | |||
cf80fd9e02 | |||
070d9261b6 | |||
769f44e918 | |||
f86f0a8bc7 | |||
83d571653b | |||
1039e0621d | |||
920ec8181b | |||
698c4f662d | |||
17291642bd | |||
f0a7e3fc9a | |||
e5b53381a2 | |||
16cc3cf9eb | |||
6a9a729674 | |||
66d86d8bdb | |||
2e339807ac | |||
ebd251cdf0 | |||
18fddad48b | |||
7d90b90d63 | |||
ed6c7fbf0b | |||
9d77a07686 | |||
24a9516ff4 | |||
8c6f5b7f92 | |||
37c7c964ae | |||
439bbe00ec | |||
3bc8639c1a | |||
6dacfe7217 | |||
b8128aee02 | |||
e6f22d0fdd | |||
9e9015ee23 | |||
bbc32fc831 | |||
07a182c6b5 | |||
eada8f5aaa | |||
c1887f465d | |||
d0fd66ba82 | |||
544305e802 | |||
eabe7d95f8 | |||
4d97abe805 | |||
43356a43d0 | |||
3f71218505 | |||
b3fd83a0ea | |||
477e1a8648 | |||
773bdd41ec | |||
aa82f8b88f | |||
987619ddd7 | |||
7b219c638d | |||
e52f6f21a1 | |||
6de1ed1ff1 | |||
8f2175e7d0 | |||
d81b510ecf | |||
0be8fb47a4 | |||
5613310538 | |||
6222c74235 | |||
9ddf99172c | |||
c8acbe3b62 | |||
0b8fc2742b | |||
dd9554a820 | |||
2c34a10aa2 | |||
a0da692fce | |||
34f9e72af9 | |||
ace826e685 | |||
82d48c0dab | |||
cfe7f896b8 | |||
1d27a27656 | |||
7e1591e06a | |||
5f996e36d1 | |||
09120df890 | |||
9eb5512082 | |||
210fa1e02d | |||
d08692a824 | |||
3b7a4f233b | |||
e11a9d351a | |||
8dbf23181a | |||
fd00806f01 | |||
b4ca56d96d | |||
49ca20aaf3 | |||
ae88e46563 | |||
b358054694 | |||
5cf96fc141 | |||
d8d4f05564 | |||
de2e86a698 | |||
21b108fe44 | |||
ddd0eb6f51 | |||
9daa7d9978 | |||
9d085c75ff | |||
ae2401621a | |||
d5fd0732e0 | |||
2a6ccfccac | |||
d48362fc8d | |||
e6101b4963 | |||
7381c93e2c | |||
a8d0062c67 | |||
61eff5d238 | |||
6572c995fb | |||
5a81561e7a | |||
344c69b66b | |||
11bf89e3b5 | |||
ce76dffda4 | |||
27cd1e07ed | |||
943bedfc86 | |||
9da348beda | |||
b8df2c6ebd | |||
8a8213f6d4 | |||
45bf5bb666 | |||
7872739d3c | |||
d928b036dc | |||
02aa57afa5 | |||
c5e8924f4e | |||
a7a56293aa | |||
805b5f2e1e | |||
cf072cf223 | |||
8376d2c4b1 | |||
3cd9422c4c | |||
4d6e99c949 | |||
5262a1f4b5 | |||
eba1ebafe5 | |||
e2f845632d | |||
ca49ae9e36 | |||
0baf8583ef | |||
052ced4954 | |||
d608e9c950 | |||
5510361a8c | |||
6b75d9f865 | |||
fb555c6898 | |||
d9de4c0efb | |||
c395cf018d | |||
5134b22ac5 | |||
a79c0c8f7a | |||
e05a47f68b | |||
2a73549ee8 | |||
ed8b4987b7 | |||
8eaa452073 | |||
42e1e2495c | |||
d00e913ea6 | |||
773086388d | |||
8843928e10 | |||
c7039fd0d3 | |||
35362495c9 | |||
70a0a12b53 | |||
a011f8a321 | |||
a062d307fb | |||
e62f4cc122 | |||
cc6d3f7903 | |||
ece8d88b10 | |||
a7cc18e563 | |||
7d61b2f64f | |||
4b25c2b4e8 | |||
692b83fc92 | |||
70ac7c876b | |||
3be5aa1a34 | |||
35c2ceba96 | |||
acdcae6b1e | |||
cf4e14c746 | |||
e32c9f888b | |||
6be483b6ad | |||
519b93d236 | |||
d13803f64f | |||
f793c578bc | |||
13f4d4fb6e | |||
3ae3d80bfb | |||
be762a1b6f | |||
c5db02d792 | |||
157034bd6c | |||
4c4a570156 | |||
f772117b55 | |||
1782550bfe | |||
11f03ee3f3 | |||
9e52255de2 | |||
c76494d8b7 | |||
2bdc7cac8b | |||
104a40463a | |||
1ae52a3bba | |||
fb33bae02d | |||
a8783012e4 | |||
6feb9cb09d | |||
2bf18e7843 | |||
2d63b6d2c1 | |||
33d4c38131 | |||
e2839d9633 | |||
357f95a77e | |||
dfb7f6b349 | |||
842e6fb92f | |||
b22ca804dd | |||
f6fb370b1b | |||
33f99431dc | |||
c933378b9b | |||
ebfff8e802 | |||
5eaa455479 | |||
63025a1d65 | |||
76204da1f8 | |||
07a5c9d4f0 | |||
c3158e230d | |||
4b96002533 | |||
2894d04b19 | |||
2470c88291 | |||
bf2ad145e3 | |||
c95fdcd127 | |||
281c011d44 | |||
127e13f53e | |||
be676eccf1 | |||
bec4066033 | |||
eeb19a346a | |||
d614c7932c | |||
fbaee922d1 | |||
2d50bf3498 | |||
3441423481 | |||
36762a00a8 | |||
f705ed22fd | |||
0920c6ca81 | |||
a9df3fa5d2 | |||
4e49e44259 | |||
2a618e0ad0 | |||
31fa064c68 | |||
b3b8910c48 | |||
ae49e8da58 | |||
a73e0e8e77 | |||
ca71c82196 | |||
6b3775bbe2 | |||
b5582d1b32 | |||
3e78319ac6 | |||
3edf7fc64f | |||
fa6ed5f759 | |||
ea538f8799 | |||
5c97bfb1e2 | |||
c5631338b1 | |||
8698830cbd | |||
f282324e1b | |||
24d7513dc4 | |||
6f7b81bd6d | |||
ad3b312cf5 | |||
5beb3b8ee5 | |||
a077f53914 | |||
14bfa0c578 | |||
fb95bb38b5 | |||
8394bf676b | |||
29d6993ccd | |||
f3e7815e61 | |||
d86c816f8c | |||
94d933aa7e | |||
027a2157d3 | |||
536be31a19 | |||
16d607929d | |||
9ef8d0d6b0 | |||
7c38994ff2 | |||
32998731bf | |||
d8316f2a1b | |||
b557654f36 | |||
5c836d2ef8 | |||
11a481f711 | |||
be8ebba325 | |||
8d00393d0c | |||
3bad76008e | |||
073ab7cda8 | |||
86992a7bb1 | |||
27c4b6b9bd | |||
96edbe7b1d | |||
3c88bbecb8 | |||
98391cd6ab | |||
cfed9a4123 | |||
175398f216 | |||
2ea6d3ab97 | |||
b90256e6cc | |||
1baf4edbd9 | |||
680252aa15 | |||
6c375d71c3 | |||
ced980ff17 | |||
cbe4377fde | |||
ca5f919965 | |||
b1f25ea187 | |||
3259e45f92 | |||
907b480350 | |||
9d207fd876 | |||
7fcf2f926f | |||
2af1e23278 | |||
4f5e378124 | |||
8760816d46 | |||
dec3e027d9 | |||
f9d3e69cc9 | |||
4ab0dcc4a9 | |||
81e84f2aae | |||
af966afaa4 | |||
9312e2d06a | |||
3b63374b33 | |||
f4c2de4c45 | |||
b4d894c067 | |||
c0a29c3656 | |||
43184566aa | |||
6db1757b53 | |||
7a6d85a778 | |||
c99bff5f56 | |||
8410c72b18 | |||
ef5037e7f6 | |||
c12cf5bde7 | |||
95ce1e5408 | |||
092e7e6c60 | |||
7757ce1cb8 | |||
3cb89cafe3 | |||
6eca56c6c5 | |||
f719247118 | |||
c1ee5e0694 | |||
4352d41db0 | |||
0355c1ed9c | |||
e3d9945f7f | |||
8bd194f98a | |||
e428fc4b52 | |||
aa985f4a7c | |||
72e304c349 | |||
96e2c3945f | |||
0a471e009a | |||
fbd8209286 | |||
570e41fc08 | |||
241b905b13 | |||
5f84b1dc41 | |||
b51e5d8b8d | |||
c9264e6d52 | |||
980dd7c011 | |||
24a56cca30 | |||
299f32dc01 | |||
5d2e4a5021 | |||
e386e51d9e | |||
f5d5da3917 | |||
04059312b0 | |||
cbab746fd8 | |||
7e6fce0698 | |||
2816bc8620 | |||
f288a64264 | |||
bcbb96e31b | |||
8e54847fdf | |||
c8f310825c | |||
bb8ea83d75 | |||
cef0107c14 | |||
14c53e4cbe | |||
7a6da502b9 | |||
9a1675b065 | |||
0aba4d825a | |||
8ba484ab69 | |||
d44ab5fdea | |||
ed4132d7e9 | |||
708176aea1 | |||
018e0d5a19 | |||
6cd4ff2ab7 | |||
085f0f1b1b | |||
e7bd49d835 | |||
e116b0f61f | |||
ff98f61601 | |||
1a0ee090ab | |||
b183534c81 | |||
403922b1b4 | |||
67535b5940 | |||
900e96781f | |||
a66b1d4615 | |||
89515304e4 | |||
1d8e768360 | |||
865584dd0c | |||
76562fa192 | |||
9153062095 | |||
533d4a36ec | |||
88652c49a8 | |||
3b2d5317a5 | |||
9327ea3e5a | |||
246408621c | |||
d3dc946155 | |||
4f453830f7 | |||
27c3143466 | |||
6784ed206a | |||
0be6d3c86f | |||
996916277d | |||
c59aa771a6 | |||
0e97d3d4ee | |||
40f5a6c4da | |||
ece19b459c | |||
9cf600e702 | |||
d595ca021d | |||
a4a024245b | |||
0735893caf | |||
486234ab3d | |||
279ecaff00 | |||
67c99ec620 | |||
d8b4fb7838 | |||
55821948cf | |||
6b827bb664 | |||
6bd6927656 | |||
33ce70c883 | |||
dc9dd8d664 | |||
5225c1ec30 | |||
aee29e51a6 | |||
3b473bb14f | |||
023e832d40 | |||
9bfd304459 | |||
05c6c6ae08 | |||
4397bf5785 | |||
4031e93c45 | |||
3d3a54f455 | |||
b7f518cbfa | |||
969cc55993 | |||
73dffc5053 | |||
e50d0b6fc1 | |||
c5173230f0 | |||
9b4383261a | |||
1083c626b9 | |||
5e44a5945a | |||
af51ae944e | |||
1b746c0ea9 | |||
ee21fe3d2a | |||
2beb731ed4 | |||
b3ce0019a7 | |||
51fc54325c | |||
3ff1228f78 | |||
c9d01ff7db | |||
891ed14f13 | |||
f6faeea41c | |||
be8058cfe4 | |||
6e9ea5adce | |||
fa2580f953 | |||
37f8df8824 | |||
ed0e96cd28 | |||
c9b7f0c249 | |||
baf93d9606 | |||
36378c33c6 | |||
45f25f7e0b | |||
f2c6164b04 | |||
4386814b04 | |||
91688b4883 | |||
70f6939fd4 | |||
da88278f27 | |||
08155e2b53 | |||
81ac8e9015 | |||
01b4efe9d9 | |||
5a40abe2d5 | |||
45fadf7323 | |||
c1ef241390 | |||
79a0ea2bec | |||
0f96a21e3f | |||
bfe2435459 | |||
69bdc4f072 | |||
2405cf8255 | |||
2c01e79dc4 | |||
31cbd34d97 | |||
29db365e4c | |||
f89d0d8230 | |||
ada82f3482 | |||
a494910aa1 | |||
d4750100b0 | |||
894f6bee54 | |||
28f87c505d | |||
7e6980a161 | |||
8171e96b96 | |||
de16c0bf64 | |||
30bd1c1e85 | |||
2ab70cb55c | |||
80b75bc99a | |||
d9406f4b64 | |||
f2398a766e | |||
9697c7f56a | |||
1a3d2dbfe7 | |||
d760e08fac | |||
827ed144fb | |||
d63b534f31 | |||
cd64f5abd4 | |||
c70c8b607f | |||
2132bbf919 | |||
88b0899eb4 | |||
2ae97f3d4c | |||
2418aa3a4a | |||
df5534f576 | |||
352811fe5f | |||
64f91fa1fd | |||
1338702b2b | |||
ec5a4d862d | |||
6e6bc3b6c0 | |||
3b56f59532 | |||
f7b174eb71 | |||
27b7813025 | |||
9e54778e7c | |||
67bac681ea | |||
7f2e43c637 | |||
09f6b1f2cb | |||
bfb8170d32 | |||
4cea88aa37 | |||
969618ebb5 | |||
226352afcb | |||
c6a039d087 | |||
53c0f0bba5 | |||
7e3300f717 | |||
62254d2cc0 | |||
ed6b44e1be | |||
a2be9c7218 | |||
c11b79ce51 | |||
dbba685c69 | |||
c2343180d7 | |||
f2cc9e8826 | |||
391f0c1ce7 | |||
8a5c68f695 | |||
e8137d263e | |||
ce6a5fb94b | |||
6cd3912a51 | |||
8f9fc1f692 | |||
aa39fc56f6 | |||
ea7491586f | |||
ed171f7be2 | |||
dca0da4e3f | |||
8093cbd8e8 | |||
a8a38f3465 | |||
06785da5b6 | |||
f2e996b991 | |||
0afd452ef1 | |||
9d6bffd517 | |||
7e9b99d55b | |||
279043d625 | |||
5a836d4767 | |||
95fa71c6d2 | |||
387ab4f706 | |||
3a84e5be88 | |||
89d7e24891 | |||
6c02ff4747 | |||
bb3aa824b7 | |||
989fbad502 | |||
38b9256439 | |||
475b97e021 | |||
0b8c4b995a | |||
0d66cdc6f9 | |||
a3d8cd3f69 | |||
4cba75dab0 | |||
1ec0b9204b | |||
ddd4ed3ce5 | |||
94fc3e0182 | |||
fb7c48f2f3 | |||
712cf9d8f3 | |||
09d21f6f0b | |||
651e82af9f | |||
fff68dccd9 | |||
61ec31cde1 | |||
4e917e8731 | |||
a7fc01a532 | |||
23c71d5182 | |||
9c75929e7b | |||
424388c207 | |||
fe3f2ad0f9 | |||
88963a18de | |||
ca58c3a4f5 | |||
db3c797c6b | |||
8853fca1fd | |||
889f73e861 | |||
10f29f79f4 | |||
8986f70bdc | |||
99429e5f41 | |||
56dec2a3a0 | |||
bed95b37b2 | |||
3f10c5b533 | |||
6d8b5989bc | |||
57c7e1d4a0 | |||
1ca2c8950f | |||
8510d5ff86 | |||
fc4ca5bdd8 | |||
596f020e90 | |||
6b6a4d63ec | |||
a4076e5dcf | |||
d5d8deec06 | |||
b819795661 | |||
ead222d2cd | |||
ae218c108f | |||
aadfea7159 | |||
9452532036 | |||
eaabec459a | |||
c8e78abaf9 | |||
75593e6fce | |||
0ccb9704d7 | |||
3081f60989 | |||
eb91101a46 | |||
7f27e14a6e | |||
b5216a3e5b | |||
5395dd6209 | |||
0c42e0e8b1 | |||
ea7504cf8e | |||
072448a2c9 | |||
fba80f5edc | |||
758955d1b6 | |||
772f4ce9f8 | |||
f3d2d3c814 | |||
624f5c8be3 | |||
40f7ce96c3 | |||
fd674c875b | |||
2d1214ef46 | |||
46fc0437ba | |||
2a325892c2 | |||
3e558468cf | |||
38b4ca26b5 | |||
292b1790c8 | |||
e22bf529c1 | |||
7436a62168 | |||
58538d1210 | |||
6abdc0aeec | |||
788ade1d29 | |||
423b6d9907 | |||
6a432d4a0d | |||
a1e97b18f1 | |||
8586770e1f | |||
6b3fa0689c | |||
685b2028dc | |||
c403a95a52 | |||
37a499148f | |||
e2d71d11de | |||
103e021912 | |||
111e46582c | |||
8e408c95fe | |||
0afb5fa70a | |||
9f19e8d29d | |||
7ede14d191 | |||
a70fde1b45 | |||
5fba815921 | |||
8f288698e4 | |||
5a11e55358 | |||
e2e5a105c6 | |||
a0140da7b0 | |||
cdfa395ad8 | |||
4e5f5e93c2 | |||
cf1ef631cf | |||
db36cc740e | |||
d4dc7c7509 | |||
24f2cc55a8 | |||
8ff144d876 | |||
3340e08bec | |||
6427894d89 | |||
c72d9ce0a6 | |||
c778c2e107 | |||
9a1c61456b | |||
dc44309336 | |||
1cec5542a8 | |||
820c81e638 | |||
44b8e58f33 | |||
ed3da23cf4 | |||
13f74635fa | |||
47c053cc39 | |||
db14d78e4f | |||
f6f8f0ee76 | |||
c3e2e40e02 | |||
ebe16cd9bd | |||
1f8afe15a4 | |||
f77f09ea6e | |||
ba6f9f60ad | |||
8b47b56fc6 | |||
f241930472 | |||
62be9f39ef | |||
16c3337122 | |||
882dd63dc7 | |||
1a896bc93f | |||
4f1dcf7c28 | |||
0bab611a96 | |||
911b731378 | |||
0432e1586e | |||
d5754eae02 | |||
01555de2da | |||
f102f50ebe | |||
c9b559a030 | |||
ccbcd390d4 | |||
a2ce40fae3 | |||
a5867a24c8 | |||
5372d9a705 | |||
298608f88c |
41
.builds/openbsd.yml
Normal file
41
.builds/openbsd.yml
Normal file
@ -0,0 +1,41 @@
|
||||
# sourcehut CI: https://builds.sr.ht/~jmk/neovim
|
||||
|
||||
image: openbsd/6.7
|
||||
|
||||
packages:
|
||||
- autoconf-2.69p2
|
||||
- automake-1.15.1
|
||||
- cmake
|
||||
- gettext-runtime-0.20.1p1
|
||||
- gettext-tools-0.20.1p3
|
||||
- gmake
|
||||
- libtool
|
||||
- ninja-1.10.0
|
||||
- unzip-6.0p13
|
||||
|
||||
sources:
|
||||
- https://github.com/neovim/neovim
|
||||
|
||||
tasks:
|
||||
- build: |
|
||||
export AUTOCONF_VERSION=2.69
|
||||
export AUTOMAKE_VERSION=1.15
|
||||
cd neovim
|
||||
mkdir .deps
|
||||
cd .deps
|
||||
cmake -G Ninja ../third-party/
|
||||
cmake --build . --config Debug
|
||||
cd ..
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G Ninja -DMIN_LOG_LEVEL=3 ..
|
||||
cmake --build . --config Debug
|
||||
./bin/nvim --version
|
||||
- test: |
|
||||
export LC_CTYPE=en_US.UTF-8
|
||||
# functional tests
|
||||
cd neovim/build
|
||||
# cmake --build . --config Debug --target functionaltest
|
||||
# oldtests
|
||||
cd ..
|
||||
gmake oldtest
|
@ -3,6 +3,7 @@ root = true
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
tab_width = 8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
charset = utf-8
|
||||
|
1
.gitattributes
vendored
Executable file
1
.gitattributes
vendored
Executable file
@ -0,0 +1 @@
|
||||
*.h linguist-language=C
|
1
.github/FUNDING.yml
vendored
Normal file
1
.github/FUNDING.yml
vendored
Normal file
@ -0,0 +1 @@
|
||||
custom: https://salt.bountysource.com/teams/neovim
|
29
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
29
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Report a problem in Nvim
|
||||
title: ''
|
||||
labels: bug
|
||||
|
||||
---
|
||||
|
||||
<!-- Before reporting: search existing issues and check the FAQ. -->
|
||||
|
||||
- `nvim --version`:
|
||||
- `vim -u DEFAULTS` (version: ) behaves differently?
|
||||
- Operating system/version:
|
||||
- Terminal name/version:
|
||||
- `$TERM`:
|
||||
|
||||
### Steps to reproduce using `nvim -u NORC`
|
||||
|
||||
```
|
||||
nvim -u NORC
|
||||
# Alternative for shell-related problems:
|
||||
# env -i TERM=ansi-256color "$(which nvim)"
|
||||
|
||||
```
|
||||
|
||||
### Actual behaviour
|
||||
|
||||
### Expected behaviour
|
||||
|
@ -1,7 +1,15 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Request an enhancement for Nvim
|
||||
title: ''
|
||||
labels: enhancement
|
||||
|
||||
---
|
||||
|
||||
<!-- Before reporting: search existing issues and check the FAQ. -->
|
||||
|
||||
- `nvim --version`:
|
||||
- Vim (version: ) behaves differently?
|
||||
- `vim -u DEFAULTS` (version: ) behaves differently?
|
||||
- Operating system/version:
|
||||
- Terminal name/version:
|
||||
- `$TERM`:
|
11
.gitignore
vendored
11
.gitignore
vendored
@ -1,5 +1,6 @@
|
||||
# Tools
|
||||
.ropeproject/
|
||||
compile_commands.json
|
||||
# Visual Studio
|
||||
/.vs/
|
||||
|
||||
@ -40,12 +41,15 @@ tags
|
||||
/src/nvim/testdir/X*
|
||||
/src/nvim/testdir/valgrind.*
|
||||
/src/nvim/testdir/.gdbinit
|
||||
/runtime/indent/testdir/*.out
|
||||
# Generated by src/nvim/testdir/runnvim.sh.
|
||||
/src/nvim/testdir/*.tlog
|
||||
|
||||
# Generated by unit tests.
|
||||
/test/includes/post/
|
||||
|
||||
# Generated by luacheck during `make testlint'
|
||||
/test/.luacheckcache
|
||||
# Generated by luacheck during `make lualint'
|
||||
.luacheckcache
|
||||
|
||||
# local make targets
|
||||
local.mk
|
||||
@ -54,3 +58,6 @@ local.mk
|
||||
/runtime/doc/*.html
|
||||
/runtime/doc/tags.ref
|
||||
/runtime/doc/errors.log
|
||||
|
||||
# CLion
|
||||
/.idea/
|
||||
|
20
.luacheckrc
Normal file
20
.luacheckrc
Normal file
@ -0,0 +1,20 @@
|
||||
-- vim: ft=lua tw=80
|
||||
|
||||
-- Ignore W211 (unused variable) with preload files.
|
||||
files["**/preload.lua"] = {ignore = { "211" }}
|
||||
|
||||
-- Don't report unused self arguments of methods.
|
||||
self = false
|
||||
|
||||
-- Rerun tests only if their modification time changed.
|
||||
cache = true
|
||||
|
||||
ignore = {
|
||||
"631", -- max_line_length
|
||||
"212/_.*", -- unused argument, for vars with "_" prefix
|
||||
}
|
||||
|
||||
-- Global objects defined by the C code
|
||||
read_globals = {
|
||||
"vim",
|
||||
}
|
146
.travis.yml
146
.travis.yml
@ -10,8 +10,6 @@ env:
|
||||
- BUILD_DIR="$TRAVIS_BUILD_DIR/build"
|
||||
# Build directory for third-party dependencies.
|
||||
- DEPS_BUILD_DIR="$HOME/nvim-deps"
|
||||
# Directory where third-party dependency sources are downloaded to.
|
||||
- DEPS_DOWNLOAD_DIR="$TRAVIS_BUILD_DIR/deps-downloads"
|
||||
# Install directory for Neovim.
|
||||
- INSTALL_PREFIX="$HOME/nvim-install"
|
||||
# Log directory for Clang sanitizers and Valgrind.
|
||||
@ -25,7 +23,7 @@ env:
|
||||
-DBUSTED_OUTPUT_TYPE=nvim
|
||||
-DDEPS_PREFIX=$DEPS_BUILD_DIR/usr
|
||||
-DMIN_LOG_LEVEL=3"
|
||||
- DEPS_CMAKE_FLAGS="-DDEPS_DOWNLOAD_DIR:PATH=$DEPS_DOWNLOAD_DIR -DUSE_BUNDLED_GPERF=OFF"
|
||||
- DEPS_CMAKE_FLAGS="-DUSE_BUNDLED_GPERF=OFF"
|
||||
# Additional CMake flags for 32-bit builds.
|
||||
- CMAKE_FLAGS_32BIT="-DCMAKE_SYSTEM_LIBRARY_PATH=/lib32:/usr/lib32:/usr/local/lib32
|
||||
-DCMAKE_IGNORE_PATH=/lib:/usr/lib:/usr/local/lib
|
||||
@ -34,11 +32,11 @@ env:
|
||||
- ASAN_OPTIONS="detect_leaks=1:check_initialization_order=1:log_path=$LOG_DIR/asan"
|
||||
- TSAN_OPTIONS="log_path=$LOG_DIR/tsan"
|
||||
- UBSAN_OPTIONS="print_stacktrace=1 log_path=$LOG_DIR/ubsan"
|
||||
- ASAN_SYMBOLIZE=asan_symbolize
|
||||
# Environment variables for Valgrind.
|
||||
- VALGRIND_LOG="$LOG_DIR/valgrind-%p.log"
|
||||
- CACHE_NVIM_DEPS_DIR="$HOME/.cache/nvim-deps"
|
||||
# If this file exists, the cache is valid (compile was successful).
|
||||
- CACHE_MARKER="$HOME/.cache/nvim-deps/.travis_cache_marker"
|
||||
- CACHE_MARKER="$CACHE_NVIM_DEPS_DIR/.travis_cache_marker"
|
||||
# default target name for functional tests
|
||||
- FUNCTIONALTEST=functionaltest
|
||||
- CI_TARGET=tests
|
||||
@ -46,66 +44,25 @@ env:
|
||||
- CCACHE_COMPRESS=1
|
||||
- CCACHE_SLOPPINESS=time_macros,file_macro
|
||||
- CCACHE_BASEDIR="$TRAVIS_BUILD_DIR"
|
||||
# Default since 3.3, but Travis (Xenial) has 3.2.4; required with newer gcc/clang.
|
||||
- CCACHE_CPP2=1
|
||||
|
||||
jobs:
|
||||
include:
|
||||
- stage: normal builds
|
||||
os: linux
|
||||
compiler: clang-4.0
|
||||
# Use Lua so that ASAN can test our embedded Lua support. 8fec4d53d0f6
|
||||
env: >
|
||||
CLANG_SANITIZER=ASAN_UBSAN
|
||||
CMAKE_FLAGS="$CMAKE_FLAGS -DPREFER_LUA=ON"
|
||||
ASAN_SYMBOLIZE=asan_symbolize-4.0
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
env: >
|
||||
FUNCTIONALTEST=functionaltest-lua
|
||||
CMAKE_FLAGS="$CMAKE_FLAGS -DPREFER_LUA=ON"
|
||||
DEPS_CMAKE_FLAGS="$DEPS_CMAKE_FLAGS -DUSE_BUNDLED_LUAJIT=OFF"
|
||||
- os: linux
|
||||
# Travis creates a cache per compiler. Set a different value here to
|
||||
# store 32-bit dependencies in a separate cache.
|
||||
compiler: gcc
|
||||
env: BUILD_32BIT=ON
|
||||
- os: osx
|
||||
compiler: clang
|
||||
osx_image: xcode9.4 # macOS 10.13
|
||||
- os: osx
|
||||
compiler: gcc
|
||||
osx_image: xcode9.4 # macOS 10.13
|
||||
- if: branch = master
|
||||
os: linux
|
||||
env: CI_TARGET=lint
|
||||
- stage: Flaky builds
|
||||
os: linux
|
||||
compiler: gcc
|
||||
env: GCOV=gcov CMAKE_FLAGS="$CMAKE_FLAGS -DUSE_GCOV=ON"
|
||||
- os: linux
|
||||
compiler: clang
|
||||
env: CLANG_SANITIZER=TSAN
|
||||
allow_failures:
|
||||
- env: GCOV=gcov CMAKE_FLAGS="$CMAKE_FLAGS -DUSE_GCOV=ON"
|
||||
- env: CLANG_SANITIZER=TSAN
|
||||
fast_finish: true
|
||||
|
||||
before_install: ci/before_install.sh
|
||||
install: ci/install.sh
|
||||
before_script: ci/before_script.sh
|
||||
script: ci/script.sh
|
||||
before_cache: ci/before_cache.sh
|
||||
anchors:
|
||||
envs: &common-job-env
|
||||
# Do not fall back to cache for "master" for PR on "release" branch:
|
||||
# adds the target branch to the cache key.
|
||||
FOR_TRAVIS_CACHE=v1-$TRAVIS_BRANCH
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
packages: &common-apt-packages
|
||||
- apport
|
||||
- autoconf
|
||||
- automake
|
||||
- build-essential
|
||||
- clang-4.0
|
||||
- clang
|
||||
- cmake
|
||||
- cscope
|
||||
- g++-multilib
|
||||
- gcc-multilib
|
||||
- gdb
|
||||
- gperf
|
||||
@ -124,6 +81,78 @@ addons:
|
||||
- ccache
|
||||
- ninja
|
||||
|
||||
jobs:
|
||||
include:
|
||||
- stage: baseline
|
||||
name: clang-asan
|
||||
os: linux
|
||||
compiler: clang
|
||||
# Use Lua so that ASAN can test our embedded Lua support. 8fec4d53d0f6
|
||||
env:
|
||||
- CLANG_SANITIZER=ASAN_UBSAN
|
||||
- CMAKE_FLAGS="$CMAKE_FLAGS -DPREFER_LUA=ON"
|
||||
- *common-job-env
|
||||
- name: gcc-coverage (gcc 9)
|
||||
os: linux
|
||||
compiler: gcc-9
|
||||
env:
|
||||
- GCOV=gcov-9
|
||||
- CMAKE_FLAGS="$CMAKE_FLAGS -DUSE_GCOV=ON"
|
||||
- GCOV_ERROR_FILE="/tmp/libgcov-errors.log"
|
||||
- *common-job-env
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- sourceline: 'ppa:ubuntu-toolchain-r/test'
|
||||
packages:
|
||||
- *common-apt-packages
|
||||
- gcc-9
|
||||
- if: branch = master AND commit_message !~ /\[skip.lint\]/
|
||||
name: lint
|
||||
os: linux
|
||||
env:
|
||||
- CI_TARGET=lint
|
||||
- *common-job-env
|
||||
|
||||
- stage: second stage
|
||||
name: "macOS: clang"
|
||||
os: osx
|
||||
compiler: clang
|
||||
osx_image: xcode10.2 # macOS 10.14
|
||||
env:
|
||||
- *common-job-env
|
||||
- name: gcc-functionaltest-lua
|
||||
os: linux
|
||||
compiler: gcc
|
||||
env:
|
||||
- FUNCTIONALTEST=functionaltest-lua
|
||||
- CMAKE_FLAGS="$CMAKE_FLAGS -DPREFER_LUA=ON"
|
||||
- DEPS_CMAKE_FLAGS="$DEPS_CMAKE_FLAGS -DUSE_BUNDLED_LUAJIT=OFF"
|
||||
- *common-job-env
|
||||
- name: gcc-32bit
|
||||
os: linux
|
||||
# Travis creates a cache per compiler. Set a different value here to
|
||||
# store 32-bit dependencies in a separate cache.
|
||||
compiler: gcc
|
||||
env:
|
||||
- BUILD_32BIT=ON
|
||||
# Minimum required CMake.
|
||||
- CMAKE_URL=https://cmake.org/files/v2.8/cmake-2.8.12-Linux-i386.sh
|
||||
- *common-job-env
|
||||
- name: clang-tsan
|
||||
os: linux
|
||||
compiler: clang
|
||||
env:
|
||||
- CLANG_SANITIZER=TSAN
|
||||
- *common-job-env
|
||||
fast_finish: true
|
||||
|
||||
before_install: ci/before_install.sh
|
||||
install: ci/install.sh
|
||||
before_script: ci/before_script.sh
|
||||
script: ci/script.sh
|
||||
before_cache: ci/before_cache.sh
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
@ -133,9 +162,10 @@ cache:
|
||||
apt: true
|
||||
ccache: true
|
||||
directories:
|
||||
- "$HOME/.cache/pip"
|
||||
- "$HOME/.cache/nvim-deps"
|
||||
- "$HOME/.cache/nvim-deps-downloads"
|
||||
- "$CACHE_NVIM_DEPS_DIR"
|
||||
|
||||
git:
|
||||
quiet: true
|
||||
|
||||
notifications:
|
||||
webhooks:
|
||||
|
222
CMakeLists.txt
222
CMakeLists.txt
@ -2,16 +2,10 @@
|
||||
# intro: https://codingnest.com/basic-cmake/
|
||||
# best practices (3.0+): https://gist.github.com/mbinna/c61dbb39bca0e4fb7d1f73b0d66a4fd1
|
||||
|
||||
# Version should match the tested CMAKE_URL in .travis.yml.
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
project(nvim C)
|
||||
|
||||
if(POLICY CMP0059)
|
||||
# Needed for use of DEFINITIONS variable, which is used to collect the
|
||||
# compilation flags for reporting in "nvim --version"
|
||||
# https://github.com/neovim/neovim/pull/8558#issuecomment-398033140
|
||||
cmake_policy(SET CMP0059 OLD)
|
||||
endif()
|
||||
|
||||
# Point CMake at any custom modules we may ship
|
||||
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
|
||||
|
||||
@ -97,26 +91,34 @@ else()
|
||||
option(ENABLE_LTO "enable link time optimization" ON)
|
||||
endif()
|
||||
|
||||
# Set default build type.
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
message(STATUS "CMAKE_BUILD_TYPE not given, defaulting to 'Debug'")
|
||||
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Choose the type of build" FORCE)
|
||||
endif()
|
||||
message(STATUS "CMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}")
|
||||
|
||||
# Build type.
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
message(STATUS "CMAKE_BUILD_TYPE not specified, default is 'Debug'")
|
||||
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Choose the type of build" FORCE)
|
||||
else()
|
||||
message(STATUS "CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}")
|
||||
endif()
|
||||
if(CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
set(DEBUG 1)
|
||||
else()
|
||||
set(DEBUG 0)
|
||||
endif()
|
||||
# Set available build types for CMake GUIs.
|
||||
# A different build type can still be set by -DCMAKE_BUILD_TYPE=...
|
||||
# Other build types can still be set by -DCMAKE_BUILD_TYPE=...
|
||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY
|
||||
STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
|
||||
|
||||
# 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 3)
|
||||
set(NVIM_VERSION_MINOR 4)
|
||||
set(NVIM_VERSION_PATCH 5)
|
||||
set(NVIM_VERSION_PRERELEASE "-dev") # for package maintainers
|
||||
|
||||
# API level
|
||||
set(NVIM_API_LEVEL 5) # Bump this after any API change.
|
||||
set(NVIM_API_LEVEL 6) # Bump this after any API change.
|
||||
set(NVIM_API_LEVEL_COMPAT 0) # Adjust this after a _breaking_ API change.
|
||||
set(NVIM_API_PRERELEASE false)
|
||||
|
||||
@ -138,12 +140,6 @@ set(NVIM_VERSION_BUILD_TYPE "${CMAKE_BUILD_TYPE}")
|
||||
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
# 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()
|
||||
|
||||
# Minimize logging for release-type builds.
|
||||
if(NOT CMAKE_C_FLAGS_RELEASE MATCHES DMIN_LOG_LEVEL)
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DMIN_LOG_LEVEL=3")
|
||||
@ -155,6 +151,22 @@ if(NOT CMAKE_C_FLAGS_RELWITHDEBINFO MATCHES DMIN_LOG_LEVEL)
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -DMIN_LOG_LEVEL=3")
|
||||
endif()
|
||||
|
||||
# Log level (MIN_LOG_LEVEL in log.h)
|
||||
if("${MIN_LOG_LEVEL}" MATCHES "^$")
|
||||
message(STATUS "MIN_LOG_LEVEL not specified, default is 1 (INFO)")
|
||||
else()
|
||||
if(NOT MIN_LOG_LEVEL MATCHES "^[0-3]$")
|
||||
message(FATAL_ERROR "invalid MIN_LOG_LEVEL: " ${MIN_LOG_LEVEL})
|
||||
endif()
|
||||
message(STATUS "MIN_LOG_LEVEL=${MIN_LOG_LEVEL}")
|
||||
endif()
|
||||
|
||||
# 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()
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCC)
|
||||
check_c_compiler_flag(-Og HAS_OG_FLAG)
|
||||
else()
|
||||
@ -172,11 +184,6 @@ if(CMAKE_C_FLAGS_RELWITHDEBINFO MATCHES DNDEBUG)
|
||||
string(REPLACE "-DNDEBUG" "" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
|
||||
endif()
|
||||
|
||||
# Enable -Wconversion.
|
||||
if(NOT MSVC)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wconversion")
|
||||
endif()
|
||||
|
||||
# gcc 4.0+ sets _FORTIFY_SOURCE=2 automatically. This currently
|
||||
# does not work with Neovim due to some uses of dynamically-sized structures.
|
||||
# https://github.com/neovim/neovim/issues/223
|
||||
@ -243,28 +250,40 @@ check_c_source_compiles("
|
||||
int main(void)
|
||||
{
|
||||
void *trace[1];
|
||||
int trace_size = backtrace(trace, 1);
|
||||
backtrace(trace, 1);
|
||||
return 0;
|
||||
}
|
||||
" HAVE_EXECINFO_BACKTRACE)
|
||||
|
||||
check_c_source_compiles("
|
||||
int main(void)
|
||||
{
|
||||
int a = 42;
|
||||
__builtin_add_overflow(a, a, &a);
|
||||
__builtin_sub_overflow(a, a, &a);
|
||||
return 0;
|
||||
}
|
||||
" HAVE_BUILTIN_ADD_OVERFLOW)
|
||||
|
||||
if(MSVC)
|
||||
# XXX: /W4 gives too many warnings. #3241
|
||||
add_definitions(/W3 -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE)
|
||||
add_compile_options(/W3)
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE)
|
||||
add_definitions(-DWIN32)
|
||||
else()
|
||||
add_definitions(-Wall -Wextra -pedantic -Wno-unused-parameter
|
||||
-Wstrict-prototypes -std=gnu99)
|
||||
add_compile_options(-Wall -Wextra -pedantic -Wno-unused-parameter
|
||||
-Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion
|
||||
-Wmissing-prototypes)
|
||||
|
||||
check_c_compiler_flag(-Wimplicit-fallthrough HAS_WIMPLICIT_FALLTHROUGH_FLAG)
|
||||
if(HAS_WIMPLICIT_FALLTHROUGH_FLAG)
|
||||
add_definitions(-Wimplicit-fallthrough)
|
||||
add_compile_options(-Wimplicit-fallthrough)
|
||||
endif()
|
||||
|
||||
# On FreeBSD 64 math.h uses unguarded C11 extension, which taints clang
|
||||
# 3.4.1 used there.
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
add_definitions(-Wno-c11-extensions)
|
||||
add_compile_options(-Wno-c11-extensions)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@ -280,7 +299,7 @@ endif()
|
||||
# OpenBSD's GCC (4.2.1) doesn't have -Wvla
|
||||
check_c_compiler_flag(-Wvla HAS_WVLA_FLAG)
|
||||
if(HAS_WVLA_FLAG)
|
||||
add_definitions(-Wvla)
|
||||
add_compile_options(-Wvla)
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
@ -289,26 +308,23 @@ if(UNIX)
|
||||
check_c_compiler_flag(-fstack-protector HAS_FSTACK_PROTECTOR_FLAG)
|
||||
|
||||
if(HAS_FSTACK_PROTECTOR_STRONG_FLAG)
|
||||
add_definitions(-fstack-protector-strong)
|
||||
add_compile_options(-fstack-protector-strong)
|
||||
elseif(HAS_FSTACK_PROTECTOR_FLAG)
|
||||
add_definitions(-fstack-protector --param ssp-buffer-size=4)
|
||||
add_compile_options(-fstack-protector --param ssp-buffer-size=4)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
check_c_compiler_flag(-fno-common HAVE_FNO_COMMON)
|
||||
if (HAVE_FNO_COMMON)
|
||||
add_compile_options(-fno-common)
|
||||
endif()
|
||||
|
||||
check_c_compiler_flag(-fdiagnostics-color=auto HAS_DIAG_COLOR_FLAG)
|
||||
if(HAS_DIAG_COLOR_FLAG)
|
||||
add_definitions(-fdiagnostics-color=auto)
|
||||
endif()
|
||||
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
# 1. Array-bounds testing is broken in some GCC versions before 4.8.5.
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56273
|
||||
# 2. But _Pragma("...ignored") is broken (unresolved) in GCC 5+:
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66099
|
||||
# So we must disable -Warray-bounds globally for GCC (for kbtree.h, #7083).
|
||||
check_c_compiler_flag(-Wno-array-bounds HAS_NO_ARRAY_BOUNDS_FLAG)
|
||||
if(HAS_NO_ARRAY_BOUNDS_FLAG)
|
||||
add_definitions(-Wno-array-bounds)
|
||||
if(CMAKE_GENERATOR MATCHES "Ninja")
|
||||
add_compile_options(-fdiagnostics-color=always)
|
||||
else()
|
||||
add_compile_options(-fdiagnostics-color=auto)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@ -316,19 +332,13 @@ option(TRAVIS_CI_BUILD "Travis/QuickBuild CI, extra flags will be set" OFF)
|
||||
|
||||
if(TRAVIS_CI_BUILD)
|
||||
message(STATUS "Travis/QuickBuild CI build enabled")
|
||||
add_definitions(-Werror)
|
||||
add_compile_options(-Werror)
|
||||
if(DEFINED ENV{BUILD_32BIT})
|
||||
# Get some test coverage for unsigned char
|
||||
add_definitions(-funsigned-char)
|
||||
add_compile_options(-funsigned-char)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
set(DEBUG 1)
|
||||
else()
|
||||
set(DEBUG 0)
|
||||
endif()
|
||||
|
||||
option(LOG_LIST_ACTIONS "Add list actions logging" OFF)
|
||||
|
||||
add_definitions(-DINCLUDE_GENERATED_DECLARATIONS)
|
||||
@ -361,12 +371,15 @@ endif()
|
||||
include_directories("${PROJECT_BINARY_DIR}/config")
|
||||
include_directories("${PROJECT_SOURCE_DIR}/src")
|
||||
|
||||
find_package(LibUV REQUIRED)
|
||||
find_package(LibUV 1.28.0 REQUIRED)
|
||||
include_directories(SYSTEM ${LIBUV_INCLUDE_DIRS})
|
||||
|
||||
find_package(Msgpack 1.0.0 REQUIRED)
|
||||
include_directories(SYSTEM ${MSGPACK_INCLUDE_DIRS})
|
||||
|
||||
find_package(LibLUV 1.30.0 REQUIRED)
|
||||
include_directories(SYSTEM ${LIBLUV_INCLUDE_DIRS})
|
||||
|
||||
# Note: The test lib requires LuaJIT; it will be skipped if LuaJIT is missing.
|
||||
option(PREFER_LUA "Prefer Lua over LuaJIT in the nvim executable." OFF)
|
||||
|
||||
@ -392,7 +405,7 @@ main(void)
|
||||
return MSGPACK_OBJECT_FLOAT32;
|
||||
}
|
||||
" MSGPACK_HAS_FLOAT32)
|
||||
unset(CMAKE_REQUIRED_LIBRARIES)
|
||||
list(REMOVE_ITEM CMAKE_REQUIRED_INCLUDES "${MSGPACK_INCLUDE_DIRS}")
|
||||
if(MSGPACK_HAS_FLOAT32)
|
||||
add_definitions(-DNVIM_MSGPACK_HAS_FLOAT32)
|
||||
endif()
|
||||
@ -400,7 +413,7 @@ endif()
|
||||
option(FEAT_TUI "Enable the Terminal UI" ON)
|
||||
|
||||
if(FEAT_TUI)
|
||||
find_package(Unibilium REQUIRED)
|
||||
find_package(UNIBILIUM 2.0 REQUIRED)
|
||||
include_directories(SYSTEM ${UNIBILIUM_INCLUDE_DIRS})
|
||||
|
||||
list(APPEND CMAKE_REQUIRED_INCLUDES "${UNIBILIUM_INCLUDE_DIRS}")
|
||||
@ -414,8 +427,8 @@ if(FEAT_TUI)
|
||||
return unibi_num_from_var(unibi_var_from_num(0));
|
||||
}
|
||||
" UNIBI_HAS_VAR_FROM)
|
||||
unset(CMAKE_REQUIRED_INCLUDES)
|
||||
unset(CMAKE_REQUIRED_LIBRARIES)
|
||||
list(REMOVE_ITEM CMAKE_REQUIRED_INCLUDES "${UNIBILIUM_INCLUDE_DIRS}")
|
||||
list(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES "${UNIBILIUM_LIBRARIES}")
|
||||
if(UNIBI_HAS_VAR_FROM)
|
||||
add_definitions(-DNVIM_UNIBI_HAS_VAR_FROM)
|
||||
endif()
|
||||
@ -424,7 +437,7 @@ if(FEAT_TUI)
|
||||
include_directories(SYSTEM ${LIBTERMKEY_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
find_package(LibVterm REQUIRED)
|
||||
find_package(LIBVTERM 0.1 REQUIRED)
|
||||
include_directories(SYSTEM ${LIBVTERM_INCLUDE_DIRS})
|
||||
|
||||
if(WIN32)
|
||||
@ -446,20 +459,9 @@ if((CLANG_ASAN_UBSAN OR CLANG_MSAN OR CLANG_TSAN) AND NOT CMAKE_C_COMPILER_ID MA
|
||||
message(FATAL_ERROR "Sanitizers are only supported for Clang")
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "OpenBSD|FreeBSD|Windows") # see #5318
|
||||
message(STATUS "skipping jemalloc on this system: ${CMAKE_SYSTEM_NAME}")
|
||||
option(ENABLE_JEMALLOC "enable jemalloc" OFF)
|
||||
else()
|
||||
option(ENABLE_JEMALLOC "enable jemalloc" ON)
|
||||
endif()
|
||||
|
||||
if(ENABLE_JEMALLOC)
|
||||
if(CLANG_ASAN_UBSAN OR CLANG_MSAN OR CLANG_TSAN)
|
||||
message(STATUS "Sanitizers enabled; disabling jemalloc")
|
||||
else()
|
||||
find_package(JeMalloc REQUIRED)
|
||||
include_directories(SYSTEM ${JEMALLOC_INCLUDE_DIRS})
|
||||
endif()
|
||||
if(ENABLE_LIBICONV)
|
||||
find_package(Iconv REQUIRED)
|
||||
include_directories(SYSTEM ${Iconv_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
if(ENABLE_LIBINTL)
|
||||
@ -468,11 +470,6 @@ if(ENABLE_LIBINTL)
|
||||
include_directories(SYSTEM ${LibIntl_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
if(ENABLE_LIBICONV)
|
||||
find_package(Iconv REQUIRED)
|
||||
include_directories(SYSTEM ${Iconv_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
# Determine platform's threading library. Set CMAKE_THREAD_PREFER_PTHREAD
|
||||
# explicitly to indicate a strong preference for pthread.
|
||||
set(CMAKE_THREAD_PREFER_PTHREAD ON)
|
||||
@ -524,6 +521,7 @@ if(NOT BUSTED_OUTPUT_TYPE)
|
||||
endif()
|
||||
|
||||
find_program(LUACHECK_PRG luacheck)
|
||||
find_program(FLAKE8_PRG flake8)
|
||||
find_program(GPERF_PRG gperf)
|
||||
|
||||
include(InstallHelpers)
|
||||
@ -535,27 +533,17 @@ install_helper(
|
||||
FILES ${MANPAGES}
|
||||
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
|
||||
|
||||
# MIN_LOG_LEVEL for log.h
|
||||
if("${MIN_LOG_LEVEL}" MATCHES "^$")
|
||||
message(STATUS "MIN_LOG_LEVEL not specified")
|
||||
else()
|
||||
if(NOT MIN_LOG_LEVEL MATCHES "^[0-3]$")
|
||||
message(FATAL_ERROR "invalid MIN_LOG_LEVEL: " ${MIN_LOG_LEVEL})
|
||||
endif()
|
||||
message(STATUS "MIN_LOG_LEVEL set to ${MIN_LOG_LEVEL}")
|
||||
endif()
|
||||
|
||||
#
|
||||
# Go down the tree.
|
||||
#
|
||||
|
||||
add_subdirectory(src/nvim)
|
||||
# Read compilation flags from src/nvim, used in config subdirectory below.
|
||||
include(GetCompileFlags)
|
||||
get_compile_flags(NVIM_VERSION_CFLAGS)
|
||||
|
||||
get_directory_property(NVIM_VERSION_CFLAGS DIRECTORY src/nvim DEFINITION NVIM_VERSION_CFLAGS)
|
||||
add_subdirectory(test/includes)
|
||||
add_subdirectory(config)
|
||||
add_subdirectory(test/functional/fixtures) # compile test programs
|
||||
add_subdirectory(runtime)
|
||||
get_directory_property(GENERATED_HELP_TAGS DIRECTORY runtime DEFINITION GENERATED_HELP_TAGS)
|
||||
if(WIN32)
|
||||
install_helper(
|
||||
FILES ${DEPS_PREFIX}/share/nvim-qt/runtime/plugin/nvim_gui_shim.vim
|
||||
@ -577,7 +565,7 @@ if(BUSTED_PRG)
|
||||
endif()
|
||||
|
||||
set(UNITTEST_PREREQS nvim-test unittest-headers)
|
||||
set(FUNCTIONALTEST_PREREQS nvim printargs-test shell-test)
|
||||
set(FUNCTIONALTEST_PREREQS nvim printargs-test shell-test streams-test ${GENERATED_HELP_TAGS})
|
||||
if(NOT WIN32)
|
||||
list(APPEND FUNCTIONALTEST_PREREQS tty-test)
|
||||
endif()
|
||||
@ -605,7 +593,6 @@ if(BUSTED_PRG)
|
||||
-DTEST_DIR=${CMAKE_CURRENT_SOURCE_DIR}/test
|
||||
-DBUILD_DIR=${CMAKE_BINARY_DIR}
|
||||
-DTEST_TYPE=unit
|
||||
-DSYSTEM_NAME=${CMAKE_SYSTEM_NAME}
|
||||
-P ${PROJECT_SOURCE_DIR}/cmake/RunTests.cmake
|
||||
DEPENDS ${UNITTEST_PREREQS}
|
||||
${TEST_TARGET_ARGS})
|
||||
@ -636,7 +623,6 @@ if(BUSTED_PRG)
|
||||
-DTEST_DIR=${CMAKE_CURRENT_SOURCE_DIR}/test
|
||||
-DBUILD_DIR=${CMAKE_BINARY_DIR}
|
||||
-DTEST_TYPE=functional
|
||||
-DSYSTEM_NAME=${CMAKE_SYSTEM_NAME}
|
||||
-P ${PROJECT_SOURCE_DIR}/cmake/RunTests.cmake
|
||||
DEPENDS ${FUNCTIONALTEST_PREREQS}
|
||||
${TEST_TARGET_ARGS})
|
||||
@ -653,7 +639,6 @@ if(BUSTED_PRG)
|
||||
-DTEST_DIR=${CMAKE_CURRENT_SOURCE_DIR}/test
|
||||
-DBUILD_DIR=${CMAKE_BINARY_DIR}
|
||||
-DTEST_TYPE=benchmark
|
||||
-DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}
|
||||
-P ${PROJECT_SOURCE_DIR}/cmake/RunTests.cmake
|
||||
DEPENDS ${BENCHMARK_PREREQS}
|
||||
${TEST_TARGET_ARGS})
|
||||
@ -671,7 +656,6 @@ if(BUSTED_LUA_PRG)
|
||||
-DTEST_DIR=${CMAKE_CURRENT_SOURCE_DIR}/test
|
||||
-DBUILD_DIR=${CMAKE_BINARY_DIR}
|
||||
-DTEST_TYPE=functional
|
||||
-DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}
|
||||
-P ${PROJECT_SOURCE_DIR}/cmake/RunTests.cmake
|
||||
DEPENDS ${FUNCTIONALTEST_PREREQS}
|
||||
${TEST_TARGET_ARGS})
|
||||
@ -679,40 +663,12 @@ if(BUSTED_LUA_PRG)
|
||||
endif()
|
||||
|
||||
if(LUACHECK_PRG)
|
||||
add_custom_target(testlint
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-DLUACHECK_PRG=${LUACHECK_PRG}
|
||||
-DLUAFILES_DIR=${CMAKE_CURRENT_SOURCE_DIR}/test
|
||||
-DIGNORE_PATTERN="*/preload.lua"
|
||||
-DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}
|
||||
-P ${PROJECT_SOURCE_DIR}/cmake/RunLuacheck.cmake)
|
||||
|
||||
add_custom_target(
|
||||
lintbuiltinlua
|
||||
COMMAND
|
||||
${CMAKE_COMMAND}
|
||||
-DLUACHECK_PRG=${LUACHECK_PRG}
|
||||
-DLUAFILES_DIR=${CMAKE_CURRENT_SOURCE_DIR}/src/nvim/lua
|
||||
-DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}
|
||||
-DREAD_GLOBALS=vim
|
||||
-P ${PROJECT_SOURCE_DIR}/cmake/RunLuacheck.cmake
|
||||
)
|
||||
add_custom_target(
|
||||
lintruntimelua
|
||||
COMMAND
|
||||
${CMAKE_COMMAND}
|
||||
-DLUACHECK_PRG=${LUACHECK_PRG}
|
||||
-DLUAFILES_DIR=${CMAKE_CURRENT_SOURCE_DIR}/runtime/lua
|
||||
-DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}
|
||||
-DREAD_GLOBALS=vim
|
||||
-P ${PROJECT_SOURCE_DIR}/cmake/RunLuacheck.cmake
|
||||
)
|
||||
# TODO(ZyX-I): Run linter for all lua code in src
|
||||
add_custom_target(
|
||||
lualint
|
||||
DEPENDS lintruntimelua
|
||||
DEPENDS lintbuiltinlua
|
||||
)
|
||||
add_custom_target(lualint
|
||||
COMMAND ${LUACHECK_PRG} -q runtime/ src/ test/
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
else()
|
||||
add_custom_target(lualint false
|
||||
COMMENT "lualint: LUACHECK_PRG not defined")
|
||||
endif()
|
||||
|
||||
set(CPACK_PACKAGE_NAME "Neovim")
|
||||
|
170
CONTRIBUTING.md
170
CONTRIBUTING.md
@ -1,4 +1,5 @@
|
||||
# Contributing to Neovim
|
||||
Contributing to Neovim
|
||||
======================
|
||||
|
||||
Getting started
|
||||
---------------
|
||||
@ -8,13 +9,25 @@ low-risk/isolated tasks:
|
||||
|
||||
- [Merge a Vim patch].
|
||||
- Try a [complexity:low] issue.
|
||||
- Fix bugs found by [clang scan-build](#clang-scan-build),
|
||||
[coverity](#coverity), and [PVS](#pvs-studio).
|
||||
- Fix bugs found by [Clang](#clang-scan-build), [PVS](#pvs-studio) or
|
||||
[Coverity](#coverity).
|
||||
|
||||
Reporting problems
|
||||
------------------
|
||||
|
||||
- [Check the FAQ][wiki-faq].
|
||||
- [Search existing issues][github-issues] (including closed!)
|
||||
- Update Neovim to the latest version to see if your problem persists.
|
||||
- Disable plugins incrementally, to narrow down the cause of the issue.
|
||||
- When reporting a crash, [include a stacktrace](https://github.com/neovim/neovim/wiki/FAQ#backtrace-linux).
|
||||
- [Bisect][git-bisect] to the cause of a regression, if you are able. This is _extremely_ helpful.
|
||||
- Check `$NVIM_LOG_FILE`, if it exists.
|
||||
- Include `cmake --system-information` for build-related issues.
|
||||
|
||||
Developer guidelines
|
||||
--------------------
|
||||
|
||||
- Nvim contributors should read `:help dev` (especially `:help dev-api`).
|
||||
- Nvim contributors should read `:help dev`.
|
||||
- External UI developers should read `:help dev-ui`.
|
||||
- API client developers should read `:help dev-api-client`.
|
||||
- Nvim developers are _strongly encouraged_ to install `ninja` for faster builds.
|
||||
@ -24,22 +37,11 @@ Developer guidelines
|
||||
make # Nvim build system uses ninja automatically, if available.
|
||||
```
|
||||
|
||||
Reporting problems
|
||||
------------------
|
||||
|
||||
- Check the [**FAQ**][wiki-faq].
|
||||
- Search [existing issues][github-issues] (including closed!)
|
||||
- Update Neovim to the latest version to see if your problem persists.
|
||||
- Disable plugins incrementally, to narrow down the cause of the issue.
|
||||
- When reporting a crash, [include a stacktrace](https://github.com/neovim/neovim/wiki/Development-tips#backtrace-linux).
|
||||
- [Bisect][git-bisect] to the cause of a regression, if you are able. This is _extremely_ helpful.
|
||||
- Check `$NVIM_LOG_FILE`, if it exists.
|
||||
- Include `cmake --system-information` for **build** issues.
|
||||
|
||||
Pull requests ("PRs")
|
||||
Pull requests (PRs)
|
||||
---------------------
|
||||
|
||||
- To avoid duplicate work, create a `[WIP]` pull request as soon as possible.
|
||||
- Your PR must include **test coverage.** See [test/README.md][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 small PRs.
|
||||
@ -63,20 +65,10 @@ Pull requests ("PRs")
|
||||
Pull requests have three stages: `[WIP]` (Work In Progress), `[RFC]` (Request
|
||||
For Comment) and `[RDY]` (Ready).
|
||||
|
||||
- Untagged PRs are assumed to be `[RFC]`, i.e. you are requesting a review.
|
||||
- Prepend `[WIP]` to the PR title if you are _not_ requesting feedback and the
|
||||
work is still in flux.
|
||||
- Prepend `[RDY]` to the PR title if you are _done_ with the PR and are only
|
||||
waiting on it to be merged.
|
||||
|
||||
For example, a typical workflow is:
|
||||
|
||||
1. You open a `[WIP]` PR where the work is _not_ ready for feedback, you just want to
|
||||
let others know what you are doing.
|
||||
2. Once the PR is ready for review, you replace `[WIP]` in the title with `[RFC]`.
|
||||
You may add fix up commits to address issues that come up during review.
|
||||
3. Once the PR is ready for merging, you rebase/squash your work appropriately and
|
||||
then replace `[RFC]` in the title with `[RDY]`.
|
||||
- `[RFC]` is assumed by default, i.e. you are requesting a review.
|
||||
- Add `[WIP]` to the PR title if you are _not_ requesting feedback and the work
|
||||
is still in flux.
|
||||
- Add `[RDY]` if you are _done_ and only waiting on merge.
|
||||
|
||||
### Commit messages
|
||||
|
||||
@ -86,14 +78,14 @@ the VCS/git logs more valuable.
|
||||
- Try to keep the first line under 72 characters.
|
||||
- **Prefix the commit subject with a _scope_:** `doc:`, `test:`, `foo.c:`,
|
||||
`runtime:`, ...
|
||||
- For commits that contain only style/lint changes, a single-word subject
|
||||
line is preferred: `style` or `lint`.
|
||||
- Subject line for commits with only style/lint changes can be a single
|
||||
word: `style` or `lint`.
|
||||
- A blank line must separate the subject from the description.
|
||||
- Use the _imperative voice_: "Fix bug" rather than "Fixed bug" or "Fixes bug."
|
||||
|
||||
### Automated builds (CI)
|
||||
|
||||
Each pull request must pass the automated builds on [travis CI], [quickbuild]
|
||||
Each pull request must pass the automated builds on [Travis CI], [QuickBuild]
|
||||
and [AppVeyor].
|
||||
|
||||
- CI builds are compiled with [`-Werror`][gcc-warnings], so compiler warnings
|
||||
@ -105,47 +97,98 @@ and [AppVeyor].
|
||||
- CI runs [ASan] and other analyzers.
|
||||
- To run valgrind locally: `VALGRIND=1 make test`
|
||||
- To run Clang ASan/UBSan locally: `CC=clang make CMAKE_FLAGS="-DCLANG_ASAN_UBSAN=ON"`
|
||||
- The `lint` build ([#3174][3174]) checks modified lines _and their immediate
|
||||
neighbors_. This is to encourage incrementally updating the legacy style to
|
||||
meet our style guidelines.
|
||||
- A single word (`lint` or `style`) is sufficient as the subject line of
|
||||
a commit that contains only style changes.
|
||||
- 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.)
|
||||
- [How to investigate QuickBuild failures](https://github.com/neovim/neovim/pull/4718#issuecomment-217631350)
|
||||
|
||||
QuickBuild uses this invocation:
|
||||
|
||||
mkdir -p build/${params.get("buildType")} \
|
||||
&& cd build/${params.get("buildType")} \
|
||||
&& cmake -G "Unix Makefiles" -DBUSTED_OUTPUT_TYPE=TAP -DCMAKE_BUILD_TYPE=${params.get("buildType")}
|
||||
-DTRAVIS_CI_BUILD=ON ../.. && ${node.getAttribute("make", "make")}
|
||||
VERBOSE=1 nvim unittest-prereqs functionaltest-prereqs
|
||||
|
||||
- QuickBuild uses this invocation:
|
||||
```
|
||||
mkdir -p build/${params.get("buildType")} \
|
||||
&& cd build/${params.get("buildType")} \
|
||||
&& cmake -G "Unix Makefiles" -DBUSTED_OUTPUT_TYPE=TAP -DCMAKE_BUILD_TYPE=${params.get("buildType")}
|
||||
-DTRAVIS_CI_BUILD=ON ../.. && ${node.getAttribute("make", "make")}
|
||||
VERBOSE=1 nvim unittest-prereqs functionaltest-prereqs
|
||||
```
|
||||
|
||||
### Clang scan-build
|
||||
|
||||
The auto-generated [clang-scan] report presents walk-throughs of bugs found by
|
||||
Clang's [scan-build](https://clang-analyzer.llvm.org/scan-build.html) static
|
||||
analyzer. To verify a fix locally, run `scan-build` like this:
|
||||
View the [Clang report] to see potential bugs found by the Clang
|
||||
[scan-build](https://clang-analyzer.llvm.org/scan-build.html) analyzer.
|
||||
|
||||
rm -rf build/
|
||||
scan-build --use-analyzer=/usr/bin/clang make
|
||||
- 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)):
|
||||
```
|
||||
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](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 commit-message format for coverity fixes:
|
||||
- Use this format for commit messages (where `{id}` is the CID (Coverity ID);
|
||||
([example](https://github.com/neovim/neovim/pull/804))):
|
||||
```
|
||||
coverity/{id}: {description}
|
||||
```
|
||||
- Search the Neovim commit history to find examples:
|
||||
```
|
||||
git log --oneline --no-merges --grep coverity
|
||||
```
|
||||
|
||||
coverity/<id>: <description of what fixed the defect>
|
||||
|
||||
where `<id>` is the Coverity ID (CID). For example see [#804](https://github.com/neovim/neovim/pull/804).
|
||||
Coding
|
||||
------
|
||||
|
||||
### PVS-Studio
|
||||
### Lint
|
||||
|
||||
You can run the linter locally by:
|
||||
|
||||
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
|
||||
|
||||
The repo includes a `.clang-format` config file which (mostly) matches the
|
||||
[style-guide]. You can use `clang-format` to format code with the `gq`
|
||||
operator in Nvim:
|
||||
|
||||
if !empty(findfile('.clang-format', ';'))
|
||||
setlocal formatprg=clang-format\ -style=file
|
||||
endif
|
||||
|
||||
### Navigate
|
||||
|
||||
- Use **[universal-ctags](https://github.com/universal-ctags/ctags).**
|
||||
("Exuberant ctags", the typical `ctags` binary provided by your distro, is
|
||||
unmaintained and won't recognize many function signatures in Neovim source.)
|
||||
- Explore the source code [on the web](https://sourcegraph.com/github.com/neovim/neovim).
|
||||
|
||||
View the [PVS analysis report](https://neovim.io/doc/reports/pvs/) to see bugs
|
||||
found by [PVS Studio](https://www.viva64.com/en/pvs-studio/).
|
||||
You can run `scripts/pvscheck.sh` locally to run PVS on your machine.
|
||||
|
||||
Reviewing
|
||||
---------
|
||||
@ -179,9 +222,10 @@ as context, use the `-W` argument as well.
|
||||
[wiki-faq]: https://github.com/neovim/neovim/wiki/FAQ
|
||||
[review-checklist]: https://github.com/neovim/neovim/wiki/Code-review-checklist
|
||||
[3174]: https://github.com/neovim/neovim/issues/3174
|
||||
[travis CI]: https://travis-ci.org/neovim/neovim
|
||||
[quickbuild]: http://neovim-qb.szakmeister.net/dashboard
|
||||
[Travis CI]: https://travis-ci.org/neovim/neovim
|
||||
[QuickBuild]: http://neovim-qb.szakmeister.net/dashboard
|
||||
[AppVeyor]: https://ci.appveyor.com/project/neovim/neovim
|
||||
[Merge a Vim patch]: https://github.com/neovim/neovim/wiki/Merging-patches-from-upstream-Vim
|
||||
[clang-scan]: https://neovim.io/doc/reports/clang/
|
||||
[Clang report]: https://neovim.io/doc/reports/clang/
|
||||
[complexity:low]: https://github.com/neovim/neovim/issues?q=is%3Aopen+is%3Aissue+label%3Acomplexity%3Alow
|
||||
[master error list]: https://raw.githubusercontent.com/neovim/doc/gh-pages/reports/clint/errors.json
|
||||
|
47
MAINTAIN.md
47
MAINTAIN.md
@ -3,9 +3,16 @@ Maintaining the Neovim project
|
||||
|
||||
Notes on maintaining the Neovim project.
|
||||
|
||||
See also: https://github.com/git/git/blob/master/Documentation/howto/maintain-git.txt
|
||||
General guidelines
|
||||
------------------
|
||||
|
||||
Ticket Triage
|
||||
* Decide by cost-benefit
|
||||
* Write down what was decided
|
||||
* Constraints are good
|
||||
* Use automation to solve problems
|
||||
* Never break the API
|
||||
|
||||
Ticket triage
|
||||
-------------
|
||||
|
||||
In practice we haven't found a meaningful way to forecast more precisely than
|
||||
@ -19,9 +26,9 @@ The forecasting problem might be solved with an explicit priority system (like
|
||||
Bram's todo.txt). Meanwhile the Neovim priority system is defined by:
|
||||
|
||||
- PRs nearing completion (RDY).
|
||||
- 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.
|
||||
- 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.
|
||||
|
||||
Anything that isn't in the next milestone, and doesn't have a RDY PR ... is
|
||||
@ -29,20 +36,28 @@ just not something you care very much about, by construction. Post-release you
|
||||
can review open issues, but chances are your next milestone is already getting
|
||||
full :)
|
||||
|
||||
Release Policy
|
||||
Release policy
|
||||
--------------
|
||||
|
||||
The goal is "early and often".
|
||||
Release "often", but not "early".
|
||||
|
||||
Up to now we use only one branch, the `master` branch.
|
||||
The (unreleased) `master` branch is the "early" channel; it should not be
|
||||
released if it's not stable. High-risk changes may be merged to `master` if
|
||||
the next release is not imminent.
|
||||
|
||||
- If `master` is unstable we don't release.
|
||||
- If the last release has a major bug, we:
|
||||
1. Fix the bug on `master`.
|
||||
2. Disable or remove any known risks present on `master`.
|
||||
3. Cut a release from `master`.
|
||||
For maintenance releases, create a `release-x.y` branch. If the current release
|
||||
has a major bug:
|
||||
|
||||
This is a bit silly, but it works ok. And it keeps `master` from biting off
|
||||
more feature-creep than it can chew.
|
||||
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`
|
||||
- Update (force-push) the remote `stable` tag.
|
||||
- The [nightly job](https://github.com/neovim/bot-ci/blob/master/ci/nightly.sh)
|
||||
will update the release assets based on the `stable` tag.
|
||||
|
||||
See also: https://github.com/neovim/neovim/issues/862
|
||||
See also
|
||||
--------
|
||||
|
||||
- https://github.com/neovim/neovim/issues/862
|
||||
- https://github.com/git/git/blob/master/Documentation/howto/maintain-git.txt
|
||||
|
87
Makefile
87
Makefile
@ -5,15 +5,39 @@ filter-true = $(strip $(filter-out 1 on ON true TRUE,$1))
|
||||
# See contrib/local.mk.example
|
||||
-include local.mk
|
||||
|
||||
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 ?=
|
||||
|
||||
# CMAKE_INSTALL_PREFIX
|
||||
# - May be passed directly or as part of CMAKE_EXTRA_FLAGS.
|
||||
# - `checkprefix` target checks that it matches the CMake-cached value. #9615
|
||||
ifneq (,$(CMAKE_INSTALL_PREFIX)$(CMAKE_EXTRA_FLAGS))
|
||||
CMAKE_INSTALL_PREFIX := $(shell echo $(CMAKE_EXTRA_FLAGS) | 2>/dev/null \
|
||||
grep -o 'CMAKE_INSTALL_PREFIX=[^ ]\+' | cut -d '=' -f2)
|
||||
endif
|
||||
ifneq (,$(CMAKE_INSTALL_PREFIX))
|
||||
override CMAKE_EXTRA_FLAGS += -DCMAKE_INSTALL_PREFIX=$(CMAKE_INSTALL_PREFIX)
|
||||
|
||||
checkprefix:
|
||||
@if [ -f build/.ran-cmake ]; then \
|
||||
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; \
|
||||
fi \
|
||||
fi
|
||||
else
|
||||
checkprefix: ;
|
||||
endif
|
||||
|
||||
BUILD_TYPE ?= $(shell (type 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
|
||||
@ -32,17 +56,15 @@ ifeq (,$(BUILD_TOOL))
|
||||
endif
|
||||
endif
|
||||
|
||||
BUILD_CMD = $(BUILD_TOOL)
|
||||
|
||||
ifneq ($(VERBOSE),)
|
||||
# Only need to handle Ninja here. Make will inherit the VERBOSE variable.
|
||||
ifeq ($(BUILD_TYPE),Ninja)
|
||||
VERBOSE_FLAG := -v
|
||||
BUILD_CMD += -v
|
||||
endif
|
||||
endif
|
||||
|
||||
BUILD_CMD = $(BUILD_TOOL) $(VERBOSE_FLAG)
|
||||
|
||||
# Extra CMake flags which extend the default set
|
||||
CMAKE_EXTRA_FLAGS ?=
|
||||
DEPS_CMAKE_FLAGS ?=
|
||||
# Back-compat: USE_BUNDLED_DEPS was the old name.
|
||||
USE_BUNDLED ?= $(USE_BUNDLED_DEPS)
|
||||
@ -60,8 +82,6 @@ endif
|
||||
# a warning, but we need to keep SCRIPTS argument.
|
||||
SINGLE_MAKE = export MAKEFLAGS= ; $(MAKE)
|
||||
|
||||
all: nvim
|
||||
|
||||
nvim: build/.ran-cmake deps
|
||||
+$(BUILD_CMD) -C build
|
||||
|
||||
@ -81,18 +101,20 @@ ifeq ($(call filter-true,$(USE_BUNDLED)),)
|
||||
+$(BUILD_CMD) -C $(DEPS_BUILD_DIR)
|
||||
endif
|
||||
|
||||
build/.ran-third-party-cmake:
|
||||
ifeq ($(call filter-true,$(USE_BUNDLED)),)
|
||||
mkdir -p $(DEPS_BUILD_DIR)
|
||||
$(DEPS_BUILD_DIR):
|
||||
mkdir -p "$@"
|
||||
build/.ran-third-party-cmake:: $(DEPS_BUILD_DIR)
|
||||
cd $(DEPS_BUILD_DIR) && \
|
||||
$(CMAKE_PRG) -G '$(BUILD_TYPE)' $(BUNDLED_CMAKE_FLAG) $(BUNDLED_LUA_CMAKE_FLAG) \
|
||||
$(DEPS_CMAKE_FLAGS) $(THIS_DIR)/third-party
|
||||
endif
|
||||
build/.ran-third-party-cmake::
|
||||
mkdir -p build
|
||||
touch $@
|
||||
|
||||
# TODO: cmake 3.2+ add_custom_target() has a USES_TERMINAL flag.
|
||||
oldtest: | nvim helptags
|
||||
oldtest: | nvim build/runtime/doc/tags
|
||||
+$(SINGLE_MAKE) -C src/nvim/testdir clean
|
||||
ifeq ($(strip $(TEST_FILE)),)
|
||||
+$(SINGLE_MAKE) -C src/nvim/testdir NVIM_PRG="$(realpath build/bin/nvim)" $(MAKEOVERRIDES)
|
||||
@ -100,11 +122,11 @@ else
|
||||
+$(SINGLE_MAKE) -C src/nvim/testdir NVIM_PRG="$(realpath build/bin/nvim)" NEW_TESTS=$(TEST_FILE) SCRIPTS= $(MAKEOVERRIDES)
|
||||
endif
|
||||
|
||||
helptags: | nvim
|
||||
+$(BUILD_CMD) -C build helptags
|
||||
build/runtime/doc/tags helptags: | nvim
|
||||
+$(BUILD_CMD) -C build runtime/doc/tags
|
||||
|
||||
# Builds help HTML _and_ checks for invalid help tags.
|
||||
helphtml: | nvim helptags
|
||||
helphtml: | nvim build/runtime/doc/tags
|
||||
+$(BUILD_CMD) -C build doc_html
|
||||
|
||||
functionaltest: | nvim
|
||||
@ -113,12 +135,17 @@ functionaltest: | nvim
|
||||
functionaltest-lua: | nvim
|
||||
+$(BUILD_CMD) -C build functionaltest-lua
|
||||
|
||||
testlint: | build/.ran-cmake deps
|
||||
$(BUILD_CMD) -C build testlint
|
||||
|
||||
lualint: | build/.ran-cmake deps
|
||||
$(BUILD_CMD) -C build lualint
|
||||
|
||||
pylint:
|
||||
flake8 contrib/ scripts/ src/ test/
|
||||
|
||||
# Run pylint only if flake8 is installed.
|
||||
_opt_pylint:
|
||||
@command -v flake8 && { $(MAKE) pylint; exit $$?; } \
|
||||
|| echo "SKIP: pylint (flake8 not found)"
|
||||
|
||||
unittest: | nvim
|
||||
+$(BUILD_CMD) -C build unittest
|
||||
|
||||
@ -132,10 +159,11 @@ clean:
|
||||
$(MAKE) -C src/nvim/testdir clean
|
||||
$(MAKE) -C runtime/doc clean
|
||||
|
||||
distclean: clean
|
||||
distclean:
|
||||
rm -rf $(DEPS_BUILD_DIR) build
|
||||
$(MAKE) clean
|
||||
|
||||
install: | nvim
|
||||
install: checkprefix nvim
|
||||
+$(BUILD_CMD) -C build install
|
||||
|
||||
clint: build/.ran-cmake
|
||||
@ -153,11 +181,22 @@ generated-sources: build/.ran-cmake
|
||||
appimage:
|
||||
bash scripts/genappimage.sh
|
||||
|
||||
# Build an appimage with embedded update information appimage-nightly for
|
||||
# nightly builds or appimage-latest for a release
|
||||
# Build an appimage with embedded update information.
|
||||
# appimage-nightly: for nightly builds
|
||||
# appimage-latest: for a release
|
||||
appimage-%:
|
||||
bash scripts/genappimage.sh $*
|
||||
|
||||
lint: check-single-includes clint testlint lualint
|
||||
lint: check-single-includes clint lualint _opt_pylint
|
||||
|
||||
.PHONY: test testlint lualint functionaltest unittest lint clint clean distclean nvim libnvim cmake deps install appimage
|
||||
# Generic pattern rules, allowing for `make build/bin/nvim` etc.
|
||||
# Does not work with "Unix Makefiles".
|
||||
ifeq ($(BUILD_TYPE),Ninja)
|
||||
build/%:
|
||||
$(BUILD_CMD) -C build $(patsubst build/%,%,$@)
|
||||
|
||||
$(DEPS_BUILD_DIR)/%:
|
||||
$(BUILD_CMD) -C $(DEPS_BUILD_DIR) $(patsubst $(DEPS_BUILD_DIR)/%,%,$@)
|
||||
endif
|
||||
|
||||
.PHONY: test lualint pylint functionaltest unittest lint clint clean distclean nvim libnvim cmake deps install appimage checkprefix
|
||||
|
42
README.md
42
README.md
@ -1,10 +1,9 @@
|
||||
[](https://neovim.io)
|
||||
[](https://neovim.io)
|
||||
|
||||
[Wiki](https://github.com/neovim/neovim/wiki) |
|
||||
[Documentation](https://neovim.io/doc) |
|
||||
[Twitter](https://twitter.com/Neovim) |
|
||||
[Community](https://neovim.io/community/) |
|
||||
[Gitter **Chat**](https://gitter.im/neovim/neovim)
|
||||
[Chat/Discussion](https://gitter.im/neovim/neovim) |
|
||||
[Twitter](https://twitter.com/Neovim)
|
||||
|
||||
[](https://travis-ci.org/neovim/neovim)
|
||||
[](https://ci.appveyor.com/project/neovim/neovim/branch/master)
|
||||
@ -27,15 +26,13 @@ Neovim is a project that seeks to aggressively refactor Vim in order to:
|
||||
See the [Introduction](https://github.com/neovim/neovim/wiki/Introduction) wiki page and [Roadmap]
|
||||
for more information.
|
||||
|
||||
[](https://waffle.io/neovim/neovim/metrics)
|
||||
|
||||
Features
|
||||
--------
|
||||
|
||||
- Modern [GUIs](https://github.com/neovim/neovim/wiki/Related-projects#gui)
|
||||
- [API](https://github.com/neovim/neovim/wiki/Related-projects#api-clients)
|
||||
access from any language including Clojure, Lisp, Go, Haskell, Lua,
|
||||
JavaScript, Perl, Python, Ruby, and Rust
|
||||
- [API access](https://github.com/neovim/neovim/wiki/Related-projects#api-clients)
|
||||
from any language including C/C++, C#, Clojure, D, Elixir, Go, Haskell, Java,
|
||||
JavaScript/Node.js, Julia, Lisp, Lua, Perl, Python, Racket, Ruby, Rust
|
||||
- Embedded, scriptable [terminal emulator](https://neovim.io/doc/user/nvim_terminal_emulator.html)
|
||||
- Asynchronous [job control](https://github.com/neovim/neovim/pull/2247)
|
||||
- [Shared data (shada)](https://github.com/neovim/neovim/pull/2506) among multiple editor instances
|
||||
@ -50,25 +47,27 @@ Install from package
|
||||
Pre-built packages for Windows, macOS, and Linux are found on the
|
||||
[Releases](https://github.com/neovim/neovim/releases/) page.
|
||||
|
||||
Managed packages are in [Homebrew], [Debian], [Ubuntu], [Fedora], [Arch Linux], [Gentoo],
|
||||
and [more](https://github.com/neovim/neovim/wiki/Installing-Neovim)!
|
||||
[Managed packages] are in Homebrew, [Debian], [Ubuntu], [Fedora], [Arch Linux],
|
||||
[Gentoo], and more!
|
||||
|
||||
Install from source
|
||||
-------------------
|
||||
|
||||
The build is CMake-based, but a Makefile is provided as a convenience.
|
||||
|
||||
make CMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
sudo make install
|
||||
|
||||
To install to a non-default location, set `CMAKE_INSTALL_PREFIX`:
|
||||
To install to a non-default location:
|
||||
|
||||
make CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX=/full/path/"
|
||||
make CMAKE_INSTALL_PREFIX=/full/path/
|
||||
make install
|
||||
|
||||
To skip bundled (`third-party/*`) dependencies:
|
||||
|
||||
1. Install the dependencies using a package manager.
|
||||
```
|
||||
sudo apt install gperf luajit luarocks libuv1-dev libluajit-5.1-dev libunibilium-dev libmsgpack-dev libtermkey-dev libvterm-dev libjemalloc-dev
|
||||
sudo apt install gperf luajit luarocks libuv1-dev libluajit-5.1-dev libunibilium-dev libmsgpack-dev libtermkey-dev libvterm-dev
|
||||
sudo luarocks build mpack
|
||||
sudo luarocks build lpeg
|
||||
sudo luarocks build inspect
|
||||
@ -79,17 +78,10 @@ To skip bundled (`third-party/*`) dependencies:
|
||||
sudo make install
|
||||
```
|
||||
|
||||
CMake features:
|
||||
To inspect the build, these CMake features are useful:
|
||||
|
||||
- List all build targets:
|
||||
```
|
||||
cmake --build build --target help
|
||||
```
|
||||
- Print all variable definitions:
|
||||
```
|
||||
cmake -LAH
|
||||
```
|
||||
- `build/CMakeCache.txt` contains the resolved values of all CMake variables.
|
||||
- `cmake --build build --target help` lists all build targets.
|
||||
- `build/CMakeCache.txt` (or `cmake -LAH build/`) contains the resolved values of all CMake variables.
|
||||
- `build/compile_commands.json` shows the full compiler invocations for each translation unit.
|
||||
|
||||
See the [Building Neovim](https://github.com/neovim/neovim/wiki/Building-Neovim) wiki page for details.
|
||||
@ -148,7 +140,7 @@ See `LICENSE` for details.
|
||||
[nvim-features]: https://neovim.io/doc/user/vim_diff.html#nvim-features
|
||||
[Roadmap]: https://neovim.io/roadmap/
|
||||
[advanced UIs]: https://github.com/neovim/neovim/wiki/Related-projects#gui
|
||||
[Homebrew]: https://github.com/neovim/homebrew-neovim#installation
|
||||
[Managed packages]: https://github.com/neovim/neovim/wiki/Installing-Neovim#install-from-package
|
||||
[Debian]: https://packages.debian.org/testing/neovim
|
||||
[Ubuntu]: http://packages.ubuntu.com/search?keywords=neovim
|
||||
[Fedora]: https://apps.fedoraproject.org/packages/neovim
|
||||
|
33
appveyor.yml
33
appveyor.yml
@ -1,25 +1,42 @@
|
||||
version: '{build}'
|
||||
environment:
|
||||
APPVEYOR_CACHE_ENTRY_ZIP_ARGS: "-t7z -m0=lzma -mx=9"
|
||||
DEPS_BUILD_DIR: "C:/projects/nvim-deps"
|
||||
DEPS_PREFIX: "C:/projects/nvim-deps/usr"
|
||||
# Silence/redirect errors due to missing locking support (via libgcov).
|
||||
GCOV_ERROR_FILE: "$(TEMP)/libgcov-errors.log"
|
||||
image: Visual Studio 2017
|
||||
configuration:
|
||||
- MINGW_64-gcov
|
||||
- MINGW_32
|
||||
- MSVC_64
|
||||
- MSVC_32
|
||||
- MINGW_64
|
||||
- MINGW_32
|
||||
- MINGW_64-gcov
|
||||
init:
|
||||
- ps: |
|
||||
# Pull requests: skip some build configurations to save time.
|
||||
if ($env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT -and $env:CONFIGURATION -match '^(MSVC_64|MINGW_32)$') {
|
||||
$env:APPVEYOR_CACHE_SKIP_SAVE = "true"
|
||||
Exit-AppVeyorBuild
|
||||
}
|
||||
# RDP
|
||||
#- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
||||
matrix:
|
||||
allow_failures:
|
||||
- configuration: MINGW_64-gcov
|
||||
fast_finish: true
|
||||
install: []
|
||||
before_build:
|
||||
- ps: Install-Product node 8
|
||||
build_script:
|
||||
- powershell ci\build.ps1
|
||||
after_build:
|
||||
- ps: |
|
||||
if (Test-Path $env:GCOV_ERROR_FILE) {
|
||||
Get-Content $env:GCOV_ERROR_FILE -Head 10
|
||||
Get-Content $env:GCOV_ERROR_FILE -Tail 10
|
||||
} else {
|
||||
write-host "no GCOV_ERROR_FILE"
|
||||
}
|
||||
cache:
|
||||
- C:\msys64\var\cache\pacman\pkg -> ci\build.ps1
|
||||
- .deps -> ci\build.ps1
|
||||
- .deps -> third-party\**
|
||||
- C:\projects\nvim-deps -> third-party\**
|
||||
artifacts:
|
||||
- path: build/Neovim.zip
|
||||
- path: build/bin/nvim.exe
|
||||
|
@ -1,94 +0,0 @@
|
||||
-- TODO(jkeyes): Use the upstream version when busted releases it. (But how to
|
||||
-- inject our call to global_helpers.read_nvim_log() ?)
|
||||
|
||||
local pretty = require 'pl.pretty'
|
||||
local global_helpers = require('test.helpers')
|
||||
|
||||
return function(options)
|
||||
local busted = require 'busted'
|
||||
local handler = require 'busted.outputHandlers.base'()
|
||||
|
||||
local success = 'ok %u - %s'
|
||||
local failure = 'not ' .. success
|
||||
local skip = 'ok %u - # SKIP %s'
|
||||
local counter = 0
|
||||
|
||||
handler.suiteReset = function()
|
||||
counter = 0
|
||||
return nil, true
|
||||
end
|
||||
|
||||
handler.suiteEnd = function()
|
||||
io.write(global_helpers.read_nvim_log())
|
||||
print('1..' .. counter)
|
||||
io.flush()
|
||||
return nil, true
|
||||
end
|
||||
|
||||
local function showFailure(t)
|
||||
local message = t.message
|
||||
local trace = t.trace or {}
|
||||
|
||||
if message == nil then
|
||||
message = 'Nil error'
|
||||
elseif type(message) ~= 'string' then
|
||||
message = pretty.write(message)
|
||||
end
|
||||
|
||||
print(failure:format(counter, t.name))
|
||||
print('# ' .. t.element.trace.short_src .. ' @ ' .. t.element.trace.currentline)
|
||||
if t.randomseed then print('# Random seed: ' .. t.randomseed) end
|
||||
print('# Failure message: ' .. message:gsub('\n', '\n# '))
|
||||
if options.verbose and trace.traceback then
|
||||
print('# ' .. trace.traceback:gsub('^\n', '', 1):gsub('\n', '\n# '))
|
||||
end
|
||||
end
|
||||
|
||||
handler.testStart = function(element, parent)
|
||||
local trace = element.trace
|
||||
if options.verbose and trace and trace.short_src then
|
||||
local fileline = trace.short_src .. ' @ ' .. trace.currentline .. ': '
|
||||
local testName = fileline .. handler.getFullName(element)
|
||||
print('# ' .. testName)
|
||||
end
|
||||
io.flush()
|
||||
|
||||
return nil, true
|
||||
end
|
||||
|
||||
handler.testEnd = function(element, parent, status, trace)
|
||||
counter = counter + 1
|
||||
if status == 'success' then
|
||||
local t = handler.successes[#handler.successes]
|
||||
print(success:format(counter, t.name))
|
||||
elseif status == 'pending' then
|
||||
local t = handler.pendings[#handler.pendings]
|
||||
print(skip:format(counter, (t.message or t.name)))
|
||||
elseif status == 'failure' then
|
||||
showFailure(handler.failures[#handler.failures])
|
||||
elseif status == 'error' then
|
||||
showFailure(handler.errors[#handler.errors])
|
||||
end
|
||||
io.flush()
|
||||
|
||||
return nil, true
|
||||
end
|
||||
|
||||
handler.error = function(element, parent, message, debug)
|
||||
if element.descriptor ~= 'it' then
|
||||
counter = counter + 1
|
||||
showFailure(handler.errors[#handler.errors])
|
||||
end
|
||||
io.flush()
|
||||
|
||||
return nil, true
|
||||
end
|
||||
|
||||
busted.subscribe({ 'suite', 'reset' }, handler.suiteReset)
|
||||
busted.subscribe({ 'suite', 'end' }, handler.suiteEnd)
|
||||
busted.subscribe({ 'test', 'start' }, handler.testStart, { predicate = handler.cancelOnPending })
|
||||
busted.subscribe({ 'test', 'end' }, handler.testEnd, { predicate = handler.cancelOnPending })
|
||||
busted.subscribe({ 'error' }, handler.error)
|
||||
|
||||
return handler
|
||||
end
|
@ -7,23 +7,20 @@ CI_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
source "${CI_DIR}/common/build.sh"
|
||||
source "${CI_DIR}/common/suite.sh"
|
||||
|
||||
# Don't cache pip's log and selfcheck.
|
||||
rm -rf "${HOME}/.cache/pip/log"
|
||||
rm -f "${HOME}/.cache/pip/selfcheck.json"
|
||||
|
||||
echo "before_cache.sh: cache size"
|
||||
du -d 2 "${HOME}/.cache" | sort -n
|
||||
du -chd 1 "${HOME}/.cache" | sort -rh | head -20
|
||||
|
||||
echo "before_cache.sh: ccache stats"
|
||||
ccache -s 2>/dev/null || true
|
||||
# Do not keep ccache stats (uploaded to cache otherwise; reset initially anyway).
|
||||
find "${HOME}/.ccache" -name stats -delete
|
||||
|
||||
# Update the third-party dependency cache only if the build was successful.
|
||||
if ended_successfully; then
|
||||
rm -rf "${HOME}/.cache/nvim-deps"
|
||||
mv "${DEPS_BUILD_DIR}" "${HOME}/.cache/nvim-deps"
|
||||
|
||||
rm -rf "${HOME}/.cache/nvim-deps-downloads"
|
||||
mv "${DEPS_DOWNLOAD_DIR}" "${HOME}/.cache/nvim-deps-downloads"
|
||||
# Do not cache downloads. They should not be needed with up-to-date deps.
|
||||
rm -rf "${DEPS_BUILD_DIR}/build/downloads"
|
||||
rm -rf "${CACHE_NVIM_DEPS_DIR}"
|
||||
mv "${DEPS_BUILD_DIR}" "${CACHE_NVIM_DEPS_DIR}"
|
||||
|
||||
touch "${CACHE_MARKER}"
|
||||
echo "Updated third-party dependencies (timestamp: $(_stat "${CACHE_MARKER}"))."
|
||||
|
@ -7,28 +7,37 @@ if [[ "${CI_TARGET}" == lint ]]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
echo 'python info:'
|
||||
echo 'Python info:'
|
||||
(
|
||||
2>&1 python --version || true
|
||||
2>&1 python2 --version || true
|
||||
2>&1 python3 --version || true
|
||||
2>&1 pip --version || true
|
||||
2>&1 pip2 --version || true
|
||||
2>&1 pip3 --version || true
|
||||
echo 'pyenv versions:'
|
||||
2>&1 pyenv versions || true
|
||||
) | sed 's/^/ /'
|
||||
set -x
|
||||
python3 --version
|
||||
python2 --version
|
||||
python --version
|
||||
pip3 --version
|
||||
pip2 --version
|
||||
pip --version
|
||||
|
||||
if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
|
||||
echo "Upgrade Python 3 pip"
|
||||
python3 -m pip -q install --user --upgrade pip
|
||||
else
|
||||
echo "Upgrade Python 2 pip"
|
||||
python2.7 -m pip -q install --user --upgrade pip
|
||||
echo "Upgrade Python 3 pip"
|
||||
# Allow failure. pyenv pip3 on travis is broken:
|
||||
# https://github.com/travis-ci/travis-ci/issues/8363
|
||||
python3 -m pip -q install --user --upgrade pip || true
|
||||
pyenv --version
|
||||
pyenv versions
|
||||
) 2>&1 | sed 's/^/ /' || true
|
||||
|
||||
# Use pyenv, but not for OSX on Travis, where it only has the "system" version.
|
||||
if [[ "${TRAVIS_OS_NAME}" != osx ]] && command -v pyenv; then
|
||||
echo 'Setting Python versions via pyenv'
|
||||
|
||||
# Prefer Python 2 over 3 (more conservative).
|
||||
pyenv global 2.7.15:3.7.1
|
||||
|
||||
echo 'Updated Python info:'
|
||||
(
|
||||
set -x
|
||||
python3 --version
|
||||
python2 --version
|
||||
python --version
|
||||
|
||||
python3 -m pip --version
|
||||
python2 -m pip --version
|
||||
) 2>&1 | sed 's/^/ /'
|
||||
fi
|
||||
|
||||
echo "Install node (LTS)"
|
||||
@ -40,3 +49,16 @@ fi
|
||||
source ~/.nvm/nvm.sh
|
||||
nvm install --lts
|
||||
nvm use --lts
|
||||
|
||||
if [[ -n "$CMAKE_URL" ]]; then
|
||||
echo "Installing custom CMake: $CMAKE_URL"
|
||||
curl --retry 5 --silent --fail -o /tmp/cmake-installer.sh "$CMAKE_URL"
|
||||
mkdir -p "$HOME/.local/bin" /opt/cmake-custom
|
||||
bash /tmp/cmake-installer.sh --prefix=/opt/cmake-custom --skip-license
|
||||
ln -sfn /opt/cmake-custom/bin/cmake "$HOME/.local/bin/cmake"
|
||||
cmake_version="$(cmake --version)"
|
||||
echo "$cmake_version" | grep -qF '2.8.12' || {
|
||||
echo "Unexpected CMake version: $cmake_version"
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
|
@ -20,8 +20,10 @@ if [[ -n "${LLVM_SYMBOLIZER}" ]] && [[ ! $(type -P "${LLVM_SYMBOLIZER}") ]]; the
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Show ccache stats so we can compare in before_cache
|
||||
ccache -s 2>/dev/null || true
|
||||
echo "before_script.sh: ccache stats (will be cleared)"
|
||||
ccache -s
|
||||
# Reset ccache stats for real results in before_cache.
|
||||
ccache --zero-stats
|
||||
|
||||
if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
|
||||
# Adds user to a dummy group.
|
||||
|
50
ci/build.ps1
50
ci/build.ps1
@ -1,25 +1,26 @@
|
||||
$ErrorActionPreference = 'stop'
|
||||
Set-PSDebug -Strict -Trace 1
|
||||
|
||||
$isPullRequest = ($env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT -ne $null)
|
||||
$env:CONFIGURATION -match '^(?<compiler>\w+)_(?<bits>32|64)(?:-(?<option>\w+))?$'
|
||||
$compiler = $Matches.compiler
|
||||
$compileOption = $Matches.option
|
||||
$bits = $Matches.bits
|
||||
$cmakeBuildType = 'RelWithDebInfo'
|
||||
$cmakeBuildType = $(if ($env:CMAKE_BUILD_TYPE -ne $null) {$env:CMAKE_BUILD_TYPE} else {'RelWithDebInfo'});
|
||||
$buildDir = [System.IO.Path]::GetFullPath("$(pwd)")
|
||||
$depsCmakeVars = @{
|
||||
CMAKE_BUILD_TYPE = $cmakeBuildType;
|
||||
}
|
||||
$nvimCmakeVars = @{
|
||||
CMAKE_BUILD_TYPE = $cmakeBuildType;
|
||||
BUSTED_OUTPUT_TYPE = 'nvim';
|
||||
DEPS_PREFIX=$(if ($env:DEPS_PREFIX -ne $null) {$env:DEPS_PREFIX} else {".deps/usr"});
|
||||
}
|
||||
if ($env:DEPS_BUILD_DIR -eq $null) {
|
||||
$env:DEPS_BUILD_DIR = ".deps";
|
||||
}
|
||||
$uploadToCodeCov = $false
|
||||
|
||||
# For pull requests, skip some build configurations to save time.
|
||||
if ($env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT -and $env:CONFIGURATION -match '^(MSVC_64|MINGW_32|MINGW_64-gcov)$') {
|
||||
exit 0
|
||||
}
|
||||
|
||||
function exitIfFailed() {
|
||||
if ($LastExitCode -ne 0) {
|
||||
Set-PSDebug -Off
|
||||
@ -27,6 +28,13 @@ function exitIfFailed() {
|
||||
}
|
||||
}
|
||||
|
||||
if (-Not (Test-Path -PathType container $env:DEPS_BUILD_DIR)) {
|
||||
write-host "cache dir not found: $($env:DEPS_BUILD_DIR)"
|
||||
mkdir $env:DEPS_BUILD_DIR
|
||||
} else {
|
||||
write-host "cache dir $($env:DEPS_BUILD_DIR) size: $(Get-ChildItem $env:DEPS_BUILD_DIR -recurse | Measure-Object -property length -sum | Select -expand sum)"
|
||||
}
|
||||
|
||||
if ($compiler -eq 'MINGW') {
|
||||
if ($bits -eq 32) {
|
||||
$arch = 'i686'
|
||||
@ -37,13 +45,14 @@ if ($compiler -eq 'MINGW') {
|
||||
if ($compileOption -eq 'gcov') {
|
||||
$nvimCmakeVars['USE_GCOV'] = 'ON'
|
||||
$uploadToCodecov = $true
|
||||
$env:GCOV = "C:\msys64\mingw$bits\bin\gcov"
|
||||
}
|
||||
# These are native MinGW builds, but they use the toolchain inside
|
||||
# MSYS2, this allows using all the dependencies and tools available
|
||||
# in MSYS2, but we cannot build inside the MSYS2 shell.
|
||||
$cmakeGenerator = 'Ninja'
|
||||
$cmakeGeneratorArgs = '-v'
|
||||
$mingwPackages = @('ninja', 'cmake', 'perl', 'diffutils', 'unibilium').ForEach({
|
||||
$mingwPackages = @('ninja', 'cmake', 'perl', 'diffutils').ForEach({
|
||||
"mingw-w64-$arch-$_"
|
||||
})
|
||||
|
||||
@ -89,20 +98,20 @@ function convertToCmakeArgs($vars) {
|
||||
return $vars.GetEnumerator() | foreach { "-D$($_.Key)=$($_.Value)" }
|
||||
}
|
||||
|
||||
if (-Not (Test-Path -PathType container .deps)) {
|
||||
mkdir .deps
|
||||
}
|
||||
cd .deps
|
||||
cmake -G $cmakeGenerator $(convertToCmakeArgs($depsCmakeVars)) ..\third-party\ ; exitIfFailed
|
||||
cd $env:DEPS_BUILD_DIR
|
||||
cmake -G $cmakeGenerator $(convertToCmakeArgs($depsCmakeVars)) "$buildDir/third-party/" ; exitIfFailed
|
||||
cmake --build . --config $cmakeBuildType -- $cmakeGeneratorArgs ; exitIfFailed
|
||||
cd ..
|
||||
cd $buildDir
|
||||
|
||||
# Build Neovim
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G $cmakeGenerator $(convertToCmakeArgs($nvimCmakeVars)) .. ; exitIfFailed
|
||||
cmake --build . --config $cmakeBuildType -- $cmakeGeneratorArgs ; exitIfFailed
|
||||
bin\nvim --version ; exitIfFailed
|
||||
.\bin\nvim --version ; exitIfFailed
|
||||
|
||||
# Ensure that the "win32" feature is set.
|
||||
.\bin\nvim -u NONE --headless -c 'exe !has(\"win32\").\"cq\"' ; exitIfFailed
|
||||
|
||||
# Functional tests
|
||||
# The $LastExitCode from MSBuild can't be trusted
|
||||
@ -113,21 +122,28 @@ cmake --build . --config $cmakeBuildType --target functionaltest -- $cmakeGenera
|
||||
foreach { $failed = $failed -or
|
||||
$_ -match 'functional tests failed with error'; $_ }
|
||||
if ($failed) {
|
||||
if ($uploadToCodecov) {
|
||||
bash -l /c/projects/neovim/ci/common/submit_coverage.sh functionaltest
|
||||
}
|
||||
exit $LastExitCode
|
||||
}
|
||||
Set-PSDebug -Strict -Trace 1
|
||||
|
||||
|
||||
if ($uploadToCodecov) {
|
||||
C:\msys64\usr\bin\bash -lc "cd /c/projects/neovim; bash <(curl -s https://codecov.io/bash) -c -F functionaltest || echo 'codecov upload failed.'"
|
||||
bash -l /c/projects/neovim/ci/common/submit_coverage.sh functionaltest
|
||||
}
|
||||
|
||||
# Old tests
|
||||
# Add MSYS to path, required for e.g. `find` used in test scripts.
|
||||
# But would break functionaltests, where its `more` would be used then.
|
||||
$OldPath = $env:PATH
|
||||
$env:PATH = "C:\msys64\usr\bin;$env:PATH"
|
||||
& "C:\msys64\mingw$bits\bin\mingw32-make.exe" -C $(Convert-Path ..\src\nvim\testdir) VERBOSE=1
|
||||
& "C:\msys64\mingw$bits\bin\mingw32-make.exe" -C $(Convert-Path ..\src\nvim\testdir) VERBOSE=1 ; exitIfFailed
|
||||
$env:PATH = $OldPath
|
||||
|
||||
if ($uploadToCodecov) {
|
||||
C:\msys64\usr\bin\bash -lc "cd /c/projects/neovim; bash <(curl -s https://codecov.io/bash) -c -F oldtest || echo 'codecov upload failed.'"
|
||||
bash -l /c/projects/neovim/ci/common/submit_coverage.sh oldtest
|
||||
}
|
||||
|
||||
# Build artifacts
|
||||
|
@ -27,15 +27,13 @@ build_deps() {
|
||||
fi
|
||||
|
||||
mkdir -p "${DEPS_BUILD_DIR}"
|
||||
mkdir -p "${DEPS_DOWNLOAD_DIR}"
|
||||
|
||||
# Use cached dependencies if $CACHE_MARKER exists.
|
||||
if test "${CACHE_ENABLE}" = "false" ; then
|
||||
export CCACHE_RECACHE=1
|
||||
elif test -f "${CACHE_MARKER}" ; then
|
||||
echo "Using third-party dependencies from Travis cache (last update: $(_stat "${CACHE_MARKER}"))."
|
||||
cp -r "${HOME}/.cache/nvim-deps"/. "${DEPS_BUILD_DIR}"
|
||||
cp -r "${HOME}/.cache/nvim-deps-downloads"/. "${DEPS_DOWNLOAD_DIR}"
|
||||
cp -a "${CACHE_NVIM_DEPS_DIR}"/. "${DEPS_BUILD_DIR}"
|
||||
fi
|
||||
|
||||
# Even if we're using cached dependencies, run CMake and make to
|
||||
@ -86,12 +84,11 @@ build_nvim() {
|
||||
fi
|
||||
|
||||
# Invoke nvim to trigger *San early.
|
||||
if ! (bin/nvim --version && bin/nvim -u NONE -e -c ':qall') ; then
|
||||
asan_check "${LOG_DIR}"
|
||||
if ! (bin/nvim --version && bin/nvim -u NONE -e -cq | cat -vet) ; then
|
||||
check_sanitizer "${LOG_DIR}"
|
||||
exit 1
|
||||
fi
|
||||
asan_check "${LOG_DIR}"
|
||||
|
||||
check_sanitizer "${LOG_DIR}"
|
||||
|
||||
cd "${TRAVIS_BUILD_DIR}"
|
||||
}
|
||||
|
45
ci/common/submit_coverage.sh
Executable file
45
ci/common/submit_coverage.sh
Executable file
@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
# Collect and submit coverage reports.
|
||||
#
|
||||
# Args:
|
||||
# $1: Flag(s) for codecov, separated by comma.
|
||||
|
||||
set -ex
|
||||
|
||||
# Change to grandparent dir (POSIXly).
|
||||
CDPATH='' cd -P -- "$(dirname -- "$0")/../.." || exit
|
||||
|
||||
echo "=== running submit_coverage in $PWD: $* ==="
|
||||
"$GCOV" --version
|
||||
|
||||
# Download/install codecov-bash and gcovr once.
|
||||
codecov_sh="${TEMP:-/tmp}/codecov.bash"
|
||||
if ! [ -f "$codecov_sh" ]; then
|
||||
curl --retry 5 --silent --fail -o "$codecov_sh" https://codecov.io/bash
|
||||
chmod +x "$codecov_sh"
|
||||
|
||||
python3 -m pip install --quiet --user gcovr
|
||||
fi
|
||||
|
||||
(
|
||||
cd build
|
||||
python3 -m gcovr --branches --exclude-unreachable-branches --print-summary -j 2 --exclude '.*/auto/.*' --root .. --delete -o ../coverage.xml --xml
|
||||
)
|
||||
|
||||
# Upload to codecov.
|
||||
# -X gcov: disable gcov, done manually above.
|
||||
# -X fix: disable fixing of reports (not necessary, rather slow)
|
||||
# -Z: exit non-zero on failure
|
||||
# -F: flag(s)
|
||||
# NOTE: ignoring flags for now, since this causes timeouts on codecov.io then,
|
||||
# which they know about for about a year already...
|
||||
# Flags must match pattern ^[\w\,]+$ ("," as separator).
|
||||
codecov_flags="$(uname -s),${1}"
|
||||
codecov_flags=$(echo "$codecov_flags" | sed 's/[^,_a-zA-Z0-9]/_/g')
|
||||
if ! "$codecov_sh" -f coverage.xml -X gcov -X fix -Z -F "${codecov_flags}"; then
|
||||
echo "codecov upload failed."
|
||||
fi
|
||||
|
||||
# Cleanup always, especially collected data.
|
||||
find . \( -name '*.gcov' -o -name '*.gcda' \) -ls -delete | wc -l
|
||||
rm -f coverage.xml
|
@ -39,10 +39,11 @@ enter_suite() {
|
||||
|
||||
exit_suite() {
|
||||
set +x
|
||||
travis_fold end "${NVIM_TEST_CURRENT_SUITE}"
|
||||
if test $FAILED -ne 0 ; then
|
||||
echo "Suite ${NVIM_TEST_CURRENT_SUITE} failed, summary:"
|
||||
echo "${FAIL_SUMMARY}"
|
||||
else
|
||||
travis_fold end "${NVIM_TEST_CURRENT_SUITE}"
|
||||
fi
|
||||
export NVIM_TEST_CURRENT_SUITE="${NVIM_TEST_CURRENT_SUITE%/*}"
|
||||
if test "$1" != "--continue" ; then
|
||||
|
@ -3,10 +3,7 @@
|
||||
|
||||
submit_coverage() {
|
||||
if [ -n "${GCOV}" ]; then
|
||||
if curl --fail --output codecov.bash --silent https://codecov.io/bash; then
|
||||
bash codecov.bash -c -F "$1" || echo "codecov upload failed."
|
||||
rm -f codecov.bash
|
||||
fi
|
||||
"${CI_DIR}/common/submit_coverage.sh" "$@" || echo 'codecov upload failed.'
|
||||
fi
|
||||
}
|
||||
|
||||
@ -32,11 +29,12 @@ check_core_dumps() {
|
||||
shift
|
||||
fi
|
||||
local app="${1:-${BUILD_DIR}/bin/nvim}"
|
||||
local cores
|
||||
if test "${TRAVIS_OS_NAME}" = osx ; then
|
||||
local cores="$(find /cores/ -type f -print)"
|
||||
cores="$(find /cores/ -type f -print)"
|
||||
local _sudo='sudo'
|
||||
else
|
||||
local cores="$(find ./ -type f -name 'core.*' -print)"
|
||||
cores="$(find ./ -type f -name 'core.*' -print)"
|
||||
local _sudo=
|
||||
fi
|
||||
|
||||
@ -71,6 +69,7 @@ check_logs() {
|
||||
for log in $(find "${1}" -type f -name "${2}" -size +0); do
|
||||
cat "${log}"
|
||||
err=1
|
||||
rm "${log}"
|
||||
done
|
||||
if test -n "${err}" ; then
|
||||
fail 'logs' E 'Runtime errors detected.'
|
||||
@ -81,9 +80,9 @@ valgrind_check() {
|
||||
check_logs "${1}" "valgrind-*"
|
||||
}
|
||||
|
||||
asan_check() {
|
||||
if test "${CLANG_SANITIZER}" = "ASAN_UBSAN" ; then
|
||||
check_logs "${1}" "*san.*" | $ASAN_SYMBOLIZE
|
||||
check_sanitizer() {
|
||||
if test -n "${CLANG_SANITIZER}"; then
|
||||
check_logs "${1}" "*san.*"
|
||||
fi
|
||||
}
|
||||
|
||||
@ -94,7 +93,7 @@ run_unittests() {(
|
||||
fail 'unittests' F 'Unit tests failed'
|
||||
fi
|
||||
submit_coverage unittest
|
||||
check_core_dumps "$(which luajit)"
|
||||
check_core_dumps "$(command -v luajit)"
|
||||
exit_suite
|
||||
)}
|
||||
|
||||
@ -105,7 +104,7 @@ run_functionaltests() {(
|
||||
fail 'functionaltests' F 'Functional tests failed'
|
||||
fi
|
||||
submit_coverage functionaltest
|
||||
asan_check "${LOG_DIR}"
|
||||
check_sanitizer "${LOG_DIR}"
|
||||
valgrind_check "${LOG_DIR}"
|
||||
check_core_dumps
|
||||
exit_suite
|
||||
@ -114,12 +113,12 @@ run_functionaltests() {(
|
||||
run_oldtests() {(
|
||||
enter_suite oldtests
|
||||
ulimit -c unlimited || true
|
||||
if ! make -C "${TRAVIS_BUILD_DIR}/src/nvim/testdir"; then
|
||||
if ! make oldtest; then
|
||||
reset
|
||||
fail 'oldtests' F 'Legacy tests failed'
|
||||
fi
|
||||
submit_coverage oldtest
|
||||
asan_check "${LOG_DIR}"
|
||||
check_sanitizer "${LOG_DIR}"
|
||||
valgrind_check "${LOG_DIR}"
|
||||
check_core_dumps
|
||||
exit_suite
|
||||
|
@ -4,6 +4,7 @@ set -e
|
||||
set -o pipefail
|
||||
|
||||
if [[ "${CI_TARGET}" == lint ]]; then
|
||||
python -m pip -q install --user --upgrade flake8
|
||||
exit
|
||||
fi
|
||||
|
||||
@ -11,18 +12,11 @@ if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
|
||||
export PATH="/usr/local/opt/ccache/libexec:$PATH"
|
||||
fi
|
||||
|
||||
# Use default CC to avoid compilation problems when installing Python modules.
|
||||
echo "Install neovim module for Python 3."
|
||||
# Allow failure. pyenv pip3 on travis is broken:
|
||||
# https://github.com/travis-ci/travis-ci/issues/8363
|
||||
CC=cc python3 -m pip -q install --user --upgrade neovim || true
|
||||
|
||||
if ! [ "${TRAVIS_OS_NAME}" = osx ] ; then
|
||||
# Update PATH for pip.
|
||||
export PATH="$(python2.7 -c 'import site; print(site.getuserbase())')/bin:$PATH"
|
||||
# Use default CC to avoid compilation problems when installing Python modules.
|
||||
echo "Install neovim module for Python 2."
|
||||
CC=cc python2.7 -m pip -q install --user --upgrade neovim
|
||||
fi
|
||||
CC=cc python3 -m pip -q install --upgrade pynvim
|
||||
echo "Install neovim module for Python 2."
|
||||
CC=cc python2 -m pip -q install --upgrade pynvim
|
||||
|
||||
echo "Install neovim RubyGem."
|
||||
gem install --no-document --version ">= 0.8.0" neovim
|
||||
|
@ -9,32 +9,24 @@ source "${CI_DIR}/common/build.sh"
|
||||
source "${CI_DIR}/common/suite.sh"
|
||||
|
||||
enter_suite 'clint'
|
||||
|
||||
run_test 'make clint-full' clint
|
||||
|
||||
exit_suite --continue
|
||||
|
||||
enter_suite 'testlint'
|
||||
|
||||
run_test 'make testlint' testlint
|
||||
|
||||
exit_suite --continue
|
||||
|
||||
enter_suite 'lualint'
|
||||
|
||||
run_test 'make lualint' lualint
|
||||
exit_suite --continue
|
||||
|
||||
enter_suite 'pylint'
|
||||
run_test 'make pylint' pylint
|
||||
exit_suite --continue
|
||||
|
||||
enter_suite single-includes
|
||||
|
||||
CLICOLOR_FORCE=1 run_test_wd \
|
||||
--allow-hang \
|
||||
10s \
|
||||
'make check-single-includes' \
|
||||
'csi_clean' \
|
||||
single-includes
|
||||
|
||||
exit_suite --continue
|
||||
|
||||
end_tests
|
||||
|
@ -11,3 +11,9 @@ if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
|
||||
else
|
||||
ci/run_${CI_TARGET}.sh
|
||||
fi
|
||||
|
||||
if [[ -s "${GCOV_ERROR_FILE}" ]]; then
|
||||
echo '=== Unexpected gcov errors: ==='
|
||||
cat "${GCOV_ERROR_FILE}"
|
||||
exit 1
|
||||
fi
|
||||
|
@ -1,50 +0,0 @@
|
||||
# - Try to find jemalloc
|
||||
# Once done this will define
|
||||
# JEMALLOC_FOUND - System has jemalloc
|
||||
# JEMALLOC_INCLUDE_DIRS - The jemalloc include directories
|
||||
# JEMALLOC_LIBRARIES - The libraries needed to use jemalloc
|
||||
|
||||
if(NOT USE_BUNDLED_JEMALLOC)
|
||||
find_package(PkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PC_JEMALLOC QUIET jemalloc)
|
||||
endif()
|
||||
else()
|
||||
set(PC_JEMALLOC_INCLUDEDIR)
|
||||
set(PC_JEMALLOC_INCLUDE_DIRS)
|
||||
set(PC_JEMALLOC_LIBDIR)
|
||||
set(PC_JEMALLOC_LIBRARY_DIRS)
|
||||
set(LIMIT_SEARCH NO_DEFAULT_PATH)
|
||||
endif()
|
||||
|
||||
set(JEMALLOC_DEFINITIONS ${PC_JEMALLOC_CFLAGS_OTHER})
|
||||
|
||||
find_path(JEMALLOC_INCLUDE_DIR jemalloc/jemalloc.h
|
||||
PATHS ${PC_JEMALLOC_INCLUDEDIR} ${PC_JEMALLOC_INCLUDE_DIRS}
|
||||
${LIMIT_SEARCH})
|
||||
|
||||
# If we're asked to use static linkage, add libjemalloc.a as a preferred library name.
|
||||
if(JEMALLOC_USE_STATIC)
|
||||
list(APPEND JEMALLOC_NAMES
|
||||
"${CMAKE_STATIC_LIBRARY_PREFIX}jemalloc${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
list(INSERT JEMALLOC_NAMES 0
|
||||
"${CMAKE_STATIC_LIBRARY_PREFIX}jemalloc${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
endif()
|
||||
|
||||
list(APPEND JEMALLOC_NAMES jemalloc)
|
||||
|
||||
find_library(JEMALLOC_LIBRARY NAMES ${JEMALLOC_NAMES}
|
||||
HINTS ${PC_JEMALLOC_LIBDIR} ${PC_JEMALLOC_LIBRARY_DIRS}
|
||||
${LIMIT_SEARCH})
|
||||
|
||||
set(JEMALLOC_LIBRARIES ${JEMALLOC_LIBRARY})
|
||||
set(JEMALLOC_INCLUDE_DIRS ${JEMALLOC_INCLUDE_DIR})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set JEMALLOC_FOUND to TRUE
|
||||
# if all listed variables are TRUE
|
||||
find_package_handle_standard_args(JeMalloc DEFAULT_MSG
|
||||
JEMALLOC_LIBRARY JEMALLOC_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(JEMALLOC_INCLUDE_DIR JEMALLOC_LIBRARY)
|
10
cmake/FindLIBVTERM.cmake
Normal file
10
cmake/FindLIBVTERM.cmake
Normal file
@ -0,0 +1,10 @@
|
||||
# - Try to find libvterm
|
||||
# Once done this will define
|
||||
# LIBVTERM_FOUND - System has libvterm
|
||||
# LIBVTERM_INCLUDE_DIRS - The libvterm include directories
|
||||
# LIBVTERM_LIBRARIES - The libraries needed to use libvterm
|
||||
|
||||
include(LibFindMacros)
|
||||
|
||||
libfind_pkg_detect(LIBVTERM vterm FIND_PATH vterm.h FIND_LIBRARY vterm)
|
||||
libfind_process(LIBVTERM REQUIRED)
|
@ -31,15 +31,16 @@ find_library(LibIntl_LIBRARY
|
||||
)
|
||||
|
||||
if (LibIntl_INCLUDE_DIR)
|
||||
set(CMAKE_REQUIRED_INCLUDES "${LibIntl_INCLUDE_DIR}")
|
||||
list(APPEND CMAKE_REQUIRED_INCLUDES "${LibIntl_INCLUDE_DIR}")
|
||||
endif()
|
||||
|
||||
# On some systems (linux+glibc) libintl is passively available.
|
||||
# So only specify the library if one was found.
|
||||
if (LibIntl_LIBRARY)
|
||||
set(CMAKE_REQUIRED_LIBRARIES "${LibIntl_LIBRARY}")
|
||||
list(APPEND CMAKE_REQUIRED_LIBRARIES "${LibIntl_LIBRARY}")
|
||||
endif()
|
||||
if (MSVC)
|
||||
list(APPEND CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARY})
|
||||
endif()
|
||||
|
||||
check_c_source_compiles("
|
||||
#include <libintl.h>
|
||||
|
||||
@ -50,6 +51,15 @@ int main(int argc, char** argv) {
|
||||
bind_textdomain_codeset(\"foo\", \"bar\");
|
||||
textdomain(\"foo\");
|
||||
}" HAVE_WORKING_LIBINTL)
|
||||
if (MSVC)
|
||||
list(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARY})
|
||||
endif()
|
||||
if (LibIntl_INCLUDE_DIR)
|
||||
list(REMOVE_ITEM CMAKE_REQUIRED_INCLUDES "${LibIntl_INCLUDE_DIR}")
|
||||
endif()
|
||||
if (LibIntl_LIBRARY)
|
||||
list(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES "${LibIntl_LIBRARY}")
|
||||
endif()
|
||||
|
||||
if (HAVE_WORKING_LIBINTL)
|
||||
# On some systems (linux+glibc) libintl is passively available.
|
||||
@ -58,6 +68,7 @@ if (HAVE_WORKING_LIBINTL)
|
||||
if(LibIntl_FIND_REQUIRED)
|
||||
unset(LibIntl_FIND_REQUIRED)
|
||||
endif()
|
||||
set(LibIntl_FIND_QUIETLY ON)
|
||||
|
||||
check_variable_exists(_nl_msg_cat_cntr HAVE_NL_MSG_CAT_CNTR)
|
||||
endif()
|
||||
|
32
cmake/FindLibLUV.cmake
Normal file
32
cmake/FindLibLUV.cmake
Normal file
@ -0,0 +1,32 @@
|
||||
# - Try to find luv
|
||||
# Once done this will define
|
||||
# LIBLUV_FOUND - System has libluv
|
||||
# LIBLUV_INCLUDE_DIRS - The libluv include directories
|
||||
# LIBLUV_LIBRARIES - The libraries needed to use libluv
|
||||
|
||||
find_package(PkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PC_LIBLUV QUIET luv)
|
||||
endif()
|
||||
|
||||
set(LIBLUV_DEFINITIONS ${PC_LIBLUV_CFLAGS_OTHER})
|
||||
|
||||
find_path(LIBLUV_INCLUDE_DIR luv/luv.h
|
||||
PATHS ${PC_LIBLUV_INCLUDEDIR} ${PC_LIBLUV_INCLUDE_DIRS})
|
||||
|
||||
# Explicitly look for luv.so. #10407
|
||||
list(APPEND LIBLUV_NAMES luv luv${CMAKE_SHARED_LIBRARY_SUFFIX})
|
||||
|
||||
find_library(LIBLUV_LIBRARY NAMES ${LIBLUV_NAMES}
|
||||
HINTS ${PC_LIBLUV_LIBDIR} ${PC_LIBLUV_LIBRARY_DIRS})
|
||||
|
||||
set(LIBLUV_LIBRARIES ${LIBLUV_LIBRARY})
|
||||
set(LIBLUV_INCLUDE_DIRS ${LIBLUV_INCLUDE_DIR})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set LIBLUV_FOUND to TRUE
|
||||
# if all listed variables are TRUE
|
||||
find_package_handle_standard_args(LibLUV DEFAULT_MSG
|
||||
LIBLUV_LIBRARY LIBLUV_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(LIBLUV_INCLUDE_DIR LIBLUV_LIBRARY)
|
@ -4,36 +4,20 @@
|
||||
# LIBTERMKEY_INCLUDE_DIRS - The libtermkey include directories
|
||||
# LIBTERMKEY_LIBRARIES - The libraries needed to use libtermkey
|
||||
|
||||
if(NOT USE_BUNDLED_LIBTERMKEY)
|
||||
find_package(PkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PC_LIBTERMKEY QUIET termkey)
|
||||
endif()
|
||||
else()
|
||||
set(PC_LIBTERMKEY_INCLUDEDIR)
|
||||
set(PC_LIBTERMKEY_INCLUDE_DIRS)
|
||||
set(PC_LIBTERMKEY_LIBDIR)
|
||||
set(PC_LIBTERMKEY_LIBRARY_DIRS)
|
||||
set(LIMIT_SEARCH NO_DEFAULT_PATH)
|
||||
find_package(PkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PC_LIBTERMKEY QUIET termkey)
|
||||
endif()
|
||||
|
||||
set(LIBTERMKEY_DEFINITIONS ${PC_LIBTERMKEY_CFLAGS_OTHER})
|
||||
|
||||
find_path(LIBTERMKEY_INCLUDE_DIR termkey.h
|
||||
PATHS ${PC_LIBTERMKEY_INCLUDEDIR} ${PC_LIBTERMKEY_INCLUDE_DIRS}
|
||||
${LIMIT_SEARCH})
|
||||
|
||||
# If we're asked to use static linkage, add libuv.a as a preferred library name.
|
||||
if(LIBTERMKEY_USE_STATIC)
|
||||
list(APPEND LIBTERMKEY_NAMES
|
||||
"${CMAKE_STATIC_LIBRARY_PREFIX}termkey${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
endif()
|
||||
PATHS ${PC_LIBTERMKEY_INCLUDEDIR} ${PC_LIBTERMKEY_INCLUDE_DIRS})
|
||||
|
||||
list(APPEND LIBTERMKEY_NAMES termkey)
|
||||
|
||||
find_library(LIBTERMKEY_LIBRARY NAMES ${LIBTERMKEY_NAMES}
|
||||
HINTS ${PC_LIBTERMKEY_LIBDIR} ${PC_LIBTERMKEY_LIBRARY_DIRS}
|
||||
${LIMIT_SEARCH})
|
||||
HINTS ${PC_LIBTERMKEY_LIBDIR} ${PC_LIBTERMKEY_LIBRARY_DIRS})
|
||||
|
||||
set(LIBTERMKEY_LIBRARIES ${LIBTERMKEY_LIBRARY})
|
||||
set(LIBTERMKEY_INCLUDE_DIRS ${LIBTERMKEY_INCLUDE_DIR})
|
||||
|
@ -4,38 +4,19 @@
|
||||
# LIBUV_FOUND - system has libuv
|
||||
# LIBUV_INCLUDE_DIRS - the libuv include directories
|
||||
# LIBUV_LIBRARIES - link these to use libuv
|
||||
#
|
||||
# Set the LIBUV_USE_STATIC variable to specify if static libraries should
|
||||
# be preferred to shared ones.
|
||||
|
||||
if(NOT USE_BUNDLED_LIBUV)
|
||||
find_package(PkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PC_LIBUV QUIET libuv)
|
||||
endif()
|
||||
else()
|
||||
set(PC_LIBUV_INCLUDEDIR)
|
||||
set(PC_LIBUV_INCLUDE_DIRS)
|
||||
set(PC_LIBUV_LIBDIR)
|
||||
set(PC_LIBUV_LIBRARY_DIRS)
|
||||
set(LIMIT_SEARCH NO_DEFAULT_PATH)
|
||||
find_package(PkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PC_LIBUV QUIET libuv)
|
||||
endif()
|
||||
|
||||
find_path(LIBUV_INCLUDE_DIR uv.h
|
||||
HINTS ${PC_LIBUV_INCLUDEDIR} ${PC_LIBUV_INCLUDE_DIRS}
|
||||
${LIMIT_SEARCH})
|
||||
|
||||
# If we're asked to use static linkage, add libuv.a as a preferred library name.
|
||||
if(LIBUV_USE_STATIC)
|
||||
list(APPEND LIBUV_NAMES
|
||||
"${CMAKE_STATIC_LIBRARY_PREFIX}uv${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
endif(LIBUV_USE_STATIC)
|
||||
HINTS ${PC_LIBUV_INCLUDEDIR} ${PC_LIBUV_INCLUDE_DIRS})
|
||||
|
||||
list(APPEND LIBUV_NAMES uv)
|
||||
|
||||
find_library(LIBUV_LIBRARY NAMES ${LIBUV_NAMES}
|
||||
HINTS ${PC_LIBUV_LIBDIR} ${PC_LIBUV_LIBRARY_DIRS}
|
||||
${LIMIT_SEARCH})
|
||||
HINTS ${PC_LIBUV_LIBDIR} ${PC_LIBUV_LIBRARY_DIRS})
|
||||
|
||||
mark_as_advanced(LIBUV_INCLUDE_DIR LIBUV_LIBRARY)
|
||||
|
||||
|
@ -1,47 +0,0 @@
|
||||
# - Try to find libvterm
|
||||
# Once done this will define
|
||||
# LIBVTERM_FOUND - System has libvterm
|
||||
# LIBVTERM_INCLUDE_DIRS - The libvterm include directories
|
||||
# LIBVTERM_LIBRARIES - The libraries needed to use libvterm
|
||||
|
||||
if(NOT USE_BUNDLED_LIBVTERM)
|
||||
find_package(PkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PC_LIBVTERM QUIET vterm)
|
||||
endif()
|
||||
else()
|
||||
set(PC_LIBVTERM_INCLUDEDIR)
|
||||
set(PC_LIBVTERM_INCLUDE_DIRS)
|
||||
set(PC_LIBVTERM_LIBDIR)
|
||||
set(PC_LIBVTERM_LIBRARY_DIRS)
|
||||
set(LIMIT_SEARCH NO_DEFAULT_PATH)
|
||||
endif()
|
||||
|
||||
set(LIBVTERM_DEFINITIONS ${PC_LIBVTERM_CFLAGS_OTHER})
|
||||
|
||||
find_path(LIBVTERM_INCLUDE_DIR vterm.h
|
||||
PATHS ${PC_LIBVTERM_INCLUDEDIR} ${PC_LIBVTERM_INCLUDE_DIRS}
|
||||
${LIMIT_SEARCH})
|
||||
|
||||
# If we're asked to use static linkage, add libuv.a as a preferred library name.
|
||||
if(LIBVTERM_USE_STATIC)
|
||||
list(APPEND LIBVTERM_NAMES
|
||||
"${CMAKE_STATIC_LIBRARY_PREFIX}vterm${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
endif()
|
||||
|
||||
list(APPEND LIBVTERM_NAMES vterm)
|
||||
|
||||
find_library(LIBVTERM_LIBRARY NAMES ${LIBVTERM_NAMES}
|
||||
HINTS ${PC_LIBVTERM_LIBDIR} ${PC_LIBVTERM_LIBRARY_DIRS}
|
||||
${LIMIT_SEARCH})
|
||||
|
||||
set(LIBVTERM_LIBRARIES ${LIBVTERM_LIBRARY})
|
||||
set(LIBVTERM_INCLUDE_DIRS ${LIBVTERM_INCLUDE_DIR})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set LIBVTERM_FOUND to TRUE
|
||||
# if all listed variables are TRUE
|
||||
find_package_handle_standard_args(LibVterm DEFAULT_MSG
|
||||
LIBVTERM_LIBRARY LIBVTERM_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(LIBVTERM_INCLUDE_DIR LIBVTERM_LIBRARY)
|
@ -4,32 +4,16 @@
|
||||
# LUAJIT_INCLUDE_DIRS - The luajit include directories
|
||||
# LUAJIT_LIBRARIES - The libraries needed to use luajit
|
||||
|
||||
if(NOT USE_BUNDLED_LUAJIT)
|
||||
find_package(PkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PC_LUAJIT QUIET luajit)
|
||||
endif()
|
||||
else()
|
||||
set(PC_LUAJIT_INCLUDEDIR)
|
||||
set(PC_LUAJIT_INCLUDE_DIRS)
|
||||
set(PC_LUAJIT_LIBDIR)
|
||||
set(PC_LUAJIT_LIBRARY_DIRS)
|
||||
set(LIMIT_SEARCH NO_DEFAULT_PATH)
|
||||
find_package(PkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PC_LUAJIT QUIET luajit)
|
||||
endif()
|
||||
|
||||
set(LUAJIT_DEFINITIONS ${PC_LUAJIT_CFLAGS_OTHER})
|
||||
|
||||
find_path(LUAJIT_INCLUDE_DIR luajit.h
|
||||
PATHS ${PC_LUAJIT_INCLUDEDIR} ${PC_LUAJIT_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES luajit-2.0
|
||||
${LIMIT_SEARCH})
|
||||
|
||||
# If we're asked to use static linkage, add libluajit-5.1.a as a preferred
|
||||
# library name.
|
||||
if(LUAJIT_USE_STATIC)
|
||||
list(APPEND LUAJIT_NAMES
|
||||
"${CMAKE_STATIC_LIBRARY_PREFIX}luajit-5.1${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
endif()
|
||||
PATH_SUFFIXES luajit-2.0 luajit-2.1)
|
||||
|
||||
if(MSVC)
|
||||
list(APPEND LUAJIT_NAMES lua51)
|
||||
@ -40,8 +24,7 @@ else()
|
||||
endif()
|
||||
|
||||
find_library(LUAJIT_LIBRARY NAMES ${LUAJIT_NAMES}
|
||||
PATHS ${PC_LUAJIT_LIBDIR} ${PC_LUAJIT_LIBRARY_DIRS}
|
||||
${LIMIT_SEARCH})
|
||||
PATHS ${PC_LUAJIT_LIBDIR} ${PC_LUAJIT_LIBRARY_DIRS})
|
||||
|
||||
set(LUAJIT_LIBRARIES ${LUAJIT_LIBRARY})
|
||||
set(LUAJIT_INCLUDE_DIRS ${LUAJIT_INCLUDE_DIR})
|
||||
|
@ -4,26 +4,17 @@
|
||||
# MSGPACK_INCLUDE_DIRS - The msgpack include directories
|
||||
# MSGPACK_LIBRARIES - The libraries needed to use msgpack
|
||||
|
||||
if(NOT USE_BUNDLED_MSGPACK)
|
||||
find_package(PkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_search_module(PC_MSGPACK QUIET
|
||||
msgpackc>=${Msgpack_FIND_VERSION}
|
||||
msgpack>=${Msgpack_FIND_VERSION})
|
||||
endif()
|
||||
else()
|
||||
set(PC_MSGPACK_INCLUDEDIR)
|
||||
set(PC_MSGPACK_INCLUDE_DIRS)
|
||||
set(PC_MSGPACK_LIBDIR)
|
||||
set(PC_MSGPACK_LIBRARY_DIRS)
|
||||
set(LIMIT_SEARCH NO_DEFAULT_PATH)
|
||||
find_package(PkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_search_module(PC_MSGPACK QUIET
|
||||
msgpackc>=${Msgpack_FIND_VERSION}
|
||||
msgpack>=${Msgpack_FIND_VERSION})
|
||||
endif()
|
||||
|
||||
set(MSGPACK_DEFINITIONS ${PC_MSGPACK_CFLAGS_OTHER})
|
||||
|
||||
find_path(MSGPACK_INCLUDE_DIR msgpack/version_master.h
|
||||
HINTS ${PC_MSGPACK_INCLUDEDIR} ${PC_MSGPACK_INCLUDE_DIRS}
|
||||
${LIMIT_SEARCH})
|
||||
HINTS ${PC_MSGPACK_INCLUDEDIR} ${PC_MSGPACK_INCLUDE_DIRS})
|
||||
|
||||
if(MSGPACK_INCLUDE_DIR)
|
||||
file(READ ${MSGPACK_INCLUDE_DIR}/msgpack/version_master.h msgpack_version_h)
|
||||
@ -35,13 +26,6 @@ else()
|
||||
set(MSGPACK_VERSION_STRING)
|
||||
endif()
|
||||
|
||||
# If we're asked to use static linkage, add libmsgpack{,c}.a as a preferred library name.
|
||||
if(MSGPACK_USE_STATIC)
|
||||
list(APPEND MSGPACK_NAMES
|
||||
"${CMAKE_STATIC_LIBRARY_PREFIX}msgpackc${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
"${CMAKE_STATIC_LIBRARY_PREFIX}msgpack${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
# The import library for the msgpack DLL has a different name
|
||||
list(APPEND MSGPACK_NAMES msgpackc_import)
|
||||
@ -53,8 +37,7 @@ find_library(MSGPACK_LIBRARY NAMES ${MSGPACK_NAMES}
|
||||
# Check each directory for all names to avoid using headers/libraries from
|
||||
# different places.
|
||||
NAMES_PER_DIR
|
||||
HINTS ${PC_MSGPACK_LIBDIR} ${PC_MSGPACK_LIBRARY_DIRS}
|
||||
${LIMIT_SEARCH})
|
||||
HINTS ${PC_MSGPACK_LIBDIR} ${PC_MSGPACK_LIBRARY_DIRS})
|
||||
|
||||
mark_as_advanced(MSGPACK_INCLUDE_DIR MSGPACK_LIBRARY)
|
||||
|
||||
|
12
cmake/FindUNIBILIUM.cmake
Normal file
12
cmake/FindUNIBILIUM.cmake
Normal file
@ -0,0 +1,12 @@
|
||||
# - Try to find unibilium
|
||||
# Once done this will define
|
||||
# UNIBILIUM_FOUND - System has unibilium
|
||||
# UNIBILIUM_INCLUDE_DIRS - The unibilium include directories
|
||||
# UNIBILIUM_LIBRARIES - The libraries needed to use unibilium
|
||||
|
||||
include(LibFindMacros)
|
||||
|
||||
libfind_pkg_detect(UNIBILIUM unibilium
|
||||
FIND_PATH unibilium.h
|
||||
FIND_LIBRARY unibilium)
|
||||
libfind_process(UNIBILIUM)
|
@ -1,47 +0,0 @@
|
||||
# - Try to find unibilium
|
||||
# Once done this will define
|
||||
# UNIBILIUM_FOUND - System has unibilium
|
||||
# UNIBILIUM_INCLUDE_DIRS - The unibilium include directories
|
||||
# UNIBILIUM_LIBRARIES - The libraries needed to use unibilium
|
||||
|
||||
if(NOT USE_BUNDLED_UNIBILIUM)
|
||||
find_package(PkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PC_UNIBILIUM QUIET unibilium)
|
||||
endif()
|
||||
else()
|
||||
set(PC_UNIBILIUM_INCLUDEDIR)
|
||||
set(PC_UNIBILIUM_INCLUDE_DIRS)
|
||||
set(PC_UNIBILIUM_LIBDIR)
|
||||
set(PC_UNIBILIUM_LIBRARY_DIRS)
|
||||
set(LIMIT_SEARCH NO_DEFAULT_PATH)
|
||||
endif()
|
||||
|
||||
set(UNIBILIUM_DEFINITIONS ${PC_UNIBILIUM_CFLAGS_OTHER})
|
||||
|
||||
find_path(UNIBILIUM_INCLUDE_DIR unibilium.h
|
||||
PATHS ${PC_UNIBILIUM_INCLUDEDIR} ${PC_UNIBILIUM_INCLUDE_DIRS}
|
||||
${LIMIT_SEARCH})
|
||||
|
||||
# If we're asked to use static linkage, add libunibilium.a as a preferred library name.
|
||||
if(UNIBILIUM_USE_STATIC)
|
||||
list(APPEND UNIBILIUM_NAMES
|
||||
"${CMAKE_STATIC_LIBRARY_PREFIX}unibilium${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
endif()
|
||||
|
||||
list(APPEND UNIBILIUM_NAMES unibilium)
|
||||
|
||||
find_library(UNIBILIUM_LIBRARY NAMES ${UNIBILIUM_NAMES}
|
||||
HINTS ${PC_UNIBILIUM_LIBDIR} ${PC_UNIBILIUM_LIBRARY_DIRS}
|
||||
${LIMIT_SEARCH})
|
||||
|
||||
set(UNIBILIUM_LIBRARIES ${UNIBILIUM_LIBRARY})
|
||||
set(UNIBILIUM_INCLUDE_DIRS ${UNIBILIUM_INCLUDE_DIR})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set UNIBILIUM_FOUND to TRUE
|
||||
# if all listed variables are TRUE
|
||||
find_package_handle_standard_args(unibilium DEFAULT_MSG
|
||||
UNIBILIUM_LIBRARY UNIBILIUM_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(UNIBILIUM_INCLUDE_DIR UNIBILIUM_LIBRARY)
|
@ -1,39 +0,0 @@
|
||||
if(DEFINED ENV{DESTDIR})
|
||||
file(TO_CMAKE_PATH
|
||||
$ENV{DESTDIR}/@CMAKE_INSTALL_FULL_DATADIR@/nvim/runtime/doc
|
||||
HELPTAGS_WORKING_DIRECTORY)
|
||||
else()
|
||||
file(TO_CMAKE_PATH
|
||||
@CMAKE_INSTALL_FULL_DATADIR@/nvim/runtime/doc
|
||||
HELPTAGS_WORKING_DIRECTORY)
|
||||
endif()
|
||||
|
||||
message(STATUS "Generating helptags in ${HELPTAGS_WORKING_DIRECTORY}")
|
||||
if(EXISTS ${HELPTAGS_WORKING_DIRECTORY}/)
|
||||
message(STATUS "${HELPTAGS_WORKING_DIRECTORY} already exists")
|
||||
# If the doc directory already exists, helptags could fail due to duplicate
|
||||
# tags. Tell the user to remove the directory and try again.
|
||||
set(TROUBLESHOOTING "\nRemove \"${HELPTAGS_WORKING_DIRECTORY}\" and try again.")
|
||||
endif()
|
||||
|
||||
# Workaround for hanging "yes | nvim -c 'helptags ++t .'"
|
||||
# and therefore hanging "yes | make install":
|
||||
# Set INPUT_FILE to an empty file, causing execute_process
|
||||
# to disregard other standard input (such as "yes |").
|
||||
set(EMPTY_FILE ${CMAKE_CURRENT_BINARY_DIR}/.GenerateHelptags)
|
||||
file(WRITE ${EMPTY_FILE} "")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/bin/nvim
|
||||
-u NONE
|
||||
-es
|
||||
-c "helptags ++t ."
|
||||
-c quit
|
||||
WORKING_DIRECTORY ${HELPTAGS_WORKING_DIRECTORY}
|
||||
INPUT_FILE ${EMPTY_FILE}
|
||||
OUTPUT_VARIABLE err
|
||||
ERROR_VARIABLE err
|
||||
RESULT_VARIABLE res)
|
||||
|
||||
if(NOT res EQUAL 0)
|
||||
message(FATAL_ERROR "Generating helptags failed: ${err} - ${res}${TROUBLESHOOTING}")
|
||||
endif()
|
@ -1,6 +1,6 @@
|
||||
function(get_compile_flags _compile_flags)
|
||||
# Create template akin to CMAKE_C_COMPILE_OBJECT.
|
||||
set(compile_flags "<CMAKE_C_COMPILER> <CFLAGS> <BUILD_TYPE_CFLAGS> <DEFINITIONS> <INCLUDES>")
|
||||
set(compile_flags "<CMAKE_C_COMPILER> <CFLAGS> <BUILD_TYPE_CFLAGS> <COMPILE_OPTIONS><COMPILE_DEFINITIONS> <INCLUDES>")
|
||||
|
||||
# Get C compiler.
|
||||
string(REPLACE
|
||||
@ -9,13 +9,36 @@ function(get_compile_flags _compile_flags)
|
||||
compile_flags
|
||||
"${compile_flags}")
|
||||
|
||||
# Get flags set by add_definition().
|
||||
get_directory_property(definitions
|
||||
DIRECTORY "src/nvim"
|
||||
DEFINITIONS)
|
||||
# Get flags set by add_definitions().
|
||||
get_property(compile_definitions DIRECTORY PROPERTY COMPILE_DEFINITIONS)
|
||||
get_target_property(compile_definitions_target nvim COMPILE_DEFINITIONS)
|
||||
if(compile_definitions_target)
|
||||
list(APPEND compile_definitions ${compile_definitions_target})
|
||||
list(REMOVE_DUPLICATES compile_definitions)
|
||||
endif()
|
||||
# NOTE: list(JOIN) requires CMake 3.12, string(CONCAT) requires CMake 3.
|
||||
string(REPLACE ";" " -D" compile_definitions "${compile_definitions}")
|
||||
if(compile_definitions)
|
||||
set(compile_definitions " -D${compile_definitions}")
|
||||
endif()
|
||||
string(REPLACE
|
||||
"<DEFINITIONS>"
|
||||
"${definitions}"
|
||||
"<COMPILE_DEFINITIONS>"
|
||||
"${compile_definitions}"
|
||||
compile_flags
|
||||
"${compile_flags}")
|
||||
|
||||
# Get flags set by add_compile_options().
|
||||
get_property(compile_options DIRECTORY PROPERTY COMPILE_OPTIONS)
|
||||
get_target_property(compile_options_target nvim COMPILE_OPTIONS)
|
||||
if(compile_options_target)
|
||||
list(APPEND compile_options ${compile_options_target})
|
||||
list(REMOVE_DUPLICATES compile_options)
|
||||
endif()
|
||||
# NOTE: list(JOIN) requires CMake 3.12.
|
||||
string(REPLACE ";" " " compile_options "${compile_options}")
|
||||
string(REPLACE
|
||||
"<COMPILE_OPTIONS>"
|
||||
"${compile_options}"
|
||||
compile_flags
|
||||
"${compile_flags}")
|
||||
|
||||
@ -35,9 +58,7 @@ function(get_compile_flags _compile_flags)
|
||||
"${compile_flags}")
|
||||
|
||||
# Get include directories.
|
||||
get_directory_property(include_directories_list
|
||||
DIRECTORY "src/nvim"
|
||||
INCLUDE_DIRECTORIES)
|
||||
get_property(include_directories_list DIRECTORY PROPERTY INCLUDE_DIRECTORIES)
|
||||
list(REMOVE_DUPLICATES include_directories_list)
|
||||
foreach(include_directory ${include_directories_list})
|
||||
set(include_directories "${include_directories} -I${include_directory}")
|
||||
|
@ -1,46 +1,101 @@
|
||||
# Version 1.0 (2013-04-12)
|
||||
# Public Domain, originally written by Lasse Kärkkäinen <tronic@zi.fi>
|
||||
# Published at http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries
|
||||
# Version 2.2
|
||||
# Public Domain, originally written by Lasse Kärkkäinen <tronic>
|
||||
# Maintained at https://github.com/Tronic/cmake-modules
|
||||
# Please send your improvements as pull requests on Github.
|
||||
|
||||
# If you improve the script, please modify the forementioned wiki page because
|
||||
# I no longer maintain my scripts (hosted as static files at zi.fi). Feel free
|
||||
# to remove this entire header if you use real version control instead.
|
||||
|
||||
# Changelog:
|
||||
# 2013-04-12 Added version number (1.0) and this header, no other changes
|
||||
# 2009-10-08 Originally published
|
||||
|
||||
|
||||
# Works the same as find_package, but forwards the "REQUIRED" and "QUIET" arguments
|
||||
# used for the current package. For this to work, the first parameter must be the
|
||||
# prefix of the current package, then the prefix of the new package etc, which are
|
||||
# passed to find_package.
|
||||
macro (libfind_package PREFIX)
|
||||
set (LIBFIND_PACKAGE_ARGS ${ARGN})
|
||||
if (${PREFIX}_FIND_QUIETLY)
|
||||
set (LIBFIND_PACKAGE_ARGS ${LIBFIND_PACKAGE_ARGS} QUIET)
|
||||
endif (${PREFIX}_FIND_QUIETLY)
|
||||
# Find another package and make it a dependency of the current package.
|
||||
# This also automatically forwards the "REQUIRED" argument.
|
||||
# Usage: libfind_package(<prefix> <another package> [extra args to find_package])
|
||||
macro (libfind_package PREFIX PKG)
|
||||
set(${PREFIX}_args ${PKG} ${ARGN})
|
||||
if (${PREFIX}_FIND_REQUIRED)
|
||||
set (LIBFIND_PACKAGE_ARGS ${LIBFIND_PACKAGE_ARGS} REQUIRED)
|
||||
endif (${PREFIX}_FIND_REQUIRED)
|
||||
find_package(${LIBFIND_PACKAGE_ARGS})
|
||||
endmacro (libfind_package)
|
||||
set(${PREFIX}_args ${${PREFIX}_args} REQUIRED)
|
||||
endif()
|
||||
find_package(${${PREFIX}_args})
|
||||
set(${PREFIX}_DEPENDENCIES ${${PREFIX}_DEPENDENCIES};${PKG})
|
||||
unset(${PREFIX}_args)
|
||||
endmacro()
|
||||
|
||||
# CMake developers made the UsePkgConfig system deprecated in the same release (2.6)
|
||||
# where they added pkg_check_modules. Consequently I need to support both in my scripts
|
||||
# to avoid those deprecated warnings. Here's a helper that does just that.
|
||||
# Works identically to pkg_check_modules, except that no checks are needed prior to use.
|
||||
macro (libfind_pkg_check_modules PREFIX PKGNAME)
|
||||
if (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
|
||||
include(UsePkgConfig)
|
||||
pkgconfig(${PKGNAME} ${PREFIX}_INCLUDE_DIRS ${PREFIX}_LIBRARY_DIRS ${PREFIX}_LDFLAGS ${PREFIX}_CFLAGS)
|
||||
else (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
|
||||
find_package(PkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(${PREFIX} ${PKGNAME})
|
||||
endif (PKG_CONFIG_FOUND)
|
||||
endif (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
|
||||
endmacro (libfind_pkg_check_modules)
|
||||
# A simple wrapper to make pkg-config searches a bit easier.
|
||||
# Works the same as CMake's internal pkg_check_modules but is always quiet.
|
||||
macro (libfind_pkg_check_modules)
|
||||
find_package(PkgConfig QUIET)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(${ARGN} QUIET)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# Avoid useless copy&pasta by doing what most simple libraries do anyway:
|
||||
# pkg-config, find headers, find library.
|
||||
# Usage: libfind_pkg_detect(<prefix> <pkg-config args> FIND_PATH <name> [other args] FIND_LIBRARY <name> [other args])
|
||||
# E.g. libfind_pkg_detect(SDL2 sdl2 FIND_PATH SDL.h PATH_SUFFIXES SDL2 FIND_LIBRARY SDL2)
|
||||
function (libfind_pkg_detect PREFIX)
|
||||
# Parse arguments
|
||||
set(argname pkgargs)
|
||||
foreach (i ${ARGN})
|
||||
if ("${i}" STREQUAL "FIND_PATH")
|
||||
set(argname pathargs)
|
||||
elseif ("${i}" STREQUAL "FIND_LIBRARY")
|
||||
set(argname libraryargs)
|
||||
else()
|
||||
set(${argname} ${${argname}} ${i})
|
||||
endif()
|
||||
endforeach()
|
||||
if (NOT pkgargs)
|
||||
message(FATAL_ERROR "libfind_pkg_detect requires at least a pkg_config package name to be passed.")
|
||||
endif()
|
||||
# Find library
|
||||
libfind_pkg_check_modules(${PREFIX}_PKGCONF ${pkgargs})
|
||||
if (pathargs)
|
||||
find_path(${PREFIX}_INCLUDE_DIR NAMES ${pathargs} HINTS ${${PREFIX}_PKGCONF_INCLUDE_DIRS})
|
||||
endif()
|
||||
if (libraryargs)
|
||||
find_library(${PREFIX}_LIBRARY NAMES ${libraryargs} HINTS ${${PREFIX}_PKGCONF_LIBRARY_DIRS})
|
||||
endif()
|
||||
# Read pkg-config version
|
||||
if (${PREFIX}_PKGCONF_VERSION)
|
||||
set(${PREFIX}_VERSION ${${PREFIX}_PKGCONF_VERSION} PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Extracts a version #define from a version.h file, output stored to <PREFIX>_VERSION.
|
||||
# Usage: libfind_version_header(Foobar foobar/version.h FOOBAR_VERSION_STR)
|
||||
# Fourth argument "QUIET" may be used for silently testing different define names.
|
||||
# This function does nothing if the version variable is already defined.
|
||||
function (libfind_version_header PREFIX VERSION_H DEFINE_NAME)
|
||||
# Skip processing if we already have a version or if the include dir was not found
|
||||
if (${PREFIX}_VERSION OR NOT ${PREFIX}_INCLUDE_DIR)
|
||||
return()
|
||||
endif()
|
||||
set(quiet ${${PREFIX}_FIND_QUIETLY})
|
||||
# Process optional arguments
|
||||
foreach(arg ${ARGN})
|
||||
if (arg STREQUAL "QUIET")
|
||||
set(quiet TRUE)
|
||||
else()
|
||||
message(AUTHOR_WARNING "Unknown argument ${arg} to libfind_version_header ignored.")
|
||||
endif()
|
||||
endforeach()
|
||||
# Read the header and parse for version number
|
||||
set(filename "${${PREFIX}_INCLUDE_DIR}/${VERSION_H}")
|
||||
if (NOT EXISTS ${filename})
|
||||
if (NOT quiet)
|
||||
message(AUTHOR_WARNING "Unable to find ${${PREFIX}_INCLUDE_DIR}/${VERSION_H}")
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
file(READ "${filename}" header)
|
||||
string(REGEX REPLACE ".*#[ \t]*define[ \t]*${DEFINE_NAME}[ \t]*\"([^\n]*)\".*" "\\1" match "${header}")
|
||||
# No regex match?
|
||||
if (match STREQUAL header)
|
||||
if (NOT quiet)
|
||||
message(AUTHOR_WARNING "Unable to find \#define ${DEFINE_NAME} \"<version>\" from ${${PREFIX}_INCLUDE_DIR}/${VERSION_H}")
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
# Export the version string
|
||||
set(${PREFIX}_VERSION "${match}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# Do the final processing once the paths have been detected.
|
||||
# If include dirs are needed, ${PREFIX}_PROCESS_INCLUDES should be set to contain
|
||||
@ -48,65 +103,167 @@ endmacro (libfind_pkg_check_modules)
|
||||
# Ditto for ${PREFIX}_PROCESS_LIBS and library files.
|
||||
# Will set ${PREFIX}_FOUND, ${PREFIX}_INCLUDE_DIRS and ${PREFIX}_LIBRARIES.
|
||||
# Also handles errors in case library detection was required, etc.
|
||||
macro (libfind_process PREFIX)
|
||||
# Skip processing if already processed during this run
|
||||
if (NOT ${PREFIX}_FOUND)
|
||||
# Start with the assumption that the library was found
|
||||
set (${PREFIX}_FOUND TRUE)
|
||||
function (libfind_process PREFIX)
|
||||
# Skip processing if already processed during this configuration run
|
||||
if (${PREFIX}_FOUND)
|
||||
return()
|
||||
endif()
|
||||
|
||||
# Process all includes and set _FOUND to false if any are missing
|
||||
foreach (i ${${PREFIX}_PROCESS_INCLUDES})
|
||||
if (${i})
|
||||
set (${PREFIX}_INCLUDE_DIRS ${${PREFIX}_INCLUDE_DIRS} ${${i}})
|
||||
mark_as_advanced(${i})
|
||||
else (${i})
|
||||
set (${PREFIX}_FOUND FALSE)
|
||||
endif (${i})
|
||||
endforeach (i)
|
||||
set(found TRUE) # Start with the assumption that the package was found
|
||||
|
||||
# Process all libraries and set _FOUND to false if any are missing
|
||||
foreach (i ${${PREFIX}_PROCESS_LIBS})
|
||||
if (${i})
|
||||
set (${PREFIX}_LIBRARIES ${${PREFIX}_LIBRARIES} ${${i}})
|
||||
mark_as_advanced(${i})
|
||||
else (${i})
|
||||
set (${PREFIX}_FOUND FALSE)
|
||||
endif (${i})
|
||||
endforeach (i)
|
||||
# Did we find any files? Did we miss includes? These are for formatting better error messages.
|
||||
set(some_files FALSE)
|
||||
set(missing_headers FALSE)
|
||||
|
||||
# Print message and/or exit on fatal error
|
||||
if (${PREFIX}_FOUND)
|
||||
if (NOT ${PREFIX}_FIND_QUIETLY)
|
||||
message (STATUS "Found ${PREFIX} ${${PREFIX}_VERSION}")
|
||||
endif (NOT ${PREFIX}_FIND_QUIETLY)
|
||||
else (${PREFIX}_FOUND)
|
||||
if (${PREFIX}_FIND_REQUIRED)
|
||||
foreach (i ${${PREFIX}_PROCESS_INCLUDES} ${${PREFIX}_PROCESS_LIBS})
|
||||
message("${i}=${${i}}")
|
||||
endforeach (i)
|
||||
message (FATAL_ERROR "Required library ${PREFIX} NOT FOUND.\nInstall the library (dev version) and try again. If the library is already installed, use ccmake to set the missing variables manually.")
|
||||
endif (${PREFIX}_FIND_REQUIRED)
|
||||
endif (${PREFIX}_FOUND)
|
||||
endif (NOT ${PREFIX}_FOUND)
|
||||
endmacro (libfind_process)
|
||||
# Shorthands for some variables that we need often
|
||||
set(quiet ${${PREFIX}_FIND_QUIETLY})
|
||||
set(required ${${PREFIX}_FIND_REQUIRED})
|
||||
set(exactver ${${PREFIX}_FIND_VERSION_EXACT})
|
||||
set(findver "${${PREFIX}_FIND_VERSION}")
|
||||
set(version "${${PREFIX}_VERSION}")
|
||||
|
||||
macro(libfind_library PREFIX basename)
|
||||
set(TMP "")
|
||||
if(MSVC80)
|
||||
set(TMP -vc80)
|
||||
endif(MSVC80)
|
||||
if(MSVC90)
|
||||
set(TMP -vc90)
|
||||
endif(MSVC90)
|
||||
set(${PREFIX}_LIBNAMES ${basename}${TMP})
|
||||
if(${ARGC} GREATER 2)
|
||||
set(${PREFIX}_LIBNAMES ${basename}${TMP}-${ARGV2})
|
||||
string(REGEX REPLACE "\\." "_" TMP ${${PREFIX}_LIBNAMES})
|
||||
set(${PREFIX}_LIBNAMES ${${PREFIX}_LIBNAMES} ${TMP})
|
||||
endif(${ARGC} GREATER 2)
|
||||
find_library(${PREFIX}_LIBRARY
|
||||
NAMES ${${PREFIX}_LIBNAMES}
|
||||
PATHS ${${PREFIX}_PKGCONF_LIBRARY_DIRS}
|
||||
)
|
||||
endmacro(libfind_library)
|
||||
# Lists of config option names (all, includes, libs)
|
||||
unset(configopts)
|
||||
set(includeopts ${${PREFIX}_PROCESS_INCLUDES})
|
||||
set(libraryopts ${${PREFIX}_PROCESS_LIBS})
|
||||
|
||||
# Process deps to add to
|
||||
foreach (i ${PREFIX} ${${PREFIX}_DEPENDENCIES})
|
||||
if (DEFINED ${i}_INCLUDE_OPTS OR DEFINED ${i}_LIBRARY_OPTS)
|
||||
# The package seems to export option lists that we can use, woohoo!
|
||||
list(APPEND includeopts ${${i}_INCLUDE_OPTS})
|
||||
list(APPEND libraryopts ${${i}_LIBRARY_OPTS})
|
||||
else()
|
||||
# If plural forms don't exist or they equal singular forms
|
||||
if ((NOT DEFINED ${i}_INCLUDE_DIRS AND NOT DEFINED ${i}_LIBRARIES) OR
|
||||
(${i}_INCLUDE_DIR STREQUAL ${i}_INCLUDE_DIRS AND ${i}_LIBRARY STREQUAL ${i}_LIBRARIES))
|
||||
# Singular forms can be used
|
||||
if (DEFINED ${i}_INCLUDE_DIR)
|
||||
list(APPEND includeopts ${i}_INCLUDE_DIR)
|
||||
endif()
|
||||
if (DEFINED ${i}_LIBRARY)
|
||||
list(APPEND libraryopts ${i}_LIBRARY)
|
||||
endif()
|
||||
else()
|
||||
# Oh no, we don't know the option names
|
||||
message(FATAL_ERROR "We couldn't determine config variable names for ${i} includes and libs. Aieeh!")
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if (includeopts)
|
||||
list(REMOVE_DUPLICATES includeopts)
|
||||
endif()
|
||||
|
||||
if (libraryopts)
|
||||
list(REMOVE_DUPLICATES libraryopts)
|
||||
endif()
|
||||
|
||||
string(REGEX REPLACE ".*[ ;]([^ ;]*(_INCLUDE_DIRS|_LIBRARIES))" "\\1" tmp "${includeopts} ${libraryopts}")
|
||||
if (NOT tmp STREQUAL "${includeopts} ${libraryopts}")
|
||||
message(AUTHOR_WARNING "Plural form ${tmp} found in config options of ${PREFIX}. This works as before but is now deprecated. Please only use singular forms INCLUDE_DIR and LIBRARY, and update your find scripts for LibFindMacros > 2.0 automatic dependency system (most often you can simply remove the PROCESS variables entirely).")
|
||||
endif()
|
||||
|
||||
# Include/library names separated by spaces (notice: not CMake lists)
|
||||
unset(includes)
|
||||
unset(libs)
|
||||
|
||||
# Process all includes and set found false if any are missing
|
||||
foreach (i ${includeopts})
|
||||
list(APPEND configopts ${i})
|
||||
if (NOT "${${i}}" STREQUAL "${i}-NOTFOUND")
|
||||
list(APPEND includes "${${i}}")
|
||||
else()
|
||||
set(found FALSE)
|
||||
set(missing_headers TRUE)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Process all libraries and set found false if any are missing
|
||||
foreach (i ${libraryopts})
|
||||
list(APPEND configopts ${i})
|
||||
if (NOT "${${i}}" STREQUAL "${i}-NOTFOUND")
|
||||
list(APPEND libs "${${i}}")
|
||||
else()
|
||||
set (found FALSE)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Version checks
|
||||
if (found AND findver)
|
||||
if (NOT version)
|
||||
message(WARNING "The find module for ${PREFIX} does not provide version information, so we'll just assume that it is OK. Please fix the module or remove package version requirements to get rid of this warning.")
|
||||
elseif (version VERSION_LESS findver OR (exactver AND NOT version VERSION_EQUAL findver))
|
||||
set(found FALSE)
|
||||
set(version_unsuitable TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# If all-OK, hide all config options, export variables, print status and exit
|
||||
if (found)
|
||||
foreach (i ${configopts})
|
||||
mark_as_advanced(${i})
|
||||
endforeach()
|
||||
if (NOT quiet)
|
||||
message(STATUS "Found ${PREFIX} ${${PREFIX}_VERSION}")
|
||||
if (LIBFIND_DEBUG)
|
||||
message(STATUS " ${PREFIX}_DEPENDENCIES=${${PREFIX}_DEPENDENCIES}")
|
||||
message(STATUS " ${PREFIX}_INCLUDE_OPTS=${includeopts}")
|
||||
message(STATUS " ${PREFIX}_INCLUDE_DIRS=${includes}")
|
||||
message(STATUS " ${PREFIX}_LIBRARY_OPTS=${libraryopts}")
|
||||
message(STATUS " ${PREFIX}_LIBRARIES=${libs}")
|
||||
endif()
|
||||
endif()
|
||||
set (${PREFIX}_INCLUDE_OPTS ${includeopts} PARENT_SCOPE)
|
||||
set (${PREFIX}_LIBRARY_OPTS ${libraryopts} PARENT_SCOPE)
|
||||
set (${PREFIX}_INCLUDE_DIRS ${includes} PARENT_SCOPE)
|
||||
set (${PREFIX}_LIBRARIES ${libs} PARENT_SCOPE)
|
||||
set (${PREFIX}_FOUND TRUE PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
|
||||
# Format messages for debug info and the type of error
|
||||
set(vars "Relevant CMake configuration variables:\n")
|
||||
foreach (i ${configopts})
|
||||
mark_as_advanced(CLEAR ${i})
|
||||
set(val ${${i}})
|
||||
if ("${val}" STREQUAL "${i}-NOTFOUND")
|
||||
set (val "<not found>")
|
||||
elseif (val AND NOT EXISTS ${val})
|
||||
set (val "${val} (does not exist)")
|
||||
else()
|
||||
set(some_files TRUE)
|
||||
endif()
|
||||
set(vars "${vars} ${i}=${val}\n")
|
||||
endforeach()
|
||||
set(vars "${vars}You may use CMake GUI, cmake -D or ccmake to modify the values. Delete CMakeCache.txt to discard all values and force full re-detection if necessary.\n")
|
||||
if (version_unsuitable)
|
||||
set(msg "${PREFIX} ${${PREFIX}_VERSION} was found but")
|
||||
if (exactver)
|
||||
set(msg "${msg} only version ${findver} is acceptable.")
|
||||
else()
|
||||
set(msg "${msg} version ${findver} is the minimum requirement.")
|
||||
endif()
|
||||
else()
|
||||
if (missing_headers)
|
||||
set(msg "We could not find development headers for ${PREFIX}. Do you have the necessary dev package installed?")
|
||||
elseif (some_files)
|
||||
set(msg "We only found some files of ${PREFIX}, not all of them. Perhaps your installation is incomplete or maybe we just didn't look in the right place?")
|
||||
if(findver)
|
||||
set(msg "${msg} This could also be caused by incompatible version (if it helps, at least ${PREFIX} ${findver} should work).")
|
||||
endif()
|
||||
else()
|
||||
set(msg "We were unable to find package ${PREFIX}.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Fatal error out if REQUIRED
|
||||
if (required)
|
||||
set(msg "REQUIRED PACKAGE NOT FOUND\n${msg} This package is REQUIRED and you need to install it or adjust CMake configuration in order to continue building ${CMAKE_PROJECT_NAME}.")
|
||||
message(FATAL_ERROR "${msg}\n${vars}")
|
||||
endif()
|
||||
# Otherwise just print a nasty warning
|
||||
if (NOT quiet)
|
||||
message(WARNING "WARNING: MISSING PACKAGE\n${msg} This package is NOT REQUIRED and you may ignore this warning but by doing so you may miss some functionality of ${CMAKE_PROJECT_NAME}. \n${vars}")
|
||||
endif()
|
||||
endfunction()
|
||||
|
@ -1,22 +0,0 @@
|
||||
set(LUACHECK_ARGS -q "${LUAFILES_DIR}")
|
||||
if(DEFINED IGNORE_PATTERN)
|
||||
list(APPEND LUACHECK_ARGS --exclude-files "${LUAFILES_DIR}/${IGNORE_PATTERN}")
|
||||
endif()
|
||||
if(DEFINED CHECK_PATTERN)
|
||||
list(APPEND LUACHECK_ARGS --include-files "${LUAFILES_DIR}/${CHECK_PATTERN}")
|
||||
endif()
|
||||
if(DEFINED READ_GLOBALS)
|
||||
list(APPEND LUACHECK_ARGS --read-globals "${READ_GLOBALS}")
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND "${LUACHECK_PRG}" ${LUACHECK_ARGS}
|
||||
WORKING_DIRECTORY "${LUAFILES_DIR}"
|
||||
ERROR_VARIABLE err
|
||||
RESULT_VARIABLE res
|
||||
)
|
||||
|
||||
if(NOT res EQUAL 0)
|
||||
message(STATUS "Output to stderr:\n${err}")
|
||||
message(FATAL_ERROR "Linting tests failed with error: ${res}")
|
||||
endif()
|
@ -1,13 +1,18 @@
|
||||
# Set LC_ALL to meet expectations of some locale-sensitive tests.
|
||||
set(ENV{LC_ALL} "en_US.UTF-8")
|
||||
|
||||
if(POLICY CMP0012)
|
||||
# Handle CI=true, without dev warnings.
|
||||
cmake_policy(SET CMP0012 NEW)
|
||||
endif()
|
||||
|
||||
set(ENV{VIMRUNTIME} ${WORKING_DIR}/runtime)
|
||||
set(ENV{NVIM_RPLUGIN_MANIFEST} ${WORKING_DIR}/Xtest_rplugin_manifest)
|
||||
set(ENV{XDG_CONFIG_HOME} ${WORKING_DIR}/Xtest_xdg/config)
|
||||
set(ENV{XDG_DATA_HOME} ${WORKING_DIR}/Xtest_xdg/share)
|
||||
set(ENV{NVIM_RPLUGIN_MANIFEST} ${BUILD_DIR}/Xtest_rplugin_manifest)
|
||||
set(ENV{XDG_CONFIG_HOME} ${BUILD_DIR}/Xtest_xdg/config)
|
||||
set(ENV{XDG_DATA_HOME} ${BUILD_DIR}/Xtest_xdg/share)
|
||||
|
||||
if(NOT DEFINED ENV{NVIM_LOG_FILE})
|
||||
set(ENV{NVIM_LOG_FILE} ${WORKING_DIR}/.nvimlog)
|
||||
set(ENV{NVIM_LOG_FILE} ${BUILD_DIR}/.nvimlog)
|
||||
endif()
|
||||
|
||||
if(NVIM_PRG)
|
||||
@ -20,38 +25,62 @@ else()
|
||||
set(TEST_PATH "${TEST_DIR}/${TEST_TYPE}")
|
||||
endif()
|
||||
|
||||
# Force $TEST_PATH to workdir-relative path ("test/…").
|
||||
if(IS_ABSOLUTE ${TEST_PATH})
|
||||
file(RELATIVE_PATH TEST_PATH "${WORKING_DIR}" "${TEST_PATH}")
|
||||
endif()
|
||||
|
||||
if(BUSTED_OUTPUT_TYPE STREQUAL junit)
|
||||
set(EXTRA_ARGS OUTPUT_FILE ${BUILD_DIR}/${TEST_TYPE}test-junit.xml)
|
||||
endif()
|
||||
|
||||
set(BUSTED_ARGS $ENV{BUSTED_ARGS})
|
||||
separate_arguments(BUSTED_ARGS)
|
||||
|
||||
if(DEFINED ENV{TEST_TAG} AND NOT "$ENV{TEST_TAG}" STREQUAL "")
|
||||
set(TEST_TAG "--tags=$ENV{TEST_TAG}")
|
||||
list(APPEND BUSTED_ARGS --tags $ENV{TEST_TAG})
|
||||
endif()
|
||||
|
||||
if(DEFINED ENV{TEST_FILTER} AND NOT "$ENV{TEST_FILTER}" STREQUAL "")
|
||||
set(TEST_FILTER "--filter=$ENV{TEST_FILTER}")
|
||||
list(APPEND BUSTED_ARGS --filter $ENV{TEST_FILTER})
|
||||
endif()
|
||||
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${WORKING_DIR}/Xtest-tmpdir)
|
||||
set(ENV{TMPDIR} ${WORKING_DIR}/Xtest-tmpdir)
|
||||
set(ENV{SYSTEM_NAME} ${SYSTEM_NAME})
|
||||
# TMPDIR: use relative test path (for parallel test runs / isolation).
|
||||
set(ENV{TMPDIR} "${BUILD_DIR}/Xtest_tmpdir/${TEST_PATH}")
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory $ENV{TMPDIR})
|
||||
|
||||
set(ENV{SYSTEM_NAME} ${CMAKE_HOST_SYSTEM_NAME}) # used by test/helpers.lua.
|
||||
execute_process(
|
||||
COMMAND ${BUSTED_PRG} ${TEST_TAG} ${TEST_FILTER} -v -o ${BUSTED_OUTPUT_TYPE}
|
||||
--lua=${LUA_PRG} --lazy --helper=${TEST_DIR}/${TEST_TYPE}/preload.lua
|
||||
COMMAND ${BUSTED_PRG} -v -o test.busted.outputHandlers.${BUSTED_OUTPUT_TYPE}
|
||||
--lazy --helper=${TEST_DIR}/${TEST_TYPE}/preload.lua
|
||||
--lpath=${BUILD_DIR}/?.lua
|
||||
--lpath=${WORKING_DIR}/runtime/lua/?.lua
|
||||
--lpath=?.lua
|
||||
${BUSTED_ARGS}
|
||||
${TEST_PATH}
|
||||
WORKING_DIRECTORY ${WORKING_DIR}
|
||||
ERROR_VARIABLE err
|
||||
RESULT_VARIABLE res
|
||||
${EXTRA_ARGS})
|
||||
|
||||
file(REMOVE ${WORKING_DIR}/Xtest_rplugin_manifest)
|
||||
file(REMOVE_RECURSE ${WORKING_DIR}/Xtest_xdg)
|
||||
file(REMOVE_RECURSE ${WORKING_DIR}/Xtest-tmpdir)
|
||||
file(GLOB RM_FILES ${BUILD_DIR}/Xtest_*)
|
||||
file(REMOVE_RECURSE ${RM_FILES})
|
||||
|
||||
if(NOT res EQUAL 0)
|
||||
message(STATUS "Output to stderr:\n${err}")
|
||||
message(STATUS "Tests exited non-zero: ${res}")
|
||||
if("${err}" STREQUAL "")
|
||||
message(STATUS "No output to stderr.")
|
||||
else()
|
||||
message(STATUS "Output to stderr:\n${err}")
|
||||
endif()
|
||||
|
||||
# Dump the logfile on CI (if not displayed and moved already).
|
||||
if($ENV{CI})
|
||||
if(EXISTS $ENV{NVIM_LOG_FILE} AND NOT EXISTS $ENV{NVIM_LOG_FILE}.displayed)
|
||||
file(READ $ENV{NVIM_LOG_FILE} out)
|
||||
message(STATUS "$NVIM_LOG_FILE: $ENV{NVIM_LOG_FILE}\n${out}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
message(FATAL_ERROR "${TEST_TYPE} tests failed with error: ${res}")
|
||||
endif()
|
||||
|
@ -1,53 +0,0 @@
|
||||
#
|
||||
# Mingw-w64 cross compiler toolchain
|
||||
#
|
||||
# - The usual CMAKE variables will point to the cross compiler
|
||||
# - HOST_EXE_LINKER, HOST_C_COMPILER, HOST_EXE_LINKER_FLAGS,
|
||||
# HOST_C_FLAGS point to a host compiler
|
||||
#
|
||||
|
||||
set(MINGW_TRIPLET i686-w64-mingw32)
|
||||
# For x86_64 use
|
||||
#set(MINGW_TRIPLET x86_64-w64-mingw32)
|
||||
|
||||
# The location of your toolchain sys-root
|
||||
set(MINGW_PREFIX_PATH /opt/mingw32/${MINGW_TRIPLET}/)
|
||||
# or sometimes like this
|
||||
#set(MINGW_PREFIX_PATH /usr/${MINGW_TRIPLET}/sys-root)
|
||||
|
||||
# the name of the target operating system
|
||||
set(CMAKE_SYSTEM_NAME Windows)
|
||||
|
||||
# which compilers to use for C and C++
|
||||
set(CMAKE_C_COMPILER ${MINGW_TRIPLET}-gcc)
|
||||
set(CMAKE_CXX_COMPILER ${MINGW_TRIPLET}-g++)
|
||||
set(CMAKE_RC_COMPILER ${MINGW_TRIPLET}-windres)
|
||||
set(CMAKE_C_COMPILER ${MINGW_TRIPLET}-gcc)
|
||||
set(CMAKE_CXX_COMPILER ${MINGW_TRIPLET}-g++)
|
||||
set(CMAKE_RC_COMPILER ${MINGW_TRIPLET}-windres)
|
||||
|
||||
# Where is the target environment located
|
||||
set(CMAKE_FIND_ROOT_PATH "${MINGW_PREFIX_PATH}/mingw")
|
||||
|
||||
# adjust the default behaviour of the FIND_XXX() commands:
|
||||
# search headers and libraries in the target environment, search
|
||||
# programs in the host environment
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
|
||||
set(CROSS_TARGET ${MINGW_TRIPLET})
|
||||
|
||||
# We need a host compiler too - assuming mildly sane Unix
|
||||
# defaults here
|
||||
set(HOST_C_COMPILER cc)
|
||||
set(HOST_EXE_LINKER ld)
|
||||
|
||||
if (MINGW_TRIPLET MATCHES "^x86_64")
|
||||
set(HOST_C_FLAGS)
|
||||
set(HOST_EXE_LINKER_FLAGS)
|
||||
else()
|
||||
# In 32 bits systems have the HOST compiler generate 32 bits binaries
|
||||
set(HOST_C_FLAGS -m32)
|
||||
set(HOST_EXE_LINKER_FLAGS -m32)
|
||||
endif()
|
16
codecov.yml
16
codecov.yml
@ -1,3 +1,6 @@
|
||||
# To validate:
|
||||
# cat codecov.yml | curl --data-binary @- https://codecov.io/validate
|
||||
|
||||
codecov:
|
||||
notify:
|
||||
require_ci_to_pass: no
|
||||
@ -12,18 +15,13 @@ coverage:
|
||||
range: "70...100"
|
||||
|
||||
status:
|
||||
project: yes
|
||||
project:
|
||||
default:
|
||||
threshold: 1
|
||||
patch:
|
||||
default:
|
||||
threshold: 1
|
||||
only_pulls: true
|
||||
changes: no
|
||||
|
||||
parsers:
|
||||
gcov:
|
||||
branch_detection:
|
||||
conditional: yes
|
||||
loop: yes
|
||||
method: no
|
||||
macro: no
|
||||
|
||||
comment: off
|
||||
|
@ -20,7 +20,6 @@ endif()
|
||||
check_symbol_exists(_NSGetEnviron crt_externs.h HAVE__NSGETENVIRON)
|
||||
|
||||
# Headers
|
||||
check_include_files(iconv.h HAVE_ICONV_H)
|
||||
check_include_files(langinfo.h HAVE_LANGINFO_H)
|
||||
check_include_files(locale.h HAVE_LOCALE_H)
|
||||
check_include_files(pwd.h HAVE_PWD_H)
|
||||
@ -32,7 +31,6 @@ if(NOT HAVE_SYS_WAIT_H AND UNIX)
|
||||
endif()
|
||||
check_include_files(sys/utsname.h HAVE_SYS_UTSNAME_H)
|
||||
check_include_files(termios.h HAVE_TERMIOS_H)
|
||||
check_include_files(utime.h HAVE_UTIME_H)
|
||||
check_include_files(sys/uio.h HAVE_SYS_UIO_H)
|
||||
|
||||
# Functions
|
||||
@ -40,35 +38,19 @@ check_function_exists(fseeko HAVE_FSEEKO)
|
||||
check_function_exists(getpwent HAVE_GETPWENT)
|
||||
check_function_exists(getpwnam HAVE_GETPWNAM)
|
||||
check_function_exists(getpwuid HAVE_GETPWUID)
|
||||
check_function_exists(uv_translate_sys_error HAVE_UV_TRANSLATE_SYS_ERROR)
|
||||
check_function_exists(readv HAVE_READV)
|
||||
|
||||
if(Iconv_FOUND)
|
||||
set(HAVE_ICONV 1)
|
||||
endif()
|
||||
|
||||
if(JEMALLOC_FOUND)
|
||||
set(HAVE_JEMALLOC 1)
|
||||
endif()
|
||||
|
||||
check_function_exists(_putenv_s HAVE_PUTENV_S)
|
||||
if(WIN32 AND NOT HAVE_PUTENV_S)
|
||||
message(SEND_ERROR "_putenv_s() function not found on your system.")
|
||||
endif()
|
||||
check_function_exists(opendir HAVE_OPENDIR)
|
||||
check_function_exists(readlink HAVE_READLINK)
|
||||
check_function_exists(setenv HAVE_SETENV)
|
||||
if(UNIX AND NOT HAVE_SETENV)
|
||||
message(SEND_ERROR "setenv() function not found on your system.")
|
||||
endif()
|
||||
check_function_exists(unsetenv HAVE_UNSETENV)
|
||||
check_function_exists(setpgid HAVE_SETPGID)
|
||||
check_function_exists(setsid HAVE_SETSID)
|
||||
check_function_exists(sigaction HAVE_SIGACTION)
|
||||
check_function_exists(strcasecmp HAVE_STRCASECMP)
|
||||
check_function_exists(strncasecmp HAVE_STRNCASECMP)
|
||||
check_function_exists(utime HAVE_UTIME)
|
||||
check_function_exists(utimes HAVE_UTIMES)
|
||||
|
||||
# Symbols
|
||||
check_symbol_exists(FD_CLOEXEC "fcntl.h" HAVE_FD_CLOEXEC)
|
||||
|
@ -13,7 +13,6 @@
|
||||
#endif
|
||||
|
||||
#define PROJECT_NAME "@PROJECT_NAME@"
|
||||
#define LOCALE_INSTALL_DIR "@CMAKE_INSTALL_FULL_LOCALEDIR@"
|
||||
|
||||
#cmakedefine HAVE__NSGETENVIRON
|
||||
#cmakedefine HAVE_FD_CLOEXEC
|
||||
@ -22,19 +21,12 @@
|
||||
#cmakedefine HAVE_GETPWNAM
|
||||
#cmakedefine HAVE_GETPWUID
|
||||
#cmakedefine HAVE_ICONV
|
||||
#cmakedefine HAVE_ICONV_H
|
||||
#cmakedefine HAVE_LANGINFO_H
|
||||
#cmakedefine HAVE_LOCALE_H
|
||||
#cmakedefine HAVE_NL_LANGINFO_CODESET
|
||||
#cmakedefine HAVE_NL_MSG_CAT_CNTR
|
||||
#cmakedefine HAVE_PUTENV_S
|
||||
#cmakedefine HAVE_PWD_H
|
||||
#cmakedefine HAVE_READLINK
|
||||
#cmakedefine HAVE_UV_TRANSLATE_SYS_ERROR
|
||||
// TODO: add proper cmake check
|
||||
// #define HAVE_SELINUX 1
|
||||
#cmakedefine HAVE_SETENV
|
||||
#cmakedefine HAVE_UNSETENV
|
||||
#cmakedefine HAVE_SETPGID
|
||||
#cmakedefine HAVE_SETSID
|
||||
#cmakedefine HAVE_SIGACTION
|
||||
@ -44,9 +36,6 @@
|
||||
#cmakedefine HAVE_SYS_UTSNAME_H
|
||||
#cmakedefine HAVE_SYS_WAIT_H
|
||||
#cmakedefine HAVE_TERMIOS_H
|
||||
#cmakedefine HAVE_UTIME
|
||||
#cmakedefine HAVE_UTIME_H
|
||||
#cmakedefine HAVE_UTIMES
|
||||
#cmakedefine HAVE_WORKING_LIBINTL
|
||||
#cmakedefine HAVE_WSL
|
||||
#cmakedefine UNIX
|
||||
@ -62,7 +51,6 @@
|
||||
#cmakedefine FEAT_TUI
|
||||
|
||||
#ifndef UNIT_TESTING
|
||||
#cmakedefine HAVE_JEMALLOC
|
||||
#cmakedefine LOG_LIST_ACTIONS
|
||||
#endif
|
||||
|
||||
@ -71,5 +59,6 @@
|
||||
#define ENDIAN_INCLUDE_FILE <@ENDIAN_INCLUDE_FILE@>
|
||||
|
||||
#cmakedefine HAVE_EXECINFO_BACKTRACE
|
||||
#cmakedefine HAVE_BUILTIN_ADD_OVERFLOW
|
||||
|
||||
#endif // AUTO_CONFIG_H
|
||||
|
@ -26,13 +26,13 @@ def get_color_code(bg, color_num):
|
||||
prefix += 1
|
||||
color_num %= 8
|
||||
else:
|
||||
prefix = '48;5;' if bg else '38;5;'
|
||||
prefix = '48;5;' if bg else '38;5;'
|
||||
return '\x1b[{0}{1}m'.format(prefix, color_num)
|
||||
|
||||
|
||||
def highlight(attrs):
|
||||
fg, bg = [int(attrs['foreground']), int(attrs['background'])]
|
||||
rv = [SGR0] # start with sgr0
|
||||
rv = [SGR0] # start with sgr0
|
||||
if fg != -1:
|
||||
rv.append(get_color_code(False, fg))
|
||||
if bg != -1:
|
||||
|
@ -7,9 +7,8 @@
|
||||
# These CFLAGS can be used in addition to those specified in CMakeLists.txt:
|
||||
# CMAKE_EXTRA_FLAGS="-DCMAKE_C_FLAGS=-ftrapv -Wlogical-op"
|
||||
|
||||
# By default, the jemalloc family of memory allocation functions are used.
|
||||
# Uncomment the following to instead use libc memory allocation functions.
|
||||
# CMAKE_EXTRA_FLAGS += -DENABLE_JEMALLOC=OFF
|
||||
# To turn compiler warnings into errors:
|
||||
# CMAKE_EXTRA_FLAGS += "-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} -Werror"
|
||||
|
||||
# Sets the build type; defaults to Debug. Valid values:
|
||||
#
|
||||
@ -36,7 +35,6 @@
|
||||
# them.
|
||||
#
|
||||
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_BUSTED=OFF
|
||||
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_JEMALLOC=OFF
|
||||
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_LIBTERMKEY=OFF
|
||||
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_LIBUV=OFF
|
||||
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_LIBVTERM=OFF
|
||||
@ -49,18 +47,6 @@
|
||||
#
|
||||
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED=OFF
|
||||
|
||||
# By default, bundled libraries are statically linked to nvim.
|
||||
# This has no effect for non-bundled deps, which are always dynamically linked.
|
||||
# Uncomment these entries to instead use dynamic linking.
|
||||
#
|
||||
# CMAKE_EXTRA_FLAGS += -DLIBTERMKEY_USE_STATIC=OFF
|
||||
# CMAKE_EXTRA_FLAGS += -DLIBUNIBILIUM_USE_STATIC=OFF
|
||||
# CMAKE_EXTRA_FLAGS += -DLIBUV_USE_STATIC=OFF
|
||||
# CMAKE_EXTRA_FLAGS += -DLIBVTERM_USE_STATIC=OFF
|
||||
# CMAKE_EXTRA_FLAGS += -DLUAJIT_USE_STATIC=OFF
|
||||
# CMAKE_EXTRA_FLAGS += -DMSGPACK_USE_STATIC=OFF
|
||||
#
|
||||
#
|
||||
# .DEFAULT_GOAL := nvim
|
||||
#
|
||||
# Run doxygen over the source code.
|
||||
|
11
man/nvim.1
11
man/nvim.1
@ -56,6 +56,7 @@ Reads text from standard input until
|
||||
.Dv EOF ,
|
||||
then opens a buffer with that text.
|
||||
User input is read from standard error, which should be a terminal.
|
||||
.El
|
||||
.Sh OPTIONS
|
||||
.Bl -tag -width Fl
|
||||
.It Fl t Ar tag
|
||||
@ -88,10 +89,14 @@ Ex mode, reading stdin as Ex commands.
|
||||
Ex mode, reading stdin as text.
|
||||
.Ic :help Ex-mode
|
||||
.It Fl es
|
||||
Silent/batch mode, reading stdin as Ex commands.
|
||||
Silent (non-interactive) Ex mode, reading stdin as Ex commands.
|
||||
Useful for scripting because it does NOT start a UI, unlike
|
||||
.Fl e .
|
||||
.Ic :help silent-mode
|
||||
.It Fl \&Es
|
||||
Silent/batch mode, reading stdin as text.
|
||||
Silent (non-interactive) Ex mode, reading stdin as text.
|
||||
Useful for scripting because it does NOT start a UI, unlike
|
||||
.Fl E .
|
||||
.Ic :help silent-mode
|
||||
.It Fl d
|
||||
Diff mode.
|
||||
@ -198,6 +203,8 @@ do not read or write a ShaDa file.
|
||||
Skip loading plugins.
|
||||
Implied by
|
||||
.Cm -u NONE .
|
||||
.It Fl -clean
|
||||
Skip loading plugins and shada (viminfo) file.
|
||||
.It Fl o Ns Op Ar N
|
||||
Open
|
||||
.Ar N
|
||||
|
@ -29,21 +29,16 @@ foreach(PACKAGE ${PACKAGES})
|
||||
file(GLOB "${PACKNAME}_DOC_FILES" ${PACKAGE}/doc/*.txt)
|
||||
if(${PACKNAME}_DOC_FILES)
|
||||
file(MAKE_DIRECTORY ${GENERATED_PACKAGE_DIR}/${PACKNAME})
|
||||
add_custom_target("${PACKNAME}-tags"
|
||||
add_custom_command(OUTPUT "${GENERATED_PACKAGE_DIR}/${PACKNAME}/doc/tags"
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||
${PACKAGE} ${GENERATED_PACKAGE_DIR}/${PACKNAME}
|
||||
COMMAND "${PROJECT_BINARY_DIR}/bin/nvim"
|
||||
-u NONE -i NONE -e --headless -c "helptags doc" -c quit
|
||||
DEPENDS
|
||||
nvim
|
||||
nvim_runtime_deps
|
||||
WORKING_DIRECTORY "${GENERATED_PACKAGE_DIR}/${PACKNAME}"
|
||||
)
|
||||
add_dependencies(${PACKNAME}-tags nvim_runtime_deps)
|
||||
|
||||
add_custom_command(OUTPUT "${GENERATED_PACKAGE_DIR}/${PACKNAME}/doc/tags"
|
||||
DEPENDS
|
||||
"${PACKNAME}-tags"
|
||||
)
|
||||
|
||||
set("${PACKNAME}_DOC_NAMES")
|
||||
foreach(DF "${${PACKNAME}_DOC_FILES}")
|
||||
@ -67,7 +62,7 @@ foreach(DF ${DOCFILES})
|
||||
list(APPEND BUILDDOCFILES ${GENERATED_RUNTIME_DIR}/doc/${F})
|
||||
endforeach()
|
||||
|
||||
add_custom_target(helptags
|
||||
add_custom_command(OUTPUT ${GENERATED_HELP_TAGS}
|
||||
COMMAND ${CMAKE_COMMAND} -E remove doc/*
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||
${PROJECT_SOURCE_DIR}/runtime/doc doc
|
||||
@ -75,19 +70,15 @@ add_custom_target(helptags
|
||||
-u NONE -i NONE -e --headless -c "helptags ++t doc" -c quit
|
||||
DEPENDS
|
||||
nvim
|
||||
nvim_runtime_deps
|
||||
WORKING_DIRECTORY "${GENERATED_RUNTIME_DIR}"
|
||||
)
|
||||
add_dependencies(helptags nvim_runtime_deps)
|
||||
|
||||
add_custom_command(OUTPUT ${GENERATED_HELP_TAGS}
|
||||
DEPENDS
|
||||
helptags
|
||||
)
|
||||
|
||||
add_custom_target(doc_html
|
||||
COMMAND make html
|
||||
DEPENDS
|
||||
helptags
|
||||
${GENERATED_HELP_TAGS}
|
||||
WORKING_DIRECTORY "${GENERATED_RUNTIME_DIR}/doc"
|
||||
)
|
||||
|
||||
|
@ -1,8 +1,12 @@
|
||||
" Author: Antony Lee <anntzer.lee@gmail.com>
|
||||
" Description: Helper functions for reStructuredText syntax folding
|
||||
" Last Modified: 2018-01-07
|
||||
" Last Modified: 2018-12-29
|
||||
|
||||
function s:CacheRstFold()
|
||||
if !g:rst_fold_enabled
|
||||
return
|
||||
endif
|
||||
|
||||
let closure = {'header_types': {}, 'max_level': 0, 'levels': {}}
|
||||
function closure.Process(match) dict
|
||||
let curline = getcurpos()[1]
|
||||
@ -20,12 +24,18 @@ function s:CacheRstFold()
|
||||
let self.levels[curline] = self.header_types[key]
|
||||
endfunction
|
||||
let save_cursor = getcurpos()
|
||||
let save_mark = getpos("'[")
|
||||
silent keeppatterns %s/\v^%(%(([=`:.'"~^_*+#-])\1+\n)?.{1,2}\n([=`:.'"~^_*+#-])\2+)|%(%(([=`:.''"~^_*+#-])\3{2,}\n)?.{3,}\n([=`:.''"~^_*+#-])\4{2,})$/\=closure.Process(submatch(0))/gn
|
||||
call setpos('.', save_cursor)
|
||||
call setpos("'[", save_mark)
|
||||
let b:RstFoldCache = closure.levels
|
||||
endfunction
|
||||
|
||||
function RstFold#GetRstFold()
|
||||
if !g:rst_fold_enabled
|
||||
return
|
||||
endif
|
||||
|
||||
if !has_key(b:, 'RstFoldCache')
|
||||
call s:CacheRstFold()
|
||||
endif
|
||||
@ -37,6 +47,10 @@ function RstFold#GetRstFold()
|
||||
endfunction
|
||||
|
||||
function RstFold#GetRstFoldText()
|
||||
if !g:rst_fold_enabled
|
||||
return
|
||||
endif
|
||||
|
||||
if !has_key(b:, 'RstFoldCache')
|
||||
call s:CacheRstFold()
|
||||
endif
|
||||
|
28
runtime/autoload/dist/ft.vim
vendored
28
runtime/autoload/dist/ft.vim
vendored
@ -1,7 +1,7 @@
|
||||
" Vim functions for file type detection
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2017 Dec 05
|
||||
" Last Change: 2019 Mar 08
|
||||
|
||||
" These functions are moved here from runtime/filetype.vim to make startup
|
||||
" faster.
|
||||
@ -126,7 +126,7 @@ endfunc
|
||||
" This function checks if one of the first ten lines start with a '@'. In
|
||||
" that case it is probably a change file.
|
||||
" If the first line starts with # or ! it's probably a ch file.
|
||||
" If a line has "main", "include", "//" ir "/*" it's probably ch.
|
||||
" If a line has "main", "include", "//" or "/*" it's probably ch.
|
||||
" Otherwise CHILL is assumed.
|
||||
func dist#ft#FTchange()
|
||||
let lnum = 1
|
||||
@ -197,7 +197,7 @@ func dist#ft#FTe()
|
||||
exe 'setf ' . g:filetype_euphoria
|
||||
else
|
||||
let n = 1
|
||||
while n < 100 && n < line("$")
|
||||
while n < 100 && n <= line("$")
|
||||
if getline(n) =~ "^\\s*\\(<'\\|'>\\)\\s*$"
|
||||
setf specman
|
||||
return
|
||||
@ -211,7 +211,7 @@ endfunc
|
||||
" Distinguish between HTML, XHTML and Django
|
||||
func dist#ft#FThtml()
|
||||
let n = 1
|
||||
while n < 10 && n < line("$")
|
||||
while n < 10 && n <= line("$")
|
||||
if getline(n) =~ '\<DTD\s\+XHTML\s'
|
||||
setf xhtml
|
||||
return
|
||||
@ -222,13 +222,13 @@ func dist#ft#FThtml()
|
||||
endif
|
||||
let n = n + 1
|
||||
endwhile
|
||||
setf html
|
||||
setf FALLBACK html
|
||||
endfunc
|
||||
|
||||
" Distinguish between standard IDL and MS-IDL
|
||||
func dist#ft#FTidl()
|
||||
let n = 1
|
||||
while n < 50 && n < line("$")
|
||||
while n < 50 && n <= line("$")
|
||||
if getline(n) =~ '^\s*import\s\+"\(unknwn\|objidl\)\.idl"'
|
||||
setf msidl
|
||||
return
|
||||
@ -484,6 +484,10 @@ endfunc
|
||||
|
||||
" Called from filetype.vim and scripts.vim.
|
||||
func dist#ft#SetFileTypeSH(name)
|
||||
if did_filetype()
|
||||
" Filetype was already detected
|
||||
return
|
||||
endif
|
||||
if expand("<amatch>") =~ g:ft_ignore_pat
|
||||
return
|
||||
endif
|
||||
@ -531,6 +535,10 @@ endfunc
|
||||
" as used for Tcl.
|
||||
" Also called from scripts.vim, thus can't be local to this script.
|
||||
func dist#ft#SetFileTypeShell(name)
|
||||
if did_filetype()
|
||||
" Filetype was already detected
|
||||
return
|
||||
endif
|
||||
if expand("<amatch>") =~ g:ft_ignore_pat
|
||||
return
|
||||
endif
|
||||
@ -551,6 +559,10 @@ func dist#ft#SetFileTypeShell(name)
|
||||
endfunc
|
||||
|
||||
func dist#ft#CSH()
|
||||
if did_filetype()
|
||||
" Filetype was already detected
|
||||
return
|
||||
endif
|
||||
if exists("g:filetype_csh")
|
||||
call dist#ft#SetFileTypeShell(g:filetype_csh)
|
||||
elseif &shell =~ "tcsh"
|
||||
@ -687,7 +699,7 @@ endfunc
|
||||
|
||||
func dist#ft#FTxml()
|
||||
let n = 1
|
||||
while n < 100 && n < line("$")
|
||||
while n < 100 && n <= line("$")
|
||||
let line = getline(n)
|
||||
" DocBook 4 or DocBook 5.
|
||||
let is_docbook4 = line =~ '<!DOCTYPE.*DocBook'
|
||||
@ -713,7 +725,7 @@ endfunc
|
||||
|
||||
func dist#ft#FTy()
|
||||
let n = 1
|
||||
while n < 100 && n < line("$")
|
||||
while n < 100 && n <= line("$")
|
||||
let line = getline(n)
|
||||
if line =~ '^\s*%'
|
||||
setf yacc
|
||||
|
@ -30,7 +30,7 @@ function! health#check(plugin_names) abort
|
||||
\ : s:to_fn_names(a:plugin_names)
|
||||
|
||||
tabnew
|
||||
setlocal wrap breakindent
|
||||
setlocal wrap breakindent linebreak
|
||||
setlocal filetype=markdown
|
||||
setlocal conceallevel=2 concealcursor=nc
|
||||
setlocal keywordprg=:help
|
||||
|
@ -8,7 +8,7 @@ function! s:check_config() abort
|
||||
if !filereadable(vimrc)
|
||||
let ok = v:false
|
||||
let has_vim = filereadable(expand('~/.vimrc'))
|
||||
call health#report_warn('Missing user config file: '.vimrc,
|
||||
call health#report_warn((-1 == getfsize(vimrc) ? 'Missing' : 'Unreadable').' user config file: '.vimrc,
|
||||
\[ has_vim ? ':help nvim-from-vim' : ':help init.vim' ])
|
||||
endif
|
||||
|
||||
@ -25,6 +25,15 @@ function! s:check_config() abort
|
||||
\ 'https://github.com/neovim/neovim/wiki/Following-HEAD#20170402' ])
|
||||
endif
|
||||
|
||||
if v:ctype ==# 'C'
|
||||
let ok = v:false
|
||||
call health#report_error('Locale does not support UTF-8. Unicode characters may not display correctly.'
|
||||
\ .printf("\n$LANG=%s $LC_ALL=%s $LC_CTYPE=%s", $LANG, $LC_ALL, $LC_CTYPE),
|
||||
\ [ 'If using tmux, try the -u option.',
|
||||
\ 'Ensure that your terminal/shell/tmux/etc inherits the environment, or set $LANG explicitly.' ,
|
||||
\ 'Configure your system locale.' ])
|
||||
endif
|
||||
|
||||
if &paste
|
||||
let ok = v:false
|
||||
call health#report_error("'paste' is enabled. This option is only for pasting text.\nIt should not be set in your config.",
|
||||
@ -32,6 +41,12 @@ function! s:check_config() abort
|
||||
\ 'Check `:verbose set paste?` to see if a plugin or script set the option.', ])
|
||||
endif
|
||||
|
||||
let shadafile = (empty(&shadafile) || &shadafile ==# 'NONE') ? stdpath('data').'/shada/main.shada' : &shadafile
|
||||
if !empty(shadafile) && (!filereadable(shadafile) || !filewritable(shadafile))
|
||||
let ok = v:false
|
||||
call health#report_error('shada file is not '.(filereadable(shadafile) ? 'writeable' : 'readable').":\n".shadafile)
|
||||
endif
|
||||
|
||||
if ok
|
||||
call health#report_ok('no issues found')
|
||||
endif
|
||||
@ -108,7 +123,7 @@ function! s:check_performance() abort
|
||||
else
|
||||
call health#report_info(buildtype)
|
||||
call health#report_warn(
|
||||
\ 'Non-optimized build-type. Nvim will be slower.',
|
||||
\ 'Non-optimized '.(has('debug')?'(DEBUG) ':'').'build. Nvim will be slower.',
|
||||
\ ['Install a different Nvim package, or rebuild with `CMAKE_BUILD_TYPE=RelWithDebInfo`.',
|
||||
\ s:suggest_faq])
|
||||
endif
|
||||
@ -161,6 +176,17 @@ function! s:check_tmux() abort
|
||||
\ ["Set default-terminal in ~/.tmux.conf:\nset-option -g default-terminal \"screen-256color\"",
|
||||
\ s:suggest_faq])
|
||||
endif
|
||||
|
||||
" check for RGB capabilities
|
||||
let info = system('tmux server-info')
|
||||
let has_tc = stridx(info, " Tc: (flag) true") != -1
|
||||
let has_rgb = stridx(info, " RGB: (flag) true") != -1
|
||||
if !has_tc && !has_rgb
|
||||
call health#report_warn(
|
||||
\ "Neither Tc nor RGB capability set. True colors are disabled. |'termguicolors'| won't work properly.",
|
||||
\ ["Put this in your ~/.tmux.conf and replace XXX by your $TERM outside of tmux:\nset-option -sa terminal-overrides ',XXX:RGB'",
|
||||
\ "For older tmux versions use this instead:\nset-option -ga terminal-overrides ',XXX:Tc'"])
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! s:check_terminal() abort
|
||||
|
@ -106,7 +106,8 @@ endfunction
|
||||
|
||||
" Fetch the contents of a URL.
|
||||
function! s:download(url) abort
|
||||
if executable('curl')
|
||||
let has_curl = executable('curl')
|
||||
if has_curl && system(['curl', '-V']) =~# 'Protocols:.*https'
|
||||
let rv = s:system(['curl', '-sL', a:url], '', 1, 1)
|
||||
return s:shell_error ? 'curl error with '.a:url.': '.s:shell_error : rv
|
||||
elseif executable('python')
|
||||
@ -124,7 +125,9 @@ function! s:download(url) abort
|
||||
\ ? 'python urllib.request error: '.s:shell_error
|
||||
\ : rv
|
||||
endif
|
||||
return 'missing `curl` and `python`, cannot make pypi request'
|
||||
return 'missing `curl` '
|
||||
\ .(has_curl ? '(with HTTPS support) ' : '')
|
||||
\ .'and `python`, cannot make web request'
|
||||
endfunction
|
||||
|
||||
" Check for clipboard tools.
|
||||
@ -561,7 +564,10 @@ function! s:check_node() abort
|
||||
endif
|
||||
call health#report_info('Neovim node.js host: '. host)
|
||||
|
||||
let latest_npm_cmd = has('win32') ? 'cmd /c npm info neovim --json' : 'npm info neovim --json'
|
||||
let manager = executable('npm') ? 'npm' : 'yarn'
|
||||
let latest_npm_cmd = has('win32') ?
|
||||
\ 'cmd /c '. manager .' info neovim --json' :
|
||||
\ manager .' info neovim --json'
|
||||
let latest_npm = s:system(split(latest_npm_cmd))
|
||||
if s:shell_error || empty(latest_npm)
|
||||
call health#report_error('Failed to run: '. latest_npm_cmd,
|
||||
@ -590,7 +596,8 @@ function! s:check_node() abort
|
||||
call health#report_warn(
|
||||
\ printf('Package "neovim" is out-of-date. Installed: %s, latest: %s',
|
||||
\ current_npm, latest_npm),
|
||||
\ ['Run in shell: npm install -g neovim'])
|
||||
\ ['Run in shell: npm install -g neovim',
|
||||
\ 'Run in shell (if you use yarn): yarn global add neovim'])
|
||||
else
|
||||
call health#report_ok('Latest "neovim" npm/yarn package is installed: '. current_npm)
|
||||
endif
|
||||
|
@ -150,8 +150,9 @@ endfunction
|
||||
|
||||
function! s:get_page(path) abort
|
||||
" Disable hard-wrap by using a big $MANWIDTH (max 1000 on some systems #9065).
|
||||
" We use soft wrap: ftplugin/man.vim sets wrap/breakindent/….
|
||||
let manwidth = 999
|
||||
" Soft-wrap: ftplugin/man.vim sets wrap/breakindent/….
|
||||
" Hard-wrap: driven by `man`.
|
||||
let manwidth = !get(g:,'man_hardwrap') ? 999 : (empty($MANWIDTH) ? winwidth(0) : $MANWIDTH)
|
||||
" Force MANPAGER=cat to ensure Vim is not recursively invoked (by man-db).
|
||||
" http://comments.gmane.org/gmane.editors.vim.devel/29085
|
||||
" Set MAN_KEEP_FORMATTING so Debian man doesn't discard backspaces.
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
" netrwSettings.vim: makes netrw settings simpler
|
||||
" Date: Dec 30, 2014
|
||||
" Date: Nov 09, 2016
|
||||
" Maintainer: Charles E Campbell <drchipNOSPAM at campbellfamily dot biz>
|
||||
" Version: 15
|
||||
" Version: 16
|
||||
" Copyright: Copyright (C) 1999-2007 Charles E. Campbell {{{1
|
||||
" Permission is hereby granted to use and distribute this code,
|
||||
" with or without modifications, provided that this copyright
|
||||
@ -19,7 +19,7 @@
|
||||
if exists("g:loaded_netrwSettings") || &cp
|
||||
finish
|
||||
endif
|
||||
let g:loaded_netrwSettings = "v15"
|
||||
let g:loaded_netrwSettings = "v16"
|
||||
if v:version < 700
|
||||
echohl WarningMsg
|
||||
echo "***warning*** this version of netrwSettings needs vim 7.0"
|
||||
@ -154,9 +154,13 @@ fun! netrwSettings#NetrwSettings()
|
||||
put = 'let g:netrw_list_hide = '.g:netrw_list_hide
|
||||
put = 'let g:netrw_liststyle = '.g:netrw_liststyle
|
||||
put = 'let g:netrw_localcopycmd = '.g:netrw_localcopycmd
|
||||
put = 'let g:netrw_localcopycmdopt = '.g:netrw_localcopycmdopt
|
||||
put = 'let g:netrw_localmkdir = '.g:netrw_localmkdir
|
||||
put = 'let g:netrw_localmkdiropt = '.g:netrw_localmkdiropt
|
||||
put = 'let g:netrw_localmovecmd = '.g:netrw_localmovecmd
|
||||
put = 'let g:netrw_localmovecmdopt = '.g:netrw_localmovecmdopt
|
||||
put = 'let g:netrw_localrmdir = '.g:netrw_localrmdir
|
||||
put = 'let g:netrw_localrmdiropt = '.g:netrw_localrmdiropt
|
||||
put = 'let g:netrw_maxfilenamelen = '.g:netrw_maxfilenamelen
|
||||
put = 'let g:netrw_menu = '.g:netrw_menu
|
||||
put = 'let g:netrw_mousemaps = '.g:netrw_mousemaps
|
||||
|
@ -1,35 +1,25 @@
|
||||
" Vim support file to help with paste mappings and menus
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2017 Aug 30
|
||||
" Last Change: 2019 Jan 27
|
||||
|
||||
" Define the string to use for items that are present both in Edit, Popup and
|
||||
" Toolbar menu. Also used in mswin.vim and macmap.vim.
|
||||
|
||||
" Pasting blockwise and linewise selections is not possible in Insert and
|
||||
" Visual mode without the +virtualedit feature. They are pasted as if they
|
||||
" were characterwise instead. Add to that some tricks to leave the cursor in
|
||||
" the right position, also for "gi".
|
||||
if has("virtualedit")
|
||||
let paste#paste_cmd = {'n': ":call paste#Paste()<CR>"}
|
||||
let paste#paste_cmd['v'] = '"-c<Esc>' . paste#paste_cmd['n']
|
||||
let paste#paste_cmd['i'] = "\<c-\>\<c-o>\"+gP"
|
||||
let paste#paste_cmd = {'n': ":call paste#Paste()<CR>"}
|
||||
let paste#paste_cmd['v'] = '"-c<Esc>' . paste#paste_cmd['n']
|
||||
let paste#paste_cmd['i'] = "\<c-\>\<c-o>\"+gP"
|
||||
|
||||
func! paste#Paste()
|
||||
let ove = &ve
|
||||
set ve=all
|
||||
normal! `^
|
||||
if @+ != ''
|
||||
normal! "+gP
|
||||
endif
|
||||
let c = col(".")
|
||||
normal! i
|
||||
if col(".") < c " compensate for i<ESC> moving the cursor left
|
||||
normal! l
|
||||
endif
|
||||
let &ve = ove
|
||||
endfunc
|
||||
else
|
||||
let paste#paste_cmd = {'n': "\"=@+.'xy'<CR>gPFx\"_2x"}
|
||||
let paste#paste_cmd['v'] = '"-c<Esc>gix<Esc>' . paste#paste_cmd['n'] . '"_x'
|
||||
let paste#paste_cmd['i'] = 'x<Esc>' . paste#paste_cmd['n'] . '"_s'
|
||||
endif
|
||||
func! paste#Paste()
|
||||
let ove = &ve
|
||||
set ve=all
|
||||
normal! `^
|
||||
if @+ != ''
|
||||
normal! "+gP
|
||||
endif
|
||||
let c = col(".")
|
||||
normal! i
|
||||
if col(".") < c " compensate for i<ESC> moving the cursor left
|
||||
normal! l
|
||||
endif
|
||||
let &ve = ove
|
||||
endfunc
|
||||
|
@ -1,6 +1,16 @@
|
||||
" The clipboard provider uses shell commands to communicate with the clipboard.
|
||||
" The provider function will only be registered if a supported command is
|
||||
" available.
|
||||
|
||||
if exists('g:loaded_clipboard_provider')
|
||||
finish
|
||||
endif
|
||||
" Default to 1. provider#clipboard#Executable() may set 2.
|
||||
" To force a reload:
|
||||
" :unlet g:loaded_clipboard_provider
|
||||
" :runtime autoload/provider/clipboard.vim
|
||||
let g:loaded_clipboard_provider = 1
|
||||
|
||||
let s:copy = {}
|
||||
let s:paste = {}
|
||||
let s:clipboard = {}
|
||||
@ -65,7 +75,7 @@ function! provider#clipboard#Executable() abort
|
||||
let s:paste = get(g:clipboard, 'paste', { '+': v:null, '*': v:null })
|
||||
let s:cache_enabled = get(g:clipboard, 'cache_enabled', 0)
|
||||
return get(g:clipboard, 'name', 'g:clipboard')
|
||||
elseif has('mac') && executable('pbpaste') && s:cmd_ok('pbpaste')
|
||||
elseif has('mac')
|
||||
let s:copy['+'] = 'pbcopy'
|
||||
let s:paste['+'] = 'pbpaste'
|
||||
let s:copy['*'] = s:copy['+']
|
||||
@ -73,9 +83,9 @@ function! provider#clipboard#Executable() abort
|
||||
let s:cache_enabled = 0
|
||||
return 'pbcopy'
|
||||
elseif exists('$WAYLAND_DISPLAY') && executable('wl-copy') && executable('wl-paste')
|
||||
let s:copy['+'] = 'wl-copy --foreground'
|
||||
let s:copy['+'] = 'wl-copy --foreground --type text/plain'
|
||||
let s:paste['+'] = 'wl-paste --no-newline'
|
||||
let s:copy['*'] = 'wl-copy --foreground --primary'
|
||||
let s:copy['*'] = 'wl-copy --foreground --primary --type text/plain'
|
||||
let s:paste['*'] = 'wl-paste --no-newline --primary'
|
||||
return 'wl-copy'
|
||||
elseif exists('$DISPLAY') && executable('xclip')
|
||||
@ -120,13 +130,6 @@ function! provider#clipboard#Executable() abort
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
if empty(provider#clipboard#Executable())
|
||||
" provider#clipboard#Call() *must not* be defined if the provider is broken.
|
||||
" Otherwise eval_has_provider() thinks the clipboard provider is
|
||||
" functioning, and eval_call_provider() will happily call it.
|
||||
finish
|
||||
endif
|
||||
|
||||
function! s:clipboard.get(reg) abort
|
||||
if type(s:paste[a:reg]) == v:t_func
|
||||
return s:paste[a:reg]()
|
||||
@ -156,9 +159,7 @@ function! s:clipboard.set(lines, regtype, reg) abort
|
||||
end
|
||||
|
||||
if s:selections[a:reg].owner > 0
|
||||
" The previous provider instance should exit when the new one takes
|
||||
" ownership, but kill it to be sure we don't fill up the job table.
|
||||
call jobstop(s:selections[a:reg].owner)
|
||||
let prev_job = s:selections[a:reg].owner
|
||||
end
|
||||
let s:selections[a:reg] = copy(s:selection)
|
||||
let selection = s:selections[a:reg]
|
||||
@ -172,13 +173,23 @@ function! s:clipboard.set(lines, regtype, reg) abort
|
||||
call jobsend(jobid, a:lines)
|
||||
call jobclose(jobid, 'stdin')
|
||||
let selection.owner = jobid
|
||||
let ret = 1
|
||||
else
|
||||
echohl WarningMsg
|
||||
echomsg 'clipboard: failed to execute: '.(s:copy[a:reg])
|
||||
echohl None
|
||||
return 0
|
||||
let ret = 1
|
||||
endif
|
||||
return 1
|
||||
|
||||
" The previous provider instance should exit when the new one takes
|
||||
" ownership, but kill it to be sure we don't fill up the job table.
|
||||
if exists('prev_job')
|
||||
call timer_start(1000, {... ->
|
||||
\ jobwait([prev_job], 0)[0] == -1
|
||||
\ && jobstop(prev_job)})
|
||||
endif
|
||||
|
||||
return ret
|
||||
endfunction
|
||||
|
||||
function! provider#clipboard#Call(method, args) abort
|
||||
@ -192,3 +203,6 @@ function! provider#clipboard#Call(method, args) abort
|
||||
let s:here = v:false
|
||||
endtry
|
||||
endfunction
|
||||
|
||||
" eval_has_provider() decides based on this variable.
|
||||
let g:loaded_clipboard_provider = empty(provider#clipboard#Executable()) ? 1 : 2
|
||||
|
@ -51,6 +51,9 @@ function! provider#node#Detect() abort
|
||||
if exists('g:node_host_prog')
|
||||
return expand(g:node_host_prog)
|
||||
endif
|
||||
if !executable('node')
|
||||
return ''
|
||||
endif
|
||||
if !s:is_minimum_version(v:null, 6, 0)
|
||||
return ''
|
||||
endif
|
||||
@ -140,8 +143,9 @@ endfunction
|
||||
|
||||
let s:err = ''
|
||||
let s:prog = provider#node#Detect()
|
||||
let g:loaded_node_provider = empty(s:prog) ? 1 : 2
|
||||
|
||||
if empty(s:prog)
|
||||
if g:loaded_node_provider != 2
|
||||
let s:err = 'Cannot find the "neovim" node package. Try :checkhealth'
|
||||
endif
|
||||
|
||||
|
@ -7,9 +7,8 @@
|
||||
if exists('g:loaded_python_provider')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_python_provider = 1
|
||||
|
||||
let [s:prog, s:err] = provider#pythonx#Detect(2)
|
||||
let g:loaded_python_provider = empty(s:prog) ? 1 : 2
|
||||
|
||||
function! provider#python#Prog() abort
|
||||
return s:prog
|
||||
@ -19,11 +18,6 @@ function! provider#python#Error() abort
|
||||
return s:err
|
||||
endfunction
|
||||
|
||||
if s:prog == ''
|
||||
" Detection failed
|
||||
finish
|
||||
endif
|
||||
|
||||
" The Python provider plugin will run in a separate instance of the Python
|
||||
" host.
|
||||
call remote#host#RegisterClone('legacy-python-provider', 'python')
|
||||
|
@ -7,9 +7,8 @@
|
||||
if exists('g:loaded_python3_provider')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_python3_provider = 1
|
||||
|
||||
let [s:prog, s:err] = provider#pythonx#Detect(3)
|
||||
let g:loaded_python3_provider = empty(s:prog) ? 1 : 2
|
||||
|
||||
function! provider#python3#Prog() abort
|
||||
return s:prog
|
||||
@ -19,11 +18,6 @@ function! provider#python3#Error() abort
|
||||
return s:err
|
||||
endfunction
|
||||
|
||||
if s:prog == ''
|
||||
" Detection failed
|
||||
finish
|
||||
endif
|
||||
|
||||
" The Python3 provider plugin will run in a separate instance of the Python3
|
||||
" host.
|
||||
call remote#host#RegisterClone('legacy-python3-provider', 'python3')
|
||||
|
@ -62,8 +62,9 @@ endfunction
|
||||
let s:err = ''
|
||||
let s:prog = s:detect()
|
||||
let s:plugin_path = expand('<sfile>:p:h') . '/script_host.rb'
|
||||
let g:loaded_ruby_provider = empty(s:prog) ? 1 : 2
|
||||
|
||||
if empty(s:prog)
|
||||
if g:loaded_ruby_provider != 2
|
||||
let s:err = 'Cannot find the neovim RubyGem. Try :checkhealth'
|
||||
endif
|
||||
|
||||
|
@ -44,7 +44,7 @@
|
||||
"
|
||||
|
||||
if !has('python3')
|
||||
echo "Error: Required vim compiled with +python3"
|
||||
echo 'Error: Requires python3 + pynvim. :help provider-python'
|
||||
finish
|
||||
endif
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
||||
"
|
||||
|
||||
if !has('python')
|
||||
echo "Error: Required vim compiled with +python"
|
||||
echo 'Error: Requires python + pynvim. :help provider-python'
|
||||
finish
|
||||
endif
|
||||
|
||||
|
@ -147,7 +147,7 @@ function! s:RegistrationCommands(host) abort
|
||||
\ a:host, string(map(registered, "fnamemodify(v:val, ':t')")))
|
||||
|
||||
" Delete the temporary host clone
|
||||
call rpcstop(s:hosts[host_id].channel)
|
||||
call jobstop(s:hosts[host_id].channel)
|
||||
call remove(s:hosts, host_id)
|
||||
call remove(s:plugins_for_host, host_id)
|
||||
return lines
|
||||
|
@ -1,9 +1,9 @@
|
||||
" Vim completion script
|
||||
" Language: Ruby
|
||||
" Maintainer: Mark Guzman <segfault@hasno.info>
|
||||
" URL: https://github.com/vim-ruby/vim-ruby
|
||||
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||
" Maintainer Version: 0.8.1
|
||||
" Language: Ruby
|
||||
" Maintainer: Mark Guzman <segfault@hasno.info>
|
||||
" URL: https://github.com/vim-ruby/vim-ruby
|
||||
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2019 Jan 06
|
||||
" ----------------------------------------------------------------------------
|
||||
"
|
||||
" Ruby IRB/Complete author: Keiju ISHITSUKA(keiju@ishitsuka.com)
|
||||
@ -103,7 +103,7 @@ function! s:GetBufferRubyEntity( name, type, ... )
|
||||
endif
|
||||
|
||||
let curpos = getpos(".")
|
||||
let [enum,ecol] = searchpairpos( crex, '', '\(end\|}\)', 'wr' )
|
||||
let [enum,ecol] = searchpairpos( crex, '', '\(end\|}\)', 'W' )
|
||||
call cursor(lastpos[1], lastpos[2])
|
||||
|
||||
if lnum > enum
|
||||
@ -253,15 +253,27 @@ class VimRubyCompletion
|
||||
|
||||
# {{{ buffer analysis magic
|
||||
def load_requires
|
||||
|
||||
custom_paths = VIM::evaluate("get(g:, 'rubycomplete_load_paths', [])")
|
||||
|
||||
if !custom_paths.empty?
|
||||
$LOAD_PATH.concat(custom_paths).uniq!
|
||||
end
|
||||
|
||||
buf = VIM::Buffer.current
|
||||
enum = buf.line_number
|
||||
nums = Range.new( 1, enum )
|
||||
nums.each do |x|
|
||||
|
||||
ln = buf[x]
|
||||
begin
|
||||
eval( "require %s" % $1 ) if /.*require\s*(.*)$/.match( ln )
|
||||
rescue Exception
|
||||
#ignore?
|
||||
if /.*require_relative\s*(.*)$/.match( ln )
|
||||
eval( "require %s" % File.expand_path($1) )
|
||||
elsif /.*require\s*(["'].*?["'])/.match( ln )
|
||||
eval( "require %s" % $1 )
|
||||
end
|
||||
rescue Exception => e
|
||||
dprint e.inspect
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -344,8 +356,13 @@ class VimRubyCompletion
|
||||
if x != cur_line
|
||||
next if x == 0
|
||||
ln = buf[x]
|
||||
if /^\s*(module|class|def|include)\s+/.match(ln)
|
||||
clscnt += 1 if $1 == "class"
|
||||
is_const = false
|
||||
if /^\s*(module|class|def|include)\s+/.match(ln) || is_const = /^\s*?[A-Z]([A-z]|[1-9])*\s*?[|]{0,2}=\s*?.+\s*?/.match(ln)
|
||||
clscnt += 1 if /class|module/.match($1)
|
||||
# We must make sure to load each constant only once to avoid errors
|
||||
if is_const
|
||||
ln.gsub!(/\s*?[|]{0,2}=\s*?/, '||=')
|
||||
end
|
||||
#dprint "\$1$1
|
||||
classdef += "%s\n" % ln
|
||||
classdef += "end\n" if /def\s+/.match(ln)
|
||||
@ -423,7 +440,6 @@ class VimRubyCompletion
|
||||
return get_buffer_entity_list( "class" )
|
||||
end
|
||||
|
||||
|
||||
def load_rails
|
||||
allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails")
|
||||
return if allow_rails.to_i.zero?
|
||||
@ -529,7 +545,6 @@ class VimRubyCompletion
|
||||
ret += ActiveRecord::ConnectionAdapters::SchemaStatements.methods
|
||||
end
|
||||
|
||||
|
||||
return ret
|
||||
end
|
||||
|
||||
@ -587,11 +602,13 @@ class VimRubyCompletion
|
||||
# {{{ main completion code
|
||||
def self.preload_rails
|
||||
a = VimRubyCompletion.new
|
||||
require 'Thread'
|
||||
Thread.new(a) do |b|
|
||||
begin
|
||||
b.load_rails
|
||||
rescue
|
||||
if VIM::evaluate("has('nvim')") == 0
|
||||
require 'thread'
|
||||
Thread.new(a) do |b|
|
||||
begin
|
||||
b.load_rails
|
||||
rescue
|
||||
end
|
||||
end
|
||||
end
|
||||
a.load_rails
|
||||
@ -612,7 +629,6 @@ class VimRubyCompletion
|
||||
|
||||
want_gems = VIM::evaluate("get(g:, 'rubycomplete_load_gemfile')")
|
||||
load_gems unless want_gems.to_i.zero?
|
||||
|
||||
|
||||
input = VIM::Buffer.current.line
|
||||
cpos = VIM::Window.current.cursor[1] - 1
|
||||
@ -666,6 +682,7 @@ class VimRubyCompletion
|
||||
message = Regexp.quote($4)
|
||||
dprint "const or cls 2 [recv: \'%s\', msg: \'%s\']" % [ receiver, message ]
|
||||
load_buffer_class( receiver )
|
||||
load_buffer_module( receiver )
|
||||
begin
|
||||
classes = eval("#{receiver}.constants")
|
||||
#methods = eval("#{receiver}.methods")
|
||||
@ -786,7 +803,6 @@ class VimRubyCompletion
|
||||
methods += Kernel.public_methods
|
||||
end
|
||||
|
||||
|
||||
include_object = VIM::evaluate("exists('g:rubycomplete_include_object') && g:rubycomplete_include_object")
|
||||
methods = clean_sel( methods, message )
|
||||
methods = (methods-Object.instance_methods) if include_object == "0"
|
||||
@ -829,5 +845,4 @@ let s:rubycomplete_rails_loaded = 0
|
||||
call s:DefRuby()
|
||||
"}}} ruby-side code
|
||||
|
||||
|
||||
" vim:tw=78:sw=4:ts=8:et:fdm=marker:ft=vim:norl:
|
||||
|
@ -195,16 +195,6 @@ function! spellfile#GetDirChoices()
|
||||
endfunc
|
||||
|
||||
function! spellfile#WritableSpellDir()
|
||||
" Always use the $XDG_DATA_HOME/nvim/site directory
|
||||
if exists('$XDG_DATA_HOME')
|
||||
return $XDG_DATA_HOME . "/nvim/site/spell"
|
||||
elseif !(has('win32') || has('win64'))
|
||||
return $HOME . "/.local/share/nvim/site/spell"
|
||||
endif
|
||||
for dir in split(&rtp, ',')
|
||||
if filewritable(dir) == 2
|
||||
return dir . "/spell"
|
||||
endif
|
||||
endfor
|
||||
return ''
|
||||
" Always use the $XDG_DATA_HOME/…/site directory
|
||||
return stdpath('data').'/site/spell'
|
||||
endfunction
|
||||
|
@ -2,7 +2,7 @@
|
||||
" Language: All languages, uses existing syntax highlighting rules
|
||||
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
|
||||
" Version: 13.0
|
||||
" Last Change: 2013 May 14
|
||||
" Last Change: 2019 Aug 08
|
||||
" Usage: For detailed help, ":help ft-syntax-omni"
|
||||
|
||||
" History
|
||||
@ -597,7 +597,7 @@ function! s:SyntaxCSyntaxGroupItems( group_name, syntax_full )
|
||||
" Remove all non-word characters
|
||||
" let syn_list = substitute( syn_list, '\<match /\zs.\{-}\<\W\+\>.\{-}\ze\/ ', "", 'g' )
|
||||
" let syn_list = substitute( syn_list, '\%(\<match \/[^/]\{-}\)\@<=\W\+\ze.\{-}\/ ', ' ', 'g' )
|
||||
" Do this by using the outer substitue() call to gather all
|
||||
" Do this by using the outer substitute() call to gather all
|
||||
" text between the match /.../ tags.
|
||||
" The inner substitute() call operates on the text selected
|
||||
" and replaces all non-word characters.
|
||||
|
@ -1,6 +1,6 @@
|
||||
" Vim autoload file for the tohtml plugin.
|
||||
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
|
||||
" Last Change: 2013 Sep 03
|
||||
" Last Change: 2018 Nov 11
|
||||
"
|
||||
" Additional contributors:
|
||||
"
|
||||
@ -544,12 +544,16 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
|
||||
" add required javascript in reverse order so we can just call append again
|
||||
" and again without adjusting {{{
|
||||
|
||||
" insert script closing tag
|
||||
call append(style_start, [
|
||||
\ '',
|
||||
\ s:settings.use_xhtml ? '//]]>' : '-->',
|
||||
\ "</script>"
|
||||
\ ])
|
||||
let s:uses_script = s:settings.dynamic_folds || s:settings.line_ids || !empty(s:settings.prevent_copy)
|
||||
|
||||
" insert script closing tag if needed
|
||||
if s:uses_script
|
||||
call append(style_start, [
|
||||
\ '',
|
||||
\ s:settings.use_xhtml ? '//]]>' : '-->',
|
||||
\ "</script>"
|
||||
\ ])
|
||||
endif
|
||||
|
||||
" insert script which corrects the size of small input elements in
|
||||
" prevent_copy mode. See 2html.vim for details on why this is needed and how
|
||||
@ -575,55 +579,61 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
|
||||
\ '}'
|
||||
\ ])
|
||||
endif
|
||||
"
|
||||
|
||||
" insert javascript to get IDs from line numbers, and to open a fold before
|
||||
" jumping to any lines contained therein
|
||||
call append(style_start, [
|
||||
\ " /* Always jump to new location even if the line was hidden inside a fold, or",
|
||||
\ " * we corrected the raw number to a line ID.",
|
||||
\ " */",
|
||||
\ " if (lineElem) {",
|
||||
\ " lineElem.scrollIntoView(true);",
|
||||
\ " }",
|
||||
\ " return true;",
|
||||
\ "}",
|
||||
\ "if ('onhashchange' in window) {",
|
||||
\ " window.onhashchange = JumpToLine;",
|
||||
\ "}"
|
||||
\ ])
|
||||
if s:settings.dynamic_folds
|
||||
if s:settings.line_ids
|
||||
call append(style_start, [
|
||||
\ " /* Always jump to new location even if the line was hidden inside a fold, or",
|
||||
\ " * we corrected the raw number to a line ID.",
|
||||
\ " */",
|
||||
\ " if (lineElem) {",
|
||||
\ " lineElem.scrollIntoView(true);",
|
||||
\ " }",
|
||||
\ " return true;",
|
||||
\ "}",
|
||||
\ "if ('onhashchange' in window) {",
|
||||
\ " window.onhashchange = JumpToLine;",
|
||||
\ "}"
|
||||
\ ])
|
||||
|
||||
if s:settings.dynamic_folds
|
||||
call append(style_start, [
|
||||
\ "",
|
||||
\ " /* navigate upwards in the DOM tree to open all folds containing the line */",
|
||||
\ " var node = lineElem;",
|
||||
\ " while (node && node.id != 'vimCodeElement".s:settings.id_suffix."')",
|
||||
\ " {",
|
||||
\ " if (node.className == 'closed-fold')",
|
||||
\ " {",
|
||||
\ " /* toggle open the fold ID (remove window ID) */",
|
||||
\ " toggleFold(node.id.substr(4));",
|
||||
\ " }",
|
||||
\ " node = node.parentNode;",
|
||||
\ " }",
|
||||
\ ])
|
||||
endif
|
||||
endif
|
||||
|
||||
if s:settings.line_ids
|
||||
call append(style_start, [
|
||||
\ "",
|
||||
\ " /* navigate upwards in the DOM tree to open all folds containing the line */",
|
||||
\ " var node = lineElem;",
|
||||
\ " while (node && node.id != 'vimCodeElement".s:settings.id_suffix."')",
|
||||
\ " {",
|
||||
\ " if (node.className == 'closed-fold')",
|
||||
\ " {",
|
||||
\ " /* toggle open the fold ID (remove window ID) */",
|
||||
\ " toggleFold(node.id.substr(4));",
|
||||
\ " }",
|
||||
\ " node = node.parentNode;",
|
||||
\ "/* function to open any folds containing a jumped-to line before jumping to it */",
|
||||
\ "function JumpToLine()",
|
||||
\ "{",
|
||||
\ " var lineNum;",
|
||||
\ " lineNum = window.location.hash;",
|
||||
\ " lineNum = lineNum.substr(1); /* strip off '#' */",
|
||||
\ "",
|
||||
\ " if (lineNum.indexOf('L') == -1) {",
|
||||
\ " lineNum = 'L'+lineNum;",
|
||||
\ " }",
|
||||
\ " if (lineNum.indexOf('W') == -1) {",
|
||||
\ " lineNum = 'W1'+lineNum;",
|
||||
\ " }",
|
||||
\ " var lineElem = document.getElementById(lineNum);"
|
||||
\ ])
|
||||
endif
|
||||
call append(style_start, [
|
||||
\ "",
|
||||
\ "/* function to open any folds containing a jumped-to line before jumping to it */",
|
||||
\ "function JumpToLine()",
|
||||
\ "{",
|
||||
\ " var lineNum;",
|
||||
\ " lineNum = window.location.hash;",
|
||||
\ " lineNum = lineNum.substr(1); /* strip off '#' */",
|
||||
\ "",
|
||||
\ " if (lineNum.indexOf('L') == -1) {",
|
||||
\ " lineNum = 'L'+lineNum;",
|
||||
\ " }",
|
||||
\ " if (lineNum.indexOf('W') == -1) {",
|
||||
\ " lineNum = 'W1'+lineNum;",
|
||||
\ " }",
|
||||
\ " lineElem = document.getElementById(lineNum);"
|
||||
\ ])
|
||||
|
||||
" Insert javascript to toggle matching folds open and closed in all windows,
|
||||
" if dynamic folding is active.
|
||||
@ -648,11 +658,13 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
|
||||
\ ])
|
||||
endif
|
||||
|
||||
" insert script tag; javascript is always needed for the line number
|
||||
" normalization for URL hashes
|
||||
call append(style_start, [
|
||||
\ "<script type='text/javascript'>",
|
||||
\ s:settings.use_xhtml ? '//<![CDATA[' : "<!--"])
|
||||
if s:uses_script
|
||||
" insert script tag; javascript is always needed for the line number
|
||||
" normalization for URL hashes
|
||||
call append(style_start, [
|
||||
\ "<script type='text/javascript'>",
|
||||
\ s:settings.use_xhtml ? '//<![CDATA[' : "<!--"])
|
||||
endif
|
||||
|
||||
" Insert styles from all the generated html documents and additional styles
|
||||
" for the table-based layout of the side-by-side diff. The diff should take
|
||||
@ -767,7 +779,7 @@ func! tohtml#GetUserSettings() "{{{
|
||||
if user_settings.no_pre == 0
|
||||
call tohtml#GetOption(user_settings,
|
||||
\ 'expand_tabs',
|
||||
\ &expandtab || &ts != 8 || user_settings.number_lines ||
|
||||
\ &expandtab || &ts != 8 || (exists("+vts") && &vts != '') || user_settings.number_lines ||
|
||||
\ (user_settings.dynamic_folds && !user_settings.no_foldcolumn))
|
||||
else
|
||||
let user_settings.expand_tabs = 1
|
||||
|
@ -1,9 +1,9 @@
|
||||
" Vim plugin for formatting XML
|
||||
" Last Change: Thu, 22 May 2018 21:26:55 +0100
|
||||
" Version: 0.1
|
||||
" Author: Christian Brabandt <cb@256bit.org>
|
||||
" Repository: https://github.com/chrisbra/vim-xml-ftplugin
|
||||
" License: VIM License
|
||||
" Last Change: Thu, 07 Dec 2018
|
||||
" Version: 0.1
|
||||
" Author: Christian Brabandt <cb@256bit.org>
|
||||
" Repository: https://github.com/chrisbra/vim-xml-ftplugin
|
||||
" License: VIM License
|
||||
" Documentation: see :h xmlformat.txt (TODO!)
|
||||
" ---------------------------------------------------------------------
|
||||
" Load Once: {{{1
|
||||
@ -85,7 +85,11 @@ func! s:Trim(item)
|
||||
endfunc
|
||||
" Check if tag is a new opening tag <tag> {{{1
|
||||
func! s:StartTag(tag)
|
||||
return a:tag =~? '^\s*<[^/?]'
|
||||
let is_comment = s:IsComment(a:tag)
|
||||
return a:tag =~? '^\s*<[^/?]' && !is_comment
|
||||
endfunc
|
||||
func! s:IsComment(tag)
|
||||
return a:tag =~? '<!--'
|
||||
endfunc
|
||||
" Remove one level of indentation {{{1
|
||||
func! s:DecreaseIndent()
|
||||
|
@ -2,7 +2,7 @@
|
||||
:" information about the environment of a possible bug in Vim.
|
||||
:"
|
||||
:" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
:" Last change: 2005 Jun 12
|
||||
:" Last change: 2019 Jan 27
|
||||
:"
|
||||
:" To use inside Vim:
|
||||
:" :so $VIMRUNTIME/bugreport.vim
|
||||
|
@ -1,8 +1,8 @@
|
||||
" Vim compiler file
|
||||
" Compiler: Microsoft Visual Studio C#
|
||||
" Maintainer: Zhou YiChao (broken.zhou@gmail.com)
|
||||
" Previous Maintainer: Joseph H. Yao (hyao@sina.com)
|
||||
" Last Change: 2012 Apr 30
|
||||
" Compiler: Microsoft Visual Studio C#
|
||||
" Maintainer: Yichao Zhou (broken.zhou@gmail.com)
|
||||
" Previous Maintainer: Joseph H. Yao (hyao@sina.com)
|
||||
" Last Change: Jul 22, 2019
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
@ -20,7 +20,7 @@ CompilerSet errorformat+=%f(%l\\,%v):\ %t%*[^:]:\ %m,
|
||||
\%trror%*[^:]:\ %m,
|
||||
\%tarning%*[^:]:\ %m
|
||||
|
||||
CompilerSet makeprg=csc\ %
|
||||
CompilerSet makeprg=csc\ %:S
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
@ -1,13 +1,13 @@
|
||||
" Vim compiler file
|
||||
" Compiler: Erlang
|
||||
" Maintainer: Dmitry Vasiliev <dima at hlabs dot org>
|
||||
" Last Change: 2012-02-13
|
||||
" Last Change: 2019 Jul 23
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "erlang"
|
||||
|
||||
CompilerSet makeprg=erlc\ -Wall\ %
|
||||
CompilerSet makeprg=erlc\ -Wall\ %:S
|
||||
|
||||
CompilerSet errorformat=%f:%l:\ %m
|
||||
|
@ -3,6 +3,7 @@
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" URL: https://github.com/vim-ruby/vim-ruby
|
||||
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2018 Jan 25
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
@ -28,8 +29,8 @@ CompilerSet errorformat=
|
||||
\%W%f:%l:\ warning:\ %m,
|
||||
\%E%f:%l:in\ %*[^:]:\ %m,
|
||||
\%E%f:%l:\ %m,
|
||||
\%-C%\tfrom\ %f:%l:in\ %.%#,
|
||||
\%-Z%\tfrom\ %f:%l,
|
||||
\%-C%\t%\\d%#:%#\ %#from\ %f:%l:in\ %.%#,
|
||||
\%-Z%\t%\\d%#:%#\ %#from\ %f:%l,
|
||||
\%-Z%p^,
|
||||
\%-G%.%#
|
||||
|
||||
|
@ -22,7 +22,7 @@ CompilerSet errorformat=
|
||||
\%-Z%p%^%.%#,
|
||||
\%-G%.%#,
|
||||
" Compiler call
|
||||
CompilerSet makeprg=df\ /nologo\ /noobj\ /c\ %
|
||||
CompilerSet makeprg=df\ /nologo\ /noobj\ /c\ %:S
|
||||
" Visual fortran defaults to printing output on stderr
|
||||
" Adjust option shellpipe accordingly
|
||||
|
||||
|
@ -2,6 +2,8 @@
|
||||
" Compiler: GNU C Compiler
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2010-10-14
|
||||
" changed pattern for entering/leaving directories
|
||||
" by Daniel Hahler, 2019 Jul 12
|
||||
" added line suggested by Anton Lindqvist 2016 Mar 31
|
||||
|
||||
if exists("current_compiler")
|
||||
@ -27,10 +29,10 @@ CompilerSet errorformat=
|
||||
\%f:%l:\ %m,
|
||||
\%f:\\(%*[^\\)]\\):\ %m,
|
||||
\\"%f\"\\,\ line\ %l%*\\D%c%*[^\ ]\ %m,
|
||||
\%D%*\\a[%*\\d]:\ Entering\ directory\ [`']%f',
|
||||
\%X%*\\a[%*\\d]:\ Leaving\ directory\ [`']%f',
|
||||
\%D%*\\a:\ Entering\ directory\ [`']%f',
|
||||
\%X%*\\a:\ Leaving\ directory\ [`']%f',
|
||||
\%D%*\\a[%*\\d]:\ Entering\ directory\ %*[`']%f',
|
||||
\%X%*\\a[%*\\d]:\ Leaving\ directory\ %*[`']%f',
|
||||
\%D%*\\a:\ Entering\ directory\ %*[`']%f',
|
||||
\%X%*\\a:\ Leaving\ directory\ %*[`']%f',
|
||||
\%DMaking\ %*\\a\ in\ %f
|
||||
|
||||
if exists('g:compiler_gcc_ignore_unmatched_lines')
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim Compiler File
|
||||
" Compiler: Jikes
|
||||
" Maintainer: Dan Sharp <dwsharp at hotmail dot com>
|
||||
" Last Change: 20 Jan 2009
|
||||
" Last Change: 2019 Jul 23
|
||||
" URL: http://dwsharp.users.sourceforge.net/vim/compiler
|
||||
|
||||
if exists("current_compiler")
|
||||
@ -14,5 +14,5 @@ if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||
endif
|
||||
|
||||
" Jikes defaults to printing output on stderr
|
||||
CompilerSet makeprg=jikes\ -Xstdout\ +E\ \"%\"
|
||||
CompilerSet makeprg=jikes\ -Xstdout\ +E\ \"%:S\"
|
||||
CompilerSet errorformat=%f:%l:%v:%*\\d:%*\\d:%*\\s%m
|
||||
|
@ -1,7 +1,11 @@
|
||||
" Vim Compiler File
|
||||
" Compiler: ocaml
|
||||
" Maintainer: See ftplugin/ocaml.vim (?)
|
||||
" Last Change: June 2013 by Marc Weber
|
||||
" Compiler: ocaml
|
||||
" Maintainer: Markus Mottl <markus.mottl@gmail.com>
|
||||
" URL: https://github.com/rgrinberg/vim-ocaml
|
||||
" Last Change:
|
||||
" 2017 Nov 26 - Improved error format (Markus Mottl)
|
||||
" 2013 Aug 27 - Added a new OCaml error format (Markus Mottl)
|
||||
" 2013 Jun 30 - Initial version (Marc Weber)
|
||||
"
|
||||
" Marc Weber's comments:
|
||||
" Setting makeprg doesn't make sense, because there is ocamlc, ocamlopt,
|
||||
@ -17,7 +21,6 @@
|
||||
"
|
||||
" So having it here makes people opt-in
|
||||
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
@ -28,6 +31,7 @@ set cpo&vim
|
||||
|
||||
CompilerSet errorformat =
|
||||
\%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d:,
|
||||
\%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d\ %.%#,
|
||||
\%EFile\ \"%f\"\\,\ line\ %l\\,\ character\ %c:%m,
|
||||
\%+EReference\ to\ unbound\ regexp\ name\ %m,
|
||||
\%Eocamlyacc:\ e\ -\ line\ %l\ of\ \"%f\"\\,\ %m,
|
||||
@ -38,6 +42,12 @@ CompilerSet errorformat =
|
||||
\%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f',
|
||||
\%D%*\\a:\ Entering\ directory\ `%f',
|
||||
\%X%*\\a:\ Leaving\ directory\ `%f',
|
||||
\%D%*\\a[%*\\d]:\ Entering\ directory\ '%f',
|
||||
\%X%*\\a[%*\\d]:\ Leaving\ directory\ '%f',
|
||||
\%D%*\\a:\ Entering\ directory\ '%f',
|
||||
\%X%*\\a:\ Leaving\ directory\ '%f',
|
||||
\%DEntering\ directory\ '%f',
|
||||
\%XLeaving\ directory\ '%f',
|
||||
\%DMaking\ %*\\a\ in\ %f
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim compiler file
|
||||
" Compiler: onsgmls
|
||||
" Maintainer: Robert Rowsome <rowsome@wam.umd.edu>
|
||||
" Last Change: 2004 Mar 27
|
||||
" Last Change: 2019 Jul 23
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
@ -15,7 +15,7 @@ endif
|
||||
let s:cpo_save = &cpo
|
||||
set cpo-=C
|
||||
|
||||
CompilerSet makeprg=onsgmls\ -s\ %
|
||||
CompilerSet makeprg=onsgmls\ -s\ %:S
|
||||
|
||||
CompilerSet errorformat=onsgmls:%f:%l:%c:%t:%m,
|
||||
\onsgmls:%f:%l:%c:%m
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim Compiler File
|
||||
" Compiler: Perl syntax checks (perl -Wc)
|
||||
" Maintainer: Christian J. Robinson <heptite@gmail.com>
|
||||
" Last Change: 2006 Aug 13
|
||||
" Last Change: 2019 Jul 22
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
@ -27,7 +27,7 @@ else
|
||||
let s:taintopt = ''
|
||||
endif
|
||||
|
||||
exe 'CompilerSet makeprg=perl\ -' . s:warnopt . s:taintopt . 'c\ %'
|
||||
exe 'CompilerSet makeprg=perl\ -' . s:warnopt . s:taintopt . 'c\ %:S'
|
||||
|
||||
CompilerSet errorformat=
|
||||
\%-G%.%#had\ compilation\ errors.,
|
||||
|
@ -3,6 +3,7 @@
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" URL: https://github.com/vim-ruby/vim-ruby
|
||||
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2018 Mar 02
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
@ -20,12 +21,12 @@ CompilerSet makeprg=rake
|
||||
|
||||
CompilerSet errorformat=
|
||||
\%D(in\ %f),
|
||||
\%\\s%#from\ %f:%l:%m,
|
||||
\%\\s%#from\ %f:%l:,
|
||||
\%\\s%##\ %f:%l:%m,
|
||||
\%\\s%##\ %f:%l,
|
||||
\%\\s%#[%f:%l:\ %#%m,
|
||||
\%\\s%#%f:%l:\ %#%m,
|
||||
\%\\s%#%\\d%#:%#\ %#from\ %f:%l:%m,
|
||||
\%\\s%#%\\d%#:%#\ %#from\ %f:%l:,
|
||||
\%\\s%##\ %f:%l:%m%\\&%.%#%\\D:%\\d%\\+:%.%#,
|
||||
\%\\s%##\ %f:%l%\\&%.%#%\\D:%\\d%\\+,
|
||||
\%\\s%#[%f:%l:\ %#%m%\\&%.%#%\\D:%\\d%\\+:%.%#,
|
||||
\%\\s%#%f:%l:\ %#%m%\\&%.%#%\\D:%\\d%\\+:%.%#,
|
||||
\%\\s%#%f:%l:,
|
||||
\%m\ [%f:%l]:,
|
||||
\%+Erake\ aborted!,
|
||||
|
@ -3,6 +3,7 @@
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" URL: https://github.com/vim-ruby/vim-ruby
|
||||
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2018 Aug 07
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
@ -23,7 +24,8 @@ CompilerSet errorformat=
|
||||
\%E%.%#:in\ `load':\ %f:%l:%m,
|
||||
\%E%f:%l:in\ `%*[^']':\ %m,
|
||||
\%-Z\ \ \ \ \ %\\+\#\ %f:%l:%.%#,
|
||||
\%E\ \ %\\d%\\+)%.%#,
|
||||
\%E\ \ \ \ \ Failure/Error:\ %m,
|
||||
\%E\ \ \ \ \ Failure/Error:,
|
||||
\%C\ \ \ \ \ %m,
|
||||
\%C%\\s%#,
|
||||
\%-G%.%#
|
||||
|
@ -4,7 +4,7 @@
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" URL: https://github.com/vim-ruby/vim-ruby
|
||||
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||
" ----------------------------------------------------------------------------
|
||||
" Last Change: 2019 Jan 06
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
@ -21,21 +21,21 @@ set cpo-=C
|
||||
" default settings runs script normally
|
||||
" add '-c' switch to run syntax check only:
|
||||
"
|
||||
" CompilerSet makeprg=ruby\ -wc\ $*
|
||||
" CompilerSet makeprg=ruby\ -c
|
||||
"
|
||||
" or add '-c' at :make command line:
|
||||
"
|
||||
" :make -c %<CR>
|
||||
"
|
||||
CompilerSet makeprg=ruby\ -w\ $*
|
||||
CompilerSet makeprg=ruby
|
||||
|
||||
CompilerSet errorformat=
|
||||
\%+E%f:%l:\ parse\ error,
|
||||
\%W%f:%l:\ warning:\ %m,
|
||||
\%E%f:%l:in\ %*[^:]:\ %m,
|
||||
\%E%f:%l:\ %m,
|
||||
\%-C%\tfrom\ %f:%l:in\ %.%#,
|
||||
\%-Z%\tfrom\ %f:%l,
|
||||
\%-C%\t%\\d%#:%#\ %#from\ %f:%l:in\ %.%#,
|
||||
\%-Z%\t%\\d%#:%#\ %#from\ %f:%l,
|
||||
\%-Z%p^,
|
||||
\%-G%.%#
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" URL: https://github.com/vim-ruby/vim-ruby
|
||||
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2014 Mar 23
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
|
@ -19,7 +19,7 @@ endif
|
||||
if exists("g:rustc_makeprg_no_percent") && g:rustc_makeprg_no_percent != 0
|
||||
CompilerSet makeprg=rustc
|
||||
else
|
||||
CompilerSet makeprg=rustc\ \%
|
||||
CompilerSet makeprg=rustc\ \%:S
|
||||
endif
|
||||
|
||||
" Old errorformat (before nightly 2016/08/10)
|
||||
|
@ -2,7 +2,7 @@
|
||||
" Compiler: splint/lclint (C source code checker)
|
||||
" Maintainer: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
" Splint Home: http://www.splint.org/
|
||||
" Last Change: 2005 Apr 21
|
||||
" Last Change: 2019 Jul 23
|
||||
" $Revision: 1.3 $
|
||||
|
||||
if exists("current_compiler")
|
||||
@ -19,7 +19,7 @@ set cpo-=C
|
||||
|
||||
" adapt this if you want to check more than one file at a time.
|
||||
" put command line options in .splintrc or ~/.splintrc
|
||||
CompilerSet makeprg=splint\ %
|
||||
CompilerSet makeprg=splint\ %:S
|
||||
|
||||
" Note: when using the new array bounds checking flags: Each warning
|
||||
" usually has several lines and several references to source code mostly
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim Compiler File
|
||||
" Compiler: xmlwf
|
||||
" Maintainer: Robert Rowsome <rowsome@wam.umd.edu>
|
||||
" Last Change: 2004 Mar 27
|
||||
" Last Change: 2019 Jul 23
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
@ -15,7 +15,7 @@ if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
CompilerSet makeprg=xmlwf\ %
|
||||
CompilerSet makeprg=xmlwf\ %:S
|
||||
|
||||
CompilerSet errorformat=%f:%l%c:%m
|
||||
|
||||
|
1213
runtime/doc/api.txt
1213
runtime/doc/api.txt
File diff suppressed because it is too large
Load Diff
@ -40,15 +40,18 @@ effects. Be careful not to destroy your text.
|
||||
2. Defining autocommands *autocmd-define*
|
||||
|
||||
*:au* *:autocmd*
|
||||
:au[tocmd] [group] {event} {pat} [nested] {cmd}
|
||||
:au[tocmd] [group] {event} {pat} [++once] [++nested] {cmd}
|
||||
Add {cmd} to the list of commands that Vim will
|
||||
execute automatically on {event} for a file matching
|
||||
{pat} |autocmd-patterns|.
|
||||
{pat} |autocmd-pattern|.
|
||||
Note: A quote character is seen as argument to the
|
||||
:autocmd and won't start a comment.
|
||||
Vim always adds the {cmd} after existing autocommands,
|
||||
so that the autocommands execute in the order in which
|
||||
they were given. See |autocmd-nested| for [nested].
|
||||
Nvim always adds {cmd} after existing autocommands so
|
||||
they execute in the order in which they were defined.
|
||||
See |autocmd-nested| for [++nested].
|
||||
*autocmd-once*
|
||||
If [++once] is supplied the command is executed once,
|
||||
then removed ("one shot").
|
||||
|
||||
The special pattern <buffer> or <buffer=N> defines a buffer-local autocommand.
|
||||
See |autocmd-buflocal|.
|
||||
@ -116,10 +119,11 @@ prompt. When one command outputs two messages this can happen anyway.
|
||||
==============================================================================
|
||||
3. Removing autocommands *autocmd-remove*
|
||||
|
||||
:au[tocmd]! [group] {event} {pat} [nested] {cmd}
|
||||
:au[tocmd]! [group] {event} {pat} [++once] [++nested] {cmd}
|
||||
Remove all autocommands associated with {event} and
|
||||
{pat}, and add the command {cmd}. See
|
||||
|autocmd-nested| for [nested].
|
||||
{pat}, and add the command {cmd}.
|
||||
See |autocmd-once| for [++once].
|
||||
See |autocmd-nested| for [++nested].
|
||||
|
||||
:au[tocmd]! [group] {event} {pat}
|
||||
Remove all autocommands associated with {event} and
|
||||
@ -264,8 +268,10 @@ Name triggered by ~
|
||||
|BufNew| just after creating a new buffer
|
||||
|
||||
|SwapExists| detected an existing swap file
|
||||
|TermOpen| when a terminal job starts
|
||||
|TermClose| when a terminal job ends
|
||||
|TermOpen| starting a terminal job
|
||||
|TermEnter| entering Terminal-mode
|
||||
|TermLeave| leaving Terminal-mode
|
||||
|TermClose| stopping a terminal job
|
||||
|ChanOpen| after a channel opened
|
||||
|ChanInfo| after a channel has its state changed
|
||||
|
||||
@ -276,8 +282,8 @@ Name triggered by ~
|
||||
|
||||
Startup and exit
|
||||
|VimEnter| after doing all the startup stuff
|
||||
|GUIEnter| after starting the GUI successfully
|
||||
|GUIFailed| after starting the GUI failed
|
||||
|UIEnter| after a UI attaches
|
||||
|UILeave| after a UI detaches
|
||||
|TermResponse| after the terminal response to t_RV is received
|
||||
|QuitPre| when using `:quit`, before deciding whether to exit
|
||||
|ExitPre| when using a command that may make Vim exit
|
||||
@ -301,6 +307,7 @@ Name triggered by ~
|
||||
|FuncUndefined| a user function is used but it isn't defined
|
||||
|SpellFileMissing| a spell file is used but it can't be found
|
||||
|SourcePre| before sourcing a Vim script
|
||||
|SourcePost| after sourcing a Vim script
|
||||
|SourceCmd| before sourcing a Vim script |Cmd-event|
|
||||
|
||||
|VimResized| after the Vim window size changed
|
||||
@ -350,9 +357,12 @@ Name triggered by ~
|
||||
|SessionLoadPost| after loading a session file
|
||||
|
||||
|MenuPopup| just before showing the popup menu
|
||||
|CompleteChanged| after popup menu changed, not fired on popup menu hide
|
||||
|CompleteDone| after Insert mode completion is done
|
||||
|
||||
|User| to be used in combination with ":doautocmd"
|
||||
|Signal| after Nvim receives a signal
|
||||
|
||||
|
||||
|
||||
The alphabetical list of autocommand events: *autocmd-events-abc*
|
||||
@ -390,8 +400,8 @@ BufFilePost After changing the name of the current buffer
|
||||
BufFilePre Before changing the name of the current buffer
|
||||
with the ":file" or ":saveas" command.
|
||||
*BufHidden*
|
||||
BufHidden Just after a buffer has become hidden. That
|
||||
is, when there are no longer windows that show
|
||||
BufHidden Just before a buffer becomes hidden. That is,
|
||||
when there are no longer windows that show
|
||||
the buffer, but the buffer is not unloaded or
|
||||
deleted. Not used for ":qa" or ":q" when
|
||||
exiting Vim.
|
||||
@ -582,6 +592,23 @@ CompleteDone After Insert mode completion is done. Either
|
||||
The |v:completed_item| variable contains the
|
||||
completed item.
|
||||
|
||||
CompleteChanged *CompleteChanged*
|
||||
After each time the Insert mode completion
|
||||
menu changed. Not fired on popup menu hide,
|
||||
use |CompleteDone| for that. Never triggered
|
||||
recursively.
|
||||
|
||||
Sets these |v:event| keys:
|
||||
completed_item See |complete-items|.
|
||||
height nr of items visible
|
||||
width screen cells
|
||||
row top screen row
|
||||
col leftmost screen column
|
||||
size total nr of items
|
||||
scrollbar TRUE if visible
|
||||
|
||||
It is not allowed to change the text |textlock|.
|
||||
|
||||
*CursorHold*
|
||||
CursorHold When the user doesn't press a key for the time
|
||||
specified with 'updatetime'. Not re-triggered
|
||||
@ -617,11 +644,13 @@ CursorHoldI Just like CursorHold, but in Insert mode.
|
||||
|
||||
*CursorMoved*
|
||||
CursorMoved After the cursor was moved in Normal or Visual
|
||||
mode. Also when the text of the cursor line
|
||||
has been changed, e.g., with "x", "rx" or "p".
|
||||
mode or to another window. Also when the text
|
||||
of the cursor line has been changed, e.g. with
|
||||
"x", "rx" or "p".
|
||||
Not triggered when there is typeahead or when
|
||||
an operator is pending.
|
||||
For an example see |match-parens|.
|
||||
Note: Cannot be skipped with `:noautocmd`.
|
||||
Careful: This is triggered very often, don't
|
||||
do anything that the user does not expect or
|
||||
that is slow.
|
||||
@ -751,13 +780,14 @@ FilterReadPre Before reading a file from a filter command.
|
||||
Not triggered when 'shelltemp' is off.
|
||||
*FilterWritePost*
|
||||
FilterWritePost After writing a file for a filter command or
|
||||
making a diff.
|
||||
making a diff with an external diff (see
|
||||
DiffUpdated for internal diff).
|
||||
Vim checks the pattern against the name of
|
||||
the current buffer as with FilterWritePre.
|
||||
Not triggered when 'shelltemp' is off.
|
||||
*FilterWritePre*
|
||||
FilterWritePre Before writing a file for a filter command or
|
||||
making a diff.
|
||||
making a diff with an external diff.
|
||||
Vim checks the pattern against the name of
|
||||
the current buffer, not the name of the
|
||||
temporary file that is the output of the
|
||||
@ -777,19 +807,17 @@ FuncUndefined When a user function is used but it isn't
|
||||
NOTE: When writing Vim scripts a better
|
||||
alternative is to use an autoloaded function.
|
||||
See |autoload-functions|.
|
||||
*GUIEnter*
|
||||
GUIEnter After starting the GUI successfully, and after
|
||||
opening the window. It is triggered before
|
||||
VimEnter when using gvim. Can be used to
|
||||
position the window from a gvimrc file: >
|
||||
:autocmd GUIEnter * winpos 100 50
|
||||
< *GUIFailed*
|
||||
GUIFailed After starting the GUI failed. Vim may
|
||||
continue to run in the terminal, if possible
|
||||
(only on Unix and alikes, when connecting the
|
||||
X server fails). You may want to quit Vim: >
|
||||
:autocmd GUIFailed * qall
|
||||
< *InsertChange*
|
||||
*UIEnter*
|
||||
UIEnter After a UI connects via |nvim_ui_attach()|,
|
||||
after VimEnter. Can be used for GUI-specific
|
||||
configuration.
|
||||
Sets these |v:event| keys:
|
||||
chan
|
||||
*UILeave*
|
||||
UILeave After a UI disconnects from Nvim.
|
||||
Sets these |v:event| keys:
|
||||
chan
|
||||
*InsertChange*
|
||||
InsertChange When typing <Insert> while in Insert or
|
||||
Replace mode. The |v:insertmode| variable
|
||||
indicates the new mode.
|
||||
@ -803,20 +831,25 @@ InsertCharPre When a character is typed in Insert mode,
|
||||
a different character. When |v:char| is set
|
||||
to more than one character this text is
|
||||
inserted literally.
|
||||
It is not allowed to change the text |textlock|.
|
||||
The event is not triggered when 'paste' is
|
||||
set.
|
||||
|
||||
Cannot change the text. |textlock|
|
||||
Not triggered when 'paste' is set.
|
||||
*TextYankPost*
|
||||
TextYankPost Just after a |yank| or |deleting| command, but not
|
||||
if the black hole register |quote_| is used nor
|
||||
for |setreg()|. Pattern must be *.
|
||||
Sets these |v:event| keys:
|
||||
inclusive
|
||||
operator
|
||||
regcontents
|
||||
regname
|
||||
regtype
|
||||
The `inclusive` flag combined with the |'[|
|
||||
and |']| marks can be used to calculate the
|
||||
precise region of the operation.
|
||||
|
||||
Recursion is ignored.
|
||||
It is not allowed to change the text |textlock|.
|
||||
Cannot change the text. |textlock|
|
||||
*InsertEnter*
|
||||
InsertEnter Just before starting Insert mode. Also for
|
||||
Replace mode and Virtual Replace mode. The
|
||||
@ -842,27 +875,48 @@ MenuPopup Just before showing the popup menu (under the
|
||||
i Insert
|
||||
c Command line
|
||||
*OptionSet*
|
||||
OptionSet After setting an option. The pattern is
|
||||
matched against the long option name.
|
||||
The |v:option_old| variable indicates the
|
||||
old option value, |v:option_new| variable
|
||||
indicates the newly set value, the
|
||||
|v:option_type| variable indicates whether
|
||||
it's global or local scoped and |<amatch>|
|
||||
OptionSet After setting an option (except during
|
||||
|startup|). The |autocmd-pattern| is matched
|
||||
against the long option name. |<amatch>|
|
||||
indicates what option has been set.
|
||||
|
||||
|v:option_type| indicates whether it's global
|
||||
or local scoped.
|
||||
|v:option_command| indicates what type of
|
||||
set/let command was used (follow the tag to
|
||||
see the table).
|
||||
|v:option_new| indicates the newly set value.
|
||||
|v:option_oldlocal| has the old local value.
|
||||
|v:option_oldglobal| has the old global value.
|
||||
|v:option_old| indicates the old option value.
|
||||
|
||||
|v:option_oldlocal| is only set when |:set|
|
||||
or |:setlocal| or a |modeline| was used to set
|
||||
the option. Similarly |v:option_oldglobal| is
|
||||
only set when |:set| or |:setglobal| was used.
|
||||
|
||||
Note that when setting a |global-local| string
|
||||
option with |:set|, then |v:option_old| is the
|
||||
old global value. However, for all other kinds
|
||||
of options (local string options, global-local
|
||||
number options, ...) it is the old local
|
||||
value.
|
||||
|
||||
OptionSet is not triggered on startup and for
|
||||
the 'key' option for obvious reasons.
|
||||
|
||||
Usage example: Check for the existence of the
|
||||
directory in the 'backupdir' and 'undodir'
|
||||
options, create the directory if it doesn't
|
||||
exist yet.
|
||||
|
||||
Note: It's a bad idea to reset an option
|
||||
during this autocommand, this may break a
|
||||
plugin. You can always use `:noa` to prevent
|
||||
triggering this autocommand.
|
||||
Note: Do not reset the same option during this
|
||||
autocommand, that may break plugins. You can
|
||||
always use |:noautocmd| to prevent triggering
|
||||
OptionSet.
|
||||
|
||||
When using |:set| in the autocommand the event
|
||||
is not triggered again.
|
||||
Recursion is ignored, thus |:set| in the
|
||||
autocommand does not trigger OptionSet again.
|
||||
|
||||
*QuickFixCmdPre*
|
||||
QuickFixCmdPre Before a quickfix command is run (|:make|,
|
||||
@ -914,13 +968,24 @@ ShellCmdPost After executing a shell command with |:!cmd|,
|
||||
any changed files.
|
||||
For non-blocking shell commands, see
|
||||
|job-control|.
|
||||
*ShellFilterPost*
|
||||
*Signal*
|
||||
Signal After Nvim receives a signal. The pattern is
|
||||
matched against the signal name. Only
|
||||
"SIGUSR1" is supported. Example: >
|
||||
autocmd Signal SIGUSR1 call some#func()
|
||||
< *ShellFilterPost*
|
||||
ShellFilterPost After executing a shell command with
|
||||
":{range}!cmd", ":w !cmd" or ":r !cmd".
|
||||
Can be used to check for any changed files.
|
||||
*SourcePre*
|
||||
SourcePre Before sourcing a Vim script. |:source|
|
||||
<afile> is the name of the file being sourced.
|
||||
*SourcePost*
|
||||
SourcePost After sourcing a Vim script. |:source|
|
||||
<afile> is the name of the file being sourced.
|
||||
Not triggered when sourcing was interrupted.
|
||||
Also triggered after a SourceCmd autocommand
|
||||
was triggered.
|
||||
*SourceCmd*
|
||||
SourceCmd When sourcing a Vim script. |:source|
|
||||
<afile> is the name of the file being sourced.
|
||||
@ -962,7 +1027,6 @@ SwapExists Detected an existing swap file when starting
|
||||
It is not allowed to change to another buffer,
|
||||
change a buffer name or change directory
|
||||
here.
|
||||
{only available with the +eval feature}
|
||||
*Syntax*
|
||||
Syntax When the 'syntax' option has been set. The
|
||||
pattern is matched against the syntax name.
|
||||
@ -987,11 +1051,17 @@ TabNewEntered After entering a new tab page. |tab-page|
|
||||
*TabClosed*
|
||||
TabClosed After closing a tab page. <afile> can be used
|
||||
for the tab page number.
|
||||
*TermClose*
|
||||
TermClose When a |terminal| job ends.
|
||||
*TermOpen*
|
||||
TermOpen When a |terminal| job is starting. Can be
|
||||
used to configure the terminal buffer.
|
||||
*TermEnter*
|
||||
TermEnter After entering |Terminal-mode|.
|
||||
After TermOpen.
|
||||
*TermLeave*
|
||||
TermLeave After leaving |Terminal-mode|.
|
||||
After TermClose.
|
||||
*TermClose*
|
||||
TermClose When a |terminal| job ends.
|
||||
*TermResponse*
|
||||
TermResponse After the response to t_RV is received from
|
||||
the terminal. The value of |v:termresponse|
|
||||
@ -1002,10 +1072,13 @@ TermResponse After the response to t_RV is received from
|
||||
anything else that takes time is involved).
|
||||
*TextChanged*
|
||||
TextChanged After a change was made to the text in the
|
||||
current buffer in Normal mode. That is when
|
||||
|b:changedtick| has changed.
|
||||
current buffer in Normal mode. That is after
|
||||
|b:changedtick| has changed (also when that
|
||||
happened before the TextChanged autocommand
|
||||
was defined).
|
||||
Not triggered when there is typeahead or when
|
||||
an operator is pending.
|
||||
Note: Cannot be skipped with `:noautocmd`.
|
||||
Careful: This is triggered very often, don't
|
||||
do anything that the user does not expect or
|
||||
that is slow.
|
||||
@ -1020,14 +1093,12 @@ TextChangedP After a change was made to the text in the
|
||||
popup menu is visible. Otherwise the same as
|
||||
TextChanged.
|
||||
*User*
|
||||
User Never executed automatically. To be used for
|
||||
autocommands that are only executed with
|
||||
":doautocmd".
|
||||
Note that when `:doautocmd User MyEvent` is
|
||||
used while there are no matching autocommands,
|
||||
you will get an error. If you don't want
|
||||
that, define a dummy autocommand yourself.
|
||||
*UserGettingBored*
|
||||
User Not executed automatically. Use |:doautocmd|
|
||||
to trigger this, typically for "custom events"
|
||||
in a plugin. Example: >
|
||||
:autocmd User MyPlugin echom 'got MyPlugin event'
|
||||
:doautocmd User MyPlugin
|
||||
< *UserGettingBored*
|
||||
UserGettingBored When the user presses the same key 42 times.
|
||||
Just kidding! :-)
|
||||
*VimEnter*
|
||||
@ -1092,7 +1163,7 @@ WinNew When a new window was created. Not done for
|
||||
Before a WinEnter event.
|
||||
|
||||
==============================================================================
|
||||
6. Patterns *autocmd-patterns* *{pat}*
|
||||
6. Patterns *autocmd-pattern* *{pat}*
|
||||
|
||||
The {pat} argument can be a comma separated list. This works as if the
|
||||
command was given with each pattern separately. Thus this command: >
|
||||
@ -1305,7 +1376,7 @@ have changed autocommands, or when Vim has executed the wrong autocommands
|
||||
Note that the 'eventignore' option applies here too. Events listed in this
|
||||
option will not cause any commands to be executed.
|
||||
|
||||
*:do* *:doau* *:doautocmd* *E217*
|
||||
*:do* *:doau* *:doaut* *:doautocmd* *E217*
|
||||
:do[autocmd] [<nomodeline>] [group] {event} [fname]
|
||||
Apply the autocommands matching [fname] (default:
|
||||
current file name) for {event} to the current buffer.
|
||||
@ -1317,24 +1388,22 @@ option will not cause any commands to be executed.
|
||||
another extension. Example: >
|
||||
:au BufEnter *.cpp so ~/.config/nvim/init_cpp.vim
|
||||
:au BufEnter *.cpp doau BufEnter x.c
|
||||
< Be careful to avoid endless loops. See
|
||||
|autocmd-nested|.
|
||||
< Be careful to avoid endless loops. |autocmd-nested|
|
||||
|
||||
When the [group] argument is not given, Vim executes
|
||||
the autocommands for all groups. When the [group]
|
||||
argument is included, Vim executes only the matching
|
||||
autocommands for that group. Note: if you use an
|
||||
undefined group name, Vim gives you an error message.
|
||||
autocommands for that group. Undefined group is an
|
||||
error.
|
||||
*<nomodeline>*
|
||||
After applying the autocommands the modelines are
|
||||
processed, so that their settings overrule the
|
||||
settings from autocommands, like what happens when
|
||||
editing a file. This is skipped when the <nomodeline>
|
||||
argument is present. You probably want to use
|
||||
<nomodeline> for events that are not used when loading
|
||||
a buffer, such as |User|.
|
||||
Processing modelines is also skipped when no
|
||||
matching autocommands were executed.
|
||||
settings from autocommands when editing a file. This
|
||||
is skipped if <nomodeline> is specified. You probably
|
||||
want to use <nomodeline> for events not used when
|
||||
loading a buffer, such as |User|.
|
||||
Modelines are also skipped when no matching
|
||||
autocommands were executed.
|
||||
|
||||
*:doautoa* *:doautoall*
|
||||
:doautoa[ll] [<nomodeline>] [group] {event} [fname]
|
||||
@ -1431,11 +1500,11 @@ If you want the buffer to be unmodified after changing it, reset the
|
||||
instead of ":q!".
|
||||
|
||||
*autocmd-nested* *E218*
|
||||
By default, autocommands do not nest. If you use ":e" or ":w" in an
|
||||
autocommand, Vim does not execute the BufRead and BufWrite autocommands for
|
||||
those commands. If you do want this, use the "nested" flag for those commands
|
||||
in which you want nesting. For example: >
|
||||
:autocmd FileChangedShell *.c nested e!
|
||||
By default, autocommands do not nest. For example, if you use ":e" or ":w" in
|
||||
an autocommand, Vim does not execute the BufRead and BufWrite autocommands for
|
||||
those commands. If you do want this, use the "++nested" flag for those
|
||||
commands in which you want nesting. For example: >
|
||||
:autocmd FileChangedShell *.c ++nested e!
|
||||
The nesting is limited to 10 levels to get out of recursive loops.
|
||||
|
||||
It's possible to use the ":au" command in an autocommand. This can be a
|
||||
@ -1578,5 +1647,8 @@ following command. Example: >
|
||||
This will write the file without triggering the autocommands defined by the
|
||||
gzip plugin.
|
||||
|
||||
Note that some autocommands are not triggered right away, but only later.
|
||||
This specifically applies to |CursorMoved| and |TextChanged|.
|
||||
|
||||
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
@ -162,8 +162,6 @@ gR Enter Virtual Replace mode: Each character you type
|
||||
<Tab> may replace several characters at once.
|
||||
Repeat the entered text [count]-1 times. See
|
||||
|Virtual-Replace-mode| for more details.
|
||||
{not available when compiled without the |+vreplace|
|
||||
feature}
|
||||
|
||||
*c*
|
||||
["x]c{motion} Delete {motion} text [into register x] and start
|
||||
@ -282,14 +280,11 @@ gr{char} Replace the virtual characters under the cursor with
|
||||
space. See |gR| and |Virtual-Replace-mode| for more
|
||||
details. As with |r| a count may be given.
|
||||
{char} can be entered like with |r|.
|
||||
{not available when compiled without the |+vreplace|
|
||||
feature}
|
||||
|
||||
*digraph-arg*
|
||||
The argument for Normal mode commands like |r| and |t| is a single character.
|
||||
When 'cpo' doesn't contain the 'D' flag, this character can also be entered
|
||||
like |digraphs|. First type CTRL-K and then the two digraph characters.
|
||||
{not available when compiled without the |+digraphs| feature}
|
||||
|
||||
*case*
|
||||
The following commands change the case of letters. The currently active
|
||||
@ -600,11 +595,11 @@ Directory for temporary files is created in the first suitable directory of:
|
||||
For the {pattern} see |pattern|.
|
||||
{string} can be a literal string, or something
|
||||
special; see |sub-replace-special|.
|
||||
*E939*
|
||||
When [range] and [count] are omitted, replace in the
|
||||
current line only. When [count] is given, replace in
|
||||
[count] lines, starting with the last line in [range].
|
||||
When [range] is omitted start in the current line.
|
||||
*E939*
|
||||
[count] must be a positive number. Also see
|
||||
|cmdline-ranges|.
|
||||
|
||||
@ -800,7 +795,7 @@ the |substitute()| function with the following exceptions:
|
||||
- magic is always set without regard to 'magic'.
|
||||
- A ~ inserts a tilde literally.
|
||||
- <CR> and \r inserts a carriage-return (CTRL-M).
|
||||
- \<CR> does not have a special meaning. it's just one of \x.
|
||||
- \<CR> does not have a special meaning. It's just one of \x.
|
||||
|
||||
Examples: >
|
||||
:s/a\|b/xxx\0xxx/g modifies "a b" to "xxxaxxx xxxbxxx"
|
||||
@ -886,9 +881,9 @@ When the result is a |List| then the items are joined with separating line
|
||||
breaks. Thus each item becomes a line, except that they can contain line
|
||||
breaks themselves.
|
||||
|
||||
The whole matched text can be accessed with "submatch(0)". The text matched
|
||||
with the first pair of () with "submatch(1)". Likewise for further
|
||||
sub-matches in ().
|
||||
The |submatch()| function can be used to obtain matched text. The whole
|
||||
matched text can be accessed with "submatch(0)". The text matched with the
|
||||
first pair of () with "submatch(1)". Likewise for further sub-matches in ().
|
||||
|
||||
Be careful: The separation character must not appear in the expression!
|
||||
Consider using a character like "@" or ":". There is no problem if the result
|
||||
@ -939,8 +934,6 @@ This replaces each 'E' character with a euro sign. Read more in |<Char->|.
|
||||
this (that's a good habit anyway).
|
||||
`:retab!` may also change a sequence of spaces by
|
||||
<Tab> characters, which can mess up a printf().
|
||||
Not available when |+ex_extra| feature was disabled at
|
||||
compile time.
|
||||
|
||||
*retab-example*
|
||||
Example for using autocommands and ":retab" to edit a file which is stored
|
||||
@ -1139,9 +1132,9 @@ There are ten types of registers: *registers* *E354*
|
||||
2. 10 numbered registers "0 to "9
|
||||
3. The small delete register "-
|
||||
4. 26 named registers "a to "z or "A to "Z
|
||||
5. three read-only registers ":, "., "%
|
||||
6. alternate buffer register "#
|
||||
7. the expression register "=
|
||||
5. Three read-only registers ":, "., "%
|
||||
6. Alternate buffer register "#
|
||||
7. The expression register "=
|
||||
8. The selection registers "* and "+
|
||||
9. The black hole register "_
|
||||
10. Last search pattern register "/
|
||||
@ -1291,21 +1284,15 @@ The next three commands always work on whole lines.
|
||||
:[range]ce[nter] [width] *:ce* *:center*
|
||||
Center lines in [range] between [width] columns
|
||||
(default 'textwidth' or 80 when 'textwidth' is 0).
|
||||
Not available when |+ex_extra| feature was disabled at
|
||||
compile time.
|
||||
|
||||
:[range]ri[ght] [width] *:ri* *:right*
|
||||
Right-align lines in [range] at [width] columns
|
||||
(default 'textwidth' or 80 when 'textwidth' is 0).
|
||||
Not available when |+ex_extra| feature was disabled at
|
||||
compile time.
|
||||
|
||||
*:le* *:left*
|
||||
:[range]le[ft] [indent]
|
||||
Left-align lines in [range]. Sets the indent in the
|
||||
lines to [indent] (default 0).
|
||||
Not available when |+ex_extra| feature was disabled at
|
||||
compile time.
|
||||
|
||||
*gq*
|
||||
gq{motion} Format the lines that {motion} moves over.
|
||||
@ -1635,6 +1622,17 @@ j Where it makes sense, remove a comment leader when joining lines. For
|
||||
// in the list ~
|
||||
Becomes:
|
||||
int i; // the index in the list ~
|
||||
p Don't break lines at single spaces that follow periods. This is
|
||||
intended to complement 'joinspaces' and |cpo-J|, for prose with
|
||||
sentences separated by two spaces. For example, with 'textwidth' set
|
||||
to 28: >
|
||||
Surely you're joking, Mr. Feynman!
|
||||
< Becomes: >
|
||||
Surely you're joking,
|
||||
Mr. Feynman!
|
||||
< Instead of: >
|
||||
Surely you're joking, Mr.
|
||||
Feynman!
|
||||
|
||||
|
||||
With 't' and 'c' you can specify when Vim performs auto-wrapping:
|
||||
|
@ -30,7 +30,7 @@ There are several ways to open a channel:
|
||||
|
||||
Channels support multiple modes or protocols. In the most basic
|
||||
mode of operation, raw bytes are read and written to the channel.
|
||||
The |rpc| protocol, based on the msgpack-rpc standard, enables nvim and the
|
||||
The |RPC| protocol, based on the msgpack-rpc standard, enables nvim and the
|
||||
process at the other end to send remote calls and events to each other.
|
||||
The builtin |terminal-emulator| is also implemented on top of PTY channels.
|
||||
|
||||
@ -43,63 +43,66 @@ functions like |chansend()| consume channel ids.
|
||||
==============================================================================
|
||||
2. Reading and writing raw bytes *channel-bytes*
|
||||
|
||||
By default, channels opened by vimscript functions will operate with raw
|
||||
bytes. Additionally, for a job channel using rpc, bytes can still be
|
||||
read over its stderr. Similarily, only bytes can be written to nvim's own stderr.
|
||||
Channels opened by Vimscript functions operate with raw bytes by default. For
|
||||
a job channel using RPC, bytes can still be read over its stderr. Similarily,
|
||||
only bytes can be written to Nvim's own stderr.
|
||||
|
||||
*channel-callback* *buffered*
|
||||
*E5210* *on_stdout* *on_stderr* *on_stdin* *on_data*
|
||||
It is possible to register callback functions when a channel receives data by
|
||||
passing the `on_stdout`, `on_stderr`, `on_stdin` options on creation. Sockets
|
||||
may specify an `on_data` callback instead. Each callback function will be
|
||||
invoked with data read from the channel. By default, the callback will be
|
||||
invoked immediately when data is available, to facilitate interactive
|
||||
communication. The same callback will then be invoked with empty data, to
|
||||
indicate that the stream reached EOF. Alternatively the `stdout_buffered`,
|
||||
`stderr_buffered`, `stdin_buffered`, `data_buffered` options can be set to
|
||||
invoke the corresponding callback only when the underlying stream reaches EOF.
|
||||
The callback will then be passed complete output. This is helpful when only
|
||||
the complete output is useful, and not partial data. Futhermore if the stream
|
||||
is set to be buffered, but the callback is not set, the data is saved in the
|
||||
options dict, with the stream name as key. For this to work a new options dict
|
||||
must be used for each opened channel. If a script uses a global `s:job_opts`
|
||||
dict, it can be copied with |copy()| before supplying it to |jobstart()|. If a
|
||||
dict is reused, so that the dict key already is occupied, error `E5210` will
|
||||
be raised.
|
||||
*channel-callback*
|
||||
on_stdout({chan-id}, {data}, {name}) *on_stdout*
|
||||
on_stderr({chan-id}, {data}, {name}) *on_stderr*
|
||||
on_stdin({chan-id}, {data}, {name}) *on_stdin*
|
||||
on_data({chan-id}, {data}, {name}) *on_data*
|
||||
Scripts can react to channel activity (received data) via callback
|
||||
functions assigned to the `on_stdout`, `on_stderr`, `on_stdin`, or
|
||||
`on_data` option keys. Callbacks should be fast: avoid potentially
|
||||
slow/expensive work.
|
||||
|
||||
- The arguments passed to the callback function are:
|
||||
Parameters: ~
|
||||
{chan-id} Channel handle. |channel-id|
|
||||
{data} Raw data (|readfile()|-style list of strings) read from
|
||||
the channel. EOF is a single-item list: `['']`. First and
|
||||
last items may be partial lines! |channel-lines|
|
||||
{name} Stream name (string) like "stdout", so the same function
|
||||
can handle multiple streams. Event names depend on how the
|
||||
channel was opened and in what mode/protocol.
|
||||
|
||||
0: |channel-id|
|
||||
1: Raw data read from the channel, formatted as a |readfile()|-style
|
||||
list. If EOF occured, a single empty string `['']` will be passed in.
|
||||
Note that the items in this list do not directly correspond to actual
|
||||
lines in the output. See |channel-lines|
|
||||
2: Stream name as a string, like `"stdout"`. This is to allow multiple
|
||||
stream handlers to be implemented by the same function. The available
|
||||
events depend on how the channel was opened and in what mode/protocol.
|
||||
*channel-buffered*
|
||||
The callback is invoked immediately as data is available, where
|
||||
a single-item list `['']` indicates EOF (stream closed). Alternatively
|
||||
set the `stdout_buffered`, `stderr_buffered`, `stdin_buffered`, or
|
||||
`data_buffered` option keys to invoke the callback only after all output
|
||||
was gathered and the stream was closed.
|
||||
*E5210*
|
||||
If a buffering mode is used without a callback, the data is saved in the
|
||||
stream {name} key of the options dict. It is an error if the key exists.
|
||||
|
||||
*channel-lines*
|
||||
Note:
|
||||
stream event handlers may receive partial (incomplete) lines. For a given
|
||||
invocation of on_stdout etc, `a:data` is not guaranteed to end
|
||||
with a newline.
|
||||
- `abcdefg` may arrive as `['abc']`, `['defg']`.
|
||||
- `abc\nefg` may arrive as `['abc', '']`, `['efg']` or `['abc']`,
|
||||
`['','efg']`, or even `['ab']`, `['c','efg']`.
|
||||
|
||||
If you only are interested in complete output when the process exits,
|
||||
use buffered mode. Otherwise, an easy way to deal with this:
|
||||
initialize a list as `['']`, then append to it as follows: >
|
||||
let s:chunks = ['']
|
||||
func! s:on_event(job_id, data, event) dict
|
||||
let s:chunks[-1] .= a:data[0]
|
||||
call extend(s:chunks, a:data[1:])
|
||||
endf
|
||||
Stream event handlers receive data as it becomes available from the OS,
|
||||
thus the first and last items in the {data} list may be partial lines.
|
||||
Empty string completes the previous partial line. Examples (not including
|
||||
the final `['']` emitted at EOF):
|
||||
- `foobar` may arrive as `['fo'], ['obar']`
|
||||
- `foo\nbar` may arrive as
|
||||
`['foo','bar']`
|
||||
or `['foo',''], ['bar']`
|
||||
or `['foo'], ['','bar']`
|
||||
or `['fo'], ['o','bar']`
|
||||
There are two ways to deal with this:
|
||||
1. To wait for the entire output, use |channel-buffered| mode.
|
||||
2. To read line-by-line, use the following code: >
|
||||
let s:lines = ['']
|
||||
func! s:on_event(job_id, data, event) dict
|
||||
let eof = (a:data == [''])
|
||||
" Complete the previous line.
|
||||
let s:lines[-1] .= a:data[0]
|
||||
" Append (last item may be a partial line, until EOF).
|
||||
call extend(s:lines, a:data[1:])
|
||||
endf
|
||||
<
|
||||
|
||||
Additionally, if the callbacks are Dictionary functions, |self| can be used to
|
||||
refer to the options dictionary containing the callbacks. |Partial|s can also be
|
||||
used as callbacks.
|
||||
If the callback functions are |Dictionary-function|s, |self| refers to the
|
||||
options dictionary containing the callbacks. |Partial|s can also be used as
|
||||
callbacks.
|
||||
|
||||
Data can be sent to the channel using the |chansend()| function. Here is a
|
||||
simple example, echoing some data through a cat-process:
|
||||
|
@ -250,20 +250,13 @@ CTRL-A command-line completion (see |cmdline-completion|)
|
||||
CTRL-L command-line completion (see |cmdline-completion|)
|
||||
|
||||
*c_CTRL-_*
|
||||
CTRL-_ a - switch between Hebrew and English keyboard mode, which is
|
||||
CTRL-_ Switch between Hebrew and English keyboard mode, which is
|
||||
private to the command-line and not related to hkmap.
|
||||
This is useful when Hebrew text entry is required in the
|
||||
command-line, searches, abbreviations, etc. Applies only if
|
||||
the 'allowrevins' option is set.
|
||||
See |rileft.txt|.
|
||||
|
||||
b - switch between Farsi and English keyboard mode, which is
|
||||
private to the command-line and not related to fkmap. In
|
||||
Farsi keyboard mode the characters are inserted in reverse
|
||||
insert manner. This is useful when Farsi text entry is
|
||||
required in the command-line, searches, abbreviations, etc.
|
||||
See |farsi.txt|.
|
||||
|
||||
*c_CTRL-^*
|
||||
CTRL-^ Toggle the use of language |:lmap| mappings and/or Input
|
||||
Method.
|
||||
@ -423,6 +416,10 @@ a previous version <Esc> was used). In the pattern standard wildcards '*' and
|
||||
'?' are accepted when matching file names. '*' matches any string, '?'
|
||||
matches exactly one character.
|
||||
|
||||
When repeating 'wildchar' or CTRL-N you cycle through the matches, eventually
|
||||
ending up back to what was typed. If the first match is not what you wanted,
|
||||
you can use <S-Tab> or CTRL-P to go straight back to what you typed.
|
||||
|
||||
The 'wildignorecase' option can be set to ignore case in filenames.
|
||||
|
||||
The 'wildmenu' option can be set to show the matches just above the command
|
||||
@ -502,7 +499,6 @@ that see the '"' as part of their argument:
|
||||
:autocmd
|
||||
:bufdo
|
||||
:cexpr (and the like)
|
||||
:call
|
||||
:cdo (and the like)
|
||||
:command
|
||||
:cscope (and the like)
|
||||
@ -664,7 +660,7 @@ commands ":write" and ":global" have the whole file (1,$) as default.
|
||||
If more line specifiers are given than required for the command, the first
|
||||
one(s) will be ignored.
|
||||
|
||||
Line numbers may be specified with: *:range* *E14* *{address}*
|
||||
Line numbers may be specified with: *:range* *{address}*
|
||||
{number} an absolute line number
|
||||
. the current line *:.*
|
||||
$ the last line in the file *:$*
|
||||
@ -796,7 +792,6 @@ function |expand()|.
|
||||
#<n (where n is a number > 0) is replaced with old *:_#<* *c_#<*
|
||||
file name n. See |:oldfiles| or |v:oldfiles| to get the
|
||||
number. *E809*
|
||||
{only when compiled with the |+eval| and |+shada| features}
|
||||
|
||||
Note that these, except "#<n", give the file name as it was typed. If an
|
||||
absolute path is needed (when using the file name from a different directory),
|
||||
@ -821,11 +816,12 @@ it, no matter how many backslashes.
|
||||
\\# \#
|
||||
Also see |`=|.
|
||||
|
||||
*:<cword>* *:<cWORD>* *:<cfile>* *<cfile>*
|
||||
*:<sfile>* *<sfile>* *:<afile>* *<afile>*
|
||||
*:<abuf>* *<abuf>* *:<amatch>* *<amatch>*
|
||||
*:<cexpr>* *<cexpr>*
|
||||
*<slnum>* *E495* *E496* *E497* *E499* *E500*
|
||||
*:<cword>* *<cword>* *:<cWORD>* *<cWORD>*
|
||||
*:<cexpr>* *<cexpr>* *:<cfile>* *<cfile>*
|
||||
*:<afile>* *<afile>* *:<abuf>* *<abuf>*
|
||||
*:<amatch>* *<amatch>*
|
||||
*:<sfile>* *<sfile>* *:<slnum>* *<slnum>*
|
||||
*:<sflnum>* *<sflnum>* *E499* *E500*
|
||||
Note: these are typed literally, they are not special keys!
|
||||
<cword> is replaced with the word under the cursor (like |star|)
|
||||
<cWORD> is replaced with the WORD under the cursor (see |WORD|)
|
||||
@ -838,15 +834,16 @@ Note: these are typed literally, they are not special keys!
|
||||
|gf| uses)
|
||||
<afile> When executing autocommands, is replaced with the file name
|
||||
of the buffer being manipulated, or the file for a read or
|
||||
write.
|
||||
write. *E495*
|
||||
<abuf> When executing autocommands, is replaced with the currently
|
||||
effective buffer number (for ":r file" and ":so file" it is
|
||||
the current buffer, the file being read/sourced is not in a
|
||||
buffer).
|
||||
buffer). *E496*
|
||||
<amatch> When executing autocommands, is replaced with the match for
|
||||
which this autocommand was executed. It differs from
|
||||
<afile> only when the file name isn't used to match with
|
||||
(for FileType, Syntax and SpellFileMissing events).
|
||||
which this autocommand was executed. *E497*
|
||||
It differs from <afile> only when the file name isn't used
|
||||
to match with (for FileType, Syntax and SpellFileMissing
|
||||
events).
|
||||
<sfile> When executing a ":source" command, is replaced with the
|
||||
file name of the sourced file. *E498*
|
||||
When executing a function, is replaced with:
|
||||
@ -856,17 +853,18 @@ Note: these are typed literally, they are not special keys!
|
||||
Note that filename-modifiers are useless when <sfile> is
|
||||
used inside a function.
|
||||
<slnum> When executing a ":source" command, is replaced with the
|
||||
line number. *E842*
|
||||
line number. *E842*
|
||||
When executing a function it's the line number relative to
|
||||
the start of the function.
|
||||
<sflnum> When executing a script, is replaced with the line number.
|
||||
It differs from <slnum> in that <sflnum> is replaced with
|
||||
the script line number in any situation. *E961*
|
||||
|
||||
*filename-modifiers*
|
||||
*:_%:* *::8* *::p* *::.* *::~* *::h* *::t* *::r* *::e* *::s* *::gs* *::S*
|
||||
*%:8* *%:p* *%:.* *%:~* *%:h* *%:t* *%:r* *%:e* *%:s* *%:gs* *%:S*
|
||||
The file name modifiers can be used after "%", "#", "#n", "<cfile>", "<sfile>",
|
||||
"<afile>" or "<abuf>". They are also used with the |fnamemodify()| function.
|
||||
These are not available when Vim has been compiled without the |+modify_fname|
|
||||
feature.
|
||||
These modifiers can be given, in this order:
|
||||
:p Make file name a full path. Must be the first modifier. Also
|
||||
changes "~/" (and "~user/" for Unix) to the path for the home
|
||||
@ -1109,8 +1107,8 @@ in the command-line window, like this: >
|
||||
Note that hitting <Tab> in Normal mode will do completion on the next
|
||||
character. That way it works at the end of the line.
|
||||
If you don't want these mappings, disable them with: >
|
||||
au CmdwinEnter [:>] iunmap <Tab>
|
||||
au CmdwinEnter [:>] nunmap <Tab>
|
||||
au CmdwinEnter [:>] iunmap <buffer> <Tab>
|
||||
au CmdwinEnter [:>] nunmap <buffer> <Tab>
|
||||
You could put these lines in your vimrc file.
|
||||
|
||||
While in the command-line window you cannot use the mouse to put the cursor in
|
||||
|
@ -76,15 +76,10 @@ matches the EXE (same date).
|
||||
If you built the executable yourself with the Microsoft Visual C++ compiler,
|
||||
then the PDB was built with the EXE.
|
||||
|
||||
Alternatively, if you have the source files, you can import Make_ivc.mak into
|
||||
Visual Studio as a workspace. Then select a debug configuration, build and
|
||||
you can do all kinds of debugging (set breakpoints, watch variables, etc.).
|
||||
|
||||
If you have Visual Studio, use that instead of the VC Toolkit and WinDbg.
|
||||
|
||||
For other compilers, you should always use the corresponding debugger: TD for
|
||||
a Vim executable compiled with the Borland compiler; gdb (see above
|
||||
|debug-gcc|) for the Cygwin and MinGW compilers.
|
||||
For other compilers, you should always use the corresponding debugger: gdb
|
||||
(see above |debug-gcc|) for the Cygwin and MinGW compilers.
|
||||
|
||||
|
||||
*debug-vs2005*
|
||||
@ -112,7 +107,7 @@ line numbers. Double-click one of the lines and the Find Source dialog will
|
||||
appear. Navigate to the directory where the Vim source is (if you have it.)
|
||||
|
||||
If you don't know how to debug this any further, follow the instructions
|
||||
at ":help bug-reports". Paste the call stack into the bug report.
|
||||
at ":help bug-report". Paste the call stack into the bug report.
|
||||
|
||||
If you have a non-free version of Visual Studio, you can save a minidump via
|
||||
the Debug menu and send it with the bug report. A minidump is a small file
|
||||
|
@ -12,6 +12,9 @@ updated.
|
||||
|
||||
==============================================================================
|
||||
|
||||
API ~
|
||||
*nvim_buf_clear_highlight()* Use |nvim_buf_clear_namespace()| instead.
|
||||
|
||||
Commands ~
|
||||
*:rv*
|
||||
*:rviminfo* Deprecated alias to |:rshada| command.
|
||||
@ -25,6 +28,8 @@ Environment Variables ~
|
||||
Events ~
|
||||
*EncodingChanged* Never fired; 'encoding' is always "utf-8".
|
||||
*FileEncoding* Never fired; equivalent to |EncodingChanged|.
|
||||
*GUIEnter* Never fired; use |UIEnter| instead.
|
||||
*GUIFailed* Never fired.
|
||||
|
||||
Keycodes ~
|
||||
*<MouseDown>* Use <ScrollWheelUp> instead.
|
||||
@ -41,6 +46,11 @@ Functions ~
|
||||
*jobclose()* Obsolete name for |chanclose()|
|
||||
*jobsend()* Obsolete name for |chansend()|
|
||||
*last_buffer_nr()* Obsolete name for bufnr("$").
|
||||
*rpcstop()* Deprecated. Instead use |jobstop()| to stop any job,
|
||||
or chanclose(id, "rpc") to close RPC communication
|
||||
without stopping the job. Use chanclose(id) to close
|
||||
any socket.
|
||||
|
||||
|
||||
Modifiers ~
|
||||
*cpo-<*
|
||||
@ -55,6 +65,10 @@ Normal commands ~
|
||||
|
||||
Options ~
|
||||
*'cscopeverbose'* Enabled by default. Use |:silent| instead.
|
||||
*'exrc'* *'ex'* Security risk: downloaded files could include
|
||||
a malicious .nvimrc or .exrc file. See 'secure'.
|
||||
Recommended alternative: define an autocommand in your
|
||||
|vimrc| to set options for a matching directory.
|
||||
'gd'
|
||||
'gdefault' Enables the |:substitute| flag 'g' by default.
|
||||
*'fe'* 'fenc'+'enc' before Vim 6.0; no longer used.
|
||||
@ -62,6 +76,14 @@ Options ~
|
||||
*'langnoremap'* Deprecated alias to 'nolangremap'.
|
||||
*'vi'*
|
||||
*'viminfo'* Deprecated alias to 'shada' option.
|
||||
*'viminfofile'* Deprecated alias to 'shadafile' option.
|
||||
|
||||
UI extensions~
|
||||
*ui-wildmenu* Use |ui-cmdline| with |ui-popupmenu| instead. Enabled
|
||||
by the `ext_wildmenu` |ui-option|. Emits these events:
|
||||
["wildmenu_show", items]
|
||||
["wildmenu_select", selected]
|
||||
["wildmenu_hide"]
|
||||
|
||||
Variables~
|
||||
*b:terminal_job_pid* PID of the top-level process in a |:terminal|.
|
||||
|
@ -4,7 +4,7 @@
|
||||
NVIM REFERENCE MANUAL
|
||||
|
||||
|
||||
Development of Nvim *development*
|
||||
Development of Nvim *development* *dev*
|
||||
|
||||
This reference describes design constraints and guidelines, for developing
|
||||
Nvim applications or Nvim itself.
|
||||
@ -79,17 +79,16 @@ include the kitchen sink... but it's good for plumbing."
|
||||
|
||||
|
||||
==============================================================================
|
||||
Developer guidelines *dev*
|
||||
Developer guidelines *dev-guidelines*
|
||||
|
||||
|
||||
PROVIDERS *dev-provider*
|
||||
|
||||
A goal of Nvim is to allow extension of the editor without special knowledge
|
||||
in the core. But some Vim components are too tightly coupled; in those cases
|
||||
a "provider" hook is exposed.
|
||||
A primary goal of Nvim is to allow extension of the editor without special
|
||||
knowledge in the core. Some core functions are delegated to "providers"
|
||||
implemented as external scripts.
|
||||
|
||||
Consider two examples of integration with external systems that are
|
||||
implemented in Vim and are now decoupled from Nvim core as providers:
|
||||
Examples:
|
||||
|
||||
1. In the Vim source code, clipboard logic accounts for more than 1k lines of
|
||||
C source code (ui.c), to perform two tasks that are now accomplished with
|
||||
@ -101,29 +100,28 @@ implemented in Vim and are now decoupled from Nvim core as providers:
|
||||
scripting is performed by an external host process implemented in ~2k lines
|
||||
of Python.
|
||||
|
||||
Ideally we could implement Python and clipboard integration in pure vimscript
|
||||
and without touching the C code. But this is infeasible without compromising
|
||||
backwards compatibility with Vim; that's where providers help.
|
||||
The provider framework invokes VimL from C. It is composed of two functions
|
||||
in eval.c:
|
||||
|
||||
The provider framework helps call vimscript from C. It is composed of two
|
||||
functions in eval.c:
|
||||
|
||||
- eval_call_provider(name, method, arguments): calls provider#(name)#Call
|
||||
- eval_call_provider(name, method, arguments): calls provider#{name}#Call
|
||||
with the method and arguments.
|
||||
- eval_has_provider(name): Checks if a provider is implemented. Returns true
|
||||
if the provider#(name)#Call function is implemented. Called by |has()|
|
||||
(vimscript) to check if features are available.
|
||||
|
||||
The provider#(name)#Call function implements integration with an external
|
||||
system, because shell commands and |RPC| clients are easier to work with in
|
||||
vimscript.
|
||||
- eval_has_provider(name): Checks the `g:loaded_{name}_provider` variable
|
||||
which must be set to 2 by the provider script to indicate that it is
|
||||
"enabled and working". Called by |has()| to check if features are available.
|
||||
|
||||
For example, the Python provider is implemented by the
|
||||
autoload/provider/python.vim script; the provider#python#Call function is only
|
||||
defined if a valid external Python host is found. That works well with the
|
||||
`has('python')` expression (normally used by Python plugins) because if the
|
||||
Python host isn't installed then the plugin will "think" it is running in
|
||||
a Vim compiled without the |+python| feature.
|
||||
"autoload/provider/python.vim" script, which sets `g:loaded_python_provider`
|
||||
to 2 only if a valid external Python host is found. Then `has("python")`
|
||||
reflects whether Python support is working.
|
||||
|
||||
*provider-reload*
|
||||
Sometimes a GUI or other application may want to force a provider to
|
||||
"reload". To reload a provider, undefine its "loaded" flag, then use
|
||||
|:runtime| to reload it: >
|
||||
|
||||
:unlet g:loaded_clipboard_provider
|
||||
:runtime autoload/provider/clipboard.vim
|
||||
|
||||
|
||||
DOCUMENTATION *dev-doc*
|
||||
|
||||
@ -157,37 +155,55 @@ with a {thing} that groups functions under a common concept).
|
||||
|
||||
Use existing common {action} names if possible:
|
||||
add Append to, or insert into, a collection
|
||||
get Get a thing (or subset of things by some query)
|
||||
set Set a thing
|
||||
get Get a thing (or group of things by query)
|
||||
set Set a thing (or group of things)
|
||||
del Delete a thing (or group of things)
|
||||
list Get all things
|
||||
|
||||
Use consistent names for {thing} in all API functions. E.g. a buffer is called
|
||||
"buf" everywhere, not "buffer" in some places and "buf" in others.
|
||||
|
||||
Example: `nvim_get_current_line` acts on the global editor state; the common
|
||||
{action} "get" is used but {thing} is omitted.
|
||||
Example:
|
||||
`nvim_get_current_line` acts on the global editor state; the common
|
||||
{action} "get" is used but {thing} is omitted.
|
||||
|
||||
Example: `nvim_buf_add_highlight` acts on a `Buffer` object (the first
|
||||
parameter) and uses the common {action} "add".
|
||||
Example:
|
||||
`nvim_buf_add_highlight` acts on a `Buffer` object (the first parameter)
|
||||
and uses the common {action} "add".
|
||||
|
||||
Example: `nvim_list_bufs` operates in a global context (first parameter is
|
||||
_not_ a Buffer). The common {action} "list" indicates that it lists all
|
||||
bufs (plural) in the global context.
|
||||
Example:
|
||||
`nvim_list_bufs` operates in a global context (first parameter is not
|
||||
a Buffer). The common {action} "list" indicates that it lists all bufs
|
||||
(plural) in the global context.
|
||||
|
||||
Use this template to name new API events:
|
||||
nvim_{thing}_{event}_event
|
||||
|
||||
Example: `nvim_buf_changedtick_event`.
|
||||
Example:
|
||||
`nvim_buf_changedtick_event`
|
||||
|
||||
|
||||
API-CLIENT *dev-api-client*
|
||||
|
||||
*api-client*
|
||||
API clients wrap the Nvim |API| to provide idiomatic "SDKs" for their
|
||||
respective platforms (see |jargon|). You can build a new API client for your
|
||||
favorite platform or programming language.
|
||||
|
||||
List of API clients:
|
||||
https://github.com/neovim/neovim/wiki/Related-projects#api-clients
|
||||
|
||||
*pynvim*
|
||||
The Python client is the reference implementation for API clients.
|
||||
https://github.com/neovim/pynvim
|
||||
|
||||
Standard Features ~
|
||||
|
||||
- API clients exist to hide msgpack-rpc details. The wrappers can be
|
||||
automatically generated by reading the |api-metadata| from Nvim. |api-mapping|
|
||||
- Clients should call |nvim_set_client_info()| after connecting, so users and
|
||||
plugins can detect the client by handling the |ChanInfo| event. This
|
||||
avoids the need for special variables or other client hints.
|
||||
plugins can detect the client by handling the |ChanInfo| event. This avoids
|
||||
the need for special variables or other client hints.
|
||||
- Clients should handle |nvim_error_event| notifications, which will be sent
|
||||
if an async request to nvim was rejected or caused an error.
|
||||
|
||||
@ -207,12 +223,28 @@ Examples of API-client package names:
|
||||
BAD: python-client
|
||||
BAD: neovim
|
||||
|
||||
Implementation ~
|
||||
API client implementation guidelines ~
|
||||
|
||||
- Separate the transport layer from the rest of the library. |rpc-connecting|
|
||||
- Use a MessagePack library that implements at least version 5 of the
|
||||
MessagePack spec, which supports the BIN and EXT types used by Nvim.
|
||||
- Use a single-threaded event loop library/pattern.
|
||||
- Use a fiber/coroutine library for the language being used for implementing
|
||||
a client. These greatly simplify concurrency and allow the library to
|
||||
expose a blocking API on top of a non-blocking event loop without the
|
||||
complexity that comes with preemptive multitasking.
|
||||
- Don't assume anything about the order of responses to RPC requests.
|
||||
- Clients should expect requests, which must be handled immediately because
|
||||
Nvim is blocked while waiting for the client response.
|
||||
- Clients should expect notifications, but these can be handled "ASAP" (rather
|
||||
than immediately) because they won't block Nvim.
|
||||
- For C/C++ projects, consider libmpack instead of the msgpack.org library.
|
||||
https://github.com/libmpack/libmpack/
|
||||
libmpack is small (no dependencies, can inline into your C/C++ project) and
|
||||
efficient (no allocations). It also implements msgpack-RPC, the protocol
|
||||
required by Nvim.
|
||||
https://github.com/msgpack-rpc/msgpack-rpc
|
||||
|
||||
Consider using libmpack instead of the msgpack.org C/C++ library. libmpack is
|
||||
small (can be inlined into your C/C++ project) and efficient (no allocations).
|
||||
It also implements msgpack-RPC.
|
||||
https://github.com/libmpack/libmpack/
|
||||
|
||||
EXTERNAL UI *dev-ui*
|
||||
|
||||
|
@ -175,7 +175,7 @@ hidden buffers. You can use ":hide" to close a window without unloading the
|
||||
buffer. If you don't want a buffer to remain used for the diff do ":set
|
||||
nodiff" before hiding it.
|
||||
|
||||
*:dif* *:diffupdate*
|
||||
*:dif* *:diff* *:diffupdate*
|
||||
:dif[fupdate][!] Update the diff highlighting and folds.
|
||||
|
||||
Vim attempts to keep the differences updated when you make changes to the
|
||||
@ -325,7 +325,7 @@ After setting this variable, reload the syntax script: >
|
||||
FINDING THE DIFFERENCES *diff-diffexpr*
|
||||
|
||||
The 'diffexpr' option can be set to use something else than the standard
|
||||
"diff" program to compare two files and find the differences.
|
||||
"diff" program to compare two files and find the differences. *E959*
|
||||
|
||||
When 'diffexpr' is empty, Vim uses this command to find the differences
|
||||
between file1 and file2: >
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user