mirror of
https://github.com/sharkdp/bat
synced 2026-08-04 19:01:44 +00:00
Compare commits
1076 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2596bfe7a7 | |||
| 406bffa8c8 | |||
| 48441b99ef | |||
| ce4717144a | |||
| f59d00d4c7 | |||
| dcfdbf82dd | |||
| 0cb884d501 | |||
| 7bc4020a92 | |||
| 0792195156 | |||
| 83f24ffcfb | |||
| 74ec390770 | |||
| 9014ffcfd8 | |||
| 81af375289 | |||
| d707eab95c | |||
| d64c55ef11 | |||
| 2b1d53fb27 | |||
| bf696f58c8 | |||
| 296bad8ffd | |||
| 94310af30c | |||
| 38c096bf79 | |||
| 696d1b3ed3 | |||
| 17d98724a5 | |||
| 7d7ee1b594 | |||
| 682b4209f2 | |||
| 41ddcbd240 | |||
| 48a7ce3bf2 | |||
| 3bcc4d0d55 | |||
| 8821bca656 | |||
| 56111aa20d | |||
| 5fe8a8342b | |||
| 989109145a | |||
| 23afc8e90c | |||
| 8e18786556 | |||
| 81488adf8b | |||
| e37e9c1214 | |||
| a4828387c1 | |||
| abeac8b12e | |||
| 82e7786e74 | |||
| 0064321323 | |||
| 9e622a1a5f | |||
| 59ca933aee | |||
| 793af6b911 | |||
| c8abe3f235 | |||
| 5d71056209 | |||
| eb7d4d002a | |||
| 62b32bd848 | |||
| 8961f7aef8 | |||
| 17f3a3b95d | |||
| 261a7ea154 | |||
| 53a973e9dd | |||
| cba9df746e | |||
| 12eee0c590 | |||
| b76f5e72d4 | |||
| 702cb198da | |||
| 5f826419d1 | |||
| 13f671b499 | |||
| 49f4322054 | |||
| 0c9e044e41 | |||
| 74d4377ed2 | |||
| 6a124591df | |||
| 7a87315b94 | |||
| 0cde4e9121 | |||
| 36dde9275a | |||
| a8f759c080 | |||
| f034be71e7 | |||
| eee35e54e9 | |||
| ec0ce05455 | |||
| 13e6b3fac7 | |||
| 26c951fec4 | |||
| 590960f7f5 | |||
| b4d54106fe | |||
| f3b90ddb38 | |||
| 3bacfc5184 | |||
| f8d0956893 | |||
| 1dc328ad49 | |||
| 5e5cb89da6 | |||
| 057e4eced1 | |||
| 27974616bf | |||
| 319ab779ee | |||
| 37831cdcb3 | |||
| 70480ee9d4 | |||
| 371c929ede | |||
| 864656bd11 | |||
| 2e9cf63a5f | |||
| 886b22e0ee | |||
| 72618db179 | |||
| c8273369cc | |||
| 95a56a2795 | |||
| 859ff50766 | |||
| ce583eb9bf | |||
| 3a195be14e | |||
| 5f6e310152 | |||
| 5449472f15 | |||
| 82e20bfe14 | |||
| 47abb192bc | |||
| 03a7d6be92 | |||
| a927815292 | |||
| 3447a03433 | |||
| 03c2281828 | |||
| c386cb35fb | |||
| 97ea3dd4dc | |||
| a6d9d1551f | |||
| 34619a2e89 | |||
| 83d408bab3 | |||
| 8067fd9eda | |||
| 98ba9e0101 | |||
| 1b8ce60054 | |||
| d5a31dc2ec | |||
| 051dd4ba87 | |||
| 2ad1848859 | |||
| 90e7d2fe33 | |||
| 04fa84aea7 | |||
| a3f8140fbe | |||
| 96aedf6240 | |||
| 4cc2989fe9 | |||
| 0ecc94956b | |||
| 61e47e0c13 | |||
| f5145ef130 | |||
| edd27645d0 | |||
| fc6f4f31dd | |||
| f2cef702a0 | |||
| 8b3d54ce29 | |||
| 47a3721890 | |||
| 495fab24a5 | |||
| fccbe4f4f2 | |||
| 9793bb3938 | |||
| 496dd29cb9 | |||
| 116d76a00f | |||
| dd336e6fb2 | |||
| c33af3581a | |||
| 2f4ecf8fc5 | |||
| e037afeaca | |||
| 7b87af1748 | |||
| 0eee26fb09 | |||
| 3355aeba22 | |||
| 42e3825daf | |||
| 014d754588 | |||
| 4e11abdf9b | |||
| 570805bc98 | |||
| e7e1967bb0 | |||
| 9a050cd87f | |||
| d39507889a | |||
| 3e8d444c78 | |||
| 522ab7a83c | |||
| 0c5b4fcd4a | |||
| 37b3b8730d | |||
| 7c50fe5fec | |||
| 40a827ebcb | |||
| 376c556862 | |||
| 83772bd2cf | |||
| 4aef8c180a | |||
| 131d113ff5 | |||
| 38178fedf4 | |||
| 59f2e2d58d | |||
| 8d3136eb6f | |||
| 136a745c5d | |||
| 5edd8260e8 | |||
| 02f2b55d5f | |||
| 6386a4b812 | |||
| c13935f3c0 | |||
| fb3c775c8b | |||
| 8adce9fae8 | |||
| eb2f3ddb7c | |||
| dfd3ef022e | |||
| 978def2d40 | |||
| 57aed07814 | |||
| bd8a13dbc9 | |||
| ba29e07636 | |||
| 32346612b7 | |||
| 0550a286bd | |||
| dfe5eb3e98 | |||
| 2c2861db6a | |||
| bb0a3d586e | |||
| 90397a8aac | |||
| 84ba323b1c | |||
| a8851e1307 | |||
| d4a39f99d2 | |||
| 8c500a7e40 | |||
| acf51bd7b3 | |||
| 83dc13a86d | |||
| 094c526a0e | |||
| 62f2d0c100 | |||
| fc1ca0875a | |||
| a7338e2ea2 | |||
| 9b8ddb24d1 | |||
| 7e0115641d | |||
| fedd32173e | |||
| 4855a47105 | |||
| 06b7be7ee9 | |||
| cfa2cb6ec7 | |||
| b1b8addf7e | |||
| 4be5adc6f5 | |||
| a9a31dca7f | |||
| 517be5c7bc | |||
| 9a9902bf9b | |||
| 4e40d4c720 | |||
| 916c1e4359 | |||
| 439be03634 | |||
| b611d2aef4 | |||
| a2075b0f24 | |||
| 3c1dd8558d | |||
| 17382d36b7 | |||
| 2e07aabb74 | |||
| f525fb974e | |||
| edf62953c4 | |||
| 260c5dcb75 | |||
| 1bc62cd7b5 | |||
| b1183f72a5 | |||
| a5e98146fb | |||
| 6d32d3dbec | |||
| c6bbca62ef | |||
| dd9755f223 | |||
| 61e39158de | |||
| 65023a987e | |||
| 91843f6f65 | |||
| 696547b646 | |||
| 4d2682325b | |||
| 65811d9034 | |||
| f2b7c060a3 | |||
| 08dd251b9c | |||
| d081473261 | |||
| 3901480c59 | |||
| 1cad3f56ec | |||
| 147503bd56 | |||
| d1b0e955ea | |||
| 4021cf8128 | |||
| 7155f76963 | |||
| b63f31e15d | |||
| 9c3d8c4028 | |||
| d33b7071e3 | |||
| ca066bf7cd | |||
| 4ac3161c19 | |||
| d479e07bcb | |||
| 369ba7bb0a | |||
| 9df85edc4c | |||
| d007caf39c | |||
| 7d453dfdc5 | |||
| 60f48a0c91 | |||
| 25640a8a81 | |||
| 944866affd | |||
| 22ded00824 | |||
| 85e84ab3eb | |||
| 993b76654d | |||
| 2b2743b120 | |||
| f01263bcff | |||
| 8648b86a73 | |||
| 39d9343a7d | |||
| 5faf7ca158 | |||
| ebe475247c | |||
| 63f6343cf1 | |||
| ad42b275a9 | |||
| 2dac1c8785 | |||
| 1225e65299 | |||
| d1bb47d741 | |||
| f079c14068 | |||
| 388f4c71fd | |||
| b675e1bb61 | |||
| f96220f33d | |||
| 6739230039 | |||
| 710018b845 | |||
| 7779d9f622 | |||
| e98f34b1e8 | |||
| 9ace915d71 | |||
| e5c415555d | |||
| 5ef1c6cce2 | |||
| 93881d9a64 | |||
| 87776ae07e | |||
| 6c71a4324b | |||
| 90ee939671 | |||
| cae06bf649 | |||
| 89220da47b | |||
| 903af3ee09 | |||
| 0418e6294b | |||
| eabd100dad | |||
| f66a5bfa42 | |||
| 8d0b8a227b | |||
| e400ebd1bd | |||
| 6684c0b07a | |||
| 6568d03924 | |||
| 67fe804256 | |||
| 126729f87a | |||
| 0aca27511a | |||
| 77ff853739 | |||
| 20ba984c6d | |||
| 6311ca22f9 | |||
| 41d547532f | |||
| e9156f8090 | |||
| 1eaa681c7e | |||
| d96ae099ef | |||
| 40e5befdc7 | |||
| f94ff93953 | |||
| 3523f60299 | |||
| 83dc8468b0 | |||
| 826624c9fa | |||
| 0fed098c53 | |||
| cc7eafb7fb | |||
| f35c41ba13 | |||
| 1f4246eb3c | |||
| 9300392c43 | |||
| 8d3ce5f88a | |||
| a1d18d8c8c | |||
| d43431d8f1 | |||
| 8baa76aa8f | |||
| 01846fad30 | |||
| 18255f9835 | |||
| 7b94f2c1d7 | |||
| 7ca73c2e79 | |||
| 75cb1ce196 | |||
| 35026a033a | |||
| 48031f282c | |||
| 7b2e98d5b7 | |||
| fb71b67a8d | |||
| d48f51e39d | |||
| 9b1930b2b3 | |||
| 96d8013581 | |||
| 46b345f2c2 | |||
| 4e5b40e274 | |||
| d0e7ca159a | |||
| e981e97407 | |||
| a8ec3b826c | |||
| f4a59d74f1 | |||
| b9b6d9e31e | |||
| d65ae517dd | |||
| bb675e57c7 | |||
| 9fe38e200e | |||
| a2fcb09d7a | |||
| 8c7916e128 | |||
| 3d23daa7b4 | |||
| 572cbb00e2 | |||
| dedaebdf15 | |||
| 3d90c6adee | |||
| 06a521ec34 | |||
| 37f7c94ba4 | |||
| 396e1ac6b6 | |||
| 49e2073910 | |||
| 7d18649284 | |||
| 850677f121 | |||
| c132e19e74 | |||
| 3334f74b72 | |||
| b9ce3c248c | |||
| 310654d49f | |||
| 3f37d292ec | |||
| 0a42d2b897 | |||
| 3b5fcf4619 | |||
| ab2a6ad1d5 | |||
| 7db30f9123 | |||
| 59f2b30768 | |||
| 9fb14d78e1 | |||
| 921a65f0a1 | |||
| b9c07e52e8 | |||
| edbb4b2fc9 | |||
| 15b1676b72 | |||
| 753a124ef2 | |||
| 58a4d009fa | |||
| 4664fb6f91 | |||
| e287594654 | |||
| 1e19404736 | |||
| 2253d07341 | |||
| 7208a63a49 | |||
| 0273848f54 | |||
| e542621125 | |||
| 26439b41d2 | |||
| a2ee753b25 | |||
| d3243903c0 | |||
| cf68b13322 | |||
| 837d0998da | |||
| 23d80f9e84 | |||
| e981bd88c1 | |||
| 710a1df4ff | |||
| cfd33168af | |||
| eefdb186b8 | |||
| fc0ad4db2e | |||
| f03b45f3e5 | |||
| 9a74bf1a88 | |||
| ff0b331dd6 | |||
| 00bfbbf884 | |||
| e44045a71a | |||
| 962abcef80 | |||
| 95f2e5bbb7 | |||
| f46123e149 | |||
| f0f77b1673 | |||
| 39112e80c3 | |||
| a84c598e2c | |||
| 6b2f78ec51 | |||
| 938005864f | |||
| 3a5f8ece49 | |||
| 047a6f3b85 | |||
| f09b75dafa | |||
| 54ec2e7bd0 | |||
| e57b2e9528 | |||
| ea2179b352 | |||
| c8478cedc5 | |||
| 1692e5fef7 | |||
| 7ba5bc78b7 | |||
| 25c2e1725e | |||
| 853e48e3f3 | |||
| f5d359927a | |||
| 4df5973fde | |||
| 45f3c73331 | |||
| 4102175d98 | |||
| 30ee2a464f | |||
| 7a5d1f27e7 | |||
| ac5ff9d454 | |||
| c9c3341a38 | |||
| a736889ef1 | |||
| ea5e096705 | |||
| 12330fd154 | |||
| 337ee568b1 | |||
| 608cefb05c | |||
| 8d0aa39181 | |||
| 5815364206 | |||
| 79f016e15c | |||
| 26f9125ebb | |||
| 9814eab13f | |||
| 82ca8804a2 | |||
| b48b9fcf3b | |||
| c64ab29739 | |||
| 83dd3fb551 | |||
| ed345f2889 | |||
| d2492980c0 | |||
| 47d5130764 | |||
| 4ba45e2ba2 | |||
| 7076ae5cd9 | |||
| 2e71146801 | |||
| f3824bad17 | |||
| ec908d5937 | |||
| 3a75d85b80 | |||
| 63d652dab5 | |||
| 7f2e61d579 | |||
| e289a2c698 | |||
| 83a213bae7 | |||
| 3967e28ded | |||
| 2dc2a3712a | |||
| 10e0f9efb0 | |||
| f8ea075e78 | |||
| c187dce2c2 | |||
| 108c907d69 | |||
| 187a3b9341 | |||
| 9c2d4f6a51 | |||
| c1126157d4 | |||
| dcfa810112 | |||
| f963104006 | |||
| 45e1c0ea6f | |||
| 590a1e9a4b | |||
| 8e2c6abb13 | |||
| 28266ee441 | |||
| 21821f1d4c | |||
| 772ce2e4fe | |||
| 35ca1c5191 | |||
| 0cc60a1519 | |||
| ee6659dacf | |||
| 76c615a304 | |||
| e8c04672f0 | |||
| 7f5a5612e4 | |||
| eee5d424bb | |||
| e5311e4b30 | |||
| a1b9334a44 | |||
| d86b7cf7e0 | |||
| 67834da681 | |||
| dcdf8dfaa7 | |||
| 9a44fa11c0 | |||
| 4ee0b2e16d | |||
| 518997135e | |||
| 69fc1caead | |||
| 175dd4c290 | |||
| e9210c0f6c | |||
| 3795acbd17 | |||
| c7d08cfcfd | |||
| 8ec96da9f0 | |||
| c9d7e3652b | |||
| dfa024f9e6 | |||
| b2757cb461 | |||
| 416a0fd439 | |||
| 9b1b3dda14 | |||
| ae7db313a6 | |||
| 3c4384990d | |||
| 260814c377 | |||
| 3675a82a1b | |||
| 5b2b594919 | |||
| 9d53ce6be6 | |||
| 51e05499a9 | |||
| dd40f7545d | |||
| c709bf2103 | |||
| f37dbb80a8 | |||
| 0a1e08da96 | |||
| 06b8dcb7eb | |||
| 493a4e719e | |||
| 27e0ca98d9 | |||
| 1b2066c5f2 | |||
| 4ec3cdb5b8 | |||
| 72152296c7 | |||
| 2b9d25df05 | |||
| cc8186103b | |||
| 0ad09df7ab | |||
| 7ef0fe091d | |||
| 89fcbb2b15 | |||
| a7e2bb86cb | |||
| 1ce0bc8e0d | |||
| fde00eec98 | |||
| bb6594e691 | |||
| e7c5561df7 | |||
| 0aabbc03d7 | |||
| 8a5b59febc | |||
| 7afdd44c43 | |||
| d72549a873 | |||
| 1ba8540e5f | |||
| a6cee4da67 | |||
| cd6850947e | |||
| 14bfedeb20 | |||
| 8fe65252f7 | |||
| 5e9351445f | |||
| 2fdfb8de40 | |||
| f8c759edff | |||
| e34431f922 | |||
| c96927b550 | |||
| 921cc0d1cb | |||
| dbc49e534a | |||
| 7755ed79e0 | |||
| 50aabf331d | |||
| f259ff2920 | |||
| 82f14121bd | |||
| a21ae614e6 | |||
| b94c94e845 | |||
| 161d107ec3 | |||
| ecf147fd96 | |||
| f0771d6532 | |||
| d8f28c177a | |||
| fbee9df719 | |||
| 6e9ca7d6dc | |||
| a9ec5c063a | |||
| 8470fd7173 | |||
| 76b7418e35 | |||
| 10c5f79640 | |||
| 9e11d66979 | |||
| fa3244f7c1 | |||
| 906774e6d3 | |||
| cec9cc073c | |||
| a16789a060 | |||
| e09499b3df | |||
| cff01d81fa | |||
| 31608c9a03 | |||
| 357ce84c56 | |||
| 3a5c52641b | |||
| 6e8fca5bb2 | |||
| 63c77383ce | |||
| 4df22e617f | |||
| 6473e8c1be | |||
| 972a764a74 | |||
| 54143d1403 | |||
| 6523bbf62f | |||
| 05e2c2c66b | |||
| 69227222b5 | |||
| 49af3e854b | |||
| 6a8e4757b7 | |||
| 91deef8b13 | |||
| 61e888de7f | |||
| f3f9f10f05 | |||
| 29ffa2a832 | |||
| 42a873fdb8 | |||
| 82f048aedb | |||
| ae08785ec8 | |||
| a500629359 | |||
| 724a5fac99 | |||
| c483e49b92 | |||
| 94c9b40694 | |||
| 0c9dc3b257 | |||
| 3b5174bb1d | |||
| 3324505383 | |||
| de7872f8a8 | |||
| abf0229741 | |||
| e04bccd12d | |||
| 668c8a6703 | |||
| bd68684537 | |||
| c2847f6a9f | |||
| cf7ed042c1 | |||
| 6b92814ea0 | |||
| a236a9b195 | |||
| b68c5d8576 | |||
| fee57d71d9 | |||
| 5d3205acc0 | |||
| 4e6816abd6 | |||
| 72e8036edc | |||
| 397def1320 | |||
| d2d29180a7 | |||
| 2f263c9fbf | |||
| 4ff360669f | |||
| 549e5d7355 | |||
| dd48d29c28 | |||
| 98ee5f7400 | |||
| 638c04c13e | |||
| b1c865acaa | |||
| d3d795ffb2 | |||
| 0571c51487 | |||
| 348c9f3562 | |||
| 6b6a8f8e16 | |||
| 6aa002850c | |||
| 49c22c8d39 | |||
| 673caf6b59 | |||
| e6ffab3cb4 | |||
| 4e43f8fa74 | |||
| bac1b16885 | |||
| 778a4929a8 | |||
| 5c22dd4248 | |||
| 214cd0f8ea | |||
| 9fd61fcb6d | |||
| edf1d3b256 | |||
| eca47b2a28 | |||
| 62424e70d7 | |||
| 4791f15222 | |||
| 159f234b78 | |||
| 3ec96127f2 | |||
| a9acb2711b | |||
| a3182e68e4 | |||
| 0691b18231 | |||
| c711cd1b2e | |||
| 14e6b41a5f | |||
| 532af6556d | |||
| 26717b0cd2 | |||
| 1f177f0a1c | |||
| 54c81fa543 | |||
| 34dee9e3aa | |||
| c073d4a118 | |||
| e79c5516bf | |||
| 4776c2a575 | |||
| f98a96c1ed | |||
| 8a3446d219 | |||
| 5d5bf616ca | |||
| b68c038db8 | |||
| 1117d2f9cb | |||
| d0ba5bcb32 | |||
| f8d39d5624 | |||
| 9998e2eac6 | |||
| 7cac07d845 | |||
| 148caa1381 | |||
| ab27cac0cc | |||
| 01fcbf2183 | |||
| 8a0c30b385 | |||
| bc21c4d0e0 | |||
| 0800562ba2 | |||
| 1f9befbcd1 | |||
| a5c779c518 | |||
| f37f100352 | |||
| 18d1a3b973 | |||
| dc10246bd2 | |||
| 44bdae0212 | |||
| 1ece38a4c4 | |||
| e90308e1f8 | |||
| d702d6740c | |||
| c6a526f99c | |||
| 278d841408 | |||
| 5f576f1ecf | |||
| 48c6ea6b25 | |||
| 558134f6c8 | |||
| 1dd57e6d7e | |||
| 20ba84d1fa | |||
| e81f9b23e6 | |||
| 50dc4a79b0 | |||
| 8fa8f44706 | |||
| ecd862d9ff | |||
| cbed338c3a | |||
| 4492d99556 | |||
| d96ee2261f | |||
| dda27b253b | |||
| 78f26d0caf | |||
| abcd09f869 | |||
| 41a5ff039b | |||
| 155bad3862 | |||
| 7c98a1c901 | |||
| c1246fcd53 | |||
| 9f401ea122 | |||
| 9c782fb692 | |||
| 154186a58d | |||
| b22a9f8fe3 | |||
| 5219c40ed8 | |||
| a25ee0e6fd | |||
| 496e0bc046 | |||
| 7082fd09f0 | |||
| 857cc215b4 | |||
| 481268f018 | |||
| f7d9f49503 | |||
| 88fcfd76aa | |||
| 76e34b29ec | |||
| 01984e1d02 | |||
| 536390509f | |||
| 58198d0700 | |||
| afc5aacb28 | |||
| 30b742e984 | |||
| 671deeef8c | |||
| a892caeb33 | |||
| a770cbf25e | |||
| 931c6e9414 | |||
| 8dc7e2efa3 | |||
| 10965a6122 | |||
| e43d97dc15 | |||
| 2c7087b8de | |||
| bb1f5aa841 | |||
| 2109a7830b | |||
| ec27c78a8a | |||
| 67fe833bc8 | |||
| e956225b4d | |||
| 314ec881ef | |||
| 25a6a55437 | |||
| 5bff4548be | |||
| 866b9e16a8 | |||
| 5af176c94f | |||
| 9e7da05459 | |||
| 1ae02c65fb | |||
| 495e7fd3b1 | |||
| b48f0fe389 | |||
| c19c704a43 | |||
| 693bd5929d | |||
| 8275b0436d | |||
| 278bde5cee | |||
| eee7e5a575 | |||
| ad7b634ee6 | |||
| 1310f83c8d | |||
| 897b9e7030 | |||
| 1891e194b5 | |||
| cea05e9f22 | |||
| d2d01b9fe8 | |||
| 2a7851530d | |||
| 1a6709c2cb | |||
| 5842d58c01 | |||
| e3c71adba7 | |||
| 504f28b3a1 | |||
| d977ba9194 | |||
| 9c09799e1f | |||
| d83c93c805 | |||
| fc8fd1e63f | |||
| 404d6a4a81 | |||
| 25d96da4a2 | |||
| e97095b724 | |||
| ce96df00b6 | |||
| f98fc5f06a | |||
| 1dbb4ef683 | |||
| 0502a3bd4a | |||
| 869cf6368c | |||
| 078228deac | |||
| e09d7dabb8 | |||
| 6d1cc8c2c8 | |||
| 87f021078e | |||
| d5b0502419 | |||
| 860f3e9006 | |||
| 1be346a038 | |||
| f9fd5e4851 | |||
| da09f3877b | |||
| e30e1bab2e | |||
| f140f6da46 | |||
| 3446fdf5f2 | |||
| e1345cdc2a | |||
| a2676ccc55 | |||
| b39e28d2c8 | |||
| 0d71968615 | |||
| 80da0dc619 | |||
| 64903bb858 | |||
| 3456ce1187 | |||
| 886a5b3d24 | |||
| 238482e5f3 | |||
| 79b960e17e | |||
| 6aa626f1c4 | |||
| 1b30539493 | |||
| 96b24d8a7e | |||
| 20b02e72b3 | |||
| 254efac9c2 | |||
| dcec322117 | |||
| d781156327 | |||
| 732750c274 | |||
| 6b6baa3118 | |||
| 54c434934e | |||
| ad6e0a2581 | |||
| bd619db3ca | |||
| e098eb43a2 | |||
| ea369ee17f | |||
| 63d32bc818 | |||
| dccf8d8221 | |||
| 97129ab9d8 | |||
| 52d0d6ca30 | |||
| a05494e9d9 | |||
| 84ac92efbb | |||
| b4c6e412dc | |||
| 3e21d69a92 | |||
| b7690d4bb1 | |||
| d404139ff7 | |||
| 9ef1e9f792 | |||
| 503fe0b641 | |||
| 1807f9653c | |||
| 1e74f0e2a9 | |||
| c1e1f753cf | |||
| d90797f8e9 | |||
| b4096e5627 | |||
| 4e3ab4d399 | |||
| f0d936763c | |||
| 7897260bf0 | |||
| eb6e43b9a9 | |||
| 7cdcdbb31d | |||
| 9159341714 | |||
| b23ff24ebc | |||
| e1ecc17f69 | |||
| 0fe3badf19 | |||
| 89d4cb951a | |||
| e9681bf22d | |||
| 1b6df8a480 | |||
| cf24986edb | |||
| b9c556a0b6 | |||
| 9d6bde48fa | |||
| d6c8fee044 | |||
| 8b4abb03db | |||
| 375cf76e15 | |||
| 1a4acc435e | |||
| d8030626f8 | |||
| fb61aa4f60 | |||
| 76df41fa97 | |||
| 97efd75cee | |||
| 53d0c1deca | |||
| 155179a07a | |||
| ba00caf9c3 | |||
| ac418ba21c | |||
| acde83af31 | |||
| 021a68eb21 | |||
| 566aab3b05 | |||
| f88eba6476 | |||
| 1d9e7ac4c2 | |||
| 80ae2ecbf8 | |||
| 96d4492d27 | |||
| c90f0b8e21 | |||
| 4b866ab6af | |||
| 2dbd91e543 | |||
| 785da3d9df | |||
| d455cb7c32 | |||
| d2b4766f92 | |||
| 5cf92b4f94 | |||
| 7b803a50af | |||
| 67ec5fe2b7 | |||
| 3447ed4def | |||
| 532fb921a6 | |||
| ba4d5a2e7d | |||
| 026273a05c | |||
| 8903b64830 | |||
| 194155f062 | |||
| a6ff3b900d | |||
| 8a52bcf92d | |||
| 0b1535f63b | |||
| 0a5b3eaf3e | |||
| 11294249f8 | |||
| 35a1236ad0 | |||
| af8da50c2c | |||
| 649d1e3df2 | |||
| 199cfd4519 | |||
| c7cce0752b | |||
| 3a89486189 | |||
| 720a2fb7a5 | |||
| e3c990f11e | |||
| 90c7d0c365 | |||
| 56002267d2 | |||
| 84734eac9d | |||
| acdea97e71 | |||
| 839e4ee611 | |||
| c7afcdebf8 | |||
| 08e6db1581 | |||
| 4d08ecd828 | |||
| 28e1d0e613 | |||
| d11839ad03 | |||
| 8cacd9b432 | |||
| 6f67444c99 | |||
| fd2b376ea0 | |||
| cda54e4f61 | |||
| 3b90ada735 | |||
| 1837d364fe | |||
| 4ea3e6bbb7 | |||
| 38544ed735 | |||
| 5444b0dfed | |||
| f3dde0185d | |||
| 2e3784aa30 | |||
| 1088455702 | |||
| 4f812c32ab | |||
| b6c59a5bd4 | |||
| b682679776 | |||
| 81771432fb | |||
| 627181bcb6 | |||
| 226d9a573a | |||
| 246cf79dbd | |||
| ea955c734d | |||
| 6223ad6d52 | |||
| 31a9335bd5 | |||
| 9316f2a758 | |||
| c884c3cc12 | |||
| 08850f0474 | |||
| 8e6c5bc562 | |||
| 052425b12f | |||
| 2df3305b94 | |||
| 6882fc1512 | |||
| 2508323264 | |||
| 297afad337 | |||
| 1dddce3aa1 | |||
| 76be0d3933 | |||
| e5b8c4471a | |||
| b191691767 | |||
| 5c95b8803b | |||
| 5b421b455d | |||
| a6d6c28723 | |||
| 2966939e38 | |||
| d179693d1d | |||
| 268577c6f9 | |||
| 037861e588 | |||
| 94ccc646e8 | |||
| 0cc5d1dab6 | |||
| 28397b8f78 | |||
| c899849101 | |||
| bf53b64125 | |||
| c68aa0f424 | |||
| 6b57f4eebc | |||
| 0ddd388a29 | |||
| 34811b8161 | |||
| 8b92aae23f | |||
| 3a0941cabe | |||
| 52877c6d67 | |||
| 455de98a89 | |||
| 8c6a74a6c5 | |||
| 3f8b340ed8 | |||
| 65e6970907 | |||
| 90cc019482 | |||
| eaf0b99d25 | |||
| 3b1dcca5d0 | |||
| 26dbdf4fa0 | |||
| 6691786d82 | |||
| 50209bfe21 | |||
| c91511cca1 | |||
| c9f7a0c126 | |||
| 69c798eafd | |||
| 195d5e0e16 | |||
| 86c1777205 | |||
| 16874ab016 | |||
| bf5883f06f | |||
| e27bdfc7d6 | |||
| a7f4f202cb | |||
| 397223374a | |||
| 0c2da90fa4 | |||
| fe29da6e76 | |||
| 0eccfb50d9 | |||
| f74263e71d | |||
| 54f4896ced | |||
| 9d92350cbb | |||
| 26d409db65 | |||
| 06cd4b2ce8 | |||
| a348a9f68e | |||
| 39e2971e96 | |||
| a13eb60df3 | |||
| 9342d0bb24 | |||
| 36d7250af2 | |||
| 2ce8655167 | |||
| a452467e06 | |||
| 2ea3758c4b | |||
| 65bb4c7ee6 | |||
| 556149ad3a | |||
| 33bbf25468 | |||
| 5ee8913538 | |||
| 9b1c1c0271 | |||
| 2712d63a4b | |||
| b21fb6bca8 | |||
| ee43377a9c | |||
| 120b33a9db | |||
| 17b37fedcb | |||
| 1013cdd80a | |||
| be0a2d6048 | |||
| d1a1943998 | |||
| 2a9f5a24ed | |||
| a0ae089c4a | |||
| 96cc391f2d | |||
| a1e1170319 | |||
| 54a331d162 | |||
| 5e3b17e6f7 | |||
| 486e6a19cd | |||
| 247dfbee83 | |||
| 882931a77b | |||
| 12cb438aa4 | |||
| d0782ef954 | |||
| c826c2a438 | |||
| 9aa97b6c22 | |||
| f7890870ea | |||
| 145b99f01c | |||
| 9af1d2b891 | |||
| 2eee68599d | |||
| d569693dab | |||
| 900f61032d | |||
| d0ca566979 | |||
| a5a7dc14e4 | |||
| 54b33c8c21 | |||
| a5de77af4d | |||
| 870ff7b538 | |||
| 15b9acd12f | |||
| b327127f37 | |||
| 9214a4a4f0 | |||
| fcecd97224 | |||
| 870b3c0daf | |||
| b9c780c8c8 | |||
| ca865f9d26 | |||
| 3ee0e56315 | |||
| 091b0b6437 | |||
| 9f005d115d | |||
| b4cfc9633c | |||
| f7e055b6b7 | |||
| d4b438b9d3 | |||
| cd26d403a3 | |||
| f95a23f948 | |||
| 0886a24685 | |||
| 53eb9c57d6 | |||
| 026a9ebae3 | |||
| bdd10b8bec | |||
| fc160b0dcd | |||
| cb7b158172 | |||
| fcc36b1f79 | |||
| 4e4110bf50 | |||
| 22c8978fca | |||
| f711fb5006 | |||
| 64a9341b73 | |||
| ccf88fd5d8 | |||
| 6343535eb2 | |||
| e2ac6de783 | |||
| 25cee002f9 | |||
| 13a53d230b | |||
| ea27053a63 | |||
| b2b932f3ed | |||
| 747d074be1 | |||
| 61109ece15 | |||
| 389edd7239 | |||
| 23813cc08b | |||
| fdeb98e859 | |||
| 6a417886aa | |||
| 8b9991d780 | |||
| f59ddd1e36 | |||
| f90b9d1acc | |||
| f7af537018 | |||
| fd68af8031 | |||
| ebdef04c8f | |||
| a4150600af | |||
| 49223eed06 | |||
| 7dc7133b3c | |||
| e5e47716b0 | |||
| b4f8cd3bae | |||
| ee3a37f3fc | |||
| 4c60ab12cc | |||
| ac32dd17c9 | |||
| 4e3c57cc7c | |||
| 438a9a99ed | |||
| 9b0877102c | |||
| 67bed73e15 | |||
| ef7c39b159 | |||
| 8a399c8d7d | |||
| 9a0e444e09 | |||
| 438f3df345 | |||
| 7e2e0c82ac | |||
| da92154163 | |||
| 179bd4f525 | |||
| 53d67e2b6e | |||
| b625d07c34 | |||
| ec606e5dcc | |||
| c253821a5e | |||
| ccb1d78b22 | |||
| 9eb64b97fe | |||
| 15f0268bdc | |||
| 3fa70deaa7 | |||
| d4553c6b38 | |||
| 23d92d7641 | |||
| 92729430fc | |||
| 3eb79d63ce | |||
| 0483407775 | |||
| cbdf5c50c4 | |||
| 418b3c5ea1 | |||
| 9dca3126b3 | |||
| 7df9a5fe82 | |||
| 4bba08062c | |||
| 4e8ea815af | |||
| b7bc2d54ba | |||
| 21f9e2b0f7 | |||
| 92aa2b547e | |||
| 65f66d0bee |
@@ -0,0 +1,39 @@
|
|||||||
|
---
|
||||||
|
name: Bug Report
|
||||||
|
about: Report a bug.
|
||||||
|
title: ""
|
||||||
|
labels: bug
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Hey there, thanks for creating an issue!
|
||||||
|
|
||||||
|
In order to reproduce your issue, we might need to know a little bit more about the environment
|
||||||
|
which you're running `bat` on.
|
||||||
|
|
||||||
|
If you're on Linux or MacOS:
|
||||||
|
Please run the script at https://github.com/sharkdp/bat/blob/master/diagnostics/info.sh and
|
||||||
|
paste the output at the bottom of the bug report.
|
||||||
|
|
||||||
|
If you're on Windows:
|
||||||
|
Please tell us about your Windows Version (e.g. "Windows 10 1908") at the
|
||||||
|
bottom of the bug report.
|
||||||
|
-->
|
||||||
|
|
||||||
|
**What version of `bat` are you using?**
|
||||||
|
[paste the output of `bat --version` here]
|
||||||
|
|
||||||
|
**Describe the bug you encountered:**
|
||||||
|
...
|
||||||
|
|
||||||
|
**Describe what you expected to happen?**
|
||||||
|
...
|
||||||
|
|
||||||
|
**How did you install `bat`?**
|
||||||
|
apt-get, homebrew, GitHub release, etc.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
[paste the output of `info.sh` here]
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
blank_issues_enabled: true
|
||||||
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
name: Feature Request
|
||||||
|
about: Suggest an idea for this project.
|
||||||
|
title: ''
|
||||||
|
labels: feature-request
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
name: Question
|
||||||
|
about: Ask a question about 'bat'.
|
||||||
|
title: ''
|
||||||
|
labels: question
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
---
|
||||||
|
name: Syntax Request
|
||||||
|
about: Request adding a new syntax to bat.
|
||||||
|
title: ""
|
||||||
|
labels: syntax-request
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<!--
|
||||||
|
BEFORE YOU MAKE A REQUEST:
|
||||||
|
|
||||||
|
Are you looking to add a new syntax to use on one of your devices?
|
||||||
|
Bat supports locally-installed language definitions. See the link below:
|
||||||
|
|
||||||
|
https://github.com/sharkdp/bat#adding-new-syntaxes--language-definitions
|
||||||
|
|
||||||
|
If you think adding this syntax would help others as well, please make sure that it meets our
|
||||||
|
guidelines for adding new syntaxes:
|
||||||
|
|
||||||
|
- 10,000 downloads on packagecontrol.io
|
||||||
|
-->
|
||||||
|
|
||||||
|
|
||||||
|
**Syntax:**
|
||||||
|
[Name or description of the syntax/language here]
|
||||||
|
|
||||||
|
**Guideline Criteria:**
|
||||||
|
[packagecontro.io link here]
|
||||||
+5
-1
@@ -1,3 +1,7 @@
|
|||||||
|
|
||||||
/target/
|
/target/
|
||||||
**/*.rs.bk
|
**/*.rs.bk
|
||||||
|
|
||||||
|
# Generated files
|
||||||
|
/assets/completions/bat.fish
|
||||||
|
/assets/manual/bat.1
|
||||||
|
/assets/metadata.yaml
|
||||||
|
|||||||
+190
@@ -0,0 +1,190 @@
|
|||||||
|
[submodule "assets/syntaxes/Elixir"]
|
||||||
|
path = assets/syntaxes/02_Extra/Elixir
|
||||||
|
url = https://github.com/princemaple/elixir-sublime-syntax/
|
||||||
|
[submodule "assets/syntaxes/Packages"]
|
||||||
|
path = assets/syntaxes/01_Packages
|
||||||
|
url = https://github.com/sublimehq/Packages/
|
||||||
|
[submodule "assets/syntaxes/TOML"]
|
||||||
|
path = assets/syntaxes/02_Extra/TOML
|
||||||
|
url = https://github.com/jasonwilliams/sublime_toml_highlighting
|
||||||
|
[submodule "assets/syntaxes/Julia"]
|
||||||
|
path = assets/syntaxes/02_Extra/Julia
|
||||||
|
url = https://github.com/JuliaEditorSupport/Julia-sublime
|
||||||
|
[submodule "assets/themes/sublime-monokai-extended"]
|
||||||
|
path = assets/themes/sublime-monokai-extended
|
||||||
|
url = https://github.com/jonschlinkert/sublime-monokai-extended
|
||||||
|
[submodule "assets/syntaxes/Docker"]
|
||||||
|
path = assets/syntaxes/02_Extra/Docker
|
||||||
|
url = https://github.com/asbjornenge/Docker.tmbundle
|
||||||
|
[submodule "assets/syntaxes/VimL"]
|
||||||
|
path = assets/syntaxes/02_Extra/VimL
|
||||||
|
url = https://github.com/SalGnt/Sublime-VimL
|
||||||
|
[submodule "assets/syntaxes/INI"]
|
||||||
|
path = assets/syntaxes/02_Extra/INI
|
||||||
|
url = https://github.com/clintberry/sublime-text-2-ini
|
||||||
|
[submodule "assets/syntaxes/CMake"]
|
||||||
|
path = assets/syntaxes/02_Extra/CMake
|
||||||
|
url = https://github.com/zyxar/Sublime-CMakeLists
|
||||||
|
[submodule "assets/syntaxes/LESS"]
|
||||||
|
path = assets/syntaxes/02_Extra/LESS
|
||||||
|
url = https://github.com/danro/LESS-sublime
|
||||||
|
[submodule "assets/themes/DarkNeon"]
|
||||||
|
path = assets/themes/DarkNeon
|
||||||
|
url = https://github.com/RainyDayMedia/DarkNeon
|
||||||
|
[submodule "assets/themes/github-sublime-theme"]
|
||||||
|
path = assets/themes/github-sublime-theme
|
||||||
|
url = https://github.com/AlexanderEkdahl/github-sublime-theme
|
||||||
|
[submodule "assets/themes/1337-Scheme"]
|
||||||
|
path = assets/themes/1337-Scheme
|
||||||
|
url = https://github.com/MarkMichos/1337-Scheme
|
||||||
|
[submodule "assets/themes/TwoDark"]
|
||||||
|
path = assets/themes/TwoDark
|
||||||
|
url = https://github.com/erremauro/TwoDark
|
||||||
|
[submodule "assets/syntaxes/AWK"]
|
||||||
|
path = assets/syntaxes/02_Extra/AWK
|
||||||
|
url = https://github.com/JohnNilsson/awk-sublime
|
||||||
|
[submodule "assets/syntaxes/Nix"]
|
||||||
|
path = assets/syntaxes/02_Extra/Nix
|
||||||
|
url = https://github.com/wmertens/sublime-nix
|
||||||
|
[submodule "assets/themes/zenburn"]
|
||||||
|
path = assets/themes/zenburn
|
||||||
|
url = https://github.com/colinta/zenburn.git
|
||||||
|
[submodule "assets/syntaxes/Kotlin"]
|
||||||
|
path = assets/syntaxes/02_Extra/Kotlin
|
||||||
|
url = https://github.com/vkostyukov/kotlin-sublime-package
|
||||||
|
[submodule "assets/syntaxes/Elm"]
|
||||||
|
path = assets/syntaxes/02_Extra/Elm
|
||||||
|
url = https://github.com/elm-community/SublimeElmLanguageSupport
|
||||||
|
[submodule "assets/syntaxes/TypeScript"]
|
||||||
|
path = assets/syntaxes/02_Extra/TypeScript
|
||||||
|
url = https://github.com/Microsoft/TypeScript-Sublime-Plugin
|
||||||
|
[submodule "assets/syntaxes/Puppet"]
|
||||||
|
path = assets/syntaxes/02_Extra/Puppet
|
||||||
|
url = https://github.com/russCloak/SublimePuppet
|
||||||
|
[submodule "assets/syntaxes/CSV"]
|
||||||
|
path = assets/syntaxes/02_Extra/CSV
|
||||||
|
url = https://github.com/wadetb/Sublime-Text-Advanced-CSV
|
||||||
|
[submodule "assets/themes/onehalf"]
|
||||||
|
path = assets/themes/onehalf
|
||||||
|
url = https://github.com/sonph/onehalf
|
||||||
|
[submodule "assets/syntaxes/JavaScript (Babel)"]
|
||||||
|
path = assets/syntaxes/02_Extra/JavaScript (Babel)
|
||||||
|
url = https://github.com/babel/babel-sublime
|
||||||
|
[submodule "assets/syntaxes/Cabal"]
|
||||||
|
path = assets/syntaxes/02_Extra/Cabal
|
||||||
|
url = https://github.com/SublimeHaskell/SublimeHaskell
|
||||||
|
[submodule "assets/syntaxes/Dart"]
|
||||||
|
path = assets/syntaxes/02_Extra/Dart
|
||||||
|
url = https://github.com/guillermooo/dart-sublime-bundle
|
||||||
|
[submodule "assets/syntaxes/FSharp"]
|
||||||
|
path = assets/syntaxes/02_Extra/FSharp
|
||||||
|
url = https://github.com/hoest/sublimetext-fsharp
|
||||||
|
[submodule "assets/syntaxes/PureScript"]
|
||||||
|
path = assets/syntaxes/02_Extra/PureScript
|
||||||
|
url = https://github.com/tellnobody1/sublime-purescript-syntax
|
||||||
|
[submodule "assets/syntaxes/Swift"]
|
||||||
|
path = assets/syntaxes/02_Extra/Swift
|
||||||
|
url = https://github.com/quiqueg/Swift-Sublime-Package
|
||||||
|
[submodule "assets/syntaxes/Crystal"]
|
||||||
|
path = assets/syntaxes/02_Extra/Crystal
|
||||||
|
url = https://github.com/crystal-lang-tools/sublime-crystal.git
|
||||||
|
[submodule "assets/syntaxes/PowerShell"]
|
||||||
|
path = assets/syntaxes/02_Extra/PowerShell
|
||||||
|
url = https://github.com/PowerShell/EditorSyntax
|
||||||
|
[submodule "assets/syntaxes/Robot"]
|
||||||
|
path = assets/syntaxes/02_Extra/Robot
|
||||||
|
url = https://github.com/andriyko/sublime-robot-framework-assistant.git
|
||||||
|
[submodule "assets/themes/sublime-snazzy"]
|
||||||
|
path = assets/themes/sublime-snazzy
|
||||||
|
url = https://github.com/greggb/sublime-snazzy
|
||||||
|
[submodule "assets/syntaxes/AsciiDoc"]
|
||||||
|
path = assets/syntaxes/02_Extra/AsciiDoc
|
||||||
|
url = https://github.com/SublimeText/AsciiDoc.git
|
||||||
|
[submodule "assets/syntaxes/Assembly (ARM)"]
|
||||||
|
path = assets/syntaxes/02_Extra/Assembly (ARM)
|
||||||
|
url = https://github.com/tvi/Sublime-ARM-Assembly
|
||||||
|
[submodule "assets/syntaxes/syslog-syntax"]
|
||||||
|
path = assets/syntaxes/02_Extra/Syslog
|
||||||
|
url = https://github.com/caos21/syslog-syntax.git
|
||||||
|
branch = master
|
||||||
|
[submodule "assets/syntaxes/protobuf-syntax-highlighting"]
|
||||||
|
path = assets/syntaxes/02_Extra/Protobuf
|
||||||
|
url = https://github.com/VcamX/protobuf-syntax-highlighting.git
|
||||||
|
branch = master
|
||||||
|
[submodule "assets/syntaxes/Terraform"]
|
||||||
|
path = assets/syntaxes/02_Extra/Terraform
|
||||||
|
url = https://github.com/alexlouden/Terraform.tmLanguage.git
|
||||||
|
[submodule "assets/syntaxes/Jsonnet"]
|
||||||
|
path = assets/syntaxes/02_Extra/Jsonnet
|
||||||
|
url = https://github.com/gburiola/sublime-jsonnet-syntax.git
|
||||||
|
[submodule "assets/syntaxes/varlink"]
|
||||||
|
path = assets/syntaxes/02_Extra/varlink
|
||||||
|
url = https://github.com/varlink/syntax-highlight-varlink.git
|
||||||
|
[submodule "assets/syntaxes/sublime-fish"]
|
||||||
|
path = assets/syntaxes/02_Extra/Fish
|
||||||
|
url = https://github.com/Phidica/sublime-fish.git
|
||||||
|
[submodule "assets/syntaxes/Org mode"]
|
||||||
|
path = assets/syntaxes/02_Extra/Org mode
|
||||||
|
url = https://github.com/jezcope/Org.tmbundle.git
|
||||||
|
[submodule "assets/syntaxes/requirementstxt"]
|
||||||
|
path = assets/syntaxes/02_Extra/requirementstxt
|
||||||
|
url = https://github.com/wuub/requirementstxt
|
||||||
|
[submodule "assets/syntaxes/DotENV"]
|
||||||
|
path = assets/syntaxes/02_Extra/DotENV
|
||||||
|
url = https://github.com/zaynali53/DotENV
|
||||||
|
[submodule "assets/syntaxes/hosts"]
|
||||||
|
path = assets/syntaxes/02_Extra/hosts
|
||||||
|
url = https://github.com/brandonwamboldt/sublime-hosts
|
||||||
|
[submodule "assets/syntaxes/ssh-config"]
|
||||||
|
path = assets/syntaxes/02_Extra/ssh-config
|
||||||
|
url = https://github.com/robballou/sublimetext-sshconfig.git
|
||||||
|
[submodule "assets/syntaxes/GraphQL"]
|
||||||
|
path = assets/syntaxes/02_Extra/GraphQL
|
||||||
|
url = https://github.com/dncrews/GraphQL-SublimeText3.git
|
||||||
|
[submodule "assets/syntaxes/Verilog"]
|
||||||
|
path = assets/syntaxes/02_Extra/Verilog
|
||||||
|
url = https://github.com/pro711/sublime-verilog
|
||||||
|
[submodule "assets/syntaxes/SCSS_Sass"]
|
||||||
|
path = assets/syntaxes/02_Extra/SCSS_Sass
|
||||||
|
url = https://github.com/braver/SublimeSass
|
||||||
|
[submodule "assets/syntaxes/Strace"]
|
||||||
|
path = assets/syntaxes/02_Extra/Strace
|
||||||
|
url = https://github.com/djuretic/SublimeStrace
|
||||||
|
[submodule "assets/syntaxes/Jinja2"]
|
||||||
|
path = assets/syntaxes/02_Extra/Jinja2
|
||||||
|
url = https://github.com/Martin819/sublime-jinja2
|
||||||
|
[submodule "assets/syntaxes/SLS"]
|
||||||
|
path = assets/syntaxes/02_Extra/SLS
|
||||||
|
url = https://github.com/saltstack/sublime-text
|
||||||
|
branch = master
|
||||||
|
[submodule "assets/themes/dracula-sublime"]
|
||||||
|
path = assets/themes/dracula-sublime
|
||||||
|
url = https://github.com/dracula/sublime.git
|
||||||
|
[submodule "assets/syntaxes/HTML (Twig)"]
|
||||||
|
path = assets/syntaxes/02_Extra/HTML (Twig)
|
||||||
|
url = https://github.com/Anomareh/PHP-Twig.tmbundle.git
|
||||||
|
[submodule "assets/themes/Nord-sublime"]
|
||||||
|
path = assets/themes/Nord-sublime
|
||||||
|
url = https://github.com/crabique/Nord-plist.git
|
||||||
|
[submodule "assets/syntaxes/Vue"]
|
||||||
|
path = assets/syntaxes/02_Extra/Vue
|
||||||
|
url = https://github.com/vuejs/vue-syntax-highlight.git
|
||||||
|
branch = new
|
||||||
|
[submodule "assets/syntaxes/CoffeeScript"]
|
||||||
|
path = assets/syntaxes/02_Extra/CoffeeScript
|
||||||
|
url = https://github.com/sustained/CoffeeScript-Sublime-Plugin
|
||||||
|
[submodule "assets/syntaxes/02_Extra/Stylus"]
|
||||||
|
path = assets/syntaxes/02_Extra/Stylus
|
||||||
|
url = https://github.com/billymoon/Stylus
|
||||||
|
[submodule "assets/themes/Solarized"]
|
||||||
|
path = assets/themes/Solarized
|
||||||
|
url = https://github.com/braver/Solarized
|
||||||
|
[submodule "assets/syntaxes/02_Extra/Fortran"]
|
||||||
|
path = assets/syntaxes/02_Extra/Fortran
|
||||||
|
url = https://github.com/315234/SublimeFortran
|
||||||
|
[submodule "assets/syntaxes/02_Extra/Email"]
|
||||||
|
path = assets/syntaxes/02_Extra/Email
|
||||||
|
url = https://github.com/mariozaizar/email.sublime-syntax.git
|
||||||
|
[submodule "assets/syntaxes/02_Extra/QML"]
|
||||||
|
path = assets/syntaxes/02_Extra/QML
|
||||||
|
url = https://github.com/skozlovf/Sublime-QML
|
||||||
+42
-16
@@ -1,30 +1,61 @@
|
|||||||
language: rust
|
language: rust
|
||||||
cache: cargo
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
# Stable channel.
|
# Stable channel.
|
||||||
- os: linux
|
- os: linux
|
||||||
rust: stable
|
rust: stable
|
||||||
env: TARGET=x86_64-unknown-linux-gnu
|
env: TARGET=x86_64-unknown-linux-gnu
|
||||||
|
- os: linux
|
||||||
|
rust: stable
|
||||||
|
env:
|
||||||
|
- TARGET=x86_64-unknown-linux-musl
|
||||||
|
- CC_x86_64_unknown_linux_musl=/usr/bin/musl-gcc
|
||||||
|
- os: linux
|
||||||
|
rust: stable
|
||||||
|
env: TARGET=i686-unknown-linux-gnu
|
||||||
- os: osx
|
- os: osx
|
||||||
rust: stable
|
rust: stable
|
||||||
env: TARGET=x86_64-apple-darwin
|
env: TARGET=x86_64-apple-darwin
|
||||||
|
- os: linux
|
||||||
|
rust: stable
|
||||||
|
env:
|
||||||
|
- TARGET=arm-unknown-linux-gnueabihf
|
||||||
|
- CC_arm_unknown_linux_gnueabihf=/usr/bin/arm-linux-gnueabihf-gcc-4.8
|
||||||
|
- CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc-4.8
|
||||||
|
- os: linux
|
||||||
|
rust: stable
|
||||||
|
env:
|
||||||
|
- TARGET=aarch64-unknown-linux-gnu
|
||||||
|
- CC_aarch64-unknown-linux-gnu=/usr/bin/aarch64-linux-gnu-gcc-4.8
|
||||||
|
- CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc-4.8
|
||||||
|
|
||||||
# Minimum Rust supported channel.
|
# Minimum Rust supported channel.
|
||||||
- os: linux
|
- os: linux
|
||||||
rust: 1.22.1
|
rust: 1.40.0
|
||||||
env: TARGET=x86_64-unknown-linux-gnu
|
env: TARGET=x86_64-unknown-linux-gnu
|
||||||
|
- os: linux
|
||||||
|
rust: 1.40.0
|
||||||
|
env:
|
||||||
|
- TARGET=x86_64-unknown-linux-musl
|
||||||
|
- CC_x86_64_unknown_linux_musl=/usr/bin/musl-gcc
|
||||||
- os: osx
|
- os: osx
|
||||||
rust: 1.22.1
|
rust: 1.40.0
|
||||||
env: TARGET=x86_64-apple-darwin
|
env: TARGET=x86_64-apple-darwin
|
||||||
|
|
||||||
addons:
|
# Disable nightly for now
|
||||||
apt:
|
# # Code formatting check
|
||||||
packages:
|
# - os: linux
|
||||||
# needed for i686-unknown-linux-gnu target
|
# rust: nightly
|
||||||
- gcc-multilib
|
# # skip the global install step
|
||||||
# needed to build deb packages
|
# install:
|
||||||
- fakeroot
|
# - cargo install --debug --force rustfmt-nightly
|
||||||
|
# script: cargo fmt -- --check
|
||||||
|
|
||||||
|
sudo: required
|
||||||
|
|
||||||
|
before_install:
|
||||||
|
- ci/before_install.bash
|
||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
@@ -39,12 +70,7 @@ install:
|
|||||||
- if [[ $TRAVIS_OS_NAME = linux && $HOST != $TARGET ]]; then rustup target add $TARGET; fi
|
- if [[ $TRAVIS_OS_NAME = linux && $HOST != $TARGET ]]; then rustup target add $TARGET; fi
|
||||||
|
|
||||||
script:
|
script:
|
||||||
# Incorporate TARGET env var to the build and test process
|
- ci/script.bash
|
||||||
- cargo build --target $TARGET --verbose
|
|
||||||
- cargo test --target $TARGET --verbose
|
|
||||||
# Run 'bat' on its own source code and the README
|
|
||||||
- cargo run --target $TARGET -- src/main.rs
|
|
||||||
- cargo run --target $TARGET -- README.md
|
|
||||||
|
|
||||||
before_deploy:
|
before_deploy:
|
||||||
- bash ci/before_deploy.bash
|
- bash ci/before_deploy.bash
|
||||||
|
|||||||
+663
@@ -0,0 +1,663 @@
|
|||||||
|
# unreleased
|
||||||
|
|
||||||
|
## Features
|
||||||
|
## Bugfixes
|
||||||
|
## Other
|
||||||
|
## New syntaxes
|
||||||
|
## New themes
|
||||||
|
## `bat` as a library
|
||||||
|
## Packaging
|
||||||
|
|
||||||
|
# v0.15.1
|
||||||
|
|
||||||
|
## Bugfixes
|
||||||
|
|
||||||
|
- Fix highlighting of Markdown files, see #963 and #977
|
||||||
|
- Fix `base16` theme (was broken since in v0.14), see #972, #934 and #979 (@mk12).
|
||||||
|
Users suffering from #865 ("no color for bat in ssh from a Windows client") can use the `ansi-dark` and `ansi-light` themes from now on.
|
||||||
|
|
||||||
|
## New syntaxes
|
||||||
|
|
||||||
|
- Fortran, see #957
|
||||||
|
- Email (@mariozaizar)
|
||||||
|
- QML, see #962 (@pylipp)
|
||||||
|
|
||||||
|
# v0.15.0
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- Add a new `--diff`/`-d` option that can be used to only show lines surrounding
|
||||||
|
Git changes, i.e. added, removed or modified lines. The amount of additional
|
||||||
|
context can be controlled with `--diff-context=N`. See #23 and #940
|
||||||
|
|
||||||
|
## Bugfixes
|
||||||
|
|
||||||
|
- Error message printed in the middle of the output for another file, see #946
|
||||||
|
- Performance improvements when using custom caches (via `bat cache --build`): the `bat` startup time should now be twice as fast (@lzutao).
|
||||||
|
|
||||||
|
## Themes
|
||||||
|
|
||||||
|
- Updated version of the Solarized dark/light themes, see #941
|
||||||
|
|
||||||
|
## `bat` as a library
|
||||||
|
|
||||||
|
- There are a few changes in the "low level" API (the `Config` struct has changed and
|
||||||
|
the error handler needs a new `&mut dyn Write` argument). The high-level API is not
|
||||||
|
affected.
|
||||||
|
|
||||||
|
# v0.14.0
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- Added a new `--file-name <name>…` option to overwrite the displayed filename(s)
|
||||||
|
in the header. This is useful when piping input into `bat`. See #654 and #892 (@neuronull).
|
||||||
|
- Added a new `--generate-config-file` option to create an initial configuration file
|
||||||
|
at the right place. See #870 (@jmick414)
|
||||||
|
|
||||||
|
## Bugfixes
|
||||||
|
|
||||||
|
- Performance problems with C# source code have been fixed, see #677 (@keith-hall)
|
||||||
|
- Performance problems with Makefiles have been fixed, see #750 (@keith-hall)
|
||||||
|
- Fix bug when highlighting Ruby files with unindented heredocs, see #914 (@keith-hall)
|
||||||
|
- A highlighting problem with Rust source code has been fixed, see #924 (@keith-hall)
|
||||||
|
- Windows: short files that do not require paging are displayed and then lost, see #887
|
||||||
|
- `--highlight-line` did not work correctly in combination with `--tabs=0` and `--wrap=never`,
|
||||||
|
see #937
|
||||||
|
|
||||||
|
## Other
|
||||||
|
|
||||||
|
- When saving/reading user-provided syntaxes or themes, `bat` will now maintain a
|
||||||
|
`metadata.yaml` file which includes information about the `bat` version which was
|
||||||
|
used to create the cached files. When loading cached files, we now print an error
|
||||||
|
if they have been created with an incompatible version. See #882
|
||||||
|
- Updated `liquid` dependency to 0.20, see #880 (@ignatenkobrain)
|
||||||
|
|
||||||
|
## `bat` as a library
|
||||||
|
|
||||||
|
- A completely new "high level" API has been added that is much more convenient
|
||||||
|
to use. See the `examples` folder for the updated code. The older "low level"
|
||||||
|
API is still available (basically everything that is not in the root `bat`
|
||||||
|
module), but has been refactored quite a bit. It is recommended to only use
|
||||||
|
the new "high level" API, if possible. This will be much easier to keep stable.
|
||||||
|
Note that this should still be considered a "beta" release of `bat`-as-a-library.
|
||||||
|
For more details and some screenshots of the example programs, see #936.
|
||||||
|
- Stripped out a lot of binary-only dependencies, see #895 and #899 (@dtolnay)
|
||||||
|
|
||||||
|
This introduces a `features = ["application"]` which is enabled by default and pulls in
|
||||||
|
everything required by `bat` the application. When depending on bat as a library, downstream
|
||||||
|
`Cargo.toml` should disable this feature to cut out inapplicable heavy dependencies:
|
||||||
|
``` toml
|
||||||
|
[dependencies]
|
||||||
|
bat = { version = "0.14", default-features = false }
|
||||||
|
```
|
||||||
|
Other optional functionality has also been put behind features: `paging` and `git` support.
|
||||||
|
- Allow using the library with older syntect, see #896 and #898 (@dtolnay)
|
||||||
|
|
||||||
|
## New syntaxes
|
||||||
|
|
||||||
|
- Rego, see #872 (@patrick-east)
|
||||||
|
- Stylo, see #917
|
||||||
|
|
||||||
|
|
||||||
|
# v0.13.0
|
||||||
|
|
||||||
|
## `bat` as a library
|
||||||
|
|
||||||
|
Beginning with this release, `bat` can be used as a library (#423).
|
||||||
|
|
||||||
|
This was a huge effort and I want to thank all people who made this possible: @DrSensor, @mitsuhiko, @mre, @eth-p!
|
||||||
|
|
||||||
|
- Initial attempt in #469 (@mitsuhiko)
|
||||||
|
- Second attempt, complete restructuring of the `bat` crate, see #679 (@DrSensor)
|
||||||
|
- Updates to example, public API, error handling, further refactoring: #693 #873 #875 (@sharkdp)
|
||||||
|
|
||||||
|
I want to stress that this is the very first release of the library. Things are very likely to change. A lot of things are still missing (including the documentation).
|
||||||
|
|
||||||
|
That being said, you can start using it! See the example programs in [`examples/`](https://github.com/sharkdp/bat/tree/master/examples).
|
||||||
|
|
||||||
|
You can see the API documentation here: https://docs.rs/bat/
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- (**Breaking change**) Glob-based syntax mapping, see #877 and #592. With this change,
|
||||||
|
users need to update their bat config files (`bat --config-file`), if they have any `--map-syntax` settings
|
||||||
|
present.
|
||||||
|
|
||||||
|
The option now works like this:
|
||||||
|
```bash
|
||||||
|
--map-syntax <glob-pattern>:<syntax-name>
|
||||||
|
```
|
||||||
|
|
||||||
|
For more information, see the `--help` text, the man page or the README.
|
||||||
|
|
||||||
|
This new feature allows us to properly highlight files like:
|
||||||
|
* `/etc/profile`
|
||||||
|
* `~/.ssh/config`
|
||||||
|
|
||||||
|
- `--highlight-line` now accepts line ranges, see #809 (@lkalir)
|
||||||
|
- Proper wrapping support for output with wide Unicode characters, see #811 #787 and #815 (@Kogia-sima)
|
||||||
|
- A lot of updates to existing syntaxes via #644 (@benwaffle, @keith-hall)
|
||||||
|
- `BAT_CACHE_PATH` can be used to place cached `bat` assets in a non-standard path, see #829 (@neuronull)
|
||||||
|
- Support combination of multiple styles at the same time, see #857 (@aslpavel)
|
||||||
|
|
||||||
|
## Bugfixes
|
||||||
|
|
||||||
|
- Do not pass '--no-init' on newer less versions, see #749 and #786 (@sharkdp)
|
||||||
|
- 'bat cache' still takes precedence over existing files, see #666 (@sharkdp)
|
||||||
|
- `.sc` files should be treated as scala files, see #443 (@benwaffle)
|
||||||
|
- Allow underscores and dashes in page names, see #670 (@LunarLambda)
|
||||||
|
- Keep empty lines empty, see #601 (@mbarbar)
|
||||||
|
- Wrapping does not work when piping, see #758 (@fusillicode, @allevo, @gildo)
|
||||||
|
- Allow for non-unicode filenames, see #225 (@sharkdp)
|
||||||
|
- Empty file without header produces incomplete grid, see #798 (@eth-p)
|
||||||
|
- Files named `build` don't respect shebang lines, see #685 (@sharkdp)
|
||||||
|
|
||||||
|
## Other
|
||||||
|
|
||||||
|
- Parametrizable names for man page and shell completion files, see #659 #673 #656 (@eth-p)
|
||||||
|
- Enabled LTO, making `bat` about 10% faster, see #719 (@bolinfest, @sharkdp)
|
||||||
|
- Suggestions non how to configure `bat` for MacOS dark mode, see README (@jerguslejko)
|
||||||
|
- Extended ["Integration with other tools"](https://github.com/sharkdp/bat#integration-with-other-tools) section (@eth-p)
|
||||||
|
- Updated [instrutions on how to use `bat` as a `man`-pager](https://github.com/sharkdp/bat#man), see #652, see #667 (@sharkdp)
|
||||||
|
- Add section concerning file encodings, see #688 and #568 (@sharkdp)
|
||||||
|
- Updated sort order of command-line options in `--help` text and manpage, see #653 and #700 (@hrlmartins)
|
||||||
|
- Updates to the man page syntax, see #718 (@sharkdp)
|
||||||
|
- Japanese documentation updates, see #863 (@k-ta-yamada, @sorairolake and @wt-l00)
|
||||||
|
- Accept "default" as a theme, see #757 (@fvictorio)
|
||||||
|
- Updated Windows installation instructions, see #852 (@sorenbug)
|
||||||
|
- Updated man page, see #573 (@sharkdp)
|
||||||
|
|
||||||
|
## New syntaxes
|
||||||
|
|
||||||
|
- Jinja2, see #648 (@Martin819)
|
||||||
|
- SaltStack SLS, see #658 (@Martin819)
|
||||||
|
- `/etc/fstab`, see #696 (@flopp and @eth-p)
|
||||||
|
- `/etc/group` and `/etc/passwd`, see #698 (@argentite)
|
||||||
|
- `/proc/cpuinfo` and `/proc/meminfo`, see #593 (@sharkdp)
|
||||||
|
- Nim, see #542 (@sharkdp)
|
||||||
|
- Vue, see #826 (@chaaaaarlotte)
|
||||||
|
- CoffeScript, see #833 (@sharkdp)
|
||||||
|
|
||||||
|
## New themes
|
||||||
|
|
||||||
|
- Dracula, see #687 (@clarfon)
|
||||||
|
- Nord, see #760 (@crabique)
|
||||||
|
- Solarized light and dark, see #768 (@hakamadare)
|
||||||
|
|
||||||
|
## Packaging
|
||||||
|
|
||||||
|
- `bat` is now in the official Ubuntu and Debian repositories, see #323 and #705 (@MarcoFalke)
|
||||||
|
- `bat` can now be installed via MacPorts, see #675 (@bn3t)
|
||||||
|
- Install fish completions into 'vendor_completions.d', see #651 (@sharkdp)
|
||||||
|
|
||||||
|
## Thanks
|
||||||
|
|
||||||
|
- To @eth-p for joining me as a maintainer! I'm very grateful for all the work you put into
|
||||||
|
managing and responding to issues, improving our deployment, adding PR/issue templates (#837) as
|
||||||
|
well as fixing bugs and implementing new features.
|
||||||
|
|
||||||
|
# v0.12.1
|
||||||
|
|
||||||
|
## Bugfixes
|
||||||
|
|
||||||
|
- Fixes a bug for older Windows versions (*"The procedure entry point `CreateFile2` could not be located"*), see #643 (@rivy)
|
||||||
|
|
||||||
|
# v0.12.0
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- Binary file content can now be viewed with `bat -A`, see #623, #640 (@pjsier and @sharkdp)
|
||||||
|
- `bat` can now be used as a man pager. Take a look at the README and #523 for more details.
|
||||||
|
- Add new style component to separate multiple `--line-range`s, see #570 (@eth-p)
|
||||||
|
- Added `-L` as an alias for `--list-languages`
|
||||||
|
|
||||||
|
## Bugfixes
|
||||||
|
|
||||||
|
- Output looks unbalanced when using '--style=grid,numbers' without 'header', see #571 (@eth-p)
|
||||||
|
- issues with filenames starting with "cache", see #584
|
||||||
|
- Can't build cache with new theme without creating cache dir, see #576 (@frm)
|
||||||
|
- `--terminal-width -10` is parsed incorrectly, see #611
|
||||||
|
|
||||||
|
## Other
|
||||||
|
|
||||||
|
- Added fish completions to DEB package, see #554
|
||||||
|
|
||||||
|
## New syntaxes
|
||||||
|
|
||||||
|
- Emacs Org mode, see #36 (@bricewge)
|
||||||
|
- `requirements.txt`
|
||||||
|
- DotENV `.env`
|
||||||
|
- SSH config syntax (`-l ssh_config`), see #582 (@issmirnov)
|
||||||
|
- `/etc/hosts`, see #583 (@issmirnov)
|
||||||
|
- GraphQL, see #625 (@dandavison)
|
||||||
|
- Verilog, see #616
|
||||||
|
- SCSS and Sass, see #637
|
||||||
|
- `strace` syntax, see #599
|
||||||
|
|
||||||
|
## Packaging
|
||||||
|
|
||||||
|
- `bat` is now in the official Gentoo repositories, see #588 (@toku-sa-n)
|
||||||
|
- `bat` is now in the official Alpine Linux repositories, see #586 (@5paceToast)
|
||||||
|
- `bat` is in the official Fedora repositories, see #610 (@ignatenkobrain)
|
||||||
|
|
||||||
|
# v0.11.0
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- Three new special color themes are available: `ansi-light`, `ansi-dark` and `base16`. These
|
||||||
|
are useful for people that often switch from dark to light themes in their terminal emulator
|
||||||
|
or for people that want the colors to match their terminal theme colors. For more details,
|
||||||
|
see #543 and #490 (@mk12, implementation idea by @trishume)
|
||||||
|
- Hand-written auto completion script for Fish shell, see #524 and #555 (@ev-dev and @eth-p)
|
||||||
|
- The `-p`/`--plain` option can now be used twice (typically `-pp`). The first `-p` switches the
|
||||||
|
`--style` to "plain". The second `-p` disables the pager. See #560 and #552 (@eth-p)
|
||||||
|
|
||||||
|
## Bugfixes
|
||||||
|
|
||||||
|
- Do not replace arguments to `less` when using `--pager`, see #509
|
||||||
|
- Binary files will now be indicated by a warning in interactive mode, see #530 #466 #550 (@maxfilov)
|
||||||
|
- Empty files are (once again) printed with a single header line, see #504 and #566 (@reidwagner
|
||||||
|
and @sharkdp)
|
||||||
|
- `--terminal-width=0` is now disallowed, see #559 (@eth-p)
|
||||||
|
- Accidental printing of files named `cache`, see #557
|
||||||
|
|
||||||
|
## Other
|
||||||
|
|
||||||
|
- New integration tests, see #500 and #502 (@reidwagner and @sharkdp)
|
||||||
|
- New ["Integration with other tools"](https://github.com/sharkdp/bat#integration-with-other-tools) section in the README.
|
||||||
|
- Migrated to Rust 2018 (@expobrain)
|
||||||
|
|
||||||
|
## New syntaxes
|
||||||
|
|
||||||
|
- F# syntax has been updated, see #531 (@stroborobo)
|
||||||
|
- Fish shell, see #548 (@sanga)
|
||||||
|
|
||||||
|
## Packaging
|
||||||
|
|
||||||
|
- `bat` is now available on Chocolatey, see #541 (@rasmuskriest)
|
||||||
|
|
||||||
|
# v0.10.0
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- Added new `--highlight-line <N>` option, see #453, #346 and #175 (@tskinn and @sharkdp)
|
||||||
|
|
||||||
|
## Changes
|
||||||
|
|
||||||
|
- **Change the default configuration directory on macOS** to `~/.config/bat`, see #442 (@lavifb). If you are on macOS, you need to copy your configuration directory from the previous place (`~/Library/Preferences/bat`) to the new place (`~/.config/bat`).
|
||||||
|
- Completely disabled the generation of shell completion files, see #372
|
||||||
|
- Properly set arguments to `less` if `PAGER` environment variable contains something like `less -F` (which is missing the `-R` option), see #430 (@majecty)
|
||||||
|
- Report the name of missing files, see #444 (@ufuji1984)
|
||||||
|
- Don't start pager if file doesn't exist, see #387
|
||||||
|
- Rename `bat cache --init` to `bat cache --build`, see #498
|
||||||
|
- Move the `--config-dir` and `--cache-dir` options from `bat cache` to `bat` and hide them from the help text.
|
||||||
|
|
||||||
|
## Bugfixes
|
||||||
|
|
||||||
|
- Blank line at the end of output when using `--style=plain`, see #379
|
||||||
|
- EOF must be sent twice on stdin if no other input is sent, see #477 (@reidwagner)
|
||||||
|
|
||||||
|
## New syntaxes
|
||||||
|
|
||||||
|
- Twig (@ahmedelgabri)
|
||||||
|
- `.desktop` files (@jleclanche)
|
||||||
|
- AsciiDoc (@markusthoemmes)
|
||||||
|
- Assembly (x86_64 and ARM)
|
||||||
|
- Log files (@caos21)
|
||||||
|
- Protobuf and ProtobufText (@caos21)
|
||||||
|
- Terraform (@caos21)
|
||||||
|
- Jsonnet (@hfm)
|
||||||
|
- Varlink (@haraldh)
|
||||||
|
|
||||||
|
## Other
|
||||||
|
|
||||||
|
- Added Japanese version of README (@sh-tech and @object1037)
|
||||||
|
- Code improvements (@barskern)
|
||||||
|
|
||||||
|
# v0.9.0
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- A new `-A`/`--show-all` option has been added to show and highlight non-printable characters (in analogy to GNU `cat`s option):
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
see #395 and #381 for more details.
|
||||||
|
|
||||||
|
- Added `--pager` option (to configure the pager from the configuration file), see #362 (@majecty)
|
||||||
|
|
||||||
|
- Added `BAT_CONFIG_PATH` environment variable to set a non-default path for `bat`s configuration file, see #375 (@deg4uss3r)
|
||||||
|
|
||||||
|
- Allow for multiple occurences of `--style` to allow for the configuration
|
||||||
|
of styles from the config file, see #367 (@sindreij)
|
||||||
|
|
||||||
|
- Allow for multiple `--line-range` arguments, see #23
|
||||||
|
|
||||||
|
- The `--terminal-width` option can now also accept offsets, see #376
|
||||||
|
|
||||||
|
## Changes
|
||||||
|
|
||||||
|
- Use of italics is now *disabled by default* (see #389 for details). They can be
|
||||||
|
re-enabled by adding `--italic-text=always` to your configuration file.
|
||||||
|
|
||||||
|
- The default tab-width has been set to 4.
|
||||||
|
|
||||||
|
- Added new "Sublime Snazzy" theme.
|
||||||
|
|
||||||
|
- Shell completions are currently *not* shipped anymore, see #372 for details.
|
||||||
|
|
||||||
|
## Bugfixes
|
||||||
|
|
||||||
|
- Avoid endless recursion when `PAGER="bat"`, see #383 (@rodorgas)
|
||||||
|
|
||||||
|
## Other
|
||||||
|
|
||||||
|
- `bat` is now available on openSUSE, see #405 (@dmarcoux)
|
||||||
|
|
||||||
|
- Added section about the new configuration file in the README (@deg4uss3r)
|
||||||
|
|
||||||
|
- Chinese translation of README (@chinanf-boy)
|
||||||
|
|
||||||
|
- Re-written tests for `--tabs` (@choznerol)
|
||||||
|
|
||||||
|
- Speed up integration tests, see #394
|
||||||
|
|
||||||
|
# v0.8.0
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- Support for a configuration file with the following simple format:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
--tabs=4
|
||||||
|
--theme="Sublime Snazzy"
|
||||||
|
|
||||||
|
# A line-comment
|
||||||
|
--map-syntax .ignore:.gitignore
|
||||||
|
--map-syntax PKGBUILD:bash
|
||||||
|
--map-syntax Podfile:ruby
|
||||||
|
|
||||||
|
# Flags and options can also be on a single line:
|
||||||
|
--wrap=never --paging=never
|
||||||
|
```
|
||||||
|
|
||||||
|
The configuration file path can be accessed via `bat --config-file`. On Linux,
|
||||||
|
it is stored in `~/.config/bat/config`.
|
||||||
|
|
||||||
|
- Support for the `BAT_OPTS` environment variable with the same format as specified
|
||||||
|
above (in a single line). This takes precedence over the configuration file.
|
||||||
|
|
||||||
|
See also #310.
|
||||||
|
|
||||||
|
- Support for custom syntax mappings via the `-m`/`--max-syntax` option.
|
||||||
|
|
||||||
|
This allows users to (re)map certain file extensions or file names to an existing syntax:
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
bat --map-syntax .config:json ...
|
||||||
|
```
|
||||||
|
|
||||||
|
The option can be use multiple times. Note that you can easily make these mappings permanent by using bats new configuration file.
|
||||||
|
|
||||||
|
See #169
|
||||||
|
|
||||||
|
- Support pager command-line arguments in `PAGER` and `BAT_PAGER`, see #352 (@Foxboron)
|
||||||
|
|
||||||
|
- Add support for wildcards in Windows CMD, see #309 (@zxey)
|
||||||
|
|
||||||
|
- First-line syntax detection for all input types, see #205
|
||||||
|
|
||||||
|
- Encoding support for UTF-16LE and UTF-16BE, see #285
|
||||||
|
|
||||||
|
- New syntaxes: Robot framework (@sanga)
|
||||||
|
|
||||||
|
## Changes
|
||||||
|
|
||||||
|
- Binary files are now detected and not displayed when the output goes to an interactive terminal, see #205
|
||||||
|
|
||||||
|
## Bugfixes
|
||||||
|
|
||||||
|
- JavaDoc comments break syntax highlighting in .java files, see #81
|
||||||
|
|
||||||
|
- Bat Panics on Haskell Source Code, see #314
|
||||||
|
|
||||||
|
## Other
|
||||||
|
|
||||||
|
- Better `-h` and `--help` texts.
|
||||||
|
|
||||||
|
- Updated documentation on how to configure `bat`s pager
|
||||||
|
|
||||||
|
- Updated documentation for light backgrounds, see #328 (@russtaylor)
|
||||||
|
|
||||||
|
- Generate shell completions during build, see #115 (@davideGiovannini)
|
||||||
|
|
||||||
|
- A lot of new tests have been written
|
||||||
|
|
||||||
|
- `bat` is now available via [Termux](https://termux.com/), see #341 (@fornwall)
|
||||||
|
|
||||||
|
- `bat` is now available via [nix](https://nixos.org/nix), see #344 (@mgttlinger)
|
||||||
|
|
||||||
|
- `bat` is now available via [Docker](https://hub.docker.com/r/danlynn/bat/), see #331 (@danlynn)
|
||||||
|
|
||||||
|
# v0.7.1
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- Use the `ansi_colours` package by @mina86 for better true-color approximation on 8 bit color terminals, see #319 and #202.
|
||||||
|
|
||||||
|
## Bugfixes
|
||||||
|
|
||||||
|
- Bat Panics on Haskell Source Code, see #314
|
||||||
|
- Disable wrapping when `--style=plain`/`-p` is used, see #289
|
||||||
|
|
||||||
|
## Other
|
||||||
|
|
||||||
|
- Added Ansible install instructions (@aeimer)
|
||||||
|
- Added section about Cygwin to the README (@eth-p)
|
||||||
|
|
||||||
|
# v0.7.0
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- Tabs are now (optionally) expanded to spaces. This can be controlled with the new
|
||||||
|
`--tabs` command-line option or the `BAT_TABS` environment variable. The
|
||||||
|
new feature also closes two bugs #166 and #184. For more information, see #302 (@eth-p).
|
||||||
|
|
||||||
|
- Added support for the `BAT_STYLE` environment variable, see #208 (@ms2300)
|
||||||
|
|
||||||
|
- Added `OneHalf` theme for terminals with a light-gray background, see #256
|
||||||
|
|
||||||
|
- Added new syntaxes for CSV, JSX in JavaScript and TypeScript, Cabal, Dart,
|
||||||
|
F#, PureScript, Swift, Crystal, PowerShell (Many Thanks to @tobenna and @mimadrid)
|
||||||
|
|
||||||
|
## Changes
|
||||||
|
|
||||||
|
- Query `git diff` only when needed, see #303 (@ShikChen)
|
||||||
|
|
||||||
|
- Disable wrapping when `--plain` is used, see #289 (@eth-p)
|
||||||
|
|
||||||
|
## Bugfixes
|
||||||
|
|
||||||
|
- Can read files named `cache`, see #275 (@BK1603)
|
||||||
|
|
||||||
|
- A lot of bugfixes for Windows, see #252, #264
|
||||||
|
|
||||||
|
- Detect `less` reliably and in a portable way, see #271 and #290 (@Aankhen)
|
||||||
|
|
||||||
|
- last decoration line is not formatted properly with `--wrap never`, see #299 (@Rogach)
|
||||||
|
|
||||||
|
- Do not show file header for directories, see #292
|
||||||
|
|
||||||
|
## Other
|
||||||
|
|
||||||
|
- Enabled a new `aarch64` build target, see #258 (@rachitchokshi)
|
||||||
|
|
||||||
|
- Provide Debian packages for `armhf`, see #280 (@rachitchokshi)
|
||||||
|
|
||||||
|
- Added README section about "`bat` on Windows" (@Aankhen)
|
||||||
|
|
||||||
|
- Windows installation via scoop (@meltinglava)
|
||||||
|
|
||||||
|
# v0.6.1
|
||||||
|
|
||||||
|
## Bugfixes
|
||||||
|
|
||||||
|
- Fixed panic when running `bat --list-languages | head`, see #232 (@mchlrhw)
|
||||||
|
- Respect `--color` settings for `--list-themes` and `--list-languages`, see #233
|
||||||
|
- Git modifications now work on Windows
|
||||||
|
|
||||||
|
## Other
|
||||||
|
|
||||||
|
- There will be auto-generated Windows releases, starting with this version (@anykao)
|
||||||
|
|
||||||
|
# v0.6.0
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- The `--list-themes` option now shows a preview for each highlighting theme (@ms2300)
|
||||||
|
- Added `-p`/`--plain` as an alias for `--style=plain`, see #212 (@ms2300)
|
||||||
|
- Major refactorings, enabling some progress on #150. In non-interactive mode, `bat` will now copy input bytes 1:1.
|
||||||
|
- New languages: Elm, Kotlin, Puppet, TypeScript, see #215 #216 #217 #218
|
||||||
|
- New syntax highlighting theme: zenburn (@colindean)
|
||||||
|
|
||||||
|
## Changes
|
||||||
|
|
||||||
|
- New themes in `$BAT_CONFIG_DIR/themes` are now loaded *in addition* to
|
||||||
|
the default themes (they may also override), see #172
|
||||||
|
- The `Default.tmTheme` symlink is not necessary anymore.
|
||||||
|
|
||||||
|
## Bugfixes
|
||||||
|
|
||||||
|
* Using `bat cache --init` leads to duplicated syntaxes, see #206
|
||||||
|
|
||||||
|
## Other
|
||||||
|
|
||||||
|
* Extended and cleaned-up `--help` text.
|
||||||
|
* Added initial version of a man page, see #52
|
||||||
|
* New README sections: *Development* and *Troubleshooting*, see #220
|
||||||
|
|
||||||
|
# v0.5.0
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- Added `--line-range n:m` option to print a range of lines, see #159 (@tskinn)
|
||||||
|
- The syntax highlighting theme can now be controlled by the `BAT_THEME` environment variable, see [README](https://github.com/sharkdp/bat#highlighting-theme) and #177 (@mandx)
|
||||||
|
- The `PAGER` and `BAT_PAGER` environment variables can be used to control the pager that `bat` uses, see #158 and the [new README section](https://github.com/sharkdp/bat#using-a-different-pager)
|
||||||
|
- Added syntax highlighting for Nix, see #180
|
||||||
|
- Added syntax highlighting for AWK (Gert Hulselmans)
|
||||||
|
|
||||||
|
## Changes
|
||||||
|
|
||||||
|
- The customization of syntax sets and theme sets is now separated. Syntax definitions are now loaded *in addition* to the ones that are stored in the `bat` binary by default. Please refer to these new sections in the README: [Adding new syntaxes](https://github.com/sharkdp/bat#adding-new-syntaxes--language-definitions), [Adding new themes](https://github.com/sharkdp/bat#adding-new-themes), also see #172
|
||||||
|
- The color for the filename is now the default foreground color. The colors for the grid and the line numbers is now determined from the syntax highlighting theme, which now also works for light backgrounds, see #178.
|
||||||
|
|
||||||
|
## Bugfixes
|
||||||
|
|
||||||
|
- Escape Sequences get partially stripped, see #182 (@eth-p)
|
||||||
|
- Use separate Git repository for snapshot testing, see #165 and #161
|
||||||
|
- Markdown breaking on JavaScript, see #183
|
||||||
|
|
||||||
|
## Other
|
||||||
|
|
||||||
|
- Binaries for armv7 are now provided, see #196
|
||||||
|
- `bat` is now in the official [Arch package repositories](https://www.archlinux.org/packages/community/x86_64/bat/).
|
||||||
|
- Optimizations in the RGB => 8-bit conversion (@mina86)
|
||||||
|
|
||||||
|
# v0.4.1
|
||||||
|
|
||||||
|
(this is just a small bugfix release, see 0.4.0 for all features and changes)
|
||||||
|
|
||||||
|
## Bugfixes
|
||||||
|
|
||||||
|
- Fix problem with `cargo test` when `bat` is not checked out in a Git repository, see #161
|
||||||
|
|
||||||
|
# v0.4.0
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
* Support for line-wrapping, see #54 and #102 (@eth-p)
|
||||||
|
* New and updated `--style` parameter, see #74 and README (@pitkley)
|
||||||
|
* Added `--theme` and `--list-themes` options, see #89 (@rleungx)
|
||||||
|
* Added syntax highlighting for: Julia (@iamed2), Dockerfiles, VimL, CMake, INI, Less
|
||||||
|
* Added a few popular Sublime Text highlighting themes, see #133
|
||||||
|
* Support for bold, italic and underline font styles, see #96
|
||||||
|
* Support for 32bit systems is now available, see #84
|
||||||
|
* Added `-u` and `-n` options, see #134
|
||||||
|
* ANSI color support on Windows 10
|
||||||
|
|
||||||
|
## Changes
|
||||||
|
|
||||||
|
* The customization folder for own syntaxes has been renamed from `syntax` to `syntaxes`, see README.
|
||||||
|
* Changed Markdown syntax to the default Sublime Text syntax, see #157
|
||||||
|
* Sorted language listing (@rleungx)
|
||||||
|
* Command line arguments like `--theme` or `--color` can now override themselves.
|
||||||
|
* Improved `--help` text.
|
||||||
|
|
||||||
|
## Bugfixes
|
||||||
|
|
||||||
|
- Fixed crash for (really) small terminal sizes, see #117 (@eth-p)
|
||||||
|
- Syntax detection for `.bashrc`, `CMakeLists.txt` etc., see #100
|
||||||
|
- Properly handle lines with invalid UTF-8, see #7 (@BrainMaestro)
|
||||||
|
- Better error handling, see #17 (@rleungx and @sharkdp)
|
||||||
|
- Proper handling of UTF-8 characters in `less`, see #98 (@ghuls)
|
||||||
|
- Build fix on nightly, see #148 (@tathanhdinh)
|
||||||
|
|
||||||
|
## Other
|
||||||
|
|
||||||
|
- [Comparison with alternative projects](https://github.com/sharkdp/bat/blob/master/doc/alternatives.md).
|
||||||
|
- New "bat" logo in the README, see #119 (@jraulhernandezi)
|
||||||
|
- Output test cases (@BrainMaestro)
|
||||||
|
- Lots of great refactoring work (@BrainMaestro)
|
||||||
|
|
||||||
|
# v0.3.0
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
* Automatic paging by integrating with `less`, see #29 (@BrainMaestro)
|
||||||
|
* Added support for reading from standard input, see #2
|
||||||
|
* Added support for writing to non-interactive terminals (pipes, files, ..); new
|
||||||
|
`--color=auto/always/never` option, see #26 (@BrainMaestro)
|
||||||
|
* Added `--list-languages` option to print all available syntaxes, see #69 (@connorkuehl)
|
||||||
|
* New option to specify the syntax via `-l`/`--language`, see #19 (@BrainMaestro)
|
||||||
|
* New option to control the output style (`--style`), see #5 (@nakulcg)
|
||||||
|
* Added syntax highlighting support for TOML files, see #37
|
||||||
|
|
||||||
|
## Changes
|
||||||
|
|
||||||
|
* The `init-cache` sub-command has been removed. The cache can now be controlled via
|
||||||
|
`bat cache`. See `bat cache -h` for all available commands.
|
||||||
|
|
||||||
|
## Bug fixes
|
||||||
|
|
||||||
|
* Get git repository from file path instead of current directory, see #22 (@nakulcg)
|
||||||
|
* Process substitution can now be used with bat (`bat <(echo a) <(echo b)`), see #80
|
||||||
|
|
||||||
|
## Thanks
|
||||||
|
|
||||||
|
I'd like to say a big THANK YOU to all contributors and everyone that has given us
|
||||||
|
some form of feedback.
|
||||||
|
|
||||||
|
Special thanks go to @BrainMaestro for his huge support with new features, bug reports
|
||||||
|
and code reviews!
|
||||||
|
|
||||||
|
# v0.2.3
|
||||||
|
|
||||||
|
- Added a new statically linked version of bat (`..-musl-..`)
|
||||||
|
|
||||||
|
# v0.2.2
|
||||||
|
|
||||||
|
- Remove openssl dependency completely, see #30.
|
||||||
|
|
||||||
|
# v0.2.1
|
||||||
|
|
||||||
|
- Added Elixir syntax, see #25.
|
||||||
|
- Use libcurl-openssl instead of libcurl-gnutls, see #30.
|
||||||
|
|
||||||
|
# v0.2.0
|
||||||
|
|
||||||
|
- Support for custom syntaxes, add 'Markdown extended' theme
|
||||||
|
- Bugfix: Git modifications not shown from child folder
|
||||||
|
|
||||||
|
# v0.1.0
|
||||||
|
|
||||||
|
Initial release
|
||||||
Generated
+1260
-474
File diff suppressed because it is too large
Load Diff
+63
-11
@@ -7,27 +7,79 @@ license = "MIT/Apache-2.0"
|
|||||||
name = "bat"
|
name = "bat"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/sharkdp/bat"
|
repository = "https://github.com/sharkdp/bat"
|
||||||
version = "0.2.2"
|
version = "0.15.1"
|
||||||
|
exclude = [
|
||||||
|
"assets/syntaxes/*",
|
||||||
|
"assets/themes/*",
|
||||||
|
]
|
||||||
|
build = "build.rs"
|
||||||
|
edition = '2018'
|
||||||
|
|
||||||
|
[features]
|
||||||
|
default = ["application"]
|
||||||
|
# Feature required for bat the application. Should be disabled when depending on
|
||||||
|
# bat as a library.
|
||||||
|
application = [
|
||||||
|
"atty",
|
||||||
|
"clap",
|
||||||
|
"dirs",
|
||||||
|
"git",
|
||||||
|
"lazy_static",
|
||||||
|
"liquid",
|
||||||
|
"paging",
|
||||||
|
"wild",
|
||||||
|
"regex-onig",
|
||||||
|
]
|
||||||
|
git = ["git2"] # Support indicating git modifications
|
||||||
|
paging = ["shell-words"] # Support applying a pager on the output
|
||||||
|
regex-onig = ["syntect/regex-onig"] # Use the "oniguruma" regex engine
|
||||||
|
regex-fancy = ["syntect/regex-fancy"] # Use the rust-only "fancy-regex" engine
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
atty = "0.2.2"
|
atty = { version = "0.2.14", optional = true }
|
||||||
ansi_term = "0.9"
|
ansi_term = "^0.12.1"
|
||||||
console = "0.6"
|
ansi_colours = "^1.0"
|
||||||
error-chain = "0.11"
|
console = "0.11.2"
|
||||||
directories = "0.9"
|
dirs = { version = "2.0", optional = true }
|
||||||
lazy_static = "1.0"
|
lazy_static = { version = "1.4", optional = true }
|
||||||
|
wild = { version = "2.0", optional = true }
|
||||||
|
content_inspector = "0.2.4"
|
||||||
|
encoding = "0.2"
|
||||||
|
shell-words = { version = "0.1.0", optional = true }
|
||||||
|
unicode-width = "0.1.7"
|
||||||
|
globset = "0.4"
|
||||||
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
|
serde_yaml = "0.8"
|
||||||
|
semver = "0.9"
|
||||||
|
|
||||||
[dependencies.git2]
|
[dependencies.git2]
|
||||||
version = "0.6"
|
version = "0.13"
|
||||||
|
optional = true
|
||||||
default-features = false
|
default-features = false
|
||||||
features = []
|
|
||||||
|
|
||||||
[dependencies.syntect]
|
[dependencies.syntect]
|
||||||
version = "2"
|
version = "4.1.0"
|
||||||
default-features = false
|
default-features = false
|
||||||
features = ["parsing", "yaml-load", "dump-load", "dump-create"]
|
features = ["parsing", "yaml-load", "dump-load", "dump-create"]
|
||||||
|
|
||||||
[dependencies.clap]
|
[dependencies.clap]
|
||||||
version = "2"
|
version = "2.33"
|
||||||
|
optional = true
|
||||||
default-features = false
|
default-features = false
|
||||||
features = ["suggestions", "color", "wrap_help"]
|
features = ["suggestions", "color", "wrap_help"]
|
||||||
|
|
||||||
|
[dependencies.error-chain]
|
||||||
|
version = "0.12"
|
||||||
|
default-features = false
|
||||||
|
|
||||||
|
[dev-dependencies]
|
||||||
|
tempdir = "0.3"
|
||||||
|
assert_cmd = "1.0.1"
|
||||||
|
|
||||||
|
[build-dependencies]
|
||||||
|
clap = { version = "2.33", optional = true }
|
||||||
|
liquid = { version = "0.20", optional = true }
|
||||||
|
|
||||||
|
[profile.release]
|
||||||
|
lto = true
|
||||||
|
codegen-units = 1
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
Copyright (c) 2018-2020 bat-developers (https://github.com/sharkdp/bat).
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
in the Software without restriction, including without limitation the rights
|
in the Software without restriction, including without limitation the rights
|
||||||
|
|||||||
@@ -1,80 +1,638 @@
|
|||||||
# bat
|
<p align="center">
|
||||||
|
<img src="doc/logo-header.svg" alt="bat - a cat clone with wings"><br>
|
||||||
|
<a href="https://travis-ci.org/sharkdp/bat"><img src="https://travis-ci.org/sharkdp/bat.svg?branch=master" alt="Build Status"></a>
|
||||||
|
<a href="https://ci.appveyor.com/project/sharkdp/bat"><img src="https://ci.appveyor.com/api/projects/status/cptsmtbiwbnr2vhf/branch/master?svg=true"></a>
|
||||||
|
<img src="https://img.shields.io/crates/l/bat.svg" alt="license">
|
||||||
|
<a href="https://crates.io/crates/bat"><img src="https://img.shields.io/crates/v/bat.svg?colorB=319e8c" alt="Version info"></a><br>
|
||||||
|
A <i>cat(1)</i> clone with syntax highlighting and Git integration.
|
||||||
|
</p>
|
||||||
|
|
||||||
[](https://travis-ci.org/sharkdp/bat)
|
<p align="center">
|
||||||
[](https://crates.io/crates/bat)
|
<a href="#syntax-highlighting">Key Features</a> •
|
||||||
|
<a href="#how-to-use">How To Use</a> •
|
||||||
A *cat(1)* clone with syntax highlighting and Git integration.
|
<a href="#installation">Installation</a> •
|
||||||
|
<a href="#customization">Customization</a> •
|
||||||
## Features
|
<a href="#project-goals-and-alternatives">Project goals, alternatives</a> •
|
||||||
|
Translation [<a href="https://github.com/chinanf-boy/bat-zh">中文</a>][<a href="doc/README-ja.md">日本語</a>][<a href="doc/README-ko.md">한국어</a>]
|
||||||
|
</p>
|
||||||
|
|
||||||
### Syntax highlighting
|
### Syntax highlighting
|
||||||
|
|
||||||
`bat` supports syntax highlighting for a large number of programming and markup languages:
|
`bat` supports syntax highlighting for a large number of programming and markup
|
||||||
|
languages:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### Git integration
|
### Git integration
|
||||||
|
|
||||||
`bat` communicates with `git` to show modifications with respect to the index (see left side bar):
|
`bat` communicates with `git` to show modifications with respect to the index
|
||||||
|
(see left side bar):
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
### Show non-printable characters
|
||||||
|
|
||||||
|
You can use the `-A`/`--show-all` option to show and highlight non-printable
|
||||||
|
characters:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### Automatic paging
|
||||||
|
|
||||||
|
`bat` can pipe its own output to `less` if the output is too large for one screen.
|
||||||
|
|
||||||
|
### File concatenation
|
||||||
|
|
||||||
|
Oh.. you can also use it to concatenate files :wink:. Whenever
|
||||||
|
`bat` detects a non-interactive terminal (i.e. when you pipe into another process
|
||||||
|
or into a file), `bat` will act as a drop-in replacement for `cat` and
|
||||||
|
fall back to printing the plain file contents.
|
||||||
|
|
||||||
|
## How to use
|
||||||
|
|
||||||
|
Display a single file on the terminal
|
||||||
|
|
||||||
|
```bash
|
||||||
|
> bat README.md
|
||||||
|
```
|
||||||
|
|
||||||
|
Display multiple files at once
|
||||||
|
|
||||||
|
```bash
|
||||||
|
> bat src/*.rs
|
||||||
|
```
|
||||||
|
|
||||||
|
Read from stdin, determine the syntax automatically
|
||||||
|
|
||||||
|
```bash
|
||||||
|
> curl -s https://sh.rustup.rs | bat
|
||||||
|
```
|
||||||
|
|
||||||
|
Read from stdin, specify the language explicitly
|
||||||
|
|
||||||
|
```bash
|
||||||
|
> yaml2json .travis.yml | json_pp | bat -l json
|
||||||
|
```
|
||||||
|
|
||||||
|
Show and highlight non-printable characters:
|
||||||
|
```bash
|
||||||
|
> bat -A /etc/hosts
|
||||||
|
```
|
||||||
|
|
||||||
|
Use it as a `cat` replacement:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
bat > note.md # quickly create a new file
|
||||||
|
|
||||||
|
bat header.md content.md footer.md > document.md
|
||||||
|
|
||||||
|
bat -n main.rs # show line numbers (only)
|
||||||
|
|
||||||
|
bat f - g # output 'f', then stdin, then 'g'.
|
||||||
|
```
|
||||||
|
|
||||||
|
### Integration with other tools
|
||||||
|
|
||||||
|
#### `find` or `fd`
|
||||||
|
|
||||||
|
You can use the `-exec` option of `find` to preview all search results with `bat`:
|
||||||
|
```bash
|
||||||
|
find … -exec bat {} +
|
||||||
|
```
|
||||||
|
|
||||||
|
If you happen to use [`fd`](https://github.com/sharkdp/fd), you can use the `-X`/`--exec-batch` option to do the same:
|
||||||
|
```bash
|
||||||
|
fd … -X bat
|
||||||
|
```
|
||||||
|
|
||||||
|
#### `ripgrep`
|
||||||
|
|
||||||
|
With [`batgrep`](https://github.com/eth-p/bat-extras/blob/master/doc/batgrep.md), `bat` can be used as the printer for [`ripgrep`](https://github.com/BurntSushi/ripgrep) search results.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
batgrep needle src/
|
||||||
|
```
|
||||||
|
|
||||||
|
#### `tail -f`
|
||||||
|
|
||||||
|
`bat` can be combined with `tail -f` to continuously monitor a given file with syntax highlighting.
|
||||||
|
```bash
|
||||||
|
tail -f /var/log/pacman.log | bat --paging=never -l log
|
||||||
|
```
|
||||||
|
Note that we have to switch off paging in order for this to work. We have also specified the syntax
|
||||||
|
explicitly (`-l log`), as it can not be auto-detected in this case.
|
||||||
|
|
||||||
|
#### `git`
|
||||||
|
|
||||||
|
You can combine `bat` with `git show` to view an older version of a given file with proper syntax
|
||||||
|
highlighting:
|
||||||
|
```bash
|
||||||
|
git show v0.6.0:src/main.rs | bat -l rs
|
||||||
|
```
|
||||||
|
|
||||||
|
Note that syntax highlighting within diffs is currently not supported. If you are looking for this, check out [`delta`](https://github.com/dandavison/delta).
|
||||||
|
|
||||||
|
#### `xclip`
|
||||||
|
|
||||||
|
The line numbers and Git modification markers in the output of `bat` can make it hard to copy
|
||||||
|
the contents of a file. To prevent this, you can call `bat` with the `-p`/`--plain` option or
|
||||||
|
simply pipe the output into `xclip`:
|
||||||
|
```bash
|
||||||
|
bat main.cpp | xclip
|
||||||
|
```
|
||||||
|
`bat` will detect that the output is being redirected and print the plain file contents.
|
||||||
|
|
||||||
|
#### `man`
|
||||||
|
|
||||||
|
`bat` can be used as a colorizing pager for `man`, by setting the
|
||||||
|
`MANPAGER` environment variable:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
|
||||||
|
man 2 select
|
||||||
|
```
|
||||||
|
|
||||||
|
It might also be necessary to set `MANROFFOPT="-c"` if you experience
|
||||||
|
formatting problems.
|
||||||
|
|
||||||
|
If you prefer to have this bundled in a new command, you can also use [`batman`](https://github.com/eth-p/bat-extras/blob/master/doc/batman.md).
|
||||||
|
|
||||||
|
Note that the [Manpage syntax](assets/syntaxes/02_Extra/Manpage.sublime-syntax) is developed in this repository and still needs some work.
|
||||||
|
|
||||||
|
#### `prettier` / `shfmt` / `rustfmt`
|
||||||
|
|
||||||
|
The [`prettybat`](https://github.com/eth-p/bat-extras/blob/master/doc/prettybat.md) script is a wrapper that will format code and print it with `bat`.
|
||||||
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
[](https://repology.org/project/bat/versions)
|
||||||
|
|
||||||
|
### On Ubuntu
|
||||||
|
*... and other Debian-based Linux distributions.*
|
||||||
|
|
||||||
|
`bat` is making its way through the [Ubuntu](https://packages.ubuntu.com/eoan/bat) and
|
||||||
|
[Debian](https://packages.debian.org/sid/bat) package release process, and is available
|
||||||
|
for Ubuntu as of Eoan 19.10. On Debian `bat` is currently only available on the unstable
|
||||||
|
"Sid" branch.
|
||||||
|
|
||||||
|
If your Ubuntu/Debian installation is new enough you can simply run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
apt install bat
|
||||||
|
```
|
||||||
|
|
||||||
|
If the package has not yet been promoted to your Ubuntu/Debian installation, or you want
|
||||||
|
the most recent release of `bat`, download the latest `.deb` package from the
|
||||||
|
[release page](https://github.com/sharkdp/bat/releases) and install it via:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo dpkg -i bat_0.15.1_amd64.deb # adapt version number and architecture
|
||||||
|
```
|
||||||
|
|
||||||
|
### On Alpine Linux
|
||||||
|
|
||||||
|
You can install [the `bat` package](https://pkgs.alpinelinux.org/packages?name=bat)
|
||||||
|
from the official sources, provided you have the appropriate repository enabled:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
apk add bat
|
||||||
|
```
|
||||||
|
|
||||||
|
### On Arch Linux
|
||||||
|
|
||||||
|
You can install [the `bat` package](https://www.archlinux.org/packages/community/x86_64/bat/)
|
||||||
|
from the official sources:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pacman -S bat
|
||||||
|
```
|
||||||
|
|
||||||
|
### On Fedora
|
||||||
|
|
||||||
|
You can install [the `bat` package](https://koji.fedoraproject.org/koji/packageinfo?packageID=27506) from the official [Fedora Modular](https://docs.fedoraproject.org/en-US/modularity/using-modules/) repository.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
dnf install bat
|
||||||
|
```
|
||||||
|
|
||||||
|
### On Gentoo Linux
|
||||||
|
|
||||||
|
You can install [the `bat` package](https://packages.gentoo.org/packages/sys-apps/bat)
|
||||||
|
from the official sources:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
emerge sys-apps/bat
|
||||||
|
```
|
||||||
|
|
||||||
|
### On Void Linux
|
||||||
|
|
||||||
|
You can install `bat` via xbps-install:
|
||||||
|
```bash
|
||||||
|
xbps-install -S bat
|
||||||
|
```
|
||||||
|
|
||||||
|
### On FreeBSD
|
||||||
|
|
||||||
|
You can install a precompiled [`bat` package](https://www.freshports.org/textproc/bat) with pkg:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pkg install bat
|
||||||
|
```
|
||||||
|
|
||||||
|
or build it on your own from the FreeBSD ports:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd /usr/ports/textproc/bat
|
||||||
|
make install
|
||||||
|
```
|
||||||
|
|
||||||
|
### Via nix
|
||||||
|
|
||||||
|
You can install `bat` using the [nix package manager](https://nixos.org/nix):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
nix-env -i bat
|
||||||
|
```
|
||||||
|
|
||||||
|
### On openSUSE
|
||||||
|
|
||||||
|
You can install `bat` with zypper:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
zypper install bat
|
||||||
|
```
|
||||||
|
|
||||||
|
### On macOS
|
||||||
|
|
||||||
|
You can install `bat` with [Homebrew](http://braumeister.org/formula/bat):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
brew install bat
|
||||||
|
```
|
||||||
|
|
||||||
|
Or install `bat` with [MacPorts](https://ports.macports.org/port/bat/summary):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
port install bat
|
||||||
|
```
|
||||||
|
|
||||||
|
### On Windows
|
||||||
|
|
||||||
|
There are a few options to install `bat` on Windows. Once you have installed `bat`,
|
||||||
|
take a look at the ["Using `bat` on Windows"](#using-bat-on-windows) section.
|
||||||
|
|
||||||
|
#### With Chocolatey
|
||||||
|
|
||||||
|
You can install `bat` via [Chocolatey](https://chocolatey.org/packages/Bat):
|
||||||
|
```bash
|
||||||
|
choco install bat
|
||||||
|
```
|
||||||
|
|
||||||
|
#### With Scoop
|
||||||
|
|
||||||
|
You can install `bat` via [scoop](https://scoop.sh/):
|
||||||
|
```bash
|
||||||
|
scoop install bat
|
||||||
|
```
|
||||||
|
|
||||||
|
You will need to install the [Visual C++ Redistributable](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads) package.
|
||||||
|
|
||||||
|
#### From prebuilt binaries:
|
||||||
|
|
||||||
|
You can download prebuilt binaries from the [Release page](https://github.com/sharkdp/bat/releases),
|
||||||
|
|
||||||
|
You will need to install the [Visual C++ Redistributable](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads) package.
|
||||||
|
|
||||||
|
### Via Docker
|
||||||
|
|
||||||
|
There is a [Docker image](https://hub.docker.com/r/danlynn/bat/) that you can use to run `bat` in a container:
|
||||||
|
```bash
|
||||||
|
docker pull danlynn/bat
|
||||||
|
alias bat='docker run -it --rm -e BAT_THEME -e BAT_STYLE -e BAT_TABS -v "$(pwd):/myapp" danlynn/bat'
|
||||||
|
```
|
||||||
|
|
||||||
|
### Via Ansible
|
||||||
|
|
||||||
|
You can install `bat` with [Ansible](https://www.ansible.com/):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Install role on local machine
|
||||||
|
ansible-galaxy install aeimer.install_bat
|
||||||
|
```
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
# Playbook to install bat
|
||||||
|
- host: all
|
||||||
|
roles:
|
||||||
|
- aeimer.install_bat
|
||||||
|
```
|
||||||
|
|
||||||
|
- [Ansible Galaxy](https://galaxy.ansible.com/aeimer/install_bat)
|
||||||
|
- [GitHub](https://github.com/aeimer/ansible-install-bat)
|
||||||
|
|
||||||
|
This should work with the following distributions:
|
||||||
|
- Debian/Ubuntu
|
||||||
|
- ARM (eg. Raspberry PI)
|
||||||
|
- Arch Linux
|
||||||
|
- Void Linux
|
||||||
|
- FreeBSD
|
||||||
|
- MacOS
|
||||||
|
|
||||||
### From binaries
|
### From binaries
|
||||||
|
|
||||||
Check out the [Release page](https://github.com/sharkdp/bat/releases) for binary builds and Debian packages.
|
Check out the [Release page](https://github.com/sharkdp/bat/releases) for
|
||||||
|
prebuilt versions of `bat` for many different architectures. Statically-linked
|
||||||
### Arch Linux
|
binaries are also available: look for archives with `musl` in the file name.
|
||||||
|
|
||||||
On Arch Linux, you can install [the AUR package](https://aur.archlinux.org/packages/bat/) via yaourt, or manually:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git clone https://aur.archlinux.org/bat.git
|
|
||||||
cd bat
|
|
||||||
makepkg -si
|
|
||||||
```
|
|
||||||
|
|
||||||
### From source
|
### From source
|
||||||
|
|
||||||
If you want to build to compile `bat` from source, you need Rust 1.22 or higher.
|
If you want to build `bat` from source, you need Rust 1.40 or
|
||||||
You can then use `cargo` to build everything:
|
higher. You can then use `cargo` to build everything:
|
||||||
|
|
||||||
``` bash
|
```bash
|
||||||
cargo install bat
|
cargo install --locked bat
|
||||||
```
|
```
|
||||||
|
|
||||||
|
On some platforms, you might need to install `llvm` and/or `libclang-dev`.
|
||||||
|
|
||||||
## Customization
|
## Customization
|
||||||
|
|
||||||
`bat` uses the excellent [`syntect`](https://github.com/trishume/syntect/) library for syntax highlighting. `syntect` can read any [Sublime Text `.sublime-syntax` files](https://www.sublimetext.com/docs/3/syntax.html) and themes.
|
### Highlighting theme
|
||||||
|
|
||||||
To build your own language-set and theme, follow these steps:
|
Use `bat --list-themes` to get a list of all available themes for syntax
|
||||||
|
highlighting. To select the `TwoDark` theme, call `bat` with the
|
||||||
|
`--theme=TwoDark` option or set the `BAT_THEME` environment variable to
|
||||||
|
`TwoDark`. Use `export BAT_THEME="TwoDark"` in your shell's startup file to
|
||||||
|
make the change permanent. Alternatively, use `bat`s
|
||||||
|
[configuration file](https://github.com/sharkdp/bat#configuration-file).
|
||||||
|
|
||||||
Create a folder with a syntax highlighting theme:
|
If you want to preview the different themes on a custom file, you can use
|
||||||
``` bash
|
the following command (you need [`fzf`](https://github.com/junegunn/fzf) for this):
|
||||||
mkdir -p ~/.config/bat/themes
|
```bash
|
||||||
cd ~/.config/bat/themes
|
bat --list-themes | fzf --preview="bat --theme={} --color=always /path/to/file"
|
||||||
|
|
||||||
# Download a theme, for example:
|
|
||||||
git clone https://github.com/jonschlinkert/sublime-monokai-extended
|
|
||||||
|
|
||||||
# Create a 'Default.tmTheme' link
|
|
||||||
ln -s "sublime-monokai-extended/Monokai Extended.tmTheme" Default.tmTheme
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Create a folder with language definition files:
|
`bat` looks good on a dark background by default. However, if your terminal uses a
|
||||||
``` bash
|
light background, some themes like `GitHub` or `OneHalfLight` will work better for you.
|
||||||
mkdir -p ~/.config/bat/syntax
|
You can also use a custom theme by following the
|
||||||
cd ~/.config/bat/syntax
|
['Adding new themes' section below](https://github.com/sharkdp/bat#adding-new-themes).
|
||||||
|
|
||||||
# Download some language definition files, for example:
|
### Output style
|
||||||
git clone https://github.com/sublimehq/Packages/
|
|
||||||
rm -rf Packages/Markdown
|
You can use the `--style` option to control the appearance of `bat`s output.
|
||||||
git clone https://github.com/jonschlinkert/sublime-markdown-extended
|
You can use `--style=numbers,changes`, for example, to show only Git changes
|
||||||
|
and line numbers but no grid and no file header. Set the `BAT_STYLE` environment
|
||||||
|
variable to make these changes permanent or use `bat`s
|
||||||
|
[configuration file](https://github.com/sharkdp/bat#configuration-file).
|
||||||
|
|
||||||
|
### Adding new syntaxes / language definitions
|
||||||
|
|
||||||
|
`bat` uses the excellent [`syntect`](https://github.com/trishume/syntect/)
|
||||||
|
library for syntax highlighting. `syntect` can read any
|
||||||
|
[Sublime Text `.sublime-syntax` file](https://www.sublimetext.com/docs/3/syntax.html)
|
||||||
|
and theme. To add new syntax definitions, do the following.
|
||||||
|
|
||||||
|
Create a folder with syntax definition files:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mkdir -p "$(bat --config-dir)/syntaxes"
|
||||||
|
cd "$(bat --config-dir)/syntaxes"
|
||||||
|
|
||||||
|
# Put new '.sublime-syntax' language definition files
|
||||||
|
# in this folder (or its subdirectories), for example:
|
||||||
|
git clone https://github.com/tellnobody1/sublime-purescript-syntax
|
||||||
```
|
```
|
||||||
|
|
||||||
Finally, use the following command to parse all these files into a binary
|
Now use the following command to parse these files into a binary cache:
|
||||||
cache:
|
|
||||||
``` bash
|
```bash
|
||||||
bat init-cache
|
bat cache --build
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Finally, use `bat --list-languages` to check if the new languages are available.
|
||||||
|
|
||||||
|
If you ever want to go back to the default settings, call:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
bat cache --clear
|
||||||
|
```
|
||||||
|
|
||||||
|
### Adding new themes
|
||||||
|
|
||||||
|
This works very similar to how we add new syntax definitions.
|
||||||
|
|
||||||
|
First, create a folder with the new syntax highlighting themes:
|
||||||
|
```bash
|
||||||
|
mkdir -p "$(bat --config-dir)/themes"
|
||||||
|
cd "$(bat --config-dir)/themes"
|
||||||
|
|
||||||
|
# Download a theme in '.tmTheme' format, for example:
|
||||||
|
git clone https://github.com/greggb/sublime-snazzy
|
||||||
|
|
||||||
|
# Update the binary cache
|
||||||
|
bat cache --build
|
||||||
|
```
|
||||||
|
|
||||||
|
Finally, use `bat --list-themes` to check if the new themes are available.
|
||||||
|
|
||||||
|
### Using a different pager
|
||||||
|
|
||||||
|
`bat` uses the pager that is specified in the `PAGER` environment variable. If this variable is not
|
||||||
|
set, `less` is used by default. If you want to use a different pager, you can either modify the
|
||||||
|
`PAGER` variable or set the `BAT_PAGER` environment variable to override what is specified in
|
||||||
|
`PAGER`.
|
||||||
|
|
||||||
|
If you want to pass command-line arguments to the pager, you can also set them via the
|
||||||
|
`PAGER`/`BAT_PAGER` variables:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
export BAT_PAGER="less -RF"
|
||||||
|
```
|
||||||
|
|
||||||
|
Instead of using environment variables, you can also use `bat`s [configuration file](https://github.com/sharkdp/bat#configuration-file) to configure the pager (`--pager` option).
|
||||||
|
|
||||||
|
**Note**: By default, if the pager is set to `less` (and no command-line options are specified),
|
||||||
|
`bat` will pass the following command line options to the pager: `-R`/`--RAW-CONTROL-CHARS`,
|
||||||
|
`-F`/`--quit-if-one-screen` and `-X`/`--no-init`. The last option (`-X`) is only used for `less`
|
||||||
|
versions older than 530.
|
||||||
|
|
||||||
|
The `-R` option is needed to interpret ANSI colors correctly. The second option (`-F`) instructs
|
||||||
|
less to exit immediately if the output size is smaller than the vertical size of the terminal.
|
||||||
|
This is convenient for small files because you do not have to press `q` to quit the pager. The
|
||||||
|
third option (`-X`) is needed to fix a bug with the `--quit-if-one-screen` feature in old versions
|
||||||
|
of `less`. Unfortunately, it also breaks mouse-wheel support in `less`.
|
||||||
|
|
||||||
|
If you want to enable mouse-wheel scrolling on older versions of `less`, you can pass just `-R` (as
|
||||||
|
in the example above, this will disable the quit-if-one-screen feature). For less 530 or newer,
|
||||||
|
it should work out of the box.
|
||||||
|
|
||||||
|
### Dark mode
|
||||||
|
|
||||||
|
If you make use of the dark mode feature in macOS, you might want to configure `bat` to use a different
|
||||||
|
theme based on the OS theme. The following snippet uses the `default` theme when in the _dark mode_
|
||||||
|
and the `GitHub` theme when in the _light mode_.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
alias cat="bat --theme=\$(defaults read -globalDomain AppleInterfaceStyle &> /dev/null && echo default || echo GitHub)"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Configuration file
|
||||||
|
|
||||||
|
`bat` can also be customized with a configuration file. The location of the file is dependent
|
||||||
|
on your operating system. To get the default path for your system, call
|
||||||
|
```
|
||||||
|
bat --config-file
|
||||||
|
```
|
||||||
|
|
||||||
|
Alternatively, you can use the `BAT_CONFIG_PATH` environment variable to point `bat` to a
|
||||||
|
non-default location of the configuration file:
|
||||||
|
```bash
|
||||||
|
export BAT_CONFIG_PATH="/path/to/bat.conf"
|
||||||
|
```
|
||||||
|
|
||||||
|
A default configuration file can be created with the `--generate-config-file` option.
|
||||||
|
```bash
|
||||||
|
bat --generate-config-file
|
||||||
|
```
|
||||||
|
|
||||||
|
### Format
|
||||||
|
|
||||||
|
The configuration file is a simple list of command line arguments. Use `bat --help` to see a full list of possible options and values. In addition, you can add comments by prepending a line with the `#` character.
|
||||||
|
|
||||||
|
Example configuration file:
|
||||||
|
```bash
|
||||||
|
# Set the theme to "TwoDark"
|
||||||
|
--theme="TwoDark"
|
||||||
|
|
||||||
|
# Show line numbers, Git modifications and file header (but no grid)
|
||||||
|
--style="numbers,changes,header"
|
||||||
|
|
||||||
|
# Use italic text on the terminal (not supported on all terminals)
|
||||||
|
--italic-text=always
|
||||||
|
|
||||||
|
# Use C++ syntax for .ino files
|
||||||
|
--map-syntax "*.ino:C++"
|
||||||
|
|
||||||
|
# Use ".gitignore"-style highlighting for ".ignore" files
|
||||||
|
--map-syntax ".ignore:Git Ignore"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Using `bat` on Windows
|
||||||
|
|
||||||
|
`bat` mostly works out-of-the-box on Windows, but a few features may need extra configuration.
|
||||||
|
|
||||||
|
### Paging
|
||||||
|
|
||||||
|
Windows only includes a very limited pager in the form of `more`. You can download a Windows binary
|
||||||
|
for `less` [from its homepage](http://www.greenwoodsoftware.com/less/download.html) or [through
|
||||||
|
Chocolatey](https://chocolatey.org/packages/Less). To use it, place the binary in a directory in
|
||||||
|
your `PATH` or [define an environment variable](#using-a-different-pager). The [Chocolatey package](#on-windows) installs `less` automatically.
|
||||||
|
|
||||||
|
### Colors
|
||||||
|
|
||||||
|
Windows 10 natively supports colors in both `conhost.exe` (Command Prompt) and PowerShell since
|
||||||
|
[v1511](https://en.wikipedia.org/wiki/Windows_10_version_history#Version_1511_(November_Update)), as
|
||||||
|
well as in newer versions of bash. On earlier versions of Windows, you can use
|
||||||
|
[Cmder](http://cmder.net/), which includes [ConEmu](https://conemu.github.io/).
|
||||||
|
|
||||||
|
**Note:** The Git and MSYS versions of `less` do not correctly interpret colors on Windows. If you
|
||||||
|
don’t have any other pagers installed, you can disable paging entirely by passing `--paging=never`
|
||||||
|
or by setting `BAT_PAGER` to an empty string.
|
||||||
|
|
||||||
|
### Cygwin
|
||||||
|
|
||||||
|
`bat` on Windows does not natively support Cygwin's unix-style paths (`/cygdrive/*`). When passed an absolute cygwin path as an argument, `bat` will encounter the following error: `The system cannot find the path specified. (os error 3)`
|
||||||
|
|
||||||
|
This can be solved by creating a wrapper or adding the following function to your `.bash_profile` file:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
bat() {
|
||||||
|
local index
|
||||||
|
local args=("$@")
|
||||||
|
for index in $(seq 0 ${#args[@]}) ; do
|
||||||
|
case "${args[index]}" in
|
||||||
|
-*) continue;;
|
||||||
|
*) [ -e "${args[index]}" ] && args[index]="$(cygpath --windows "${args[index]}")";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
command bat "${args[@]}"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
### Terminals & colors
|
||||||
|
|
||||||
|
`bat` handles terminals *with* and *without* truecolor support. However, the colors in the syntax
|
||||||
|
highlighting themes are not optimized for 8-bit colors and it is therefore strongly recommended
|
||||||
|
that you use a terminal with 24-bit truecolor support (`terminator`, `konsole`, `iTerm2`, ...).
|
||||||
|
See [this article](https://gist.github.com/XVilka/8346728) for more details and a full list of
|
||||||
|
terminals with truecolor support.
|
||||||
|
|
||||||
|
Make sure that your truecolor terminal sets the `COLORTERM` variable to either `truecolor` or
|
||||||
|
`24bit`. Otherwise, `bat` will not be able to determine whether or not 24-bit escape sequences
|
||||||
|
are supported (and fall back to 8-bit colors).
|
||||||
|
|
||||||
|
### Line numbers and grid are hardly visible
|
||||||
|
|
||||||
|
Please try a different theme (see `bat --list-themes` for a list). The `OneHalfDark` and
|
||||||
|
`OneHalfLight` themes provide grid and line colors that are brighter.
|
||||||
|
|
||||||
|
### File encodings
|
||||||
|
|
||||||
|
`bat` natively supports UTF-8 as well as UTF-16. For every other file encoding, you may need to
|
||||||
|
convert to UTF-8 first because the encodings can typically not be auto-detected. You can `iconv`
|
||||||
|
to do so.
|
||||||
|
Example: if you have a PHP file in Latin-1 (ISO-8859-1) encoding, you can call:
|
||||||
|
``` bash
|
||||||
|
iconv -f ISO-8859-1 -t UTF-8 my-file.php | bat
|
||||||
|
```
|
||||||
|
Note: you might have to use the `-l`/`--language` option if the syntax can not be auto-detected
|
||||||
|
by `bat`.
|
||||||
|
|
||||||
|
## Development
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Recursive clone to retrieve all submodules
|
||||||
|
git clone --recursive https://github.com/sharkdp/bat
|
||||||
|
|
||||||
|
# Build (debug version)
|
||||||
|
cd bat
|
||||||
|
cargo build --bins
|
||||||
|
|
||||||
|
# Run unit tests and integration tests
|
||||||
|
cargo test
|
||||||
|
|
||||||
|
# Install (release version)
|
||||||
|
cargo install --locked
|
||||||
|
|
||||||
|
# Build a bat binary with modified syntaxes and themes
|
||||||
|
bash assets/create.sh
|
||||||
|
cargo install --locked --force
|
||||||
|
```
|
||||||
|
|
||||||
|
## Maintainers
|
||||||
|
|
||||||
|
- [sharkdp](https://github.com/sharkdp)
|
||||||
|
- [eth-p](https://github.com/eth-p)
|
||||||
|
|
||||||
|
## Project goals and alternatives
|
||||||
|
|
||||||
|
`bat` tries to achieve the following goals:
|
||||||
|
|
||||||
|
- Provide beautiful, advanced syntax highlighting
|
||||||
|
- Integrate with Git to show file modifications
|
||||||
|
- Be a drop-in replacement for (POSIX) `cat`
|
||||||
|
- Offer a user-friendly command-line interface
|
||||||
|
|
||||||
|
There are a lot of alternatives, if you are looking for similar programs. See
|
||||||
|
[this document](doc/alternatives.md) for a comparison.
|
||||||
|
|
||||||
|
## License
|
||||||
|
Copyright (c) 2018-2020 [bat-developers](https://github.com/sharkdp/bat).
|
||||||
|
|
||||||
|
`bat` is distributed under the terms of both the MIT License and the Apache License 2.0.
|
||||||
|
|
||||||
|
See the [LICENSE-APACHE](LICENSE-APACHE) and [LICENSE-MIT](LICENSE-MIT) files for license details.
|
||||||
|
|||||||
@@ -0,0 +1,49 @@
|
|||||||
|
environment:
|
||||||
|
global:
|
||||||
|
TARGET: x86_64-pc-windows-msvc
|
||||||
|
RUST_VERSION: stable
|
||||||
|
CRATE_NAME: bat
|
||||||
|
CARGO_HOME: "c:\\cargo"
|
||||||
|
RUSTUP_HOME: "c:\\rustup"
|
||||||
|
|
||||||
|
install:
|
||||||
|
- appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
|
||||||
|
- rustup-init.exe -y --default-host %TARGET% --profile minimal
|
||||||
|
- set PATH=%PATH%;C:\cargo\bin
|
||||||
|
- rustc -Vv
|
||||||
|
- cargo -V
|
||||||
|
|
||||||
|
build: false
|
||||||
|
test_script:
|
||||||
|
- cargo test --target %TARGET% --verbose
|
||||||
|
- cargo run --target %TARGET% -- src/bin/bat/main.rs README.md --paging=never
|
||||||
|
|
||||||
|
before_deploy:
|
||||||
|
# Generate artifacts for release
|
||||||
|
- cargo build --bins --release --verbose
|
||||||
|
- ps: ci\before_deploy.ps1
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
description: 'Automatically deployed release'
|
||||||
|
artifact: /.*\.zip/
|
||||||
|
# Here's how:
|
||||||
|
# - Go to 'https://github.com/settings/tokens/new' and generate a Token with only the
|
||||||
|
# `public_repo` scope enabled
|
||||||
|
# - Then go to 'https://ci.appveyor.com/tools/encrypt' and enter the newly generated token.
|
||||||
|
# - Enter the "encrypted value" below
|
||||||
|
auth_token:
|
||||||
|
secure: oO4/J+hcFXgXcEqEc8gzlQNqLG0IxU78s4EyH+uczGdsyWajb3yipxPR6nXUvmoj
|
||||||
|
provider: GitHub
|
||||||
|
on:
|
||||||
|
RUST_VERSION: stable
|
||||||
|
appveyor_repo_tag: true
|
||||||
|
|
||||||
|
cache:
|
||||||
|
- C:\Users\appveyor\.cargo\registry
|
||||||
|
- target
|
||||||
|
|
||||||
|
notifications:
|
||||||
|
- provider: Email
|
||||||
|
on_build_success: false
|
||||||
|
on_build_failure: false
|
||||||
|
on_build_status_changed: false
|
||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
* linguist-vendored
|
||||||
Vendored
+2
@@ -0,0 +1,2 @@
|
|||||||
|
syntaxes/*
|
||||||
|
themes/*
|
||||||
Vendored
+44
@@ -0,0 +1,44 @@
|
|||||||
|
## Syntax Highlighting in bat
|
||||||
|
|
||||||
|
`bat` uses the [syntect](https://github.com/trishume/syntect) library to highlight source
|
||||||
|
code. As a basis, syntect uses [Sublime Text](https://www.sublimetext.com/) syntax definitions
|
||||||
|
in the `.sublime-syntax` format.
|
||||||
|
|
||||||
|
In order to add new syntaxes to `bat`, follow these steps:
|
||||||
|
|
||||||
|
1. Find a Sublime Text syntax for the given language, preferably in a separate Git repository
|
||||||
|
which can be included as a submodule (under `assets/syntaxes`).
|
||||||
|
|
||||||
|
2. If the Sublime Text syntax is only available as a `.tmLanguage` file, open the file in
|
||||||
|
Sublime Text and convert it to a `.sublime-syntax` file via *Tools* -> *Developer* ->
|
||||||
|
*New Syntax from XXX.tmLanguage...*. Save the new file in the `assets/syntaxes` folder.
|
||||||
|
|
||||||
|
3. Run the `create.sh` script. It calls `bat cache --build` to parse all available
|
||||||
|
`.sublime-syntax` files and serialize them to a `syntaxes.bin` file (in this folder).
|
||||||
|
|
||||||
|
4. Re-compile `bat`. At compilation time, the `syntaxes.bin` file will be stored inside the
|
||||||
|
`bat` binary.
|
||||||
|
|
||||||
|
5. If you send a pull request with your changes, please do *not* include the changed `syntaxes.bin`
|
||||||
|
file. A new binary cache file will be created once before every new release of `bat`.
|
||||||
|
|
||||||
|
### Troubleshooting
|
||||||
|
|
||||||
|
Make sure that the local cache does not interfere with the internally stored syntaxes and
|
||||||
|
themes (`bat cache --clear`).
|
||||||
|
|
||||||
|
### Manual modifications
|
||||||
|
|
||||||
|
The following files have been manually modified after converting from a `.tmLanguage` file:
|
||||||
|
|
||||||
|
* `Dart.sublime-syntax` => removed `#regex.dart` include.
|
||||||
|
* `INI.sublime-syntax` => added `.hgrc`, `hgrc`, and `desktop` file types.
|
||||||
|
* `Org mode.sublime-syntax` => removed `task` file type.
|
||||||
|
|
||||||
|
### Non-submodule additions
|
||||||
|
|
||||||
|
* `Assembly (x86_64)` has been manually added from https://github.com/13xforever/x86-assembly-textmate-bundle due to `git clone` recursion problems
|
||||||
|
* `Nim.sublime-syntax` has been added manually from https://github.com/getzola/zola/blob/master/sublime_syntaxes/Nim.sublime-syntax as there was no suitable Git repository for it. The original syntax seems to originate from https://github.com/Varriount/NimLime
|
||||||
|
* `Rego.sublime-syntax` has been added manually from https://github.com/open-policy-agent/opa/blob/master/misc/syntax/sublime/rego.sublime-syntax
|
||||||
|
as it is not kept in a standalone repository. The file is generated from
|
||||||
|
https://github.com/open-policy-agent/opa/blob/master/misc/syntax/textmate/Rego.tmLanguage
|
||||||
Vendored
+76
@@ -0,0 +1,76 @@
|
|||||||
|
# Fish Shell Completions
|
||||||
|
# Place or symlink to $XDG_CONFIG_HOME/fish/completions/{{PROJECT_EXECUTABLE}}.fish ($XDG_CONFIG_HOME is usually set to ~/.config)
|
||||||
|
|
||||||
|
# Helper function:
|
||||||
|
function __{{PROJECT_EXECUTABLE}}_autocomplete_languages --description "A helper function used by "(status filename)
|
||||||
|
{{PROJECT_EXECUTABLE}} --list-languages | awk -F':' '
|
||||||
|
{
|
||||||
|
lang=$1
|
||||||
|
split($2, exts, ",")
|
||||||
|
|
||||||
|
for (i in exts) {
|
||||||
|
ext=exts[i]
|
||||||
|
if (ext !~ /[A-Z].*/ && ext !~ /^\..*rc$/) {
|
||||||
|
print ext"\t"lang
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
' | sort
|
||||||
|
end
|
||||||
|
|
||||||
|
# Completions:
|
||||||
|
|
||||||
|
complete -c {{PROJECT_EXECUTABLE}} -l color -xka "auto never always" -d "Specify when to use colored output (default: auto)" -n "not __fish_seen_subcommand_from cache"
|
||||||
|
|
||||||
|
complete -c {{PROJECT_EXECUTABLE}} -l config-dir -d "Display location of '{{PROJECT_EXECUTABLE}}' configuration directory" -n "not __fish_seen_subcommand_from cache"
|
||||||
|
|
||||||
|
complete -c {{PROJECT_EXECUTABLE}} -l config-file -d "Display location of '{{PROJECT_EXECUTABLE}}' configuration file" -n "not __fish_seen_subcommand_from cache"
|
||||||
|
|
||||||
|
complete -c {{PROJECT_EXECUTABLE}} -l decorations -xka "auto never always" -d "Specify when to use the decorations specified with '--style' (default: auto)" -n "not __fish_seen_subcommand_from cache"
|
||||||
|
|
||||||
|
complete -c {{PROJECT_EXECUTABLE}} -s h -l help -d "Print help message" -n "not __fish_seen_subcommand_from cache"
|
||||||
|
|
||||||
|
complete -c {{PROJECT_EXECUTABLE}} -s H -l highlight-line -x -d "<N> Highlight the N-th line with a different background color" -n "not __fish_seen_subcommand_from cache"
|
||||||
|
|
||||||
|
complete -c {{PROJECT_EXECUTABLE}} -l italic-text -xka "always never" -d "Specify when to use ANSI sequences for italic text (default: never)" -n "not __fish_seen_subcommand_from cache"
|
||||||
|
|
||||||
|
complete -c {{PROJECT_EXECUTABLE}} -s l -l language -d "Set the language for syntax highlighting" -n "not __fish_seen_subcommand_from cache" -xa "(__{{PROJECT_EXECUTABLE}}_autocomplete_languages)"
|
||||||
|
|
||||||
|
complete -c {{PROJECT_EXECUTABLE}} -s r -l line-range -x -d "<N:M> Only print the specified range of lines for each file" -n "not __fish_seen_subcommand_from cache"
|
||||||
|
|
||||||
|
complete -c {{PROJECT_EXECUTABLE}} -l list-languages -d "Display list of supported languages for syntax highlighting" -n "not __fish_seen_subcommand_from cache"
|
||||||
|
|
||||||
|
complete -c {{PROJECT_EXECUTABLE}} -l list-themes -d "Display a list of supported themes for syntax highlighting" -n "not __fish_seen_subcommand_from cache"
|
||||||
|
|
||||||
|
complete -c {{PROJECT_EXECUTABLE}} -s m -l map-syntax -x -d "<from:to> Map a file extension or file name to an existing syntax" -n "not __fish_seen_subcommand_from cache"
|
||||||
|
|
||||||
|
complete -c {{PROJECT_EXECUTABLE}} -s n -l number -d "Only show line numbers, no other decorations. Alias for '--style=numbers'" -n "not __fish_seen_subcommand_from cache"
|
||||||
|
|
||||||
|
complete -c {{PROJECT_EXECUTABLE}} -l pager -x -d "<command> Specify which pager program to use (default: less)" -n "not __fish_seen_subcommand_from cache"
|
||||||
|
|
||||||
|
complete -c {{PROJECT_EXECUTABLE}} -l paging -xka "auto never always" -d "Specify when to use the pager (default: auto)" -n "not __fish_seen_subcommand_from cache"
|
||||||
|
|
||||||
|
complete -c {{PROJECT_EXECUTABLE}} -s p -l plain -d "Only show plain style, no decorations. Alias for '--style=plain'" -n "not __fish_seen_subcommand_from cache"
|
||||||
|
|
||||||
|
complete -c {{PROJECT_EXECUTABLE}} -s A -l show-all -d "Show non-printable characters like space/tab/newline" -n "not __fish_seen_subcommand_from cache"
|
||||||
|
|
||||||
|
complete -c {{PROJECT_EXECUTABLE}} -l style -xka "auto full plain changes header grid numbers" -d "Comma-separated list of style elements or presets to display with file contents" -n "not __fish_seen_subcommand_from cache"
|
||||||
|
|
||||||
|
complete -c {{PROJECT_EXECUTABLE}} -l tabs -x -d "<T> Set the tab width to T spaces (width of 0 passes tabs through directly)" -n "not __fish_seen_subcommand_from cache"
|
||||||
|
|
||||||
|
complete -c {{PROJECT_EXECUTABLE}} -l terminal-width -x -d "<width> Explicitly set terminal width; Prefix with '+' or '-' to offset (default width is auto determined)" -n "not __fish_seen_subcommand_from cache"
|
||||||
|
|
||||||
|
complete -c {{PROJECT_EXECUTABLE}} -l theme -xka "({{PROJECT_EXECUTABLE}} --list-themes | cat)" -d "Set the theme for syntax highlighting" -n "not __fish_seen_subcommand_from cache"
|
||||||
|
|
||||||
|
complete -c {{PROJECT_EXECUTABLE}} -s u -l unbuffered -d "POSIX-compliant unbuffered output. Option is ignored" -n "not __fish_seen_subcommand_from cache"
|
||||||
|
|
||||||
|
complete -c {{PROJECT_EXECUTABLE}} -s V -l version -d "Show version information" -n "not __fish_seen_subcommand_from cache"
|
||||||
|
|
||||||
|
complete -c {{PROJECT_EXECUTABLE}} -l wrap -xka "auto never character" -d "<mode> Specify the text-wrapping mode (default: auto)" -n "not __fish_seen_subcommand_from cache"
|
||||||
|
|
||||||
|
# Sub-command 'cache' completions
|
||||||
|
complete -c {{PROJECT_EXECUTABLE}} -a "cache" -d "Modify the syntax/language definition cache" -n "not __fish_seen_subcommand_from cache"
|
||||||
|
|
||||||
|
complete -c {{PROJECT_EXECUTABLE}} -l build -f -d "Parse syntaxes/language definitions into cache" -n "__fish_seen_subcommand_from cache"
|
||||||
|
|
||||||
|
complete -c {{PROJECT_EXECUTABLE}} -l clear -f -d "Reset syntaxes/language definitions to default settings" -n "__fish_seen_subcommand_from cache"
|
||||||
+57
-21
@@ -1,27 +1,63 @@
|
|||||||
set -e
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
THEME_FOLDER="$HOME/.config/bat/themes"
|
ASSET_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
SYNTAX_FOLDER="$HOME/.config/bat/syntax"
|
REPO_DIR="$ASSET_DIR/.."
|
||||||
|
|
||||||
if [ ! -e "$THEME_FOLDER" ]; then
|
# Ensure submodules are initialized.
|
||||||
mkdir -p "$THEME_FOLDER"
|
function update_submodules() {
|
||||||
(
|
local submodule
|
||||||
cd "$THEME_FOLDER"
|
local submodule_prompt=unspecified
|
||||||
git clone https://github.com/jonschlinkert/sublime-monokai-extended
|
local submodule_path
|
||||||
ln -s "sublime-monokai-extended/Monokai Extended.tmTheme" Default.tmTheme
|
|
||||||
)
|
{
|
||||||
|
while { read -r submodule && read -r submodule_path; } <&3; do
|
||||||
|
if ! [[ -d "${REPO_DIR}/.git/modules/${submodule}" ]] && [[ -d "${REPO_DIR}/${submodule_path}" ]]; then
|
||||||
|
if [[ "$submodule_prompt" = "unspecified" ]]; then
|
||||||
|
echo "One or more submodules were found to be uninitialized."
|
||||||
|
printf "Initialize and update them? [Y/n] "
|
||||||
|
read -r submodule_prompt
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$submodule_prompt" in
|
||||||
|
y|yes|'') {
|
||||||
|
git -C "$REPO_DIR" submodule update --init "$submodule_path"
|
||||||
|
};;
|
||||||
|
n|no) {
|
||||||
|
return
|
||||||
|
};;
|
||||||
|
*) {
|
||||||
|
echo "Unknown answer. Not updating submodules."
|
||||||
|
};;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
} 3< <(git config --file "${REPO_DIR}/.gitmodules" --null --get-regexp path | xargs -0 printf "%s\n" | sed 's/^submodule.//;s/.path$//')
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -t 0 ]; then
|
||||||
|
update_submodules
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -e "$SYNTAX_FOLDER" ]; then
|
# Always remove the local cache to avoid any confusion
|
||||||
mkdir -p "$SYNTAX_FOLDER"
|
bat cache --clear
|
||||||
(
|
|
||||||
cd "$SYNTAX_FOLDER"
|
|
||||||
git clone https://github.com/sublimehq/Packages/
|
|
||||||
rm -rf Packages/Markdown
|
|
||||||
git clone https://github.com/jonschlinkert/sublime-markdown-extended
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
|
|
||||||
bat init-cache
|
# TODO:
|
||||||
|
# - Remove the JavaDoc patch once https://github.com/trishume/syntect/issues/222 has been fixed
|
||||||
|
# - Remove the C# patch once https://github.com/sublimehq/Packages/pull/2331 has been merged
|
||||||
|
|
||||||
cp "$HOME/.cache/bat"/* .
|
(
|
||||||
|
cd "$ASSET_DIR"
|
||||||
|
for patch in patches/*.patch; do
|
||||||
|
patch --strip=0 < "$patch"
|
||||||
|
done
|
||||||
|
)
|
||||||
|
|
||||||
|
bat cache --build --blank --source="$ASSET_DIR" --target="$ASSET_DIR"
|
||||||
|
|
||||||
|
(
|
||||||
|
cd "$ASSET_DIR"
|
||||||
|
for patch in patches/*.patch; do
|
||||||
|
patch --strip=0 --reverse < "$patch"
|
||||||
|
done
|
||||||
|
)
|
||||||
|
|||||||
Vendored
+173
@@ -0,0 +1,173 @@
|
|||||||
|
.TH {{PROJECT_EXECUTABLE | upcase}} "1"
|
||||||
|
.SH NAME
|
||||||
|
{{PROJECT_EXECUTABLE}} \- a cat(1) clone with syntax highlighting and Git integration.
|
||||||
|
.SH "USAGE"
|
||||||
|
.IP "{{PROJECT_EXECUTABLE}} [OPTIONS] [FILE]..."
|
||||||
|
.IP "{{PROJECT_EXECUTABLE}} cache [CACHE-OPTIONS] [--build|--clear]
|
||||||
|
.SH DESCRIPTION
|
||||||
|
{{PROJECT_EXECUTABLE}} prints the syntax-highlighted content of a collection of FILEs to the
|
||||||
|
terminal. If no FILE is specified, or when FILE is '-', it reads from standard input.
|
||||||
|
|
||||||
|
{{PROJECT_EXECUTABLE}} supports a large number of programming and markup languages.
|
||||||
|
It also communicates with git(1) to show modifications with respect to the git index.
|
||||||
|
{{PROJECT_EXECUTABLE}} automatically pipes its output through a pager (by default: less).
|
||||||
|
|
||||||
|
Whenever the output of {{PROJECT_EXECUTABLE}} goes to a non-interactive terminal, i.e. when the
|
||||||
|
output is piped into another process or into a file, {{PROJECT_EXECUTABLE}} will act as a drop-in
|
||||||
|
replacement for cat(1) and fall back to printing the plain file contents.
|
||||||
|
|
||||||
|
.SH "OPTIONS"
|
||||||
|
General remarks: Command-line options like '-l'/'--language' that take values can be specified as
|
||||||
|
either '--language value', '--language=value', '-l value' or '-lvalue'.
|
||||||
|
.HP
|
||||||
|
\fB\-A\fR, \fB\-\-show\-all\fR
|
||||||
|
.IP
|
||||||
|
Show non\-printable characters like space, tab or newline. Use '\-\-tabs' to
|
||||||
|
control the width of the tab\-placeholders.
|
||||||
|
.HP
|
||||||
|
\fB\-p\fR, \fB\-\-plain\fR
|
||||||
|
.IP
|
||||||
|
Only show plain style, no decorations. This is an alias for
|
||||||
|
\&'\-\-style=plain'. When '\-p' is used twice ('\-pp'), it also disables
|
||||||
|
automatic paging (alias for '\-\-style=plain \fB\-\-pager\fR=\fI\,never\/\fR').
|
||||||
|
.HP
|
||||||
|
\fB\-l\fR, \fB\-\-language\fR <language>
|
||||||
|
.IP
|
||||||
|
Explicitly set the language for syntax highlighting. The language can be
|
||||||
|
specified as a name (like 'C++' or 'LaTeX') or possible file extension
|
||||||
|
(like 'cpp', 'hpp' or 'md'). Use '\-\-list\-languages' to show all supported
|
||||||
|
language names and file extensions.
|
||||||
|
.HP
|
||||||
|
\fB\-H\fR, \fB\-\-highlight\-line\fR <N:M>...
|
||||||
|
.IP
|
||||||
|
Highlight the specified line ranges with a different background color For example:
|
||||||
|
.RS
|
||||||
|
.IP "\-\-highlight\-line 40"
|
||||||
|
highlights line 40
|
||||||
|
.IP "\-\-highlight\-line 30:40"
|
||||||
|
highlights lines 30 to 40
|
||||||
|
.IP "\-\-highlight\-line :40"
|
||||||
|
highlights lines 1 to 40
|
||||||
|
.IP "\-\-highlight\-line 40:"
|
||||||
|
highlights lines 40 to the end of the file
|
||||||
|
.RE
|
||||||
|
.HP
|
||||||
|
\fB\-\-tabs\fR <T>
|
||||||
|
.IP
|
||||||
|
Set the tab width to T spaces. Use a width of 0 to pass tabs through directly
|
||||||
|
.HP
|
||||||
|
\fB\-\-wrap\fR <mode>
|
||||||
|
.IP
|
||||||
|
Specify the text\-wrapping mode (*auto*, never, character). The '\-\-terminal\-width' option
|
||||||
|
can be used in addition to control the output width.
|
||||||
|
.HP
|
||||||
|
\fB\-\-terminal\-width\fR <width>
|
||||||
|
.IP
|
||||||
|
Explicitly set the width of the terminal instead of determining it automatically. If
|
||||||
|
prefixed with '+' or '\-', the value will be treated as an offset to the actual terminal
|
||||||
|
width. See also: '\-\-wrap'.
|
||||||
|
.HP
|
||||||
|
\fB\-n\fR, \fB\-\-number\fR
|
||||||
|
.IP
|
||||||
|
Only show line numbers, no other decorations. This is an alias for '\-\-style=numbers'
|
||||||
|
.HP
|
||||||
|
\fB\-\-color\fR <when>
|
||||||
|
.IP
|
||||||
|
Specify when to use colored output. The automatic mode only enables colors if an
|
||||||
|
interactive terminal is detected. Possible values: *auto*, never, always.
|
||||||
|
.HP
|
||||||
|
\fB\-\-italic\-text\fR <when>
|
||||||
|
.IP
|
||||||
|
Specify when to use ANSI sequences for italic text in the output. Possible values:
|
||||||
|
always, *never*.
|
||||||
|
.HP
|
||||||
|
\fB\-\-decorations\fR <when>
|
||||||
|
.IP
|
||||||
|
Specify when to use the decorations that have been specified via '\-\-style'. The
|
||||||
|
automatic mode only enables decorations if an interactive terminal is detected. Possible
|
||||||
|
values: *auto*, never, always.
|
||||||
|
.HP
|
||||||
|
\fB\-\-paging\fR <when>
|
||||||
|
.IP
|
||||||
|
Specify when to use the pager. To control which pager is used, set the PAGER or
|
||||||
|
BAT_PAGER environment variables (the latter takes precedence) or use the '\-\-pager'
|
||||||
|
option. To disable the pager permanently, set BAT_PAGER to an empty string or set
|
||||||
|
\&'\-\-paging=never' in the configuration file. Possible values: *auto*, never, always.
|
||||||
|
.HP
|
||||||
|
\fB\-\-pager\fR <command>
|
||||||
|
.IP
|
||||||
|
Determine which pager is used. This option will overwrite the PAGER and BAT_PAGER
|
||||||
|
environment variables. The default pager is 'less'. To disable the pager completely, use
|
||||||
|
the '\-\-paging' option. Example: '\-\-pager "less \fB\-RF\fR"'.
|
||||||
|
.HP
|
||||||
|
\fB\-m\fR, \fB\-\-map\-syntax\fR <glob-pattern:syntax-name>...
|
||||||
|
.IP
|
||||||
|
Map a glob pattern to an existing syntax name. The glob pattern is matched on the full
|
||||||
|
path and the filename. For example, to highlight *.build files with the Python syntax,
|
||||||
|
use -m '*.build:Python'. To highlight files named '.myignore' with the Git Ignore
|
||||||
|
syntax, use -m '.myignore:Git Ignore'.
|
||||||
|
.HP
|
||||||
|
\fB\-\-theme\fR <theme>
|
||||||
|
.IP
|
||||||
|
Set the theme for syntax highlighting. Use '\-\-list\-themes' to see all available themes.
|
||||||
|
To set a default theme, add the '\-\-theme="..."' option to the configuration file or
|
||||||
|
export the BAT_THEME environment variable (e.g.: export BAT_THEME="...").
|
||||||
|
.HP
|
||||||
|
\fB\-\-list\-themes\fR
|
||||||
|
.IP
|
||||||
|
Display a list of supported themes for syntax highlighting.
|
||||||
|
.HP
|
||||||
|
\fB\-\-style\fR <style\-components>
|
||||||
|
.IP
|
||||||
|
Configure which elements (line numbers, file headers, grid borders, Git modifications,
|
||||||
|
\&..) to display in addition to the file contents. The argument is a comma\-separated list
|
||||||
|
of components to display (e.g. 'numbers,changes,grid') or a pre\-defined style ('full').
|
||||||
|
To set a default style, add the '\-\-style=".."' option to the configuration file or
|
||||||
|
export the BAT_STYLE environment variable (e.g.: export BAT_STYLE=".."). Possible
|
||||||
|
values: *auto*, full, plain, changes, header, grid, numbers, snip.
|
||||||
|
.HP
|
||||||
|
\fB\-r\fR, \fB\-\-line\-range\fR <N:M>...
|
||||||
|
.IP
|
||||||
|
Only print the specified range of lines for each file. For example:
|
||||||
|
.RS
|
||||||
|
.IP "\-\-line\-range 30:40"
|
||||||
|
prints lines 30 to 40
|
||||||
|
.IP "\-\-line\-range :40"
|
||||||
|
prints lines 1 to 40
|
||||||
|
.IP "\-\-line\-range 40:"
|
||||||
|
prints lines 40 to the end of the file
|
||||||
|
.RE
|
||||||
|
.HP
|
||||||
|
\fB\-L\fR, \fB\-\-list\-languages\fR
|
||||||
|
.IP
|
||||||
|
Display a list of supported languages for syntax highlighting.
|
||||||
|
.HP
|
||||||
|
\fB\-u\fR, \fB\-\-unbuffered\fR
|
||||||
|
.IP
|
||||||
|
This option exists for POSIX\-compliance reasons ('u' is for 'unbuffered'). The output is
|
||||||
|
always unbuffered \- this option is simply ignored.
|
||||||
|
.HP
|
||||||
|
\fB\-h\fR, \fB\-\-help\fR
|
||||||
|
.IP
|
||||||
|
Print this help message.
|
||||||
|
.HP
|
||||||
|
\fB\-V\fR, \fB\-\-version\fR
|
||||||
|
.IP
|
||||||
|
Show version information.
|
||||||
|
.SH "POSITIONAL ARGUMENTS"
|
||||||
|
.HP
|
||||||
|
\fB<FILE>...\fR
|
||||||
|
.IP
|
||||||
|
Files to print and concatenate. Use a dash ('\-') or no argument at all to read from
|
||||||
|
standard input.
|
||||||
|
.SH "SUBCOMMANDS"
|
||||||
|
.HP
|
||||||
|
\fBcache\fR - Modify the syntax\-definition and theme cache.
|
||||||
|
.SH "FILES"
|
||||||
|
{{PROJECT_EXECUTABLE}} can also be customized with a configuration file. The location of the file
|
||||||
|
is dependent on your operating system. To get the default path for your system, call:
|
||||||
|
|
||||||
|
\fB{{PROJECT_EXECUTABLE}} --config-file\fR
|
||||||
|
|
||||||
|
Alternatively, you can use the BAT_CONFIG_PATH environment variable to point bat to a non-default
|
||||||
|
location of the configuration file.
|
||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
diff --git syntaxes/01_Packages/C#/C#.sublime-syntax syntaxes/01_Packages/C#/C#.sublime-syntax
|
||||||
|
index ed494f8b..01b710e8 100644
|
||||||
|
--- syntaxes/01_Packages/C#/C#.sublime-syntax
|
||||||
|
+++ syntaxes/01_Packages/C#/C#.sublime-syntax
|
||||||
|
@@ -1312,7 +1312,7 @@ contexts:
|
||||||
|
2: punctuation.separator.cs
|
||||||
|
3: punctuation.section.brackets.end.cs
|
||||||
|
4: keyword.operator.pointer.cs
|
||||||
|
- - match: \((?=(?:[^,)(]*|\([^\)]*\))*,)
|
||||||
|
+ - match: \((?=(?:[^,)(]|\([^\)]*\))*,)
|
||||||
|
scope: punctuation.section.group.begin.cs
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.group.tuple.cs
|
||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
diff --git syntaxes/01_Packages/Java/JavaDoc.sublime-syntax syntaxes/01_Packages/Java/JavaDoc.sublime-syntax
|
||||||
|
index 422a6a9..40a741e 100644
|
||||||
|
--- syntaxes/01_Packages/Java/JavaDoc.sublime-syntax
|
||||||
|
+++ syntaxes/01_Packages/Java/JavaDoc.sublime-syntax
|
||||||
|
@@ -13,7 +13,7 @@ variables:
|
||||||
|
contexts:
|
||||||
|
prototype:
|
||||||
|
# https://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#leadingasterisks
|
||||||
|
- - match: ^\s*(\*)\s*(?!\s*@)
|
||||||
|
+ - match: ^\s*(\*)(?!/)\s*(?!\s*@)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.comment.javadoc
|
||||||
|
|
||||||
+81
@@ -0,0 +1,81 @@
|
|||||||
|
diff --git syntaxes/01_Packages/Makefile/Makefile.sublime-syntax syntaxes/01_Packages/Makefile/Makefile.sublime-syntax
|
||||||
|
index 3cc3a97e..0c7a3f24 100644
|
||||||
|
--- syntaxes/01_Packages/Makefile/Makefile.sublime-syntax
|
||||||
|
+++ syntaxes/01_Packages/Makefile/Makefile.sublime-syntax
|
||||||
|
@@ -44,64 +44,50 @@ variables:
|
||||||
|
# variable substitutions anywhere. We try to remedy this by hacking in a
|
||||||
|
# regex that matches up to four levels of nested parentheses, and ignores
|
||||||
|
# whatever's inside the parentheses.
|
||||||
|
- nps: '[^()]*'
|
||||||
|
- open: '(?:\('
|
||||||
|
- close: '\))?' # ignore this invalid.illegal
|
||||||
|
+ nps_unnested: '[^()]*'
|
||||||
|
+ nps: '[^()]*(?=[()])'
|
||||||
|
+ open: '(?:{{nps}}\('
|
||||||
|
+ close: '\){{nps_unnested}})?' # ignore this invalid.illegal
|
||||||
|
just_eat: | # WARNING: INSANITY FOLLOWS!
|
||||||
|
- (?x) # ignore whitespace in this regex
|
||||||
|
- {{nps}} # level 0
|
||||||
|
+ (?x)(?: # ignore whitespace in this regex
|
||||||
|
{{open}} # start level 1 __
|
||||||
|
- {{nps}} # level 1 _______ /*_>-<
|
||||||
|
{{open}} # start level 2 ___/ _____ \__/ /
|
||||||
|
- {{nps}} # level 2 <____/ \____/
|
||||||
|
{{open}} # start level 3 is like snek... (by Valerie Haecky)
|
||||||
|
- {{nps}} # level 3
|
||||||
|
{{open}} # start level 4
|
||||||
|
{{nps}} # level 4
|
||||||
|
{{close}} # end level 4
|
||||||
|
- {{nps}} # level 3
|
||||||
|
{{close}} # end level 3
|
||||||
|
- {{nps}} # level 2
|
||||||
|
{{open}} # start level 3
|
||||||
|
- {{nps}} # level 3
|
||||||
|
{{open}} # start level 4
|
||||||
|
{{nps}} # level 4
|
||||||
|
{{close}} # end level 4
|
||||||
|
- {{nps}} # level 3
|
||||||
|
{{close}} # end level 3
|
||||||
|
- {{nps}} # level 2
|
||||||
|
+ {{nps}}
|
||||||
|
{{close}} # end level 2
|
||||||
|
- {{nps}} # level 1
|
||||||
|
{{open}} # start level 2
|
||||||
|
- {{nps}} # level 2
|
||||||
|
{{open}} # start level 3
|
||||||
|
- {{nps}} # level 3
|
||||||
|
{{open}} # start level 4
|
||||||
|
{{nps}} # level 4
|
||||||
|
{{close}} # end level 4
|
||||||
|
- {{nps}} # level 3
|
||||||
|
+ {{nps}}
|
||||||
|
{{close}} # end level 3
|
||||||
|
- {{nps}} # level 2
|
||||||
|
{{open}} # start level 3
|
||||||
|
- {{nps}} # level 3
|
||||||
|
{{open}} # start level 4
|
||||||
|
{{nps}} # level 4
|
||||||
|
{{close}} # end level 4
|
||||||
|
- {{nps}} # level 3
|
||||||
|
+ {{nps}}
|
||||||
|
{{close}} # end level 3
|
||||||
|
- {{nps}} # level 2
|
||||||
|
{{open}} # start level 3
|
||||||
|
- {{nps}} # level 3
|
||||||
|
{{open}} # start level 4
|
||||||
|
{{nps}} # level 4
|
||||||
|
{{close}} # end level 4
|
||||||
|
- {{nps}} # level 3
|
||||||
|
+ {{nps}}
|
||||||
|
{{close}} # end level 3
|
||||||
|
- {{nps}} # level 2
|
||||||
|
+ {{nps}}
|
||||||
|
{{close}} # end level 2
|
||||||
|
- {{nps}} # level 1
|
||||||
|
+ {{nps}}
|
||||||
|
{{close}} # end level 1
|
||||||
|
- {{nps}} # level 0
|
||||||
|
+ |{{nps_unnested}})
|
||||||
|
rule_lookahead: '{{just_eat}}{{ruleassign}}{{just_eat}}'
|
||||||
|
|
||||||
|
var_lookahead_base: '{{just_eat}}({{varassign}}|{{shellassign}}){{just_eat}}'
|
||||||
+168
@@ -0,0 +1,168 @@
|
|||||||
|
diff --git syntaxes/01_Packages/Markdown/Markdown.sublime-syntax syntaxes/01_Packages/Markdown/Markdown.sublime-syntax
|
||||||
|
index 19dc685d..6afd87ae 100644
|
||||||
|
--- syntaxes/01_Packages/Markdown/Markdown.sublime-syntax
|
||||||
|
+++ syntaxes/01_Packages/Markdown/Markdown.sublime-syntax
|
||||||
|
@@ -24,7 +24,6 @@ variables:
|
||||||
|
)
|
||||||
|
[ \t]*$ # followed by any number of tabs or spaces, followed by the end of the line
|
||||||
|
)
|
||||||
|
- setext_escape: ^(?=\s{0,3}(?:---+|===+)\s*$)
|
||||||
|
block_quote: (?:[ ]{,3}>(?:.|$)) # between 0 and 3 spaces, followed by a greater than sign, followed by any character or the end of the line
|
||||||
|
atx_heading: (?:[#]{1,6}\s*) # between 1 and 6 hashes, followed by any amount of whitespace
|
||||||
|
indented_code_block: (?:[ ]{4}|\t) # 4 spaces or a tab
|
||||||
|
@@ -277,69 +276,40 @@ contexts:
|
||||||
|
8: markup.underline.link.markdown
|
||||||
|
push: [link-ref-def, after-link-title, link-title]
|
||||||
|
- match: '^(?=\S)(?![=-]{3,}\s*$)'
|
||||||
|
- branch_point: heading2-branch
|
||||||
|
- branch:
|
||||||
|
- - not-heading2
|
||||||
|
- - heading2
|
||||||
|
-
|
||||||
|
- not-paragraph:
|
||||||
|
- - match: |-
|
||||||
|
- (?x) # pop out of this context when one of the following conditions are met:
|
||||||
|
- ^(?:
|
||||||
|
- \s*$ # the line is blank (or only contains whitespace)
|
||||||
|
- | (?=
|
||||||
|
- {{block_quote}} # a block quote begins the line
|
||||||
|
- | [ ]{,3}[*+-][ ] # an unordered list item begins the line
|
||||||
|
- | [ ]{,3}1[.][ ] # an ordered list item with number "1" begins the line
|
||||||
|
- | \# # an ATX heading begins the line
|
||||||
|
- | [ ]{,3}<( # all types of HTML blocks except type 7 may interrupt a paragraph
|
||||||
|
- {{html_tag_block_end_at_close_tag}} # 1
|
||||||
|
- | !-- # 2
|
||||||
|
- | \? # 3
|
||||||
|
- | ![A-Z] # 4
|
||||||
|
- | !\[CDATA\[ # 5
|
||||||
|
- | {{html_tag_block_end_at_blank_line}} # 6
|
||||||
|
+ push:
|
||||||
|
+ - meta_scope: meta.paragraph.markdown
|
||||||
|
+ - match: |-
|
||||||
|
+ (?x) # pop out of this context when one of the following conditions are met:
|
||||||
|
+ ^(?:
|
||||||
|
+ \s*$ # the line is blank (or only contains whitespace)
|
||||||
|
+ | (?=
|
||||||
|
+ {{block_quote}} # a block quote begins the line
|
||||||
|
+ | [ ]{,3}[*+-][ ] # an unordered list item begins the line
|
||||||
|
+ | [ ]{,3}1[.][ ] # an ordered list item with number "1" begins the line
|
||||||
|
+ | \# # an ATX heading begins the line
|
||||||
|
+ | [ ]{,3}<( # all types of HTML blocks except type 7 may interrupt a paragraph
|
||||||
|
+ {{html_tag_block_end_at_close_tag}} # 1
|
||||||
|
+ | !-- # 2
|
||||||
|
+ | \? # 3
|
||||||
|
+ | ![A-Z] # 4
|
||||||
|
+ | !\[CDATA\[ # 5
|
||||||
|
+ | {{html_tag_block_end_at_blank_line}} # 6
|
||||||
|
+ )
|
||||||
|
)
|
||||||
|
)
|
||||||
|
- )
|
||||||
|
- pop: true
|
||||||
|
-
|
||||||
|
- not-heading2:
|
||||||
|
- - include: not-paragraph
|
||||||
|
- - match: (?=\S)
|
||||||
|
- branch_point: heading1-branch
|
||||||
|
- branch:
|
||||||
|
- - paragraph
|
||||||
|
- - heading1
|
||||||
|
- - match: ''
|
||||||
|
- pop: true
|
||||||
|
-
|
||||||
|
- paragraph:
|
||||||
|
- - meta_scope: meta.paragraph.markdown
|
||||||
|
- - match: ^\s{0,3}===+\s*$
|
||||||
|
- fail: heading1-branch
|
||||||
|
- - match: ^\s{0,3}---+\s*$
|
||||||
|
- fail: heading2-branch
|
||||||
|
- - include: not-paragraph
|
||||||
|
- - include: inline-bold-italic-linebreak
|
||||||
|
- - include: scope:text.html.basic
|
||||||
|
-
|
||||||
|
- heading1:
|
||||||
|
- - meta_scope: markup.heading.1.markdown
|
||||||
|
- - include: inline-bold-italic-linebreak
|
||||||
|
- - match: '^[ \t]{0,3}(={3,})(?=[ \t]*$)'
|
||||||
|
- captures:
|
||||||
|
- 1: markup.heading.1.setext.markdown punctuation.definition.heading.setext.markdown
|
||||||
|
- pop: true
|
||||||
|
-
|
||||||
|
- heading2:
|
||||||
|
- - meta_scope: markup.heading.2.markdown
|
||||||
|
- - include: inline-bold-italic-linebreak
|
||||||
|
- - match: '^[ \t]{0,3}(-{3,})(?=[ \t]*$)'
|
||||||
|
- captures:
|
||||||
|
- 1: markup.heading.2.setext.markdown punctuation.definition.heading.setext.markdown
|
||||||
|
- pop: true
|
||||||
|
-
|
||||||
|
+ pop: true
|
||||||
|
+ - include: inline-bold-italic-linebreak
|
||||||
|
+ - include: scope:text.html.basic
|
||||||
|
+ - match: '^(={3,})(?=[ \t]*$)'
|
||||||
|
+ scope: markup.heading.1.setext.markdown
|
||||||
|
+ captures:
|
||||||
|
+ 1: punctuation.definition.heading.setext.markdown
|
||||||
|
+ pop: true
|
||||||
|
+ - match: '^(-{3,})(?=[ \t]*$)'
|
||||||
|
+ scope: markup.heading.2.setext.markdown
|
||||||
|
+ captures:
|
||||||
|
+ 1: punctuation.definition.heading.setext.markdown
|
||||||
|
+ pop: true
|
||||||
|
link-ref-def:
|
||||||
|
- meta_scope: meta.link.reference.def.markdown
|
||||||
|
- match: ''
|
||||||
|
@@ -430,8 +400,6 @@ contexts:
|
||||||
|
push:
|
||||||
|
- meta_scope: markup.bold.markdown
|
||||||
|
- meta_content_scope: markup.italic.markdown
|
||||||
|
- - match: '{{setext_escape}}'
|
||||||
|
- pop: true
|
||||||
|
- match: |-
|
||||||
|
(?x)
|
||||||
|
[ \t]*\*{4,} # if there are more than 3 its not applicable to be bold or italic
|
||||||
|
@@ -446,8 +414,6 @@ contexts:
|
||||||
|
scope: punctuation.definition.bold.end.markdown
|
||||||
|
set:
|
||||||
|
- meta_content_scope: markup.italic.markdown
|
||||||
|
- - match: '{{setext_escape}}'
|
||||||
|
- pop: true
|
||||||
|
- match: |-
|
||||||
|
(?x)
|
||||||
|
[ \t]*\*{3,} # if there are more than 3 its not applicable to be bold or italic
|
||||||
|
@@ -463,8 +429,6 @@ contexts:
|
||||||
|
scope: punctuation.definition.italic.end.markdown
|
||||||
|
set:
|
||||||
|
- meta_content_scope: markup.bold.markdown
|
||||||
|
- - match: '{{setext_escape}}'
|
||||||
|
- pop: true
|
||||||
|
- match: |-
|
||||||
|
(?x)
|
||||||
|
[ \t]*\*{3,} # if there are more than 3 its not applicable to be bold or italic
|
||||||
|
@@ -727,8 +691,6 @@ contexts:
|
||||||
|
scope: punctuation.definition.italic.begin.markdown
|
||||||
|
push:
|
||||||
|
- meta_scope: markup.italic.markdown
|
||||||
|
- - match: '{{setext_escape}}'
|
||||||
|
- pop: true
|
||||||
|
- match: |-
|
||||||
|
(?x)
|
||||||
|
[ \t]*\*{4,} # if there are more than 3 its not applicable to be bold or italic
|
||||||
|
@@ -745,8 +707,6 @@ contexts:
|
||||||
|
scope: punctuation.definition.italic.begin.markdown
|
||||||
|
push:
|
||||||
|
- meta_scope: markup.italic.markdown
|
||||||
|
- - match: '{{setext_escape}}'
|
||||||
|
- pop: true
|
||||||
|
- match: |-
|
||||||
|
(?x)
|
||||||
|
[ \t]*_{4,} # if there are more than 3 its not applicable to be bold or italic
|
||||||
|
@@ -773,8 +733,6 @@ contexts:
|
||||||
|
- include: bold-italic-trailing
|
||||||
|
bold-italic-trailing:
|
||||||
|
- include: scope:text.html.basic
|
||||||
|
- - match: '{{setext_escape}}'
|
||||||
|
- pop: true
|
||||||
|
- match: ^\s*$\n?
|
||||||
|
scope: invalid.illegal.non-terminated.bold-italic.markdown
|
||||||
|
pop: true
|
||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
diff --git syntaxes/01_Packages/Rust/Rust.sublime-syntax syntaxes/01_Packages/Rust/Rust.sublime-syntax
|
||||||
|
index 3c354486..24727a4e 100644
|
||||||
|
--- syntaxes/01_Packages/Rust/Rust.sublime-syntax
|
||||||
|
+++ syntaxes/01_Packages/Rust/Rust.sublime-syntax
|
||||||
|
@@ -907,6 +907,8 @@ contexts:
|
||||||
|
- include: type-any-identifier
|
||||||
|
- match: ':'
|
||||||
|
scope: punctuation.separator.rust
|
||||||
|
+ - match: (?=;)
|
||||||
|
+ pop: true
|
||||||
|
|
||||||
|
fn-body:
|
||||||
|
- meta_scope: meta.function.rust
|
||||||
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
+1
Submodule assets/syntaxes/01_Packages added at 759d6eed9b
+1
Submodule assets/syntaxes/02_Extra/AWK added at 1ce5f90d44
+1
Submodule assets/syntaxes/02_Extra/AsciiDoc added at d0089991e5
+283
@@ -0,0 +1,283 @@
|
|||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
# http://www.sublimetext.com/docs/3/syntax.html
|
||||||
|
name: AsciiDoc
|
||||||
|
comment: |
|
||||||
|
A very early hack. Mostly ripped from other syntaxes.
|
||||||
|
Only the very basic stuff is working.
|
||||||
|
file_extensions:
|
||||||
|
- adoc
|
||||||
|
- asciidoc
|
||||||
|
- asc
|
||||||
|
scope: text.html.asciidoc
|
||||||
|
contexts:
|
||||||
|
main:
|
||||||
|
- include: heading_inline
|
||||||
|
- include: heading-block
|
||||||
|
- include: heading-blockattr
|
||||||
|
- match: \$\$(?!\$)
|
||||||
|
push:
|
||||||
|
- meta_scope: comment.block.passthrough.macro.doubledollar.asciidoc
|
||||||
|
- match: \$\$(?!\$)
|
||||||
|
pop: true
|
||||||
|
- match: \+\+\+(?!\+)
|
||||||
|
push:
|
||||||
|
- meta_scope: comment.block.passthrough.macro.tripeplus.asciidoc
|
||||||
|
- match: \+\+\+(?!\+)
|
||||||
|
pop: true
|
||||||
|
- match: (//).*$\n?
|
||||||
|
scope: comment.line.double-slash.asciidoc
|
||||||
|
- match: |-
|
||||||
|
(?x)^
|
||||||
|
(?= ([/+-.*_=]{4,})\s*$
|
||||||
|
| ([ \t]{1,})
|
||||||
|
| [=]{1,6}\s*+
|
||||||
|
| [ ]{,3}(?<marker>[-*_])([ ]{,2}\k<marker>){2,}[ \t]*+$
|
||||||
|
)
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.block-level.asciidoc
|
||||||
|
- match: |-
|
||||||
|
(?x)^
|
||||||
|
(?! \1
|
||||||
|
| ([ \t]{1,})
|
||||||
|
| [=]{1,6}\s*+
|
||||||
|
| [ ]{,3}(?<marker>[-*_])([ ]{,2}\k<marker>){2,}[ \t]*+$
|
||||||
|
)
|
||||||
|
pop: true
|
||||||
|
- include: block_quote
|
||||||
|
- include: block_raw
|
||||||
|
- include: heading_inline
|
||||||
|
- include: heading-block
|
||||||
|
- include: separator
|
||||||
|
- match: '^[ ]{0,3}([*+-])(?=\s)'
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.list_item.asciidoc
|
||||||
|
push:
|
||||||
|
- meta_scope: markup.list.unnumbered.asciidoc
|
||||||
|
- match: ^(?=\S)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.list_item.asciidoc
|
||||||
|
pop: true
|
||||||
|
- include: list-paragraph
|
||||||
|
- match: '^[ ]{0,3}[0-9]+(\.)(?=\s)'
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.list_item.asciidoc
|
||||||
|
push:
|
||||||
|
- meta_scope: markup.list.numbered.asciidoc
|
||||||
|
- match: ^(?=\S)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.list_item.asciidoc
|
||||||
|
pop: true
|
||||||
|
- include: list-paragraph
|
||||||
|
- match: '^([/+-.*_=]){4,}\s*$'
|
||||||
|
push:
|
||||||
|
- meta_scope: comment.block.asciidoc
|
||||||
|
- match: '^\1{4,}\s*$'
|
||||||
|
pop: true
|
||||||
|
- match: '^([/+.]){4,}\s*$'
|
||||||
|
comment: asciidoc formatting is disabled inside certain blocks.
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.disable-asciidoc
|
||||||
|
- match: '^[/+.]{4,}\s*$'
|
||||||
|
pop: true
|
||||||
|
- match: '^(?=\S)(?![=-]{3,}(?=$))(?!\.\S+)'
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.paragraph.asciidoc
|
||||||
|
- match: '^(?:\s*$|(?=[ ]{,3}>.))|(?=[ \t]*\n)(?<=^===|^====|=====|^---|^----|-----)[ \t]*\n'
|
||||||
|
pop: true
|
||||||
|
- include: inline
|
||||||
|
- include: scope:text.html.basic
|
||||||
|
- match: '^(={3,})(?=[ \t]*$)'
|
||||||
|
scope: markup.heading.0.asciidoc
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.heading.asciidoc
|
||||||
|
- match: '^(-{3,})(?=[ \t]*$)'
|
||||||
|
scope: markup.heading.1.asciidoc
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.heading.asciidoc
|
||||||
|
- match: '^(~{3,})(?=[ \t]*$)'
|
||||||
|
scope: markup.heading.2.asciidoc
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.heading.asciidoc
|
||||||
|
- match: '^(\^{3,})(?=[ \t]*$)'
|
||||||
|
scope: markup.heading.3.asciidoc
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.heading.asciidoc
|
||||||
|
- match: '^(\+{3,})(?=[ \t]*$)'
|
||||||
|
scope: markup.heading.4.asciidoc
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.heading.asciidoc
|
||||||
|
attribute-entry:
|
||||||
|
- match: '^:[-_. A-Za-z0-9]+:\s*(.*)\s*$'
|
||||||
|
scope: variable.other
|
||||||
|
attribute-reference:
|
||||||
|
- match: "{[-_. A-Za-z0-9]+}"
|
||||||
|
scope: variable.other
|
||||||
|
attribute-reference-predefined:
|
||||||
|
- match: "{(?i:amp|asciidoc-dir|asciidoc-file|asciidoc-version|author|authored|authorinitials|backend-docbook|backend-xhtml11|backend-html4|docbook-article|xhtml11-article|html4-article|docbook-book|xhtml11-book|html4-book|docbook-manpage|xhtml11-manpage|html4-manpage|backend|backslash|basebackend|brvbar|date|docdate|doctime|docname|docfile|docdir|doctitle|doctype-article|doctype-book|doctype-manpage|doctype|email|empty|encoding|filetype|firstname|gt|id|indir|infile|lastname|level|listindex|localdate|localtime|lt|manname|manpurpose|mantitle|manvolnum|middlename|nbsp|outdir|outfile|reftext|revision|sectnum|showcomments|title|two_colons|two_semicolons|user-dir|verbose)}"
|
||||||
|
scope: support.variable
|
||||||
|
block_quote:
|
||||||
|
- match: '^([/+-.*_=]){4,}\s*$'
|
||||||
|
push:
|
||||||
|
- meta_scope: comment.block.asciidoc
|
||||||
|
- match: '^\1{4,}\s*$'
|
||||||
|
pop: true
|
||||||
|
block_raw:
|
||||||
|
- match: '\G([ ]{4}|\t).*$\n?'
|
||||||
|
scope: markup.raw.block.asciidoc
|
||||||
|
bracket:
|
||||||
|
- match: '<(?![a-z/?\$!])'
|
||||||
|
comment: |
|
||||||
|
asciidoc will convert this for us. We match it so that the
|
||||||
|
HTML grammar will not mark it up as invalid.
|
||||||
|
scope: meta.other.valid-bracket.asciidoc
|
||||||
|
character-replacements:
|
||||||
|
- match: \(C\)|\(R\)|\(TM\)|--(?!-)|\.\.\.(?!\.)|->|<-|=>|<=
|
||||||
|
scope: constant.character.asciidoc
|
||||||
|
escape:
|
||||||
|
- match: '\\[-`*_#+.!(){}\[\]\\>:]'
|
||||||
|
scope: constant.character.escape.asciidoc
|
||||||
|
heading:
|
||||||
|
- match: '(?m)^(\S+)$([=-~^+])+\s*$'
|
||||||
|
scope: markup.heading.asciidoc
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.heading.asciidoc
|
||||||
|
heading-block:
|
||||||
|
- match: ^\.(\w.*)$
|
||||||
|
scope: markup.heading.asciidoc
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.heading.asciidoc
|
||||||
|
heading-blockattr:
|
||||||
|
- match: '^\[\[?(\w.*)\]$'
|
||||||
|
scope: markup.heading.asciidoc
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.heading.asciidoc
|
||||||
|
heading_inline:
|
||||||
|
- match: '\G(={1,6})(?!=)\s*(?=\S)'
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.heading.asciidoc
|
||||||
|
push:
|
||||||
|
- meta_scope: markup.heading.asciidoc
|
||||||
|
- meta_content_scope: entity.name.section.asciidoc
|
||||||
|
- match: \s*(=*)$\n?
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.heading.asciidoc
|
||||||
|
pop: true
|
||||||
|
- include: inline
|
||||||
|
inline:
|
||||||
|
- include: line-break
|
||||||
|
- include: line-page-break
|
||||||
|
- include: line-ruler
|
||||||
|
- include: escape
|
||||||
|
- include: passthrough-macro-trippleplus-inline
|
||||||
|
- include: passthrough-macro-doubledollar-inline
|
||||||
|
- include: character-replacements
|
||||||
|
- include: bracket
|
||||||
|
- include: raw
|
||||||
|
- include: text-quote-single
|
||||||
|
- include: text-quote-double
|
||||||
|
- include: text-quote-other
|
||||||
|
- include: text-bold-unconstrained
|
||||||
|
- include: text-italic-unconstrained
|
||||||
|
- include: text-monospace-unconstrained
|
||||||
|
- include: text-unquoted-unconstrained
|
||||||
|
- include: text-bold
|
||||||
|
- include: text-italic
|
||||||
|
- include: text-monospace
|
||||||
|
- include: text-unquoted
|
||||||
|
- include: attribute-entry
|
||||||
|
- include: attribute-reference-predefined
|
||||||
|
- include: attribute-reference
|
||||||
|
line-break:
|
||||||
|
- match: (?<=\S)\s+\+$
|
||||||
|
scope: constant.character.escape.asciidoc
|
||||||
|
line-page-break:
|
||||||
|
- match: "^<{3,}$"
|
||||||
|
scope: constant.character.escape.asciidoc
|
||||||
|
line-ruler:
|
||||||
|
- match: "^'{3,}$"
|
||||||
|
scope: constant.character.escape.asciidoc
|
||||||
|
list-paragraph:
|
||||||
|
- match: \G\s+(?=\S)
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.paragraph.list.asciidoc
|
||||||
|
- match: ^\s*$
|
||||||
|
pop: true
|
||||||
|
- include: inline
|
||||||
|
passthrough-macro-doubledollar-inline:
|
||||||
|
- match: '(?:\[.*\])?\$\$(?!\$).+\$\$(?!\$)'
|
||||||
|
scope: comment.block.passthrough.asciidoc
|
||||||
|
passthrough-macro-trippleplus-inline:
|
||||||
|
- match: '(?:\[.*\])?\+\+\+(?!\+).+\+\+\+(?!\+)'
|
||||||
|
scope: comment.block.passthrough.asciidoc
|
||||||
|
raw:
|
||||||
|
- match: '(`+)(?:[^`]|(?!(?<!`)\1(?!`))`)*+(\1)'
|
||||||
|
scope: markup.raw.inline.asciidoc
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.raw.asciidoc
|
||||||
|
2: punctuation.definition.raw.asciidoc
|
||||||
|
separator:
|
||||||
|
- match: '\G[ ]{,3}([-*_])([ ]{,2}\1){2,}[ \t]*$\n?'
|
||||||
|
scope: meta.separator.asciidoc
|
||||||
|
text-bold:
|
||||||
|
- match: (?<!\w)(\*)(?=\S)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.bold.asciidoc
|
||||||
|
push:
|
||||||
|
- meta_scope: markup.bold.asciidoc
|
||||||
|
- match: (?<=\S)(\1)(?!\w)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.bold.asciidoc
|
||||||
|
pop: true
|
||||||
|
text-bold-unconstrained:
|
||||||
|
- match: (\*\*)(?=\S)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.bold.asciidoc
|
||||||
|
push:
|
||||||
|
- meta_scope: markup.bold.asciidoc
|
||||||
|
- match: (?<=\S)(\1)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.bold.asciidoc
|
||||||
|
pop: true
|
||||||
|
text-italic:
|
||||||
|
- match: (?<!\w)('|_)(?=\S)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.italic.asciidoc
|
||||||
|
push:
|
||||||
|
- meta_scope: markup.italic.asciidoc
|
||||||
|
- match: (?<=\S)(\1)((?!\1)|(?=\1\1))(?!\w)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.italic.asciidoc
|
||||||
|
pop: true
|
||||||
|
text-italic-unconstrained:
|
||||||
|
- match: (__)(?=\S)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.italic.asciidoc
|
||||||
|
push:
|
||||||
|
- meta_scope: markup.italic.asciidoc
|
||||||
|
- match: (?<=\S)(\1)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.italic.asciidoc
|
||||||
|
pop: true
|
||||||
|
text-monospace:
|
||||||
|
- match: '(?<!\w)([\+`])[^\+]*(\1)(?!\w)'
|
||||||
|
scope: string.interpolated.asciidoc
|
||||||
|
text-monospace-unconstrained:
|
||||||
|
- match: (\+\+).*(\1)
|
||||||
|
scope: string.interpolated.asciidoc
|
||||||
|
text-quote-double:
|
||||||
|
- match: '(?<!\w)(?:\[.*\])?``(?!`).*''''(?!'')(?!\w)'
|
||||||
|
scope: string.quoted.double.asciidoc
|
||||||
|
text-quote-other:
|
||||||
|
- match: '(?<!\w)(?:\[.*\])?([~^]).*(\1)(?!\w)'
|
||||||
|
scope: string.quoted.single.asciidoc
|
||||||
|
text-quote-single:
|
||||||
|
- match: '(?<!\w)(?:\[.*\])?`(?!`).*''(?!'')(?!\w)'
|
||||||
|
comment: "TODO: Sub- and Superscript are really unconstrained"
|
||||||
|
scope: string.quoted.single.asciidoc
|
||||||
|
text-unquoted:
|
||||||
|
- match: (?<!\w)(#).*(\1)(?!\w)
|
||||||
|
scope: string.unquoted.asciidoc
|
||||||
|
text-unquoted-unconstrained:
|
||||||
|
- match: (##).*(\1)
|
||||||
|
scope: string.unquoted.asciidoc
|
||||||
+1
Submodule assets/syntaxes/02_Extra/Assembly (ARM) added at 08f33d80de
@@ -0,0 +1,172 @@
|
|||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
# http://www.sublimetext.com/docs/3/syntax.html
|
||||||
|
name: ARM Assembly
|
||||||
|
file_extensions:
|
||||||
|
- s
|
||||||
|
- S
|
||||||
|
scope: source.asm.arm
|
||||||
|
contexts:
|
||||||
|
main:
|
||||||
|
- match: "@.*$"
|
||||||
|
scope: comment.line
|
||||||
|
- match: //.*$
|
||||||
|
scope: comment.line
|
||||||
|
- match: ;.*$
|
||||||
|
scope: comment.line
|
||||||
|
- match: ^\s*\#\s*if\s+0\b
|
||||||
|
push:
|
||||||
|
- meta_scope: comment.preprocessor
|
||||||
|
- match: ^\s*\#\s*endif\b
|
||||||
|
pop: true
|
||||||
|
- match: /\*
|
||||||
|
push:
|
||||||
|
- meta_scope: comment.block
|
||||||
|
- match: \*/
|
||||||
|
pop: true
|
||||||
|
- match: |-
|
||||||
|
(?x)
|
||||||
|
^\s*\#\s*(define)\s+ # define
|
||||||
|
((?<id>[a-zA-Z_][a-zA-Z0-9_]*)) # macro name
|
||||||
|
(?: # and optionally:
|
||||||
|
(\() # an open parenthesis
|
||||||
|
(
|
||||||
|
\s* \g<id> \s* # first argument
|
||||||
|
((,) \s* \g<id> \s*)* # additional arguments
|
||||||
|
(?:\.\.\.)? # varargs ellipsis?
|
||||||
|
)
|
||||||
|
(\)) # a close parenthesis
|
||||||
|
)?
|
||||||
|
captures:
|
||||||
|
1: keyword.control.import.define.c
|
||||||
|
2: entity.name.function.preprocessor.c
|
||||||
|
4: punctuation.definition.parameters.c
|
||||||
|
5: variable.parameter.preprocessor.c
|
||||||
|
7: punctuation.separator.parameters.c
|
||||||
|
8: punctuation.definition.parameters.c
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.preprocessor.macro.c
|
||||||
|
- match: (?=(?://|/\*))|$
|
||||||
|
pop: true
|
||||||
|
- match: (?>\\\s*\n)
|
||||||
|
scope: punctuation.separator.continuation.c
|
||||||
|
- include: $top_level_main
|
||||||
|
- match: ^\s*#\s*(error|warning)\b
|
||||||
|
captures:
|
||||||
|
1: keyword.control.import.error.c
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.preprocessor.diagnostic.c
|
||||||
|
- match: $
|
||||||
|
captures:
|
||||||
|
1: keyword.control.import.error.c
|
||||||
|
pop: true
|
||||||
|
- match: (?>\\\s*\n)
|
||||||
|
scope: punctuation.separator.continuation.c
|
||||||
|
- match: ^\s*#\s*(include|import)\b\s+
|
||||||
|
captures:
|
||||||
|
1: keyword.control.import.include.c
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.preprocessor.c.include
|
||||||
|
- match: (?=(?://|/\*))|$
|
||||||
|
captures:
|
||||||
|
1: keyword.control.import.include.c
|
||||||
|
pop: true
|
||||||
|
- match: (?>\\\s*\n)
|
||||||
|
scope: punctuation.separator.continuation.c
|
||||||
|
- match: '"'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.begin.c
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.double.include.c
|
||||||
|
- match: '"'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.end.c
|
||||||
|
pop: true
|
||||||
|
- match: <
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.begin.c
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.other.lt-gt.include.c
|
||||||
|
- match: ">"
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.end.c
|
||||||
|
pop: true
|
||||||
|
- match: '((?i)([xw][0-9]|[xw]1[0-9]||[xw]2[0-9]|[wx]30|wzr|xzr|wsp|fpsr|fpcr|[rcp]1[0-5]|[rcp][0-9]|a[1-4]|v[1-8]|sl|sb|fp|ip|sp|lr|(c|s)psr(_c)?|pc|[sd]3[0-1]|[sd][12][0-9]|[sd][0-9]|fpsid|fpscr|fpexc|q3[0-1]|q2[0-9]|q1[0-9]|q[0-9]|APSR_nzcv|sy)!?(?-i))?\b'
|
||||||
|
scope: storage.other.register
|
||||||
|
- match: \.(?i)(globl|global|macro|endm|purgem|if|elseif|else|endif|section|text|arm|align|balign|irp|rept|endr|req|unreq|error|short|func|endfunc|hidden|type|fpu|arch|code|altmacro|object_arch|word|int|string)(?-i)\b
|
||||||
|
scope: keyword.control.directive
|
||||||
|
- match: armv(2a?|3m?|4t?|5t?e?6(j|t2|zk?|-m)?|7v?e?(-(a|r|m))?|8-a(\+crc)?)
|
||||||
|
scope: keyword.control.arch.arm
|
||||||
|
- match: ^\s*#\s*(define|defined|elif|else|if|ifdef|ifndef|line|pragma|undef|endif)\b
|
||||||
|
captures:
|
||||||
|
1: keyword.control.import.c
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.preprocessor.c
|
||||||
|
- match: (?=(?://|/\*))|$
|
||||||
|
captures:
|
||||||
|
1: keyword.control.import.c
|
||||||
|
pop: true
|
||||||
|
- match: (?>\\\s*\n)
|
||||||
|
scope: punctuation.separator.continuation.c
|
||||||
|
- match: |-
|
||||||
|
(?x)\b((?i)
|
||||||
|
(
|
||||||
|
(bf(c|i)|(u|s)bfx|(u|s)xta?(h|b)?) |
|
||||||
|
(v(add|cvt|sub|mov|trn|cmp|div|qdmulh|mrs|mul|ld1|qadd|qshrun|st[1234]|addw|mull|mlal|rshrn|swp|qmovun)|qmovun)(\.([isup]?8|[isupf]?16|[isuf]?32|[isu]?64))* |
|
||||||
|
(and|m(rs|sr)|eor|sub|rsb|add|adc|sbc|rsc|tst|teq|cmp|cmn|orr|mov|bic|mvn |
|
||||||
|
(neg) |
|
||||||
|
(lsr|lsl|ror|asr) # shift ops either pseudo ops or actual shifts
|
||||||
|
)s? |
|
||||||
|
(mul|mla|mull|smlabb) |
|
||||||
|
(mov(w|t)) |
|
||||||
|
rev(8|16)? |
|
||||||
|
(pld|adr|adrl|vswp)
|
||||||
|
)
|
||||||
|
(ne|eq|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|lt|le|gt|ge|al)?(?-i))?\b
|
||||||
|
scope: support.function.mnemonic.arithmetic
|
||||||
|
- match: |-
|
||||||
|
(?x)\b((?i)(
|
||||||
|
swi|svc|wfi|
|
||||||
|
dmb | clrex | dsb | isb |
|
||||||
|
v(ldr|str|push|pop) |
|
||||||
|
(push|pop) |
|
||||||
|
(st|ld)(
|
||||||
|
p |
|
||||||
|
r(ex|s?(h|b)|d)? |
|
||||||
|
m(
|
||||||
|
(f|e)(d|a) |
|
||||||
|
(d|i)(b|a)
|
||||||
|
)?
|
||||||
|
) |
|
||||||
|
b(l|x|lx|lr|r)? |
|
||||||
|
(i|e)?ret|
|
||||||
|
b\.(eq|ne|hs|cs|lo|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al|nv)+ |
|
||||||
|
(c|t)?bn?z|
|
||||||
|
)+(ne|eq|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|lt|le|gt|ge|al)?(?-i))\b
|
||||||
|
scope: support.function.mnemonic.memory
|
||||||
|
- match: '\b((?i)(def(b|w|s)|equ|(include|get)(\s+([a-zA-Z_]+[0-9a-zA-Z_]*|[0-9]+[a-zA-Z_]+[0-9a-zA-Z_]*?)\.s)?)?(?-i))\b'
|
||||||
|
scope: meta.preprocessor.c.include
|
||||||
|
- match: \b((?i)(align)(?-i))?\b
|
||||||
|
scope: storage.type.c.memaccess
|
||||||
|
- match: \s+\".+\"
|
||||||
|
scope: string
|
||||||
|
- match: \b((?i)nop(ne|eq|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|lt|le|gt|ge|al)?(?-i))?\b
|
||||||
|
scope: comment.nop
|
||||||
|
- match: '\s\['
|
||||||
|
push:
|
||||||
|
- meta_scope: storage.type.c.memaccess
|
||||||
|
- match: '\]'
|
||||||
|
pop: true
|
||||||
|
- match: (?>\\\s*\n)
|
||||||
|
scope: punctuation.separator.continuation.c
|
||||||
|
- include: $top_level_main
|
||||||
|
- match: (\b|\s+)\=\b
|
||||||
|
scope: keyword.control.evaluation
|
||||||
|
- match: '(\b|\s+)(\#)?-?(0x|&)[0-9a-fA-F_]+\b'
|
||||||
|
scope: constant.numeric.hex
|
||||||
|
- match: '(\b|\s+)\#-?[0-9a-zA-Z_]+\b'
|
||||||
|
scope: constant.numeric.literal
|
||||||
|
- match: '(\b|\s+)[0-9]+\b'
|
||||||
|
scope: constant.numeric.dec
|
||||||
|
- match: '\b([a-zA-Z_]+[0-9a-zA-Z_]*|[0-9]+[a-zA-Z_]+[0-9a-zA-Z_]*)\b'
|
||||||
|
scope: meta.function.source.arm.label
|
||||||
File diff suppressed because it is too large
Load Diff
+1
Submodule assets/syntaxes/02_Extra/CMake added at aba96a0862
+1
Submodule assets/syntaxes/02_Extra/CSV added at 4786d037a7
+46
@@ -0,0 +1,46 @@
|
|||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
# http://www.sublimetext.com/docs/3/syntax.html
|
||||||
|
name: Advanced CSV
|
||||||
|
file_extensions:
|
||||||
|
- csv
|
||||||
|
- tsv
|
||||||
|
scope: text.advanced_csv
|
||||||
|
contexts:
|
||||||
|
main:
|
||||||
|
- match: (\")
|
||||||
|
captures:
|
||||||
|
1: string.quoted.double.advanced_csv
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.quoted.advanced_csv
|
||||||
|
- match: (\")
|
||||||
|
captures:
|
||||||
|
1: string.quoted.double.advanced_csv
|
||||||
|
pop: true
|
||||||
|
- include: main
|
||||||
|
- match: '(\[([+-]?\d*)(\:)?([+-]?\d*)(\,)?([+-]?\d*)(\:)?([+-]?\d*)\])?\s*([<>v^])?\s*(=)'
|
||||||
|
captures:
|
||||||
|
1: keyword.operator.advanced_csv
|
||||||
|
2: constant.numeric.formula.advanced_csv
|
||||||
|
4: constant.numeric.formula.advanced_csv
|
||||||
|
6: constant.numeric.formula.advanced_csv
|
||||||
|
8: constant.numeric.formula.advanced_csv
|
||||||
|
9: keyword.operator.advanced_csv
|
||||||
|
10: keyword.operator.advanced_csv
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.range.advanced_csv
|
||||||
|
- match: (?=(\")|$)
|
||||||
|
pop: true
|
||||||
|
- include: scope:source.python
|
||||||
|
- match: '(?<=^|,|\s|\")([0-9.eE+-]+)(?=$|,|\s|\")'
|
||||||
|
scope: meta.number.advanced_csv
|
||||||
|
captures:
|
||||||
|
1: constant.numeric.advanced_csv
|
||||||
|
- match: '(?<=^|,|\s|\")([^, \t\"]+)(?=$|,|\s|\")'
|
||||||
|
scope: meta.nonnumber.advanced_csv
|
||||||
|
captures:
|
||||||
|
1: storage.type.advanced_csv
|
||||||
|
- match: (\,)
|
||||||
|
scope: meta.delimiter.advanced_csv
|
||||||
|
captures:
|
||||||
|
1: keyword.operator.advanced_csv
|
||||||
+1
Submodule assets/syntaxes/02_Extra/Cabal added at 2d98cb79eb
+47
@@ -0,0 +1,47 @@
|
|||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
# http://www.sublimetext.com/docs/3/syntax.html
|
||||||
|
name: Cabal
|
||||||
|
file_extensions:
|
||||||
|
- cabal
|
||||||
|
scope: source.cabal
|
||||||
|
contexts:
|
||||||
|
main:
|
||||||
|
- match: ^(\s*)(exposed-modules):$
|
||||||
|
captures:
|
||||||
|
2: constant.other.cabal
|
||||||
|
push:
|
||||||
|
- meta_scope: exposed.modules.cabal
|
||||||
|
- match: ^(?!\1\s)
|
||||||
|
pop: true
|
||||||
|
- include: module_name
|
||||||
|
- match: ^(\s*)(build-depends):$
|
||||||
|
captures:
|
||||||
|
2: constant.other.cabal
|
||||||
|
push:
|
||||||
|
- meta_scope: exposed.modules.cabal
|
||||||
|
- match: ^(?!\1\s)
|
||||||
|
pop: true
|
||||||
|
- match: "([<>=]+)|([&|]+)"
|
||||||
|
scope: keyword.operator.haskell
|
||||||
|
- match: ((\d+|\*)\.)*(\d+|\*)
|
||||||
|
scope: constant.numeric.haskell
|
||||||
|
- match: '([\w\-]+)'
|
||||||
|
scope: support.function.haskell
|
||||||
|
- match: '^\s*([a-zA-Z_-]+)(:)\s+'
|
||||||
|
scope: entity.cabal
|
||||||
|
captures:
|
||||||
|
1: constant.other.cabal
|
||||||
|
2: punctuation.entity.cabal
|
||||||
|
- match: '^(?i)(executable|library|test-suite|benchmark|flag|source-repository|custom-setup)\s+([^\s,]+)\s*$'
|
||||||
|
scope: entity.cabal
|
||||||
|
captures:
|
||||||
|
1: keyword.entity.cabal
|
||||||
|
2: string.cabal
|
||||||
|
- match: ^(?i)library\s*$
|
||||||
|
scope: keyword.entity.cabal
|
||||||
|
- match: "--.*$"
|
||||||
|
scope: comment.cabal
|
||||||
|
module_name:
|
||||||
|
- match: '([A-Z][A-Za-z_''0-9]*)(\.[A-Z][A-Za-z_''0-9]*)*'
|
||||||
|
scope: storage.module.haskell
|
||||||
+1
Submodule assets/syntaxes/02_Extra/CoffeeScript added at e08f9b8cdf
@@ -0,0 +1,271 @@
|
|||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
# http://www.sublimetext.com/docs/3/syntax.html
|
||||||
|
name: CoffeeScript
|
||||||
|
comment: "CoffeeScript Syntax: version 1"
|
||||||
|
file_extensions:
|
||||||
|
- coffee
|
||||||
|
- Cakefile
|
||||||
|
- coffee.erb
|
||||||
|
- cson
|
||||||
|
first_line_match: ^#!.*\bcoffee
|
||||||
|
scope: source.coffee
|
||||||
|
contexts:
|
||||||
|
main:
|
||||||
|
- match: '(\([^()]*?\))\s*([=-]>)'
|
||||||
|
comment: "match stuff like: a -> …"
|
||||||
|
scope: meta.inline.function.coffee
|
||||||
|
captures:
|
||||||
|
1: variable.parameter.function.coffee
|
||||||
|
2: storage.type.function.coffee
|
||||||
|
- match: (new)\s+(\w+(?:\.\w*)*)
|
||||||
|
scope: meta.class.instance.constructor
|
||||||
|
captures:
|
||||||
|
1: keyword.operator.new.coffee
|
||||||
|
2: support.class.coffee
|
||||||
|
- match: "'''"
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.begin.coffee
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.heredoc.coffee
|
||||||
|
- match: "'''"
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.end.coffee
|
||||||
|
pop: true
|
||||||
|
- match: '"""'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.begin.coffee
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.double.heredoc.coffee
|
||||||
|
- match: '"""'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.end.coffee
|
||||||
|
pop: true
|
||||||
|
- match: \\.
|
||||||
|
scope: constant.character.escape.coffee
|
||||||
|
- include: interpolated_coffee
|
||||||
|
- match: "`"
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.begin.coffee
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.script.coffee
|
||||||
|
- match: "`"
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.end.coffee
|
||||||
|
pop: true
|
||||||
|
- match: '\\(x\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)'
|
||||||
|
scope: constant.character.escape.coffee
|
||||||
|
- match: (?<!#)###(?!#)
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.comment.coffee
|
||||||
|
push:
|
||||||
|
- meta_scope: comment.block.coffee
|
||||||
|
- match: '###(?:[ \t]*\n)'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.comment.coffee
|
||||||
|
pop: true
|
||||||
|
- match: '@\w*'
|
||||||
|
scope: storage.type.annotation.coffeescript
|
||||||
|
- match: '(#)(?!\{).*$\n?'
|
||||||
|
scope: comment.line.number-sign.coffee
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.comment.coffee
|
||||||
|
- match: "/{3}"
|
||||||
|
push:
|
||||||
|
- meta_scope: string.regexp.coffee
|
||||||
|
- match: "/{3}[imgy]{0,4}"
|
||||||
|
pop: true
|
||||||
|
- include: interpolated_coffee
|
||||||
|
- include: embedded_comment
|
||||||
|
- match: '/(?![\s=/*+{}?]).*?[^\\]/[igmy]{0,4}(?![a-zA-Z0-9])'
|
||||||
|
scope: string.regexp.coffee
|
||||||
|
- match: |-
|
||||||
|
(?x)
|
||||||
|
\b(?<![\.\$])(
|
||||||
|
break|by|catch|continue|else|finally|for|in|of|if|return|switch|
|
||||||
|
then|throw|try|unless|when|while|until|loop|do|(?<=for)\s+own
|
||||||
|
)(?!\s*:)\b
|
||||||
|
scope: keyword.control.coffee
|
||||||
|
- match: |-
|
||||||
|
(?x)
|
||||||
|
and=|or=|!|%|&|\^|\*|\/|(\-)?\-(?!>)|\+\+|\+|~|==|=(?!>)|!=|<=|>=|<<=|>>=|
|
||||||
|
>>>=|<>|<|>|!|&&|\.\.(\.)?|\?|\||\|\||\:|\*=|(?<!\()/=|%=|\+=|\-=|&=|
|
||||||
|
\^=|\b(?<![\.\$])(instanceof|new|delete|typeof|and|or|is|isnt|not|super)\b
|
||||||
|
scope: keyword.operator.coffee
|
||||||
|
- match: '([a-zA-Z\$_](\w|\$|\.)*\s*(?!\::)((:)|(=[^=]))(?!(\s*\(.*\))?\s*((=|-)>)))'
|
||||||
|
scope: variable.assignment.coffee
|
||||||
|
captures:
|
||||||
|
1: variable.assignment.coffee
|
||||||
|
4: punctuation.separator.key-value
|
||||||
|
5: keyword.operator.coffee
|
||||||
|
- match: '(?<=\s|^)([\[\{])(?=.*?[\]\}]\s+[:=])'
|
||||||
|
captures:
|
||||||
|
0: keyword.operator.coffee
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.variable.assignment.destructured.coffee
|
||||||
|
- match: '([\]\}]\s*[:=])'
|
||||||
|
captures:
|
||||||
|
0: keyword.operator.coffee
|
||||||
|
pop: true
|
||||||
|
- include: variable_name
|
||||||
|
- include: instance_variable
|
||||||
|
- include: single_quoted_string
|
||||||
|
- include: double_quoted_string
|
||||||
|
- include: numeric
|
||||||
|
- match: |-
|
||||||
|
(?x)
|
||||||
|
(\s*)
|
||||||
|
(?=[a-zA-Z\$_])
|
||||||
|
(
|
||||||
|
[a-zA-Z\$_](\w|\$|:|\.)*\s*
|
||||||
|
(?=[:=](\s*\(.*\))?\s*([=-]>))
|
||||||
|
)
|
||||||
|
scope: meta.function.coffee
|
||||||
|
captures:
|
||||||
|
2: entity.name.function.coffee
|
||||||
|
3: entity.name.function.coffee
|
||||||
|
4: variable.parameter.function.coffee
|
||||||
|
5: storage.type.function.coffee
|
||||||
|
- match: ^\s*(describe|it|app\.(get|post|put|all|del|delete))
|
||||||
|
comment: Show well-known functions from Express and Mocha in Go To Symbol view
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.function.symbols.coffee
|
||||||
|
- match: $
|
||||||
|
pop: true
|
||||||
|
- include: main
|
||||||
|
- match: "[=-]>"
|
||||||
|
scope: storage.type.function.coffee
|
||||||
|
- match: '\b(?<!\.)(true|on|yes)(?!\s*[:=])\b'
|
||||||
|
scope: constant.language.boolean.true.coffee
|
||||||
|
- match: '\b(?<!\.)(false|off|no)(?!\s*[:=])\b'
|
||||||
|
scope: constant.language.boolean.false.coffee
|
||||||
|
- match: '\b(?<!\.)null(?!\s*[:=])\b'
|
||||||
|
scope: constant.language.null.coffee
|
||||||
|
- match: '\b(?<!\.)(this|extends)(?!\s*[:=])\b'
|
||||||
|
scope: variable.language.coffee
|
||||||
|
- match: '(class\b)\s+(@?[a-zA-Z\$_][\w\.]*)?(?:\s+(extends)\s+(@?[a-zA-Z\$\._][\w\.]*))?'
|
||||||
|
scope: meta.class.coffee
|
||||||
|
captures:
|
||||||
|
1: storage.type.class.coffee
|
||||||
|
2: entity.name.type.class.coffee
|
||||||
|
3: keyword.control.inheritance.coffee
|
||||||
|
4: entity.other.inherited-class.coffee
|
||||||
|
- match: \b(debugger|\\)\b
|
||||||
|
scope: keyword.other.coffee
|
||||||
|
- match: |-
|
||||||
|
(?x)\b(
|
||||||
|
Array|ArrayBuffer|Blob|Boolean|Date|document|event|Function|
|
||||||
|
Int(8|16|32|64)Array|Math|Map|Number|
|
||||||
|
Object|Proxy|RegExp|Set|String|WeakMap|
|
||||||
|
window|Uint(8|16|32|64)Array|XMLHttpRequest
|
||||||
|
)\b
|
||||||
|
scope: support.class.coffee
|
||||||
|
- match: ((?<=console\.)(debug|warn|info|log|error|time|timeEnd|assert))\b
|
||||||
|
scope: support.function.console.coffee
|
||||||
|
- match: |-
|
||||||
|
(?x)\b(
|
||||||
|
decodeURI(Component)?|encodeURI(Component)?|eval|parse(Float|Int)|require
|
||||||
|
)\b
|
||||||
|
scope: support.function.coffee
|
||||||
|
- match: |-
|
||||||
|
(?x)((?<=\.)(
|
||||||
|
apply|call|concat|every|filter|forEach|from|hasOwnProperty|indexOf|
|
||||||
|
isPrototypeOf|join|lastIndexOf|map|of|pop|propertyIsEnumerable|push|
|
||||||
|
reduce(Right)?|reverse|shift|slice|some|sort|splice|to(Locale)?String|
|
||||||
|
unshift|valueOf
|
||||||
|
))\b
|
||||||
|
scope: support.function.method.array.coffee
|
||||||
|
- match: |-
|
||||||
|
(?x)((?<=Array\.)(
|
||||||
|
isArray
|
||||||
|
))\b
|
||||||
|
scope: support.function.static.array.coffee
|
||||||
|
- match: |-
|
||||||
|
(?x)((?<=Object\.)(
|
||||||
|
create|definePropert(ies|y)|freeze|getOwnProperty(Descriptors?|Names)|
|
||||||
|
getProperty(Descriptor|Names)|getPrototypeOf|is(Extensible|Frozen|Sealed)?|
|
||||||
|
isnt|keys|preventExtensions|seal
|
||||||
|
))\b
|
||||||
|
scope: support.function.static.object.coffee
|
||||||
|
- match: |-
|
||||||
|
(?x)((?<=Math\.)(
|
||||||
|
abs|acos|acosh|asin|asinh|atan|atan2|atanh|ceil|cos|cosh|exp|expm1|floor|
|
||||||
|
hypot|log|log10|log1p|log2|max|min|pow|random|round|sign|sin|sinh|sqrt|
|
||||||
|
tan|tanh|trunc
|
||||||
|
))\b
|
||||||
|
scope: support.function.static.math.coffee
|
||||||
|
- match: |-
|
||||||
|
(?x)((?<=Number\.)(
|
||||||
|
is(Finite|Integer|NaN)|toInteger
|
||||||
|
))\b
|
||||||
|
scope: support.function.static.number.coffee
|
||||||
|
- match: \b(Infinity|NaN|undefined)\b
|
||||||
|
scope: constant.language.coffee
|
||||||
|
- match: \;
|
||||||
|
scope: punctuation.terminator.statement.coffee
|
||||||
|
- match: ',[ |\t]*'
|
||||||
|
scope: meta.delimiter.object.comma.coffee
|
||||||
|
- match: \.
|
||||||
|
scope: meta.delimiter.method.period.coffee
|
||||||
|
- match: '\{|\}'
|
||||||
|
scope: meta.brace.curly.coffee
|
||||||
|
- match: \(|\)
|
||||||
|
scope: meta.brace.round.coffee
|
||||||
|
- match: '\[|\]\s*'
|
||||||
|
scope: meta.brace.square.coffee
|
||||||
|
- include: instance_variable
|
||||||
|
- include: single_quoted_string
|
||||||
|
- include: double_quoted_string
|
||||||
|
- include: numeric
|
||||||
|
double_quoted_string:
|
||||||
|
- match: '"'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.begin.coffee
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.double.coffee
|
||||||
|
- match: '"'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.end.coffee
|
||||||
|
pop: true
|
||||||
|
- match: '\\(x\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)'
|
||||||
|
scope: constant.character.escape.coffee
|
||||||
|
- include: interpolated_coffee
|
||||||
|
embedded_comment:
|
||||||
|
- match: (?<!\\)(#).*$\n?
|
||||||
|
scope: comment.line.number-sign.coffee
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.comment.coffee
|
||||||
|
instance_variable:
|
||||||
|
- match: '(@)([a-zA-Z_\$]\w*)?'
|
||||||
|
scope: variable.other.readwrite.instance.coffee
|
||||||
|
interpolated_coffee:
|
||||||
|
- match: '\#\{'
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.embedded.coffee
|
||||||
|
push:
|
||||||
|
- meta_scope: source.coffee.embedded.source
|
||||||
|
- match: '\}'
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.embedded.coffee
|
||||||
|
pop: true
|
||||||
|
- include: main
|
||||||
|
numeric:
|
||||||
|
- match: '(?<!\$)\b((0([box])[0-9a-fA-F]+)|([0-9]+(\.[0-9]+)?(e[+\-]?[0-9]+)?))\b'
|
||||||
|
scope: constant.numeric.coffee
|
||||||
|
single_quoted_string:
|
||||||
|
- match: "'"
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.begin.coffee
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.single.coffee
|
||||||
|
- match: "'"
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.end.coffee
|
||||||
|
pop: true
|
||||||
|
- match: '\\(x\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)'
|
||||||
|
scope: constant.character.escape.coffee
|
||||||
|
variable_name:
|
||||||
|
- match: '([a-zA-Z\$_]\w*(\.\w+)*)'
|
||||||
|
scope: variable.assignment.coffee
|
||||||
|
captures:
|
||||||
|
1: variable.assignment.coffee
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
# http://www.sublimetext.com/docs/3/syntax.html
|
||||||
|
name: CpuInfo
|
||||||
|
file_extensions:
|
||||||
|
- cpuinfo
|
||||||
|
scope: source.cpuinfo
|
||||||
|
|
||||||
|
contexts:
|
||||||
|
main:
|
||||||
|
- match: '^([^:]+)\w*:\w*(.*)$'
|
||||||
|
captures:
|
||||||
|
1: keyword.other.cpuinfo-key
|
||||||
|
2: string.other.cpuinfo-value
|
||||||
+1
Submodule assets/syntaxes/02_Extra/Crystal added at 2ee9d667ae
+1036
File diff suppressed because it is too large
Load Diff
+1
Submodule assets/syntaxes/02_Extra/Dart added at d891fb36c9
+369
@@ -0,0 +1,369 @@
|
|||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
# http://www.sublimetext.com/docs/3/syntax.html
|
||||||
|
name: Dart
|
||||||
|
file_extensions:
|
||||||
|
- dart
|
||||||
|
scope: source.dart
|
||||||
|
contexts:
|
||||||
|
main:
|
||||||
|
- match: ^(#!.*)$
|
||||||
|
scope: meta.preprocessor.script.dart
|
||||||
|
- match: ^\s*\b(library|import|export|part of|part)\b
|
||||||
|
captures:
|
||||||
|
0: keyword.other.import.dart
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.declaration.dart
|
||||||
|
- match: ;
|
||||||
|
captures:
|
||||||
|
0: punctuation.terminator.dart
|
||||||
|
pop: true
|
||||||
|
- include: strings
|
||||||
|
- match: \b(as|show|hide|deferred)\b
|
||||||
|
scope: keyword.other.import.dart
|
||||||
|
- include: comments
|
||||||
|
- include: constants-and-special-vars
|
||||||
|
- include: annotations
|
||||||
|
- include: decl-typedef
|
||||||
|
- include: decl-class
|
||||||
|
- include: decl-enum
|
||||||
|
- include: decl-function
|
||||||
|
- include: keywords
|
||||||
|
- include: strings
|
||||||
|
annotations:
|
||||||
|
- match: '^(?:\s*)((@)([a-zA-Z0-9_]+))'
|
||||||
|
captures:
|
||||||
|
1: annotation.dart
|
||||||
|
2: entity.name.function.annotation.dart
|
||||||
|
3: support.type.dart
|
||||||
|
comments:
|
||||||
|
- match: /\*\*/
|
||||||
|
scope: comment.block.empty.dart
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.comment.dart
|
||||||
|
- include: comments-inline
|
||||||
|
comments-inline:
|
||||||
|
- match: /\*
|
||||||
|
push:
|
||||||
|
- meta_scope: comment.block.dart
|
||||||
|
- match: \*/
|
||||||
|
pop: true
|
||||||
|
- include: scope:text.dart-doccomments
|
||||||
|
- match: (///)
|
||||||
|
captures:
|
||||||
|
1: marker.dart
|
||||||
|
push:
|
||||||
|
- meta_scope: comment.line.triple-slash.dart
|
||||||
|
- match: $
|
||||||
|
pop: true
|
||||||
|
- include: scope:text.dart-doccomments
|
||||||
|
- match: (//)
|
||||||
|
captures:
|
||||||
|
1: marker.dart
|
||||||
|
push:
|
||||||
|
- meta_scope: comment.line.double-slash.dart
|
||||||
|
- match: $
|
||||||
|
pop: true
|
||||||
|
- include: scope:text.dart-doccomments
|
||||||
|
constants-and-special-vars:
|
||||||
|
- match: \b(true|false|null)\b
|
||||||
|
scope: constant.language.dart
|
||||||
|
- match: \b(this|super)\b
|
||||||
|
scope: variable.language.dart
|
||||||
|
- match: '\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)\b'
|
||||||
|
scope: constant.numeric.dart
|
||||||
|
decl-class:
|
||||||
|
- match: \bclass\b
|
||||||
|
captures:
|
||||||
|
0: keyword.control.new.dart
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.declaration.class.dart
|
||||||
|
- match: "(?={)"
|
||||||
|
pop: true
|
||||||
|
- include: keywords
|
||||||
|
- match: "[A-Za-z_][A-Za-z0-9_]*"
|
||||||
|
scope: class.name.dart
|
||||||
|
decl-enum:
|
||||||
|
- match: \benum\b
|
||||||
|
captures:
|
||||||
|
0: keyword.declaration.dart
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.declaration.enum.dart
|
||||||
|
- match: "(?={)"
|
||||||
|
pop: true
|
||||||
|
- include: keywords
|
||||||
|
- match: "[A-Za-z_][A-Za-z0-9_]*"
|
||||||
|
scope: enum.name.dart
|
||||||
|
decl-function:
|
||||||
|
- match: ^\s*(?:\b(void|bool|num|int|double|dynamic|var|String|List|Map)\b)\s+(get)\s+(\w+)\s+(?==>)
|
||||||
|
comment: A getter with a primitive return type.
|
||||||
|
scope: meta.declaration.function.dart
|
||||||
|
captures:
|
||||||
|
1: storage.type.primitive.dart
|
||||||
|
2: keyword.declaration.dart
|
||||||
|
3: function.name.dart
|
||||||
|
- match: ^\s*(?:\b(\w+)\b\s+)?(get)\s+(\w+)\s+(?==>)
|
||||||
|
comment: A getter with a user-defined return type or no return type.
|
||||||
|
scope: meta.declaration.function.dart
|
||||||
|
captures:
|
||||||
|
1: type.user-defined.dart
|
||||||
|
2: keyword.declaration.dart
|
||||||
|
3: function.name.dart
|
||||||
|
- match: ^\s*(set)\s+(\w+)(?=\()
|
||||||
|
comment: A setter.
|
||||||
|
captures:
|
||||||
|
1: keyword.declaration.dart
|
||||||
|
2: function.name.dart
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.declaration.function.dart
|
||||||
|
- match: \)
|
||||||
|
pop: true
|
||||||
|
- include: comments-inline
|
||||||
|
- include: decl-function-parameter
|
||||||
|
- include: strings
|
||||||
|
- include: keywords
|
||||||
|
- match: ^\s*(?:\b(void|bool|num|int|double|dynamic|var|String|List|Map)\b)\s+(\w+)(?=\()
|
||||||
|
comment: A function with a primitive return type.
|
||||||
|
captures:
|
||||||
|
1: storage.type.primitive.dart
|
||||||
|
2: function.name.dart
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.declaration.function.dart
|
||||||
|
- match: \)
|
||||||
|
pop: true
|
||||||
|
- include: comments-inline
|
||||||
|
- include: decl-function-parameter
|
||||||
|
- include: strings
|
||||||
|
- include: keywords
|
||||||
|
- match: ^\s*(?:\b(return)\b)\s+(\w+)(?=\()
|
||||||
|
comment: A function invocation after 'return'
|
||||||
|
captures:
|
||||||
|
1: keyword.control.dart
|
||||||
|
2: function.name.dart
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.invocation.function.dart
|
||||||
|
- match: \)
|
||||||
|
pop: true
|
||||||
|
- include: comments-inline
|
||||||
|
- include: decl-function-parameter
|
||||||
|
- include: strings
|
||||||
|
- include: keywords
|
||||||
|
- match: ^\s*\b(new)\b\s+(\w+)(?=\()
|
||||||
|
comment: A class instantiation after 'new'
|
||||||
|
captures:
|
||||||
|
1: keyword.declaration.dart
|
||||||
|
2: function.name.dart
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.invocation.function.dart
|
||||||
|
- match: \)
|
||||||
|
pop: true
|
||||||
|
- include: comments-inline
|
||||||
|
- include: decl-function-parameter
|
||||||
|
- include: strings
|
||||||
|
- include: keywords
|
||||||
|
decl-function-parameter:
|
||||||
|
- include: constants-and-special-vars
|
||||||
|
- match: (?:\b(void|bool|num|int|double|dynamic|var|String|List|Map)\b)\s+(\w+)(?=\()
|
||||||
|
comment: A function with a primitive return type.
|
||||||
|
captures:
|
||||||
|
1: storage.type.primitive.dart
|
||||||
|
2: function.name.dart
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.parameter.function.dart
|
||||||
|
- match: \)
|
||||||
|
pop: true
|
||||||
|
- include: decl-function-parameter
|
||||||
|
- include: strings
|
||||||
|
- include: keywords
|
||||||
|
- match: \b(new)\b\s+(\w+)(?=\()
|
||||||
|
comment: A class instantiation after 'new'
|
||||||
|
captures:
|
||||||
|
1: keyword.declaration.dart
|
||||||
|
2: function.name.dart
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.invocation.function.dart
|
||||||
|
- match: \)
|
||||||
|
pop: true
|
||||||
|
- include: decl-function-parameter
|
||||||
|
- include: strings
|
||||||
|
- include: keywords
|
||||||
|
- match: (?:\b(\w+)\b)\s+(\w+)(?=\()
|
||||||
|
comment: A function with a user-defined return type.
|
||||||
|
captures:
|
||||||
|
1: type.user-defined.dart
|
||||||
|
2: function.name.dart
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.parameter.function.dart
|
||||||
|
- match: \)
|
||||||
|
pop: true
|
||||||
|
- include: decl-function-parameter
|
||||||
|
- include: strings
|
||||||
|
- include: keywords
|
||||||
|
- match: (\w+)(?=\()
|
||||||
|
comment: A function with no return type.
|
||||||
|
captures:
|
||||||
|
1: function.name.dart
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.parameter.function.dart
|
||||||
|
- match: \)
|
||||||
|
pop: true
|
||||||
|
- include: decl-function-parameter
|
||||||
|
- include: strings
|
||||||
|
- include: keywords
|
||||||
|
decl-typedef:
|
||||||
|
- match: typedef
|
||||||
|
captures:
|
||||||
|
0: keyword.control.new.dart
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.declaration.typedef.dart
|
||||||
|
- match: ;
|
||||||
|
captures:
|
||||||
|
0: punctuation.terminator.dart
|
||||||
|
pop: true
|
||||||
|
- match: '(?:\b(void|bool|num|int|double|dynamic|var|String|List|Map)\b|([a-zA-Z_][a-zA-Z0-9_]*))\s+([a-zA-Z_][a-zA-Z0-9_]+)'
|
||||||
|
captures:
|
||||||
|
1: storage.type.primitive.dart
|
||||||
|
2: typedef.return.dart
|
||||||
|
3: typedef.name.dart
|
||||||
|
- match: \(
|
||||||
|
push:
|
||||||
|
- meta_scope: typedef.params.dart
|
||||||
|
- match: \)
|
||||||
|
pop: true
|
||||||
|
- include: keywords
|
||||||
|
keywords:
|
||||||
|
- match: \bassert\b
|
||||||
|
scope: keyword.control.assert.dart
|
||||||
|
- match: \bas\b
|
||||||
|
scope: keyword.cast.dart
|
||||||
|
- match: \b(try|catch|finally|throw|on|rethrow)\b
|
||||||
|
scope: keyword.control.catch-exception.dart
|
||||||
|
- match: \s+\?\s+|\s+:\s+
|
||||||
|
scope: keyword.control.ternary.dart
|
||||||
|
- match: \b(break|case|continue|default|do|else|for|if|in|return|switch|while)\b
|
||||||
|
scope: keyword.control.dart
|
||||||
|
- match: \b(async\*|async|await\*|await|yield)\b
|
||||||
|
scope: keyword.control.async.dart
|
||||||
|
- match: \b(new)\b
|
||||||
|
scope: keyword.control.new.dart
|
||||||
|
- match: \b(abstract|extends|external|factory|implements|with|interface|get|native|operator|set|typedef)\b
|
||||||
|
scope: keyword.declaration.dart
|
||||||
|
- match: \b(is\!?)\b
|
||||||
|
scope: keyword.operator.dart
|
||||||
|
- match: (<<|>>>?|~|\^|\||&)
|
||||||
|
scope: keyword.operator.bitwise.dart
|
||||||
|
- match: ((&|\^|\||<<|>>>?)=)
|
||||||
|
scope: keyword.operator.assignment.bitwise.dart
|
||||||
|
- match: (===?|!==?|<=?|>=?)
|
||||||
|
scope: keyword.operator.comparison.dart
|
||||||
|
- match: '(([+*/%-]|\~)=)'
|
||||||
|
scope: keyword.operator.assignment.arithmetic.dart
|
||||||
|
- match: (=)
|
||||||
|
scope: keyword.operator.assignment.dart
|
||||||
|
- match: (\-\-|\+\+)
|
||||||
|
scope: keyword.operator.increment-decrement.dart
|
||||||
|
- match: (\-|\+|\*|\/|\~\/|%)
|
||||||
|
scope: keyword.operator.arithmetic.dart
|
||||||
|
- match: (!|&&|\|\|)
|
||||||
|
scope: keyword.operator.logical.dart
|
||||||
|
- match: ;
|
||||||
|
scope: punctuation.terminator.dart
|
||||||
|
- match: \b(static|final|const)\b
|
||||||
|
scope: storage.modifier.dart
|
||||||
|
- match: \b(?:void|bool|num|int|double|dynamic|var|String|List|Map)\b
|
||||||
|
scope: storage.type.primitive.dart
|
||||||
|
regexp:
|
||||||
|
- match: '\\[^''"]'
|
||||||
|
scope: constant.character.escaped.regex.dart
|
||||||
|
- match: \(
|
||||||
|
push:
|
||||||
|
- meta_content_scope: meta.capture.regex.dart
|
||||||
|
- match: \)
|
||||||
|
pop: true
|
||||||
|
- match: \?(:|=|!)
|
||||||
|
scope: ignore.capture.regex.dart
|
||||||
|
- match: \*|\+|\?|\.|\|
|
||||||
|
scope: keyword.other.regex.dart
|
||||||
|
- match: \^|\$
|
||||||
|
scope: keyword.other.regex.dart
|
||||||
|
- match: \.
|
||||||
|
scope: constant.other.regex.dart
|
||||||
|
- match: '\[(\^)?'
|
||||||
|
captures:
|
||||||
|
1: keyword.other.negation.regex.dart
|
||||||
|
push:
|
||||||
|
- meta_scope: constant.character.range.regex.dart
|
||||||
|
- match: '\]'
|
||||||
|
pop: true
|
||||||
|
- match: '\\[^"'']'
|
||||||
|
scope: constant.character.escaped.regex.dart
|
||||||
|
- match: '\{(?:\d+)?,(?:\d+)?\}'
|
||||||
|
scope: keyword.other.regex.dart
|
||||||
|
string-interp:
|
||||||
|
- match: '(\$)(\{)'
|
||||||
|
captures:
|
||||||
|
1: keyword.other.dart
|
||||||
|
2: keyword.other.dart
|
||||||
|
push:
|
||||||
|
- meta_scope: interpolation.dart
|
||||||
|
- meta_content_scope: source.dart
|
||||||
|
- match: '(\})'
|
||||||
|
captures:
|
||||||
|
1: keyword.other.dart
|
||||||
|
pop: true
|
||||||
|
- include: main
|
||||||
|
- match: (\$)(\w+)
|
||||||
|
captures:
|
||||||
|
1: keyword.other.dart
|
||||||
|
2: variable.parameter.dart
|
||||||
|
- match: \\.
|
||||||
|
scope: constant.character.escape.dart
|
||||||
|
strings:
|
||||||
|
- match: (?<!r)"""
|
||||||
|
push:
|
||||||
|
- meta_scope: string.interpolated.triple.double.dart
|
||||||
|
- match: '"""(?!")'
|
||||||
|
pop: true
|
||||||
|
- include: string-interp
|
||||||
|
- match: (?<!r)'''
|
||||||
|
push:
|
||||||
|
- meta_scope: string.interpolated.triple.single.dart
|
||||||
|
- match: "'''(?!')"
|
||||||
|
pop: true
|
||||||
|
- include: string-interp
|
||||||
|
- match: r"""
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.triple.double.dart
|
||||||
|
- match: '"""(?!")'
|
||||||
|
pop: true
|
||||||
|
- match: r'''
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.triple.single.dart
|
||||||
|
- match: "'''(?!')"
|
||||||
|
pop: true
|
||||||
|
- match: (?<!\\|r)"
|
||||||
|
push:
|
||||||
|
- meta_scope: string.interpolated.double.dart
|
||||||
|
- match: '"'
|
||||||
|
pop: true
|
||||||
|
- match: \n
|
||||||
|
scope: invalid.string.newline
|
||||||
|
- include: string-interp
|
||||||
|
- match: r"
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.double.dart
|
||||||
|
- match: '"'
|
||||||
|
pop: true
|
||||||
|
- include: regexp
|
||||||
|
- match: (?<!\|r)'
|
||||||
|
push:
|
||||||
|
- meta_scope: string.interpolated.single.dart
|
||||||
|
- match: "'"
|
||||||
|
pop: true
|
||||||
|
- include: string-interp
|
||||||
|
- match: r'
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.single.dart
|
||||||
|
- match: "'"
|
||||||
|
pop: true
|
||||||
|
- include: regexp
|
||||||
+1
Submodule assets/syntaxes/02_Extra/Docker added at 9e9a518aed
+1
Submodule assets/syntaxes/02_Extra/DotENV added at a1c917633d
+91
@@ -0,0 +1,91 @@
|
|||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
# http://www.sublimetext.com/docs/3/syntax.html
|
||||||
|
name: DotENV
|
||||||
|
file_extensions:
|
||||||
|
- .env
|
||||||
|
- .envrc
|
||||||
|
- .env.dist
|
||||||
|
- .env.local
|
||||||
|
- .env.sample
|
||||||
|
- .env.example
|
||||||
|
- .env.test
|
||||||
|
- .env.test.local
|
||||||
|
- .env.testing
|
||||||
|
- .env.dev
|
||||||
|
- .env.development
|
||||||
|
- .env.development.local
|
||||||
|
- .env.prod
|
||||||
|
- .env.production
|
||||||
|
- .env.production.local
|
||||||
|
- .env.dusk.local
|
||||||
|
- .flaskenv
|
||||||
|
- .env.staging
|
||||||
|
scope: source.env
|
||||||
|
contexts:
|
||||||
|
main:
|
||||||
|
- match: (#).*$\n?
|
||||||
|
comment: "Comments - starts with #"
|
||||||
|
scope: comment.line.number-sign.env
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.comment.env
|
||||||
|
- match: (\")
|
||||||
|
comment: Strings (double)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.string.begin.env
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.double.env
|
||||||
|
- match: (\")
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.string.end
|
||||||
|
pop: true
|
||||||
|
- include: interpolation
|
||||||
|
- include: variable
|
||||||
|
- include: escape-characters
|
||||||
|
- match: (\')
|
||||||
|
comment: Strings (single)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.string.begin.env
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.single.env
|
||||||
|
- match: (\')
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.string.end
|
||||||
|
pop: true
|
||||||
|
- match: '(?<=[\w])\s?='
|
||||||
|
comment: Assignment Operator
|
||||||
|
scope: keyword.operator.assignment.env
|
||||||
|
- match: '([\w]+)(?=\s?\=)'
|
||||||
|
comment: Variable
|
||||||
|
scope: variable.other.env
|
||||||
|
- match: (?i)\s?(export)
|
||||||
|
comment: Keywords
|
||||||
|
scope: keyword.other.env
|
||||||
|
- match: (?i)(?<=\=)\s?(true|false|null)
|
||||||
|
comment: Constants
|
||||||
|
scope: constant.language.env
|
||||||
|
- match: '\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)\b'
|
||||||
|
comment: Numeric
|
||||||
|
scope: constant.numeric.env
|
||||||
|
escape-characters:
|
||||||
|
- match: '\\[nrt\\\$\"\'']'
|
||||||
|
scope: constant.character.escape.env
|
||||||
|
interpolation:
|
||||||
|
- match: '(\$\{|\{)'
|
||||||
|
comment: 'Template Syntax: "foo ${bar} {$baz}"'
|
||||||
|
captures:
|
||||||
|
1: string.interpolated.env keyword.other.template.begin.env
|
||||||
|
push:
|
||||||
|
- match: '(\})'
|
||||||
|
captures:
|
||||||
|
1: string.interpolated.env keyword.other.template.end.env
|
||||||
|
pop: true
|
||||||
|
- match: '(?x)(\$+)?([a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*?\b)'
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.variable.env variable.other.env
|
||||||
|
2: variable.other.env
|
||||||
|
variable:
|
||||||
|
- match: '(?x)(\$+)([a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*?\b)'
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.variable.env variable.other.env
|
||||||
|
2: variable.other.env
|
||||||
+1
Submodule assets/syntaxes/02_Extra/Elixir added at 89b3bada32
+1
Submodule assets/syntaxes/02_Extra/Elm added at dfbb8bdc9a
+1
Submodule assets/syntaxes/02_Extra/Email added at fc034fb85a
+1
Submodule assets/syntaxes/02_Extra/FSharp added at c18616d6bd
+1
Submodule assets/syntaxes/02_Extra/Fish added at 2c254cc851
+1
Submodule assets/syntaxes/02_Extra/Fortran added at dcf4f24f1c
+133
@@ -0,0 +1,133 @@
|
|||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
# http://www.sublimetext.com/docs/3/syntax.html
|
||||||
|
name: fstab
|
||||||
|
file_extensions:
|
||||||
|
- fstab
|
||||||
|
scope: source.fstab
|
||||||
|
|
||||||
|
contexts:
|
||||||
|
main:
|
||||||
|
- include: comment
|
||||||
|
- match: '^'
|
||||||
|
push: fstab_device
|
||||||
|
comment: leading spaces
|
||||||
|
|
||||||
|
fstab_device:
|
||||||
|
- include: comment
|
||||||
|
- match: '\s*([^=\s]+=)([^\s]+)\s*'
|
||||||
|
comment: device by uuid or label
|
||||||
|
set: fstab_mountpoint
|
||||||
|
captures:
|
||||||
|
1: punctuation.accessor
|
||||||
|
2: keyword.other.device
|
||||||
|
- match: '\s*(//|\\\\)([^\s]+)\s*'
|
||||||
|
comment: device by samba share
|
||||||
|
set: fstab_mountpoint
|
||||||
|
captures:
|
||||||
|
1: punctuation.accessor
|
||||||
|
2: keyword.other.device
|
||||||
|
- match: '\s*([^\s]+)(:)([^\s]+)\s*'
|
||||||
|
comment: device by server
|
||||||
|
set: fstab_mountpoint
|
||||||
|
captures:
|
||||||
|
1: keyword.other.device
|
||||||
|
2: punctuation.accessor
|
||||||
|
3: keyword.other.device
|
||||||
|
- match: '\s*[^\s/\\]+\s*'
|
||||||
|
comment: device by dev name
|
||||||
|
set: fstab_mountpoint
|
||||||
|
scope: keyword.other.device
|
||||||
|
- match: '\s*(/dev/)([^\s]+)\s*'
|
||||||
|
comment: device by dev path
|
||||||
|
set: fstab_mountpoint
|
||||||
|
captures:
|
||||||
|
1: punctuation.accessor
|
||||||
|
2: keyword.other.device
|
||||||
|
- match: '\s*([^\s/]*/)*([^\s]+)\s*'
|
||||||
|
comment: device by unknown path
|
||||||
|
set: fstab_mountpoint
|
||||||
|
captures:
|
||||||
|
1: punctuation.accessor
|
||||||
|
2: keyword.other.device
|
||||||
|
- include: clear
|
||||||
|
|
||||||
|
fstab_mountpoint:
|
||||||
|
- include: comment
|
||||||
|
- match: '\s*/[^\s]*\s*'
|
||||||
|
comment: mount point
|
||||||
|
set: fstab_filesystem
|
||||||
|
scope: string.unquoted.mountpoint
|
||||||
|
- match: '\s*[^\s]+\s*'
|
||||||
|
comment: mount point without leading slash (invalid)
|
||||||
|
set: fstab_filesystem
|
||||||
|
scope: invalid.illegal
|
||||||
|
- include: clear
|
||||||
|
|
||||||
|
fstab_filesystem:
|
||||||
|
- include: comment
|
||||||
|
- match: '\s*[^\s]+\s*'
|
||||||
|
comment: filesystem type
|
||||||
|
set: fstab_options
|
||||||
|
scope: variable.parameter.filesystem
|
||||||
|
- include: clear
|
||||||
|
|
||||||
|
fstab_options:
|
||||||
|
- include: comment
|
||||||
|
- match: '([^\s,=]+)(=)([^\s,]+)'
|
||||||
|
comment: key-value option
|
||||||
|
captures:
|
||||||
|
1: entity.name.option
|
||||||
|
2: entity.other.separator
|
||||||
|
3: variable.parameter
|
||||||
|
- match: '[^\s,]+'
|
||||||
|
comment: flag option
|
||||||
|
scope: entity.name.option
|
||||||
|
- match: ','
|
||||||
|
comment: option separator
|
||||||
|
scope: punctuation.separator
|
||||||
|
- match: '\s+'
|
||||||
|
comment: next field
|
||||||
|
set: fstab_dump
|
||||||
|
- include: clear
|
||||||
|
|
||||||
|
fstab_dump:
|
||||||
|
- include: comment
|
||||||
|
- match: '\s*[01]\s*'
|
||||||
|
comment: dump field
|
||||||
|
scope: constant.numeric
|
||||||
|
set: fstab_pass
|
||||||
|
- match: '\s*[^\s]+\s*'
|
||||||
|
comment: invalid dump field
|
||||||
|
scope: invalid.illegal
|
||||||
|
set: fstab_pass
|
||||||
|
- include: clear
|
||||||
|
|
||||||
|
fstab_pass:
|
||||||
|
- include: comment
|
||||||
|
- match: '\s*[01]\s*'
|
||||||
|
comment: pass field
|
||||||
|
scope: constant.numeric
|
||||||
|
set: expected_eol
|
||||||
|
- match: '\s*[^\s]+\s*'
|
||||||
|
comment: invalid pass field
|
||||||
|
scope: invalid.illegal
|
||||||
|
set: expected_eol
|
||||||
|
- include: clear
|
||||||
|
|
||||||
|
expected_eol:
|
||||||
|
- include: comment
|
||||||
|
- include: clear
|
||||||
|
- match: '.*'
|
||||||
|
scope: invalid.illegal
|
||||||
|
|
||||||
|
comment:
|
||||||
|
- match: '\s*#.*$'
|
||||||
|
comment: comment using the number sign
|
||||||
|
scope: comment.line
|
||||||
|
|
||||||
|
clear:
|
||||||
|
- match: '.*$'
|
||||||
|
comment: used for clearing the context
|
||||||
|
pop: true
|
||||||
|
|
||||||
+1
Submodule assets/syntaxes/02_Extra/GraphQL added at c9d84587eb
+48
@@ -0,0 +1,48 @@
|
|||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
# http://www.sublimetext.com/docs/3/syntax.html
|
||||||
|
name: group
|
||||||
|
file_extensions:
|
||||||
|
- group
|
||||||
|
scope: source.group
|
||||||
|
|
||||||
|
contexts:
|
||||||
|
main:
|
||||||
|
- comment: name
|
||||||
|
match: ^[^:]+
|
||||||
|
scope: keyword
|
||||||
|
|
||||||
|
- comment: password
|
||||||
|
match: ":"
|
||||||
|
push: password
|
||||||
|
|
||||||
|
password:
|
||||||
|
- comment: uid
|
||||||
|
match: ":"
|
||||||
|
set: gid
|
||||||
|
|
||||||
|
- comment: shadowpassword
|
||||||
|
match: "[^:]+"
|
||||||
|
scope: invalid
|
||||||
|
|
||||||
|
gid:
|
||||||
|
- comment: gid
|
||||||
|
match: ":"
|
||||||
|
set: users
|
||||||
|
|
||||||
|
- comment: number
|
||||||
|
match: "[0-9]+"
|
||||||
|
scope: constant.numeric
|
||||||
|
|
||||||
|
users:
|
||||||
|
- comment: newline
|
||||||
|
match: "\n"
|
||||||
|
pop: true
|
||||||
|
|
||||||
|
- comment: directory
|
||||||
|
match: "[^:\n]+"
|
||||||
|
scope: variable.parameter
|
||||||
|
|
||||||
|
- comment: separator
|
||||||
|
match: ","
|
||||||
|
scope: punctuation
|
||||||
+1
Submodule assets/syntaxes/02_Extra/HTML (Twig) added at 77def406d7
+662
@@ -0,0 +1,662 @@
|
|||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
# http://www.sublimetext.com/docs/3/syntax.html
|
||||||
|
name: HTML (Twig)
|
||||||
|
file_extensions:
|
||||||
|
- twig
|
||||||
|
- html.twig
|
||||||
|
scope: text.html.twig
|
||||||
|
contexts:
|
||||||
|
main:
|
||||||
|
- match: '(<)([a-zA-Z0-9:]++)(?=[^>]*></\2>)'
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.tag.html
|
||||||
|
2: entity.name.tag.html
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.tag.any.html
|
||||||
|
- match: (>(<)/)(\2)(>)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.tag.html
|
||||||
|
2: meta.scope.between-tag-pair.html
|
||||||
|
3: entity.name.tag.html
|
||||||
|
4: punctuation.definition.tag.html
|
||||||
|
pop: true
|
||||||
|
- include: tag-stuff
|
||||||
|
- match: (<\?)(xml)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.tag.html
|
||||||
|
2: entity.name.tag.xml.html
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.tag.preprocessor.xml.html
|
||||||
|
- match: (\?>)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.tag.html
|
||||||
|
2: entity.name.tag.xml.html
|
||||||
|
pop: true
|
||||||
|
- include: tag-generic-attribute
|
||||||
|
- include: string-double-quoted
|
||||||
|
- include: string-single-quoted
|
||||||
|
- match: <!--
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.comment.html
|
||||||
|
push:
|
||||||
|
- meta_scope: comment.block.html
|
||||||
|
- match: '--\s*>'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.comment.html
|
||||||
|
pop: true
|
||||||
|
- match: "--"
|
||||||
|
scope: invalid.illegal.bad-comments-or-CDATA.html
|
||||||
|
- include: embedded-code
|
||||||
|
- match: <!
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.tag.html
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.tag.sgml.html
|
||||||
|
- match: ">"
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.tag.html
|
||||||
|
pop: true
|
||||||
|
- match: (?i:DOCTYPE)
|
||||||
|
captures:
|
||||||
|
1: entity.name.tag.doctype.html
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.tag.sgml.doctype.html
|
||||||
|
- match: (?=>)
|
||||||
|
captures:
|
||||||
|
1: entity.name.tag.doctype.html
|
||||||
|
pop: true
|
||||||
|
- match: '"[^">]*"'
|
||||||
|
scope: string.quoted.double.doctype.identifiers-and-DTDs.html
|
||||||
|
- match: '\[CDATA\['
|
||||||
|
push:
|
||||||
|
- meta_scope: constant.other.inline-data.html
|
||||||
|
- match: "]](?=>)"
|
||||||
|
pop: true
|
||||||
|
- match: (\s*)(?!--|>)\S(\s*)
|
||||||
|
scope: invalid.illegal.bad-comments-or-CDATA.html
|
||||||
|
- include: embedded-code
|
||||||
|
- match: '(?:^\s+)?(<)((?i:style))\b(?![^>]*/>)'
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.tag.html
|
||||||
|
2: entity.name.tag.style.html
|
||||||
|
3: punctuation.definition.tag.html
|
||||||
|
push:
|
||||||
|
- meta_scope: source.css.embedded.html
|
||||||
|
- match: (</)((?i:style))(>)(?:\s*\n)?
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.tag.html
|
||||||
|
2: entity.name.tag.style.html
|
||||||
|
3: punctuation.definition.tag.html
|
||||||
|
pop: true
|
||||||
|
- include: tag-stuff
|
||||||
|
- match: (>)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.tag.html
|
||||||
|
push:
|
||||||
|
- match: (?=</(?i:style))
|
||||||
|
pop: true
|
||||||
|
- include: embedded-code
|
||||||
|
- include: scope:source.css
|
||||||
|
- match: '(?:^\s+)?(<)((?i:script))\b(?![^>]*/>)'
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.tag.html
|
||||||
|
2: entity.name.tag.script.html
|
||||||
|
push:
|
||||||
|
- meta_scope: source.js.embedded.html
|
||||||
|
- match: (?<=</(script|SCRIPT))(>)(?:\s*\n)?
|
||||||
|
captures:
|
||||||
|
2: punctuation.definition.tag.html
|
||||||
|
pop: true
|
||||||
|
- include: tag-stuff
|
||||||
|
- match: (?<!</(?:script|SCRIPT))(>)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.tag.html
|
||||||
|
2: entity.name.tag.script.html
|
||||||
|
push:
|
||||||
|
- match: (</)((?i:script))
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.tag.html
|
||||||
|
2: entity.name.tag.script.html
|
||||||
|
pop: true
|
||||||
|
- match: (//).*?((?=</script)|$\n?)
|
||||||
|
scope: comment.line.double-slash.js
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.comment.js
|
||||||
|
- match: /\*
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.comment.js
|
||||||
|
push:
|
||||||
|
- meta_scope: comment.block.js
|
||||||
|
- match: \*/|(?=</script)
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.comment.js
|
||||||
|
pop: true
|
||||||
|
- include: php
|
||||||
|
- include: twig-print-tag
|
||||||
|
- include: twig-statement-tag
|
||||||
|
- include: twig-comment-tag
|
||||||
|
- include: scope:source.js
|
||||||
|
- match: (</?)((?i:body|head|html)\b)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.tag.html
|
||||||
|
2: entity.name.tag.structure.any.html
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.tag.structure.any.html
|
||||||
|
- match: (>)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.tag.html
|
||||||
|
2: entity.name.tag.structure.any.html
|
||||||
|
pop: true
|
||||||
|
- include: tag-stuff
|
||||||
|
- match: (</?)((?i:address|blockquote|dd|div|dl|dt|fieldset|form|frame|frameset|h1|h2|h3|h4|h5|h6|iframe|noframes|object|ol|p|ul|applet|center|dir|hr|menu|pre)\b)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.tag.begin.html
|
||||||
|
2: entity.name.tag.block.any.html
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.tag.block.any.html
|
||||||
|
- match: (>)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.tag.end.html
|
||||||
|
pop: true
|
||||||
|
- include: tag-stuff
|
||||||
|
- match: (</?)((?i:a|abbr|acronym|area|b|base|basefont|bdo|big|br|button|caption|cite|code|col|colgroup|del|dfn|em|font|head|html|i|img|input|ins|isindex|kbd|label|legend|li|link|map|meta|noscript|optgroup|option|param|q|s|samp|script|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|title|tr|tt|u|var)\b)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.tag.begin.html
|
||||||
|
2: entity.name.tag.inline.any.html
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.tag.inline.any.html
|
||||||
|
- match: "((?: ?/)?>)"
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.tag.end.html
|
||||||
|
pop: true
|
||||||
|
- include: tag-stuff
|
||||||
|
- match: "(</?)([a-zA-Z0-9:]+)"
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.tag.begin.html
|
||||||
|
2: entity.name.tag.other.html
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.tag.other.html
|
||||||
|
- match: (>)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.tag.end.html
|
||||||
|
pop: true
|
||||||
|
- include: tag-stuff
|
||||||
|
- include: entities
|
||||||
|
- match: <>
|
||||||
|
scope: invalid.illegal.incomplete.html
|
||||||
|
- match: <
|
||||||
|
scope: invalid.illegal.bad-angle-bracket.html
|
||||||
|
- include: twig-print-tag
|
||||||
|
- include: twig-statement-tag
|
||||||
|
- include: twig-comment-tag
|
||||||
|
embedded-code:
|
||||||
|
- include: ruby
|
||||||
|
- include: php
|
||||||
|
- include: twig-print-tag
|
||||||
|
- include: twig-statement-tag
|
||||||
|
- include: twig-comment-tag
|
||||||
|
- include: python
|
||||||
|
entities:
|
||||||
|
- match: "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)"
|
||||||
|
scope: constant.character.entity.html
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.entity.html
|
||||||
|
3: punctuation.definition.entity.html
|
||||||
|
- match: "&"
|
||||||
|
scope: invalid.illegal.bad-ampersand.html
|
||||||
|
php:
|
||||||
|
- match: (?=(^\s*)?<\?)
|
||||||
|
push:
|
||||||
|
- match: (?!(^\s*)?<\?)
|
||||||
|
pop: true
|
||||||
|
- include: scope:text.html.php
|
||||||
|
python:
|
||||||
|
- match: (?:^\s*)<\?python(?!.*\?>)
|
||||||
|
push:
|
||||||
|
- meta_scope: source.python.embedded.html
|
||||||
|
- match: \?>(?:\s*$\n)?
|
||||||
|
pop: true
|
||||||
|
- include: scope:source.python
|
||||||
|
ruby:
|
||||||
|
- match: "<%+#"
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.comment.erb
|
||||||
|
push:
|
||||||
|
- meta_scope: comment.block.erb
|
||||||
|
- match: "%>"
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.comment.erb
|
||||||
|
pop: true
|
||||||
|
- match: <%+(?!>)=?
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.embedded.ruby
|
||||||
|
push:
|
||||||
|
- meta_scope: source.ruby.embedded.html
|
||||||
|
- match: "-?%>"
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.embedded.ruby
|
||||||
|
pop: true
|
||||||
|
- match: (#).*?(?=-?%>)
|
||||||
|
scope: comment.line.number-sign.ruby
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.comment.ruby
|
||||||
|
- include: scope:source.ruby
|
||||||
|
- match: <\?r(?!>)=?
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.embedded.ruby.nitro
|
||||||
|
push:
|
||||||
|
- meta_scope: source.ruby.nitro.embedded.html
|
||||||
|
- match: '-?\?>'
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.embedded.ruby.nitro
|
||||||
|
pop: true
|
||||||
|
- match: (#).*?(?=-?\?>)
|
||||||
|
scope: comment.line.number-sign.ruby.nitro
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.comment.ruby.nitro
|
||||||
|
- include: scope:source.ruby
|
||||||
|
string-double-quoted:
|
||||||
|
- match: '"'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.begin.html
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.double.html
|
||||||
|
- match: '"'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.end.html
|
||||||
|
pop: true
|
||||||
|
- include: embedded-code
|
||||||
|
- include: entities
|
||||||
|
string-single-quoted:
|
||||||
|
- match: "'"
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.begin.html
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.single.html
|
||||||
|
- match: "'"
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.end.html
|
||||||
|
pop: true
|
||||||
|
- include: embedded-code
|
||||||
|
- include: entities
|
||||||
|
tag-generic-attribute:
|
||||||
|
- match: '\b([a-zA-Z\-:]+)'
|
||||||
|
scope: entity.other.attribute-name.html
|
||||||
|
tag-id-attribute:
|
||||||
|
- match: \b(id)\b\s*(=)
|
||||||
|
captures:
|
||||||
|
1: entity.other.attribute-name.id.html
|
||||||
|
2: punctuation.separator.key-value.html
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.attribute-with-value.id.html
|
||||||
|
- match: (?<='|")
|
||||||
|
captures:
|
||||||
|
1: entity.other.attribute-name.id.html
|
||||||
|
2: punctuation.separator.key-value.html
|
||||||
|
pop: true
|
||||||
|
- match: '"'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.begin.html
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.double.html
|
||||||
|
- meta_content_scope: meta.toc-list.id.html
|
||||||
|
- match: '"'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.end.html
|
||||||
|
pop: true
|
||||||
|
- include: embedded-code
|
||||||
|
- include: entities
|
||||||
|
- match: "'"
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.begin.html
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.single.html
|
||||||
|
- meta_content_scope: meta.toc-list.id.html
|
||||||
|
- match: "'"
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.end.html
|
||||||
|
pop: true
|
||||||
|
- include: embedded-code
|
||||||
|
- include: entities
|
||||||
|
tag-stuff:
|
||||||
|
- include: tag-id-attribute
|
||||||
|
- include: tag-generic-attribute
|
||||||
|
- include: string-double-quoted
|
||||||
|
- include: string-single-quoted
|
||||||
|
- include: embedded-code
|
||||||
|
twig-arrays:
|
||||||
|
- match: '(?<=[\s\(\{\[:,])\['
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.array.begin.twig
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.array.twig
|
||||||
|
- match: '\]'
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.array.end.twig
|
||||||
|
pop: true
|
||||||
|
- include: twig-arrays
|
||||||
|
- include: twig-hashes
|
||||||
|
- include: twig-constants
|
||||||
|
- include: twig-strings
|
||||||
|
- include: twig-functions-warg
|
||||||
|
- include: twig-functions
|
||||||
|
- include: twig-macros
|
||||||
|
- include: twig-objects
|
||||||
|
- include: twig-properties
|
||||||
|
- include: twig-filters-warg
|
||||||
|
- include: twig-filters
|
||||||
|
- include: twig-filters-warg-ud
|
||||||
|
- include: twig-filters-ud
|
||||||
|
- match: ","
|
||||||
|
scope: punctuation.separator.object.twig
|
||||||
|
twig-comment-tag:
|
||||||
|
- match: '\{#-?'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.comment.begin.twig
|
||||||
|
push:
|
||||||
|
- meta_scope: comment.block.twig
|
||||||
|
- match: '-?#\}'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.comment.end.twig
|
||||||
|
pop: true
|
||||||
|
twig-constants:
|
||||||
|
- match: '(?i)(?<=[\s\[\(\{:,])(?:true|false|null|none)(?=[\s\)\]\}\,])'
|
||||||
|
scope: constant.language.twig
|
||||||
|
- match: '(?<=[\s\[\(\{:,]|\.\.|\*\*)[0-9]+(?:\.[0-9]+)?(?=[\s\)\]\}\,]|\.\.|\*\*)'
|
||||||
|
scope: constant.numeric.twig
|
||||||
|
twig-filters:
|
||||||
|
- match: '(?<=(?:[a-zA-Z0-9_\x{7f}-\x{ff}\]\)\''\"]\|)|\{%\sfilter\s)(abs|capitalize|e(?:scape)?|first|join|(?:json|url)_encode|keys|last|length|lower|nl2br|number_format|raw|reverse|round|sort|striptags|title|trim|upper)(?=[\s\|\]\}\):,]|\.\.|\*\*)'
|
||||||
|
captures:
|
||||||
|
1: support.function.twig
|
||||||
|
twig-filters-ud:
|
||||||
|
- match: '(?<=(?:[a-zA-Z0-9_\x{7f}-\x{ff}\]\)\''\"]\|)|\{%\sfilter\s)([a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)'
|
||||||
|
captures:
|
||||||
|
1: meta.function-call.other.twig
|
||||||
|
twig-filters-warg:
|
||||||
|
- match: '(?<=(?:[a-zA-Z0-9_\x{7f}-\x{ff}\]\)\''\"]\|)|\{%\sfilter\s)(batch|convert_encoding|date|date_modify|default|e(?:scape)?|format|join|merge|number_format|replace|round|slice|split|trim)(\()'
|
||||||
|
captures:
|
||||||
|
1: support.function.twig
|
||||||
|
2: punctuation.definition.parameters.begin.twig
|
||||||
|
push:
|
||||||
|
- meta_content_scope: meta.function.arguments.twig
|
||||||
|
- match: \)
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.parameters.end.twig
|
||||||
|
pop: true
|
||||||
|
- include: twig-constants
|
||||||
|
- include: twig-functions-warg
|
||||||
|
- include: twig-functions
|
||||||
|
- include: twig-macros
|
||||||
|
- include: twig-objects
|
||||||
|
- include: twig-properties
|
||||||
|
- include: twig-filters-warg
|
||||||
|
- include: twig-filters
|
||||||
|
- include: twig-filters-warg-ud
|
||||||
|
- include: twig-filters-ud
|
||||||
|
- include: twig-strings
|
||||||
|
- include: twig-arrays
|
||||||
|
- include: twig-hashes
|
||||||
|
twig-filters-warg-ud:
|
||||||
|
- match: '(?<=(?:[a-zA-Z0-9_\x{7f}-\x{ff}\]\)\''\"]\|)|\{%\sfilter\s)([a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)(\()'
|
||||||
|
captures:
|
||||||
|
1: meta.function-call.other.twig
|
||||||
|
2: punctuation.definition.parameters.begin.twig
|
||||||
|
push:
|
||||||
|
- meta_content_scope: meta.function.arguments.twig
|
||||||
|
- match: \)
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.parameters.end.twig
|
||||||
|
pop: true
|
||||||
|
- include: twig-constants
|
||||||
|
- include: twig-functions-warg
|
||||||
|
- include: twig-functions
|
||||||
|
- include: twig-macros
|
||||||
|
- include: twig-objects
|
||||||
|
- include: twig-properties
|
||||||
|
- include: twig-filters-warg
|
||||||
|
- include: twig-filters
|
||||||
|
- include: twig-filters-warg-ud
|
||||||
|
- include: twig-filters-ud
|
||||||
|
- include: twig-strings
|
||||||
|
- include: twig-arrays
|
||||||
|
- include: twig-hashes
|
||||||
|
twig-functions:
|
||||||
|
- match: (?<=is\s)(defined|empty|even|iterable|odd)
|
||||||
|
captures:
|
||||||
|
1: support.function.twig
|
||||||
|
twig-functions-warg:
|
||||||
|
- match: '(?<=[\s\(\[\{:,])(attribute|block|constant|cycle|date|divisible by|dump|include|max|min|parent|random|range|same as|source|template_from_string)(\()'
|
||||||
|
captures:
|
||||||
|
1: support.function.twig
|
||||||
|
2: punctuation.definition.parameters.begin.twig
|
||||||
|
push:
|
||||||
|
- meta_content_scope: meta.function.arguments.twig
|
||||||
|
- match: \)
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.parameters.end.twig
|
||||||
|
pop: true
|
||||||
|
- include: twig-constants
|
||||||
|
- include: twig-functions-warg
|
||||||
|
- include: twig-functions
|
||||||
|
- include: twig-macros
|
||||||
|
- include: twig-objects
|
||||||
|
- include: twig-properties
|
||||||
|
- include: twig-filters-warg
|
||||||
|
- include: twig-filters
|
||||||
|
- include: twig-filters-warg-ud
|
||||||
|
- include: twig-filters-ud
|
||||||
|
- include: twig-strings
|
||||||
|
- include: twig-arrays
|
||||||
|
twig-hashes:
|
||||||
|
- match: '(?<=[\s\(\{\[:,])\{'
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.hash.begin.twig
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.hash.twig
|
||||||
|
- match: '\}'
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.hash.end.twig
|
||||||
|
pop: true
|
||||||
|
- include: twig-hashes
|
||||||
|
- include: twig-arrays
|
||||||
|
- include: twig-constants
|
||||||
|
- include: twig-strings
|
||||||
|
- include: twig-functions-warg
|
||||||
|
- include: twig-functions
|
||||||
|
- include: twig-macros
|
||||||
|
- include: twig-objects
|
||||||
|
- include: twig-properties
|
||||||
|
- include: twig-filters-warg
|
||||||
|
- include: twig-filters
|
||||||
|
- include: twig-filters-warg-ud
|
||||||
|
- include: twig-filters-ud
|
||||||
|
- match: ":"
|
||||||
|
scope: punctuation.separator.key-value.twig
|
||||||
|
- match: ","
|
||||||
|
scope: punctuation.separator.object.twig
|
||||||
|
twig-keywords:
|
||||||
|
- match: (?<=\s)((?:end)?(?:autoescape|block|embed|filter|for|if|macro|raw|sandbox|set|spaceless|trans|verbatim)|as|do|else|elseif|extends|flush|from|ignore missing|import|include|only|use|with)(?=\s)
|
||||||
|
scope: keyword.control.twig
|
||||||
|
twig-macros:
|
||||||
|
- match: |-
|
||||||
|
(?x)
|
||||||
|
(?<=[\s\(\[\{:,])
|
||||||
|
([a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)
|
||||||
|
(?:
|
||||||
|
(\.)([a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)
|
||||||
|
)?
|
||||||
|
(\()
|
||||||
|
captures:
|
||||||
|
1: meta.function-call.twig
|
||||||
|
2: punctuation.separator.property.twig
|
||||||
|
3: variable.other.property.twig
|
||||||
|
4: punctuation.definition.parameters.begin.twig
|
||||||
|
push:
|
||||||
|
- meta_content_scope: meta.function.arguments.twig
|
||||||
|
- match: \)
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.parameters.end.twig
|
||||||
|
pop: true
|
||||||
|
- include: twig-constants
|
||||||
|
- include: twig-operators
|
||||||
|
- include: twig-functions-warg
|
||||||
|
- include: twig-functions
|
||||||
|
- include: twig-macros
|
||||||
|
- include: twig-objects
|
||||||
|
- include: twig-properties
|
||||||
|
- include: twig-filters-warg
|
||||||
|
- include: twig-filters
|
||||||
|
- include: twig-filters-warg-ud
|
||||||
|
- include: twig-filters-ud
|
||||||
|
- include: twig-strings
|
||||||
|
- include: twig-arrays
|
||||||
|
- include: twig-hashes
|
||||||
|
twig-objects:
|
||||||
|
- match: '(?<=[\s\{\[\(:,])([a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)(?=[\s\}\[\]\(\)\.\|,:])'
|
||||||
|
captures:
|
||||||
|
1: variable.other.twig
|
||||||
|
twig-operators:
|
||||||
|
- match: (?<=\s)(\+|-|//?|%|\*\*?)(?=\s)
|
||||||
|
captures:
|
||||||
|
1: keyword.operator.arithmetic.twig
|
||||||
|
- match: (?<=\s)(=|~)(?=\s)
|
||||||
|
captures:
|
||||||
|
1: keyword.operator.assignment.twig
|
||||||
|
- match: (?<=\s)(b-(?:and|or|xor))(?=\s)
|
||||||
|
captures:
|
||||||
|
1: keyword.operator.bitwise.twig
|
||||||
|
- match: '(?<=\s)((?:!|=)=|<=?|>=?|(?:not )?in|is(?: not)?|(?:ends|starts) with|matches)(?=\s)'
|
||||||
|
captures:
|
||||||
|
1: keyword.operator.comparison.twig
|
||||||
|
- match: (?<=\s)(\?|:|and|not|or)(?=\s)
|
||||||
|
captures:
|
||||||
|
1: keyword.operator.logical.twig
|
||||||
|
- match: '(?<=[a-zA-Z0-9_\x{7f}-\x{ff}\]\)''"])\.\.(?=[a-zA-Z0-9_\x{7f}-\x{ff}''"])'
|
||||||
|
captures:
|
||||||
|
0: keyword.operator.other.twig
|
||||||
|
- match: '(?<=[a-zA-Z0-9_\x{7f}-\x{ff}\]\}\)''"])\|(?=[a-zA-Z_\x{7f}-\x{ff}])'
|
||||||
|
captures:
|
||||||
|
0: keyword.operator.other.twig
|
||||||
|
twig-print-tag:
|
||||||
|
- match: '\{\{-?'
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.tag.twig
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.tag.template.value.twig
|
||||||
|
- match: '-?\}\}'
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.tag.twig
|
||||||
|
pop: true
|
||||||
|
- include: twig-constants
|
||||||
|
- include: twig-operators
|
||||||
|
- include: twig-functions-warg
|
||||||
|
- include: twig-functions
|
||||||
|
- include: twig-macros
|
||||||
|
- include: twig-objects
|
||||||
|
- include: twig-properties
|
||||||
|
- include: twig-filters-warg
|
||||||
|
- include: twig-filters
|
||||||
|
- include: twig-filters-warg-ud
|
||||||
|
- include: twig-filters-ud
|
||||||
|
- include: twig-strings
|
||||||
|
- include: twig-arrays
|
||||||
|
- include: twig-hashes
|
||||||
|
twig-properties:
|
||||||
|
- match: |-
|
||||||
|
(?x)
|
||||||
|
(?<=[a-zA-Z0-9_\x{7f}-\x{ff}])
|
||||||
|
(\.)([a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)
|
||||||
|
(?=[\.\s\|\[\)\]\}:,])
|
||||||
|
captures:
|
||||||
|
1: punctuation.separator.property.twig
|
||||||
|
2: variable.other.property.twig
|
||||||
|
- match: |-
|
||||||
|
(?x)
|
||||||
|
(?<=[a-zA-Z0-9_\x{7f}-\x{ff}])
|
||||||
|
(\.)([a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)
|
||||||
|
(\()
|
||||||
|
captures:
|
||||||
|
1: punctuation.separator.property.twig
|
||||||
|
2: variable.other.property.twig
|
||||||
|
3: punctuation.definition.parameters.begin.twig
|
||||||
|
push:
|
||||||
|
- meta_content_scope: meta.function.arguments.twig
|
||||||
|
- match: \)
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.parameters.end.twig
|
||||||
|
pop: true
|
||||||
|
- include: twig-constants
|
||||||
|
- include: twig-functions-warg
|
||||||
|
- include: twig-functions
|
||||||
|
- include: twig-macros
|
||||||
|
- include: twig-objects
|
||||||
|
- include: twig-properties
|
||||||
|
- include: twig-filters-warg
|
||||||
|
- include: twig-filters
|
||||||
|
- include: twig-filters-warg-ud
|
||||||
|
- include: twig-filters-ud
|
||||||
|
- include: twig-strings
|
||||||
|
- include: twig-arrays
|
||||||
|
- match: |-
|
||||||
|
(?x)
|
||||||
|
(?<=[a-zA-Z0-9_\x{7f}-\x{ff}\]])
|
||||||
|
(?:
|
||||||
|
(\[)('[a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*')(\])
|
||||||
|
|(\[)("[a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*")(\])
|
||||||
|
|(\[)([a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)(\])
|
||||||
|
)
|
||||||
|
captures:
|
||||||
|
1: punctuation.section.array.begin.twig
|
||||||
|
2: variable.other.property.twig
|
||||||
|
3: punctuation.section.array.end.twig
|
||||||
|
4: punctuation.section.array.begin.twig
|
||||||
|
5: variable.other.property.twig
|
||||||
|
6: punctuation.section.array.end.twig
|
||||||
|
7: punctuation.section.array.begin.twig
|
||||||
|
8: variable.other.property.twig
|
||||||
|
9: punctuation.section.array.end.twig
|
||||||
|
twig-statement-tag:
|
||||||
|
- match: '\{%-?'
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.tag.twig
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.tag.template.block.twig
|
||||||
|
- match: '-?%\}'
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.tag.twig
|
||||||
|
pop: true
|
||||||
|
- include: twig-constants
|
||||||
|
- include: twig-keywords
|
||||||
|
- include: twig-operators
|
||||||
|
- include: twig-functions-warg
|
||||||
|
- include: twig-functions
|
||||||
|
- include: twig-macros
|
||||||
|
- include: twig-filters-warg
|
||||||
|
- include: twig-filters
|
||||||
|
- include: twig-filters-warg-ud
|
||||||
|
- include: twig-filters-ud
|
||||||
|
- include: twig-objects
|
||||||
|
- include: twig-properties
|
||||||
|
- include: twig-strings
|
||||||
|
- include: twig-arrays
|
||||||
|
- include: twig-hashes
|
||||||
|
twig-strings:
|
||||||
|
- match: (?:(?<!\\)|(?<=\\\\))'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.begin.twig
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.single.twig
|
||||||
|
- match: (?:(?<!\\)|(?<=\\\\))'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.end.twig
|
||||||
|
pop: true
|
||||||
|
- match: (?:(?<!\\)|(?<=\\\\))"
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.begin.twig
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.double.twig
|
||||||
|
- match: (?:(?<!\\)|(?<=\\\\))"
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.end.twig
|
||||||
|
pop: true
|
||||||
+23
@@ -0,0 +1,23 @@
|
|||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
# http://www.sublimetext.com/docs/3/syntax.html
|
||||||
|
name: hosts
|
||||||
|
file_extensions:
|
||||||
|
- hosts
|
||||||
|
scope: source.hosts
|
||||||
|
|
||||||
|
contexts:
|
||||||
|
main:
|
||||||
|
- scope: comment.line.number-sign
|
||||||
|
match: \#.*
|
||||||
|
comment: comment
|
||||||
|
|
||||||
|
- match: ^\s*([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}|[0-9a-f:]+)
|
||||||
|
comment: ipaddress
|
||||||
|
scope: constant.numeric.ipaddress
|
||||||
|
|
||||||
|
|
||||||
|
- match: \s(localhost|ip6-loopback|ip6-localhost|ip6-localnet|ip6-mcastprefix|ip6-allnodes|ip6-allrouters|ip6-allhosts|broadcasthost)\b
|
||||||
|
scope: keyword.host.predefined}
|
||||||
|
comment: prefdfined
|
||||||
|
|
||||||
+1
Submodule assets/syntaxes/02_Extra/INI added at 8dd3e316ad
+46
@@ -0,0 +1,46 @@
|
|||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
# http://www.sublimetext.com/docs/3/syntax.html
|
||||||
|
name: INI
|
||||||
|
file_extensions:
|
||||||
|
- ini
|
||||||
|
- INI
|
||||||
|
- inf
|
||||||
|
- INF
|
||||||
|
- reg
|
||||||
|
- REG
|
||||||
|
- lng
|
||||||
|
- cfg
|
||||||
|
- CFG
|
||||||
|
- desktop
|
||||||
|
- url
|
||||||
|
- URL
|
||||||
|
- .editorconfig
|
||||||
|
- .hgrc
|
||||||
|
- hgrc
|
||||||
|
scope: source.ini
|
||||||
|
contexts:
|
||||||
|
main:
|
||||||
|
- match: ^\s*(;|#).*$\n?
|
||||||
|
scope: comment.line.semicolon.ini
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.comment.ini
|
||||||
|
- match: '^\s*(\[)(.*?)(\])'
|
||||||
|
scope: meta.tag.section.ini
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.section.ini
|
||||||
|
2: entity.section.ini
|
||||||
|
3: punctuation.definition.section.ini
|
||||||
|
- match: '^(\s*(["'']?)(.+?)(\2)\s*(=))?\s*((["'']?)(.*?)(\7))\s*(;.*)?$\n?'
|
||||||
|
scope: meta.declaration.ini
|
||||||
|
captures:
|
||||||
|
1: meta.property.ini
|
||||||
|
2: punctuation.definition.quote.ini
|
||||||
|
3: keyword.name.ini
|
||||||
|
4: punctuation.definition.quote.ini
|
||||||
|
5: punctuation.definition.equals.ini
|
||||||
|
6: meta.value.ini
|
||||||
|
7: punctuation.definition.quote.ini
|
||||||
|
8: string.name.value.ini
|
||||||
|
9: punctuation.definition.quote.ini
|
||||||
|
10: comment.declarationline.semicolon.ini
|
||||||
+1
Submodule assets/syntaxes/02_Extra/JavaScript (Babel) added at f4579f9107
File diff suppressed because it is too large
Load Diff
+1
Submodule assets/syntaxes/02_Extra/Jinja2 added at 45355633d1
+1
Submodule assets/syntaxes/02_Extra/Jsonnet added at e2c917ed7d
+1
Submodule assets/syntaxes/02_Extra/Julia added at 0ca4cc2990
+1
Submodule assets/syntaxes/02_Extra/Kotlin added at aeeed2780b
+398
@@ -0,0 +1,398 @@
|
|||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
# http://www.sublimetext.com/docs/3/syntax.html
|
||||||
|
name: Kotlin
|
||||||
|
file_extensions:
|
||||||
|
- kt
|
||||||
|
- kts
|
||||||
|
scope: source.Kotlin
|
||||||
|
contexts:
|
||||||
|
main:
|
||||||
|
- include: comments
|
||||||
|
- match: '^\s*(package)\b(?:\s*([^ ;$]+)\s*)?'
|
||||||
|
captures:
|
||||||
|
1: keyword.other.kotlin
|
||||||
|
2: entity.name.package.kotlin
|
||||||
|
- include: imports
|
||||||
|
- include: statements
|
||||||
|
classes:
|
||||||
|
- match: (?<!::)(?=\b(?:companion|class|object|interface)\b)
|
||||||
|
push:
|
||||||
|
- match: '(?=$|\})'
|
||||||
|
pop: true
|
||||||
|
- include: comments
|
||||||
|
- match: \b(companion\s*)?(class|object|interface)\b
|
||||||
|
captures:
|
||||||
|
1: storage.modifier.kotlin
|
||||||
|
2: storage.modifier.kotlin
|
||||||
|
push:
|
||||||
|
- match: '(?=<|\{|\(|:|$)'
|
||||||
|
pop: true
|
||||||
|
- include: comments
|
||||||
|
- match: \w+
|
||||||
|
scope: entity.name.type.class.kotlin
|
||||||
|
- match: <
|
||||||
|
push:
|
||||||
|
- match: ">"
|
||||||
|
pop: true
|
||||||
|
- include: generics
|
||||||
|
- match: \(
|
||||||
|
push:
|
||||||
|
- match: \)
|
||||||
|
pop: true
|
||||||
|
- include: parameters
|
||||||
|
- match: (:)
|
||||||
|
captures:
|
||||||
|
1: keyword.operator.declaration.kotlin
|
||||||
|
push:
|
||||||
|
- match: "(?={|$)"
|
||||||
|
pop: true
|
||||||
|
- match: \w+
|
||||||
|
scope: entity.other.inherited-class.kotlin
|
||||||
|
- match: \(
|
||||||
|
push:
|
||||||
|
- match: \)
|
||||||
|
pop: true
|
||||||
|
- include: expressions
|
||||||
|
- match: '\{'
|
||||||
|
push:
|
||||||
|
- match: '\}'
|
||||||
|
pop: true
|
||||||
|
- include: statements
|
||||||
|
comments:
|
||||||
|
- match: /\*
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.comment.kotlin
|
||||||
|
push:
|
||||||
|
- meta_scope: comment.block.kotlin
|
||||||
|
- match: \*/
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.comment.kotlin
|
||||||
|
pop: true
|
||||||
|
- match: \s*((//).*$\n?)
|
||||||
|
captures:
|
||||||
|
1: comment.line.double-slash.kotlin
|
||||||
|
2: punctuation.definition.comment.kotlin
|
||||||
|
constants:
|
||||||
|
- match: \b(true|false|null|this|super)\b
|
||||||
|
scope: constant.language.kotlin
|
||||||
|
- match: '\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)([LlFf])?\b'
|
||||||
|
scope: constant.numeric.kotlin
|
||||||
|
- match: '\b([A-Z][A-Z0-9_]+)\b'
|
||||||
|
scope: constant.other.kotlin
|
||||||
|
expressions:
|
||||||
|
- match: \(
|
||||||
|
push:
|
||||||
|
- match: \)
|
||||||
|
pop: true
|
||||||
|
- include: expressions
|
||||||
|
- include: types
|
||||||
|
- include: strings
|
||||||
|
- include: constants
|
||||||
|
- include: comments
|
||||||
|
- include: keywords
|
||||||
|
functions:
|
||||||
|
- match: (?=\s*\b(?:fun)\b)
|
||||||
|
push:
|
||||||
|
- match: '(?=$|\})'
|
||||||
|
pop: true
|
||||||
|
- match: \b(fun)\b
|
||||||
|
captures:
|
||||||
|
1: keyword.other.kotlin
|
||||||
|
push:
|
||||||
|
- match: (?=\()
|
||||||
|
pop: true
|
||||||
|
- match: <
|
||||||
|
push:
|
||||||
|
- match: ">"
|
||||||
|
pop: true
|
||||||
|
- include: generics
|
||||||
|
- match: '([\.<\?>\w]+\.)?(\w+)'
|
||||||
|
captures:
|
||||||
|
2: entity.name.function.kotlin
|
||||||
|
- match: \(
|
||||||
|
push:
|
||||||
|
- match: \)
|
||||||
|
pop: true
|
||||||
|
- include: parameters
|
||||||
|
- match: (:)
|
||||||
|
captures:
|
||||||
|
1: keyword.operator.declaration.kotlin
|
||||||
|
push:
|
||||||
|
- match: "(?={|=|$)"
|
||||||
|
pop: true
|
||||||
|
- include: types
|
||||||
|
- match: '\{'
|
||||||
|
push:
|
||||||
|
- match: '(?=\})'
|
||||||
|
pop: true
|
||||||
|
- include: statements
|
||||||
|
- match: (=)
|
||||||
|
captures:
|
||||||
|
1: keyword.operator.assignment.kotlin
|
||||||
|
push:
|
||||||
|
- match: (?=$)
|
||||||
|
pop: true
|
||||||
|
- include: expressions
|
||||||
|
generics:
|
||||||
|
- match: (:)
|
||||||
|
captures:
|
||||||
|
1: keyword.operator.declaration.kotlin
|
||||||
|
push:
|
||||||
|
- match: (?=,|>)
|
||||||
|
pop: true
|
||||||
|
- include: types
|
||||||
|
- include: keywords
|
||||||
|
- match: \w+
|
||||||
|
scope: storage.type.generic.kotlin
|
||||||
|
getters-and-setters:
|
||||||
|
- match: \b(get)\b\s*\(\s*\)
|
||||||
|
captures:
|
||||||
|
1: entity.name.function.kotlin
|
||||||
|
push:
|
||||||
|
- match: '\}|(?=\bset\b)|$'
|
||||||
|
pop: true
|
||||||
|
- match: (=)
|
||||||
|
captures:
|
||||||
|
1: keyword.operator.assignment.kotlin
|
||||||
|
push:
|
||||||
|
- match: (?=$|\bset\b)
|
||||||
|
pop: true
|
||||||
|
- include: expressions
|
||||||
|
- match: '\{'
|
||||||
|
push:
|
||||||
|
- match: '\}'
|
||||||
|
pop: true
|
||||||
|
- include: expressions
|
||||||
|
- match: \b(set)\b\s*(?=\()
|
||||||
|
captures:
|
||||||
|
1: entity.name.function.kotlin
|
||||||
|
push:
|
||||||
|
- match: '\}|(?=\bget\b)|$'
|
||||||
|
pop: true
|
||||||
|
- match: \(
|
||||||
|
push:
|
||||||
|
- match: \)
|
||||||
|
pop: true
|
||||||
|
- include: parameters
|
||||||
|
- match: (=)
|
||||||
|
captures:
|
||||||
|
1: keyword.operator.assignment.kotlin
|
||||||
|
push:
|
||||||
|
- match: (?=$|\bset\b)
|
||||||
|
pop: true
|
||||||
|
- include: expressions
|
||||||
|
- match: '\{'
|
||||||
|
push:
|
||||||
|
- match: '\}'
|
||||||
|
pop: true
|
||||||
|
- include: expressions
|
||||||
|
imports:
|
||||||
|
- match: '^\s*(import)\s+[^ $]+\s+(as)?'
|
||||||
|
captures:
|
||||||
|
1: keyword.other.kotlin
|
||||||
|
2: keyword.other.kotlin
|
||||||
|
keywords:
|
||||||
|
- match: \b(var|val|public|private|protected|abstract|final|sealed|enum|open|attribute|annotation|override|inline|vararg|in|out|internal|data|tailrec|operator|infix|const|yield|typealias|typeof|reified|suspend)\b
|
||||||
|
scope: storage.modifier.kotlin
|
||||||
|
- match: \b(try|catch|finally|throw)\b
|
||||||
|
scope: keyword.control.catch-exception.kotlin
|
||||||
|
- match: \b(if|else|while|for|do|return|when|where|break|continue)\b
|
||||||
|
scope: keyword.control.kotlin
|
||||||
|
- match: \b(in|is|!in|!is|as|as\?|assert)\b
|
||||||
|
scope: keyword.operator.kotlin
|
||||||
|
- match: (==|!=|===|!==|<=|>=|<|>)
|
||||||
|
scope: keyword.operator.comparison.kotlin
|
||||||
|
- match: (=)
|
||||||
|
scope: keyword.operator.assignment.kotlin
|
||||||
|
- match: (::)
|
||||||
|
scope: keyword.operator.kotlin
|
||||||
|
- match: (:)
|
||||||
|
scope: keyword.operator.declaration.kotlin
|
||||||
|
- match: \b(by)\b
|
||||||
|
scope: keyword.other.by.kotlin
|
||||||
|
- match: (\?\.)
|
||||||
|
scope: keyword.operator.safenav.kotlin
|
||||||
|
- match: (\.)
|
||||||
|
scope: keyword.operator.dot.kotlin
|
||||||
|
- match: (\?:)
|
||||||
|
scope: keyword.operator.elvis.kotlin
|
||||||
|
- match: (\-\-|\+\+)
|
||||||
|
scope: keyword.operator.increment-decrement.kotlin
|
||||||
|
- match: (\+=|\-=|\*=|\/=)
|
||||||
|
scope: keyword.operator.arithmetic.assign.kotlin
|
||||||
|
- match: (\.\.)
|
||||||
|
scope: keyword.operator.range.kotlin
|
||||||
|
- match: (\-|\+|\*|\/|%)
|
||||||
|
scope: keyword.operator.arithmetic.kotlin
|
||||||
|
- match: (!|&&|\|\|)
|
||||||
|
scope: keyword.operator.logical.kotlin
|
||||||
|
- match: (;)
|
||||||
|
scope: punctuation.terminator.kotlin
|
||||||
|
namespaces:
|
||||||
|
- match: \b(namespace)\b
|
||||||
|
scope: keyword.other.kotlin
|
||||||
|
- match: '\{'
|
||||||
|
push:
|
||||||
|
- match: '\}'
|
||||||
|
pop: true
|
||||||
|
- include: statements
|
||||||
|
parameters:
|
||||||
|
- match: (:)
|
||||||
|
captures:
|
||||||
|
1: keyword.operator.declaration.kotlin
|
||||||
|
push:
|
||||||
|
- match: (?=,|\)|=)
|
||||||
|
pop: true
|
||||||
|
- include: types
|
||||||
|
- match: (=)
|
||||||
|
captures:
|
||||||
|
1: keyword.operator.declaration.kotlin
|
||||||
|
push:
|
||||||
|
- match: (?=,|\))
|
||||||
|
pop: true
|
||||||
|
- include: expressions
|
||||||
|
- include: keywords
|
||||||
|
- match: \w+
|
||||||
|
scope: variable.parameter.function.kotlin
|
||||||
|
statements:
|
||||||
|
- include: namespaces
|
||||||
|
- include: typedefs
|
||||||
|
- include: classes
|
||||||
|
- include: functions
|
||||||
|
- include: variables
|
||||||
|
- include: getters-and-setters
|
||||||
|
- include: expressions
|
||||||
|
strings:
|
||||||
|
- match: '"""'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.begin.kotlin
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.third.kotlin
|
||||||
|
- match: '"""'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.end.kotlin
|
||||||
|
pop: true
|
||||||
|
- match: '(\$\w+|\$\{[^\}]+\})'
|
||||||
|
scope: variable.parameter.template.kotlin
|
||||||
|
- match: \\.
|
||||||
|
scope: constant.character.escape.kotlin
|
||||||
|
- match: '"'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.begin.kotlin
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.double.kotlin
|
||||||
|
- match: '"'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.end.kotlin
|
||||||
|
pop: true
|
||||||
|
- match: '(\$\w+|\$\{[^\}]+\})'
|
||||||
|
scope: variable.parameter.template.kotlin
|
||||||
|
- match: \\.
|
||||||
|
scope: constant.character.escape.kotlin
|
||||||
|
- match: "'"
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.begin.kotlin
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.single.kotlin
|
||||||
|
- match: "'"
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.end.kotlin
|
||||||
|
pop: true
|
||||||
|
- match: \\.
|
||||||
|
scope: constant.character.escape.kotlin
|
||||||
|
- match: "`"
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.begin.kotlin
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.single.kotlin
|
||||||
|
- match: "`"
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.end.kotlin
|
||||||
|
pop: true
|
||||||
|
typedefs:
|
||||||
|
- match: (?=\s*(?:type))
|
||||||
|
push:
|
||||||
|
- match: (?=$)
|
||||||
|
pop: true
|
||||||
|
- match: \b(type)\b
|
||||||
|
scope: keyword.other.kotlin
|
||||||
|
- match: <
|
||||||
|
push:
|
||||||
|
- match: ">"
|
||||||
|
pop: true
|
||||||
|
- include: generics
|
||||||
|
- include: expressions
|
||||||
|
types:
|
||||||
|
- match: \b(Nothing|Any|Unit|String|CharSequence|Int|Boolean|Char|Long|Double|Float|Short|Byte|dynamic)\b
|
||||||
|
scope: storage.type.buildin.kotlin
|
||||||
|
- match: \b(IntArray|BooleanArray|CharArray|LongArray|DoubleArray|FloatArray|ShortArray|ByteArray)\b
|
||||||
|
scope: storage.type.buildin.array.kotlin
|
||||||
|
- match: \b(Array|Collection|List|Map|Set|MutableList|MutableMap|MutableSet|Sequence)<\b
|
||||||
|
captures:
|
||||||
|
1: storage.type.buildin.collection.kotlin
|
||||||
|
push:
|
||||||
|
- match: ">"
|
||||||
|
pop: true
|
||||||
|
- include: types
|
||||||
|
- include: keywords
|
||||||
|
- match: \w+<
|
||||||
|
push:
|
||||||
|
- match: ">"
|
||||||
|
pop: true
|
||||||
|
- include: types
|
||||||
|
- include: keywords
|
||||||
|
- match: '\{'
|
||||||
|
push:
|
||||||
|
- match: '\}'
|
||||||
|
pop: true
|
||||||
|
- include: statements
|
||||||
|
- match: \(
|
||||||
|
push:
|
||||||
|
- match: \)
|
||||||
|
pop: true
|
||||||
|
- include: types
|
||||||
|
- match: (->)
|
||||||
|
scope: keyword.operator.declaration.kotlin
|
||||||
|
variables:
|
||||||
|
- match: (?=\s*\b(?:var|val)\b)
|
||||||
|
push:
|
||||||
|
- match: (?=:|=|(\b(by)\b)|$)
|
||||||
|
pop: true
|
||||||
|
- match: \b(var|val)\b
|
||||||
|
captures:
|
||||||
|
1: keyword.other.kotlin
|
||||||
|
push:
|
||||||
|
- match: (?=:|=|(\b(by)\b)|$)
|
||||||
|
pop: true
|
||||||
|
- match: <
|
||||||
|
push:
|
||||||
|
- match: ">"
|
||||||
|
pop: true
|
||||||
|
- include: generics
|
||||||
|
- match: '([\.<\?>\w]+\.)?(\w+)'
|
||||||
|
captures:
|
||||||
|
2: entity.name.variable.kotlin
|
||||||
|
- match: (:)
|
||||||
|
captures:
|
||||||
|
1: keyword.operator.declaration.kotlin
|
||||||
|
push:
|
||||||
|
- match: (?==|$)
|
||||||
|
pop: true
|
||||||
|
- include: types
|
||||||
|
- include: getters-and-setters
|
||||||
|
- match: \b(by)\b
|
||||||
|
captures:
|
||||||
|
1: keyword.other.kotlin
|
||||||
|
push:
|
||||||
|
- match: (?=$)
|
||||||
|
pop: true
|
||||||
|
- include: expressions
|
||||||
|
- match: (=)
|
||||||
|
captures:
|
||||||
|
1: keyword.operator.assignment.kotlin
|
||||||
|
push:
|
||||||
|
- match: (?=$)
|
||||||
|
pop: true
|
||||||
|
- include: expressions
|
||||||
|
- include: getters-and-setters
|
||||||
+1
Submodule assets/syntaxes/02_Extra/LESS added at 3020993658
+53
@@ -0,0 +1,53 @@
|
|||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
# http://www.sublimetext.com/docs/3/syntax.html
|
||||||
|
name: Manpage
|
||||||
|
file_extensions:
|
||||||
|
- man
|
||||||
|
scope: source.man
|
||||||
|
|
||||||
|
variables:
|
||||||
|
section_heading: '^\S.*$'
|
||||||
|
|
||||||
|
contexts:
|
||||||
|
main:
|
||||||
|
- match: ^
|
||||||
|
push: first_line
|
||||||
|
|
||||||
|
first_line:
|
||||||
|
- match: '([A-Z0-9_\-]+)(\()([^)]+)(\))'
|
||||||
|
captures:
|
||||||
|
1: meta.preprocessor
|
||||||
|
2: keyword.operator
|
||||||
|
3: string.quoted.other
|
||||||
|
4: keyword.operator
|
||||||
|
|
||||||
|
- match: '$'
|
||||||
|
push: body
|
||||||
|
|
||||||
|
body:
|
||||||
|
- match: '^(SYNOPSIS|SYNTAX|SINTASSI|SKŁADNIA|СИНТАКСИС|書式)'
|
||||||
|
push: Packages/C/C.sublime-syntax
|
||||||
|
scope: markup.heading
|
||||||
|
with_prototype:
|
||||||
|
- match: '(?={{section_heading}})'
|
||||||
|
pop: true
|
||||||
|
|
||||||
|
- match: '^\S.*$'
|
||||||
|
scope: markup.heading
|
||||||
|
|
||||||
|
- match: '\b([A-Za-z0-9_\-]+)(\()([^)]*)(\))'
|
||||||
|
captures:
|
||||||
|
1: entity.name.function
|
||||||
|
2: keyword.operator
|
||||||
|
3: constant.numeric
|
||||||
|
4: keyword.operator
|
||||||
|
|
||||||
|
# command-line options like --option=value, --some-flag, or -x
|
||||||
|
- match: '(?:[^a-zA-Z0-9_-]|^|\s)(--?[A-Za-z0-9][A-Za-z0-9-]*)(?:(=)?("?)([A-Za-z0-9]+)("?))?'
|
||||||
|
captures:
|
||||||
|
1: entity.name
|
||||||
|
2: keyword.operator
|
||||||
|
3: punctuation.definition.string.begin
|
||||||
|
4: variable.parameter
|
||||||
|
3: punctuation.definition.string.end
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
# http://www.sublimetext.com/docs/3/syntax.html
|
||||||
|
name: MemInfo
|
||||||
|
file_extensions:
|
||||||
|
- meminfo
|
||||||
|
scope: source.meminfo
|
||||||
|
|
||||||
|
contexts:
|
||||||
|
main:
|
||||||
|
- match: '^([^:]+)\w*:\w*(.*)$'
|
||||||
|
captures:
|
||||||
|
1: keyword.other.meminfo-key
|
||||||
|
2: string.other.meminfo-value
|
||||||
+257
@@ -0,0 +1,257 @@
|
|||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
# http://www.sublimetext.com/docs/3/syntax.html
|
||||||
|
name: Nim
|
||||||
|
file_extensions:
|
||||||
|
- nim
|
||||||
|
- nims
|
||||||
|
scope: source.nim
|
||||||
|
contexts:
|
||||||
|
main:
|
||||||
|
- match: '(\#\[\s*(TODO|todo)?)'
|
||||||
|
comment: A multiline comment.
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.multi-comment.nim
|
||||||
|
2: invalid.illegal.TODO.nim
|
||||||
|
push:
|
||||||
|
- meta_scope: comment.line.number-sign.multi-comment.nim
|
||||||
|
- match: '(.*]\#)'
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.multi-comment.nim
|
||||||
|
2: invalid.illegal.TODO.nim
|
||||||
|
pop: true
|
||||||
|
- match: (##\s*(TODO|todo)?).+$\n?
|
||||||
|
comment: A documentation comment.
|
||||||
|
scope: comment.line.number-sign.doc-comment.nim
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.doc-comment.nim
|
||||||
|
2: invalid.illegal.TODO.nim
|
||||||
|
- match: (##\s*)$\n?
|
||||||
|
comment: An empty documentation comment.
|
||||||
|
scope: comment.line.number-sign.doc-comment.empty.nim
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.doc-comment.empty.nim
|
||||||
|
- match: (#\s*(TODO|todo)?).*$\n?
|
||||||
|
comment: A regular comment
|
||||||
|
scope: comment.line.number-sign.comment.nim
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.comment.nim
|
||||||
|
2: invalid.illegal.TODO.nim
|
||||||
|
- match: '\{\.'
|
||||||
|
comment: Pragmas
|
||||||
|
push:
|
||||||
|
- meta_scope: pragma
|
||||||
|
- match: '\.?\}'
|
||||||
|
pop: true
|
||||||
|
- match: \"
|
||||||
|
push:
|
||||||
|
- meta_scope: string.something.nim
|
||||||
|
- match: \"
|
||||||
|
pop: true
|
||||||
|
- match: '([\w\x{80}-\x{10FFFF}]+)'
|
||||||
|
scope: entity.other.attribute-name.pragma.nim
|
||||||
|
- match: discard \"\"\"
|
||||||
|
comment: A discarded triple string literal comment
|
||||||
|
push:
|
||||||
|
- meta_scope: comment.line.discarded.nim
|
||||||
|
- match: \"\"\"
|
||||||
|
pop: true
|
||||||
|
- match: '(?<![\w\x{80}-\x{10FFFF}])(\d[_\d]*((\.[_\d]+([eE][\+\-]?\d[_\d]*)?)|([eE][\+\-]?\d[_\d]*)))(''?([fF](32|64|128))|[fFdD])?'
|
||||||
|
comment: A float literal
|
||||||
|
scope: constant.numeric.float.decimal.nim
|
||||||
|
- match: '(?<![\w\x{80}-\x{10FFFF}])(0[xX][0-9A-Fa-f][_0-9A-Fa-f]*)(''?(([iIuUfF](8|16|32|64))|[uUfFdD]))?'
|
||||||
|
comment: A hexadecimal literal
|
||||||
|
scope: constant.numeric.integer.hexadecimal.nim
|
||||||
|
- match: '(?<![\w\x{80}-\x{10FFFF}])(0[ocC][0-7][_0-7]*)(''?(([iIuUfF](8|16|32|64))|[uUfFdD]))?'
|
||||||
|
comment: A base-8 integer literal
|
||||||
|
scope: constant.numeric.integer.octal.nim
|
||||||
|
- match: '(?<![\w\x{80}-\x{10FFFF}])(0(b|B)[01][_01]*)(''?(([iIuUfF](8|16|32|64))|[uUfFdD]))?'
|
||||||
|
comment: A base-2 integer literal
|
||||||
|
scope: constant.numeric.integer.binary.nim
|
||||||
|
- match: '(?<![\w\x{80}-\x{10FFFF}])(\d[_\d]*)(''?(([iIuUfF](8|16|32|64))|[uUfFdD]))?'
|
||||||
|
comment: A base-10 integer literal
|
||||||
|
scope: constant.numeric.integer.decimal.nim
|
||||||
|
- match: '(?<![\w\x{80}-\x{10FFFF}])(true|false|inf|nil)(?![\w\x{80}-\x{10FFFF}])'
|
||||||
|
comment: Language Constants.
|
||||||
|
scope: constant.language.nim
|
||||||
|
- match: (?:^|\s+|=)(when|if)\b
|
||||||
|
comment: Primary branching keywords
|
||||||
|
captures:
|
||||||
|
1: keyword.control.primary.nim
|
||||||
|
push:
|
||||||
|
- match: (?=:)
|
||||||
|
captures:
|
||||||
|
1: control.variable.parameter.nim
|
||||||
|
pop: true
|
||||||
|
- include: scope:source.nim
|
||||||
|
- match: (?:^|\s+|=)(case)\b
|
||||||
|
comment: Primary branching keyword 'case'
|
||||||
|
captures:
|
||||||
|
1: keyword.control.primary.nim
|
||||||
|
push:
|
||||||
|
- match: (?=\bof\b)
|
||||||
|
captures:
|
||||||
|
1: control.variable.parameter.nim
|
||||||
|
pop: true
|
||||||
|
- include: scope:source.nim
|
||||||
|
- match: (?:^|\s+)(of|else|elif)\b
|
||||||
|
comment: Secondary branching keywords and their conditions
|
||||||
|
captures:
|
||||||
|
1: keyword.control.secondary.nim
|
||||||
|
push:
|
||||||
|
- match: (?=:)
|
||||||
|
captures:
|
||||||
|
1: control.variable.parameter.nim
|
||||||
|
pop: true
|
||||||
|
- include: scope:source.nim
|
||||||
|
- match: '(?<![\w\x{80}-\x{10FFFF}])(await|block|break|continue|do|end|except|finally|raise|return|try|while|yield)(?![\w\x{80}-\x{10FFFF}])'
|
||||||
|
comment: Keywords that affect program control flow or scope.
|
||||||
|
scope: keyword.control.nim
|
||||||
|
- match: '((?<![\w\x{80}-\x{10FFFF}])(and|in|is|isnot|not|notin|or|xor)(?![\w\x{80}-\x{10FFFF}]))'
|
||||||
|
comment: Keyword boolean operators for expressions.
|
||||||
|
scope: keyword.operator.boolean.nim
|
||||||
|
- match: '((?<![\w\x{80}-\x{10FFFF}])(addr|as|atomic|bind|cast|const|converter|defer|discard|distinct|div|enum|export|include|let|mixin|object|of|ptr|ref|shl|shr|static|type|var)(?![\w\x{80}-\x{10FFFF}]))'
|
||||||
|
comment: Other keywords.
|
||||||
|
scope: keyword.other.nim
|
||||||
|
- match: (\b()\b|(=|\+|-|\*|/|<|>|@|\$|~|&|%|!|\?|\^|\.|:|\\)+)
|
||||||
|
comment: Generic operators for expressions.
|
||||||
|
scope: keyword.operator.nim
|
||||||
|
- match: (for)\s+
|
||||||
|
comment: in keyword in a 'for' loop
|
||||||
|
captures:
|
||||||
|
1: keyword.control.nim
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.forloop.nim
|
||||||
|
- match: (?=:)
|
||||||
|
captures:
|
||||||
|
1: keyword.control.nim
|
||||||
|
pop: true
|
||||||
|
- match: '\ [\w\x{80}-\x{10FFFF},]+\s+(in)\s+'
|
||||||
|
captures:
|
||||||
|
1: keyword.control.nim
|
||||||
|
- include: scope:source.nim
|
||||||
|
- match: '((import)\s+[\.|\w|\/]+,?)'
|
||||||
|
comment: Import syntax
|
||||||
|
captures:
|
||||||
|
2: keyword.control.nim
|
||||||
|
- match: '(from)\s+[\/\w]+\s+(?=import)'
|
||||||
|
captures:
|
||||||
|
1: keyword.control.nim
|
||||||
|
- match: (var|let)\s*\(
|
||||||
|
comment: Destructure syntax
|
||||||
|
captures:
|
||||||
|
1: keyword.other.nim
|
||||||
|
push:
|
||||||
|
- match: \)
|
||||||
|
captures:
|
||||||
|
1: keyword.other.nim
|
||||||
|
pop: true
|
||||||
|
- match: '((?<![\w\x{80}-\x{10FFFF}])(generic|interface|lambda|out|shared|with|without)(?![\w\x{80}-\x{10FFFF}]))'
|
||||||
|
comment: Invalid and unused keywords.
|
||||||
|
scope: keyword.invalid.nim
|
||||||
|
- match: '(?<![\w\x{80}-\x{10FFFF}])(new|GC_ref|GC_unref|assert|echo|defined|declared|newException|countup|countdown|len|high|low)(?![\w\x{80}-\x{10FFFF}])'
|
||||||
|
comment: Common functions
|
||||||
|
scope: keyword.other.common.function.nim
|
||||||
|
- match: '(?<![\w\x{80}-\x{10FFFF}])(((uint|int|float)(8|16|32|64)?)|clong|culong|cchar|cschar|cshort|cint|csize|clonglong|cfloat|cdouble|clongdouble|cuchar|cushort|cuint|culonglong|cstringArray|bool|string|auto|cstring|char|byte|tobject|typedesc|stmt|expr|any|untyped|typed)(?![\w\x{80}-\x{10FFFF}])'
|
||||||
|
comment: Built-in, concrete types.
|
||||||
|
scope: storage.type.concrete.nim
|
||||||
|
- match: '(?<![\w\x{80}-\x{10FFFF}])(range|array|seq|tuple|natural|set|ref|ptr|pointer)(?![\w\x{80}-\x{10FFFF}])'
|
||||||
|
comment: Built-in, generic types.
|
||||||
|
scope: storage.type.generic.nim
|
||||||
|
- match: '(?<![\w\x{80}-\x{10FFFF}])(proc|iterator|method|template|macro)(?![\w\x{80}-\x{10FFFF}])'
|
||||||
|
comment: Function types
|
||||||
|
scope: storage.type.function.nim
|
||||||
|
- match: '(?<![\w\x{80}-\x{10FFFF}])(openarray|varargs|void)(?![\w\x{80}-\x{10FFFF}])'
|
||||||
|
comment: Special types.
|
||||||
|
scope: storage.type.generic.nim
|
||||||
|
- match: '(?<![\w\x{80}-\x{10FFFF}])([A-Z][A-Z0-9_]+)(?![\w\x{80}-\x{10FFFF}])'
|
||||||
|
comment: Other constants.
|
||||||
|
scope: support.constant.nim
|
||||||
|
- match: '(?<![\w\x{80}-\x{10FFFF}])([A-Z]\w+)(?![\w\x{80}-\x{10FFFF}])'
|
||||||
|
comment: Other types.
|
||||||
|
scope: support.type.nim
|
||||||
|
- match: '(?<![\w\x{80}-\x{10FFFF}])(\w+)(?![\w\x{80}-\x{10FFFF}])(?=\()'
|
||||||
|
comment: Function call.
|
||||||
|
scope: support.function.any-method.nim
|
||||||
|
- match: r?\"\"\"
|
||||||
|
comment: (Raw) Triple Quoted String
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.triple.nim
|
||||||
|
- match: '\"\"\"[^\"]'
|
||||||
|
pop: true
|
||||||
|
- match: r\"
|
||||||
|
comment: Raw Double Quoted String
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.double.raw.nim
|
||||||
|
- match: \"
|
||||||
|
pop: true
|
||||||
|
- match: \"\"
|
||||||
|
- match: \"
|
||||||
|
comment: Double Quoted String
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.double.nim
|
||||||
|
- match: \"
|
||||||
|
pop: true
|
||||||
|
- include: escaped_char
|
||||||
|
- match: \'
|
||||||
|
comment: Single quoted character literal
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.single.nim
|
||||||
|
- match: \'
|
||||||
|
pop: true
|
||||||
|
- match: \\n
|
||||||
|
scope: invalid.illegal.character.nim
|
||||||
|
- include: escaped_char
|
||||||
|
- match: '([^\''][^\'']+?)'
|
||||||
|
scope: invalid.illegal.character.nim
|
||||||
|
- match: '([\w\x{80}-\x{10FFFF}\`]+)\s*(?=\(|\[.+?\]\s*\()'
|
||||||
|
comment: Call syntax
|
||||||
|
captures:
|
||||||
|
1: support.function.any-method.nim
|
||||||
|
push:
|
||||||
|
- match: \)
|
||||||
|
captures:
|
||||||
|
1: support.function.any-method.nim
|
||||||
|
pop: true
|
||||||
|
- include: scope:source.nim
|
||||||
|
- match: '([\w\x{80}-\x{10FFFF}]+)(?=\s+[\w](?![\w\x{80}-\x{10FFFF}]+((?!\n)\s)+))'
|
||||||
|
comment: Command syntax
|
||||||
|
captures:
|
||||||
|
1: support.function.any-method.nim
|
||||||
|
- match: '([\w\x{80}-\x{10FFFF}]+)(?=\s+[\"\''\`])'
|
||||||
|
captures:
|
||||||
|
1: support.function.any-method.nim
|
||||||
|
- match: (tmpl(i)?)(?=( (nim|html|xml|js|css|glsl|md))?\"\"\")
|
||||||
|
comment: tmpl specifier
|
||||||
|
captures:
|
||||||
|
1: storage.type.function.nim
|
||||||
|
2: keyword.operator.nim
|
||||||
|
escaped_char:
|
||||||
|
- match: '\\[nN]'
|
||||||
|
scope: constant.character.escape.newline.nim
|
||||||
|
- match: '\\[cC]|\\[rR]'
|
||||||
|
scope: constant.character.escape.carriagereturn.nim
|
||||||
|
- match: '\\[lL]'
|
||||||
|
scope: constant.character.escape.linefeed.nim
|
||||||
|
- match: '\\[fF]'
|
||||||
|
scope: constant.character.escape.formfeed.nim
|
||||||
|
- match: '\\[tT]'
|
||||||
|
scope: constant.character.escape.tabulator.nim
|
||||||
|
- match: '\\[vV]'
|
||||||
|
scope: constant.character.escape.verticaltabulator.nim
|
||||||
|
- match: \\\"
|
||||||
|
scope: constant.character.escape.double-quote.nim
|
||||||
|
- match: \\'
|
||||||
|
scope: constant.character.escape.single-quote.nim
|
||||||
|
- match: '\\[0-9]+'
|
||||||
|
scope: constant.character.escape.chardecimalvalue.nim
|
||||||
|
- match: '\\[aA]'
|
||||||
|
scope: constant.character.escape.alert.nim
|
||||||
|
- match: '\\[bB]'
|
||||||
|
scope: constant.character.escape.backspace.nim
|
||||||
|
- match: '\\[eE]'
|
||||||
|
scope: constant.character.escape.escape.nim
|
||||||
|
- match: '\\[xX][0-9A-Fa-f]{2}'
|
||||||
|
scope: constant.character.escape.hex.nim
|
||||||
|
- match: \\\\
|
||||||
|
scope: constant.character.escape.backslash.nim
|
||||||
+1
Submodule assets/syntaxes/02_Extra/Nix added at 9032bd6137
+609
@@ -0,0 +1,609 @@
|
|||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
# http://www.sublimetext.com/docs/3/syntax.html
|
||||||
|
name: Nix
|
||||||
|
file_extensions:
|
||||||
|
- nix
|
||||||
|
scope: source.nix
|
||||||
|
contexts:
|
||||||
|
main:
|
||||||
|
- include: expression
|
||||||
|
comment:
|
||||||
|
- match: '/\*([^*]|\*[^\/])*'
|
||||||
|
push:
|
||||||
|
- meta_scope: comment.block.nix
|
||||||
|
- match: \*\/
|
||||||
|
pop: true
|
||||||
|
- include: comment-remark
|
||||||
|
- match: '\#'
|
||||||
|
push:
|
||||||
|
- meta_scope: comment.line.number-sign.nix
|
||||||
|
- match: $
|
||||||
|
pop: true
|
||||||
|
- include: comment-remark
|
||||||
|
attribute-bind:
|
||||||
|
- include: attribute-name
|
||||||
|
- include: attribute-bind-from-equals
|
||||||
|
attribute-bind-from-equals:
|
||||||
|
- match: \=
|
||||||
|
captures:
|
||||||
|
0: keyword.operator.bind.nix
|
||||||
|
push:
|
||||||
|
- match: \;
|
||||||
|
captures:
|
||||||
|
0: punctuation.terminator.bind.nix
|
||||||
|
pop: true
|
||||||
|
- include: expression
|
||||||
|
attribute-inherit:
|
||||||
|
- match: \binherit\b
|
||||||
|
captures:
|
||||||
|
0: keyword.other.inherit.nix
|
||||||
|
push:
|
||||||
|
- match: \;
|
||||||
|
captures:
|
||||||
|
0: punctuation.terminator.inherit.nix
|
||||||
|
pop: true
|
||||||
|
- match: \(
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.function.arguments.nix
|
||||||
|
push:
|
||||||
|
- match: (?=\;)
|
||||||
|
pop: true
|
||||||
|
- match: \)
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.function.arguments.nix
|
||||||
|
push:
|
||||||
|
- match: (?=\;)
|
||||||
|
pop: true
|
||||||
|
- include: bad-reserved
|
||||||
|
- include: attribute-name-single
|
||||||
|
- include: others
|
||||||
|
- include: expression
|
||||||
|
- match: '(?=[a-zA-Z\_])'
|
||||||
|
push:
|
||||||
|
- match: (?=\;)
|
||||||
|
pop: true
|
||||||
|
- include: bad-reserved
|
||||||
|
- include: attribute-name-single
|
||||||
|
- include: others
|
||||||
|
- include: others
|
||||||
|
attribute-name:
|
||||||
|
- match: '\b[a-zA-Z\_][a-zA-Z0-9\_\''\-]*'
|
||||||
|
scope: entity.other.attribute-name.multipart.nix
|
||||||
|
- match: \.
|
||||||
|
- include: string-quoted
|
||||||
|
- include: interpolation
|
||||||
|
attribute-name-single:
|
||||||
|
- match: '\b[a-zA-Z\_][a-zA-Z0-9\_\''\-]*'
|
||||||
|
scope: entity.other.attribute-name.single.nix
|
||||||
|
attrset-contents:
|
||||||
|
- include: attribute-inherit
|
||||||
|
- include: bad-reserved
|
||||||
|
- include: attribute-bind
|
||||||
|
- include: others
|
||||||
|
attrset-definition:
|
||||||
|
- match: '(?=\{)'
|
||||||
|
push:
|
||||||
|
- match: '(?=([\])};,]|\b(else|then)\b))'
|
||||||
|
pop: true
|
||||||
|
- match: '(\{)'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.attrset.nix
|
||||||
|
push:
|
||||||
|
- match: '(\})'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.attrset.nix
|
||||||
|
pop: true
|
||||||
|
- include: attrset-contents
|
||||||
|
- match: '(?<=\})'
|
||||||
|
push:
|
||||||
|
- match: '(?=([\])};,]|\b(else|then)\b))'
|
||||||
|
pop: true
|
||||||
|
- include: expression-cont
|
||||||
|
attrset-definition-brace-opened:
|
||||||
|
- match: '(?<=\})'
|
||||||
|
push:
|
||||||
|
- match: '(?=([\])};,]|\b(else|then)\b))'
|
||||||
|
pop: true
|
||||||
|
- include: expression-cont
|
||||||
|
- match: (?=.?)
|
||||||
|
push:
|
||||||
|
- match: '\}'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.attrset.nix
|
||||||
|
pop: true
|
||||||
|
- include: attrset-contents
|
||||||
|
attrset-for-sure:
|
||||||
|
- match: (?=\brec\b)
|
||||||
|
push:
|
||||||
|
- match: '(?=([\])};,]|\b(else|then)\b))'
|
||||||
|
pop: true
|
||||||
|
- match: \brec\b
|
||||||
|
captures:
|
||||||
|
0: keyword.other.nix
|
||||||
|
push:
|
||||||
|
- match: '(?=\{)'
|
||||||
|
pop: true
|
||||||
|
- include: others
|
||||||
|
- include: attrset-definition
|
||||||
|
- include: others
|
||||||
|
- match: '(?=\{\s*(\}|[^,?]*(=|;)))'
|
||||||
|
push:
|
||||||
|
- match: '(?=([\])};,]|\b(else|then)\b))'
|
||||||
|
pop: true
|
||||||
|
- include: attrset-definition
|
||||||
|
- include: others
|
||||||
|
attrset-or-function:
|
||||||
|
- match: '\{'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.attrset-or-function.nix
|
||||||
|
push:
|
||||||
|
- match: '(?=([\])};]|\b(else|then)\b))'
|
||||||
|
pop: true
|
||||||
|
- match: '(?=(\s*\}|\"|\binherit\b|\b[a-zA-Z\_][a-zA-Z0-9\_\''\-]*(\s*\.|\s*=[^=])|\$\{[a-zA-z0-9\_\''\-]+\}(\s*\.|\s*=[^=])))'
|
||||||
|
push:
|
||||||
|
- match: '(?=([\])};,]|\b(else|then)\b))'
|
||||||
|
pop: true
|
||||||
|
- include: attrset-definition-brace-opened
|
||||||
|
- match: '(?=(\.\.\.|\b[a-zA-Z\_][a-zA-Z0-9\_\''\-]*\s*[,?]))'
|
||||||
|
push:
|
||||||
|
- match: '(?=([\])};,]|\b(else|then)\b))'
|
||||||
|
pop: true
|
||||||
|
- include: function-definition-brace-opened
|
||||||
|
- include: bad-reserved
|
||||||
|
- match: '\b[a-zA-Z\_][a-zA-Z0-9\_\''\-]*'
|
||||||
|
captures:
|
||||||
|
0: variable.parameter.function.maybe.nix
|
||||||
|
push:
|
||||||
|
- match: '(?=([\])};]|\b(else|then)\b))'
|
||||||
|
pop: true
|
||||||
|
- match: (?=\.)
|
||||||
|
push:
|
||||||
|
- match: '(?=([\])};,]|\b(else|then)\b))'
|
||||||
|
pop: true
|
||||||
|
- include: attrset-definition-brace-opened
|
||||||
|
- match: \s*(\,)
|
||||||
|
captures:
|
||||||
|
1: keyword.operator.nix
|
||||||
|
push:
|
||||||
|
- match: '(?=([\])};,]|\b(else|then)\b))'
|
||||||
|
pop: true
|
||||||
|
- include: function-definition-brace-opened
|
||||||
|
- match: (?=\=)
|
||||||
|
push:
|
||||||
|
- match: '(?=([\])};,]|\b(else|then)\b))'
|
||||||
|
pop: true
|
||||||
|
- include: attribute-bind-from-equals
|
||||||
|
- include: attrset-definition-brace-opened
|
||||||
|
- match: (?=\?)
|
||||||
|
push:
|
||||||
|
- match: '(?=([\])};,]|\b(else|then)\b))'
|
||||||
|
pop: true
|
||||||
|
- include: function-parameter-default
|
||||||
|
- match: \,
|
||||||
|
captures:
|
||||||
|
0: keyword.operator.nix
|
||||||
|
push:
|
||||||
|
- match: '(?=([\])};,]|\b(else|then)\b))'
|
||||||
|
pop: true
|
||||||
|
- include: function-definition-brace-opened
|
||||||
|
- include: others
|
||||||
|
- include: others
|
||||||
|
bad-reserved:
|
||||||
|
- match: '(?<![\w''-])(if|then|else|assert|with|let|in|rec|inherit)(?![\w''-])'
|
||||||
|
scope: invalid.illegal.reserved.nix
|
||||||
|
comment-remark:
|
||||||
|
- match: (TODO|FIXME|BUG|\!\!\!):?
|
||||||
|
captures:
|
||||||
|
1: markup.bold.comment.nix
|
||||||
|
constants:
|
||||||
|
- match: \b(builtins|true|false|null)\b
|
||||||
|
captures:
|
||||||
|
0: constant.language.nix
|
||||||
|
push:
|
||||||
|
- match: '(?=([\])};,]|\b(else|then)\b))'
|
||||||
|
pop: true
|
||||||
|
- include: expression-cont
|
||||||
|
- match: \b(scopedImport|import|isNull|abort|throw|baseNameOf|dirOf|removeAttrs|map|toString|derivationStrict|derivation)\b
|
||||||
|
captures:
|
||||||
|
0: support.function.nix
|
||||||
|
push:
|
||||||
|
- match: '(?=([\])};,]|\b(else|then)\b))'
|
||||||
|
pop: true
|
||||||
|
- include: expression-cont
|
||||||
|
- match: '\b[0-9]+\b'
|
||||||
|
captures:
|
||||||
|
0: constant.numeric.nix
|
||||||
|
push:
|
||||||
|
- match: '(?=([\])};,]|\b(else|then)\b))'
|
||||||
|
pop: true
|
||||||
|
- include: expression-cont
|
||||||
|
expression:
|
||||||
|
- include: parens-and-cont
|
||||||
|
- include: list-and-cont
|
||||||
|
- include: string
|
||||||
|
- include: interpolation
|
||||||
|
- include: with-assert
|
||||||
|
- include: function-for-sure
|
||||||
|
- include: attrset-for-sure
|
||||||
|
- include: attrset-or-function
|
||||||
|
- include: let
|
||||||
|
- include: if
|
||||||
|
- include: operator-unary
|
||||||
|
- include: constants
|
||||||
|
- include: bad-reserved
|
||||||
|
- include: parameter-name-and-cont
|
||||||
|
- include: others
|
||||||
|
expression-cont:
|
||||||
|
- match: (?=.?)
|
||||||
|
push:
|
||||||
|
- match: '(?=([\])};,]|\b(else|then)\b))'
|
||||||
|
pop: true
|
||||||
|
- include: parens
|
||||||
|
- include: list
|
||||||
|
- include: string
|
||||||
|
- include: interpolation
|
||||||
|
- include: function-for-sure
|
||||||
|
- include: attrset-for-sure
|
||||||
|
- include: attrset-or-function
|
||||||
|
- match: '(\bor\b|\.|==|!=|!|\<\=|\<|\>\=|\>|&&|\|\||-\>|//|\?|\+\+|-|\*|/(?=([^*]|$))|\+)'
|
||||||
|
scope: keyword.operator.nix
|
||||||
|
- include: constants
|
||||||
|
- include: bad-reserved
|
||||||
|
- include: parameter-name
|
||||||
|
- include: others
|
||||||
|
function-body:
|
||||||
|
- match: '(@\s*([a-zA-Z\_][a-zA-Z0-9\_\''\-]*)\s*)?(\:)'
|
||||||
|
push:
|
||||||
|
- match: '(?=([\])};,]|\b(else|then)\b))'
|
||||||
|
pop: true
|
||||||
|
- include: expression
|
||||||
|
function-body-from-colon:
|
||||||
|
- match: (\:)
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.function.nix
|
||||||
|
push:
|
||||||
|
- match: '(?=([\])};,]|\b(else|then)\b))'
|
||||||
|
pop: true
|
||||||
|
- include: expression
|
||||||
|
function-contents:
|
||||||
|
- include: bad-reserved
|
||||||
|
- include: function-parameter
|
||||||
|
- include: others
|
||||||
|
function-definition:
|
||||||
|
- match: (?=.?)
|
||||||
|
push:
|
||||||
|
- match: '(?=([\])};,]|\b(else|then)\b))'
|
||||||
|
pop: true
|
||||||
|
- include: function-body-from-colon
|
||||||
|
- match: (?=.?)
|
||||||
|
push:
|
||||||
|
- match: (?=\:)
|
||||||
|
pop: true
|
||||||
|
- match: '(\b[a-zA-Z\_][a-zA-Z0-9\_\''\-]*)'
|
||||||
|
captures:
|
||||||
|
0: variable.parameter.function.4.nix
|
||||||
|
push:
|
||||||
|
- match: (?=\:)
|
||||||
|
pop: true
|
||||||
|
- match: \@
|
||||||
|
push:
|
||||||
|
- match: (?=\:)
|
||||||
|
pop: true
|
||||||
|
- include: function-header-until-colon-no-arg
|
||||||
|
- include: others
|
||||||
|
- include: others
|
||||||
|
- match: '(?=\{)'
|
||||||
|
push:
|
||||||
|
- match: (?=\:)
|
||||||
|
pop: true
|
||||||
|
- include: function-header-until-colon-with-arg
|
||||||
|
- include: others
|
||||||
|
function-definition-brace-opened:
|
||||||
|
- match: (?=.?)
|
||||||
|
push:
|
||||||
|
- match: '(?=([\])};,]|\b(else|then)\b))'
|
||||||
|
pop: true
|
||||||
|
- include: function-body-from-colon
|
||||||
|
- match: (?=.?)
|
||||||
|
push:
|
||||||
|
- match: (?=\:)
|
||||||
|
pop: true
|
||||||
|
- include: function-header-close-brace-with-arg
|
||||||
|
- match: (?=.?)
|
||||||
|
push:
|
||||||
|
- match: '(?=\})'
|
||||||
|
pop: true
|
||||||
|
- include: function-contents
|
||||||
|
- include: others
|
||||||
|
function-for-sure:
|
||||||
|
- match: '(?=(\b[a-zA-Z\_][a-zA-Z0-9\_\''\-]*\s*[:@]|\{[^}]*\}\s*:|\{[^#}"''/=]*[,\?]))'
|
||||||
|
push:
|
||||||
|
- match: '(?=([\])};,]|\b(else|then)\b))'
|
||||||
|
pop: true
|
||||||
|
- include: function-definition
|
||||||
|
function-header-close-brace-no-arg:
|
||||||
|
- match: '\}'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.entity.function.nix
|
||||||
|
push:
|
||||||
|
- match: (?=\:)
|
||||||
|
pop: true
|
||||||
|
- include: others
|
||||||
|
function-header-close-brace-with-arg:
|
||||||
|
- match: '\}'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.entity.function.nix
|
||||||
|
push:
|
||||||
|
- match: (?=\:)
|
||||||
|
pop: true
|
||||||
|
- include: function-header-terminal-arg
|
||||||
|
- include: others
|
||||||
|
function-header-open-brace:
|
||||||
|
- match: '\{'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.entity.function.2.nix
|
||||||
|
push:
|
||||||
|
- match: '(?=\})'
|
||||||
|
pop: true
|
||||||
|
- include: function-contents
|
||||||
|
function-header-terminal-arg:
|
||||||
|
- match: (?=@)
|
||||||
|
push:
|
||||||
|
- match: (?=\:)
|
||||||
|
pop: true
|
||||||
|
- match: \@
|
||||||
|
push:
|
||||||
|
- match: (?=\:)
|
||||||
|
pop: true
|
||||||
|
- match: '(\b[a-zA-Z\_][a-zA-Z0-9\_\''\-]*)'
|
||||||
|
push:
|
||||||
|
- meta_scope: variable.parameter.function.3.nix
|
||||||
|
- match: (?=\:)
|
||||||
|
pop: true
|
||||||
|
- include: others
|
||||||
|
- include: others
|
||||||
|
function-header-until-colon-no-arg:
|
||||||
|
- match: '(?=\{)'
|
||||||
|
push:
|
||||||
|
- match: (?=\:)
|
||||||
|
pop: true
|
||||||
|
- include: function-header-open-brace
|
||||||
|
- include: function-header-close-brace-no-arg
|
||||||
|
function-header-until-colon-with-arg:
|
||||||
|
- match: '(?=\{)'
|
||||||
|
push:
|
||||||
|
- match: (?=\:)
|
||||||
|
pop: true
|
||||||
|
- include: function-header-open-brace
|
||||||
|
- include: function-header-close-brace-with-arg
|
||||||
|
function-parameter:
|
||||||
|
- match: (\.\.\.)
|
||||||
|
push:
|
||||||
|
- meta_scope: keyword.operator.nix
|
||||||
|
- match: '(,|(?=\}))'
|
||||||
|
pop: true
|
||||||
|
- include: others
|
||||||
|
- match: '\b[a-zA-Z\_][a-zA-Z0-9\_\''\-]*'
|
||||||
|
captures:
|
||||||
|
0: variable.parameter.function.1.nix
|
||||||
|
push:
|
||||||
|
- match: '(,|(?=\}))'
|
||||||
|
captures:
|
||||||
|
0: keyword.operator.nix
|
||||||
|
pop: true
|
||||||
|
- include: whitespace
|
||||||
|
- include: comment
|
||||||
|
- include: function-parameter-default
|
||||||
|
- include: expression
|
||||||
|
- include: others
|
||||||
|
function-parameter-default:
|
||||||
|
- match: \?
|
||||||
|
captures:
|
||||||
|
0: keyword.operator.nix
|
||||||
|
push:
|
||||||
|
- match: "(?=[,}])"
|
||||||
|
pop: true
|
||||||
|
- include: expression
|
||||||
|
if:
|
||||||
|
- match: (?=\bif\b)
|
||||||
|
push:
|
||||||
|
- match: '(?=([\])};,]|\b(else|then)\b))'
|
||||||
|
pop: true
|
||||||
|
- match: \bif\b
|
||||||
|
captures:
|
||||||
|
0: keyword.other.nix
|
||||||
|
push:
|
||||||
|
- match: \bth(?=en\b)
|
||||||
|
captures:
|
||||||
|
0: keyword.other.nix
|
||||||
|
pop: true
|
||||||
|
- include: expression
|
||||||
|
- match: (?<=th)en\b
|
||||||
|
captures:
|
||||||
|
0: keyword.other.nix
|
||||||
|
push:
|
||||||
|
- match: \bel(?=se\b)
|
||||||
|
captures:
|
||||||
|
0: keyword.other.nix
|
||||||
|
pop: true
|
||||||
|
- include: expression
|
||||||
|
- match: (?<=el)se\b
|
||||||
|
captures:
|
||||||
|
0: keyword.other.nix
|
||||||
|
push:
|
||||||
|
- match: '(?=([\])};,]|\b(else|then)\b))'
|
||||||
|
captures:
|
||||||
|
0: keyword.other.nix
|
||||||
|
pop: true
|
||||||
|
- include: expression
|
||||||
|
illegal:
|
||||||
|
- match: .
|
||||||
|
scope: invalid.illegal
|
||||||
|
interpolation:
|
||||||
|
- match: '\$\{'
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.embedded.begin.nix
|
||||||
|
push:
|
||||||
|
- meta_scope: markup.italic
|
||||||
|
- match: '\}'
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.embedded.end.nix
|
||||||
|
pop: true
|
||||||
|
- include: expression
|
||||||
|
let:
|
||||||
|
- match: (?=\blet\b)
|
||||||
|
push:
|
||||||
|
- match: '(?=([\])};,]|\b(else|then)\b))'
|
||||||
|
pop: true
|
||||||
|
- match: \blet\b
|
||||||
|
captures:
|
||||||
|
0: keyword.other.nix
|
||||||
|
push:
|
||||||
|
- match: '(?=([\])};,]|\b(in|else|then)\b))'
|
||||||
|
pop: true
|
||||||
|
- match: '(?=\{)'
|
||||||
|
push:
|
||||||
|
- match: '(?=([\])};,]|\b(else|then)\b))'
|
||||||
|
pop: true
|
||||||
|
- match: '\{'
|
||||||
|
push:
|
||||||
|
- match: '\}'
|
||||||
|
pop: true
|
||||||
|
- include: attrset-contents
|
||||||
|
- match: '(^|(?<=\}))'
|
||||||
|
push:
|
||||||
|
- match: '(?=([\])};,]|\b(else|then)\b))'
|
||||||
|
pop: true
|
||||||
|
- include: expression-cont
|
||||||
|
- include: others
|
||||||
|
- include: attrset-contents
|
||||||
|
- include: others
|
||||||
|
- match: \bin\b
|
||||||
|
captures:
|
||||||
|
0: keyword.other.nix
|
||||||
|
push:
|
||||||
|
- match: '(?=([\])};,]|\b(else|then)\b))'
|
||||||
|
pop: true
|
||||||
|
- include: expression
|
||||||
|
list:
|
||||||
|
- match: '\['
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.list.nix
|
||||||
|
push:
|
||||||
|
- match: '\]'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.list.nix
|
||||||
|
pop: true
|
||||||
|
- include: expression
|
||||||
|
list-and-cont:
|
||||||
|
- match: '(?=\[)'
|
||||||
|
push:
|
||||||
|
- match: '(?=([\])};,]|\b(else|then)\b))'
|
||||||
|
pop: true
|
||||||
|
- include: list
|
||||||
|
- include: expression-cont
|
||||||
|
operator-unary:
|
||||||
|
- match: (!|-)
|
||||||
|
scope: keyword.operator.unary.nix
|
||||||
|
others:
|
||||||
|
- include: whitespace
|
||||||
|
- include: comment
|
||||||
|
- include: illegal
|
||||||
|
parameter-name:
|
||||||
|
- match: '\b[a-zA-Z\_][a-zA-Z0-9\_\''\-]*'
|
||||||
|
captures:
|
||||||
|
0: variable.parameter.name.nix
|
||||||
|
parameter-name-and-cont:
|
||||||
|
- match: '\b[a-zA-Z\_][a-zA-Z0-9\_\''\-]*'
|
||||||
|
captures:
|
||||||
|
0: variable.parameter.name.nix
|
||||||
|
push:
|
||||||
|
- match: '(?=([\])};,]|\b(else|then)\b))'
|
||||||
|
pop: true
|
||||||
|
- include: expression-cont
|
||||||
|
parens:
|
||||||
|
- match: \(
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.expression.nix
|
||||||
|
push:
|
||||||
|
- match: \)
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.expression.nix
|
||||||
|
pop: true
|
||||||
|
- include: expression
|
||||||
|
parens-and-cont:
|
||||||
|
- match: (?=\()
|
||||||
|
push:
|
||||||
|
- match: '(?=([\])};,]|\b(else|then)\b))'
|
||||||
|
pop: true
|
||||||
|
- include: parens
|
||||||
|
- include: expression-cont
|
||||||
|
string:
|
||||||
|
- match: (?=\'\')
|
||||||
|
push:
|
||||||
|
- match: '(?=([\])};,]|\b(else|then)\b))'
|
||||||
|
pop: true
|
||||||
|
- match: \'\'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.other.start.nix
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.other.nix
|
||||||
|
- match: \'\'(?!\$|\'|\\.)
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.other.end.nix
|
||||||
|
pop: true
|
||||||
|
- match: \'\'(\$|\'|\\.)
|
||||||
|
scope: constant.character.escape.nix
|
||||||
|
- include: interpolation
|
||||||
|
- include: expression-cont
|
||||||
|
- match: (?=\")
|
||||||
|
push:
|
||||||
|
- match: '(?=([\])};,]|\b(else|then)\b))'
|
||||||
|
pop: true
|
||||||
|
- include: string-quoted
|
||||||
|
- include: expression-cont
|
||||||
|
- match: '(~?[a-zA-Z0-9\.\_\-\+]*(\/[a-zA-Z0-9\.\_\-\+]+)+)'
|
||||||
|
captures:
|
||||||
|
0: string.unquoted.path.nix
|
||||||
|
push:
|
||||||
|
- match: '(?=([\])};,]|\b(else|then)\b))'
|
||||||
|
pop: true
|
||||||
|
- include: expression-cont
|
||||||
|
- match: '(\<[a-zA-Z0-9\.\_\-\+]+(\/[a-zA-Z0-9\.\_\-\+]+)*\>)'
|
||||||
|
captures:
|
||||||
|
0: string.unquoted.spath.nix
|
||||||
|
push:
|
||||||
|
- match: '(?=([\])};,]|\b(else|then)\b))'
|
||||||
|
pop: true
|
||||||
|
- include: expression-cont
|
||||||
|
- match: '([a-zA-Z][a-zA-Z0-9\+\-\.]*\:[a-zA-Z0-9\%\/\?\:\@\&\=\+\$\,\-\_\.\!\~\*\'']+)'
|
||||||
|
captures:
|
||||||
|
0: string.unquoted.url.nix
|
||||||
|
push:
|
||||||
|
- match: '(?=([\])};,]|\b(else|then)\b))'
|
||||||
|
pop: true
|
||||||
|
- include: expression-cont
|
||||||
|
string-quoted:
|
||||||
|
- match: \"
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.double.start.nix
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.double.nix
|
||||||
|
- match: \"
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.double.end.nix
|
||||||
|
pop: true
|
||||||
|
- match: \\.
|
||||||
|
scope: constant.character.escape.nix
|
||||||
|
- include: interpolation
|
||||||
|
whitespace:
|
||||||
|
- match: \s+
|
||||||
|
with-assert:
|
||||||
|
- match: '(?<![\w''-])(with|assert)(?![\w''-])'
|
||||||
|
captures:
|
||||||
|
0: keyword.other.nix
|
||||||
|
push:
|
||||||
|
- match: \;
|
||||||
|
pop: true
|
||||||
|
- include: expression
|
||||||
+1
Submodule assets/syntaxes/02_Extra/Org mode added at 4976d8f84e
+219
@@ -0,0 +1,219 @@
|
|||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
# http://www.sublimetext.com/docs/3/syntax.html
|
||||||
|
name: orgmode
|
||||||
|
file_extensions:
|
||||||
|
- org
|
||||||
|
scope: text.orgmode
|
||||||
|
contexts:
|
||||||
|
main:
|
||||||
|
- match: |-
|
||||||
|
(?x)
|
||||||
|
^(\*+) # leading stars
|
||||||
|
\s*([A-Z_]{2,})? # todo keywords
|
||||||
|
\s*(\[\#[A-Ca-c]\])? # priority
|
||||||
|
\s*(?=\s+[A-Za-z0-9]+) # expected heading text
|
||||||
|
comment: Outline headings
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.heading.orgmode
|
||||||
|
2: keyword.other.todo.orgmode
|
||||||
|
3: constant.other.priority.orgmode
|
||||||
|
push:
|
||||||
|
- meta_scope: markup.heading.orgmode
|
||||||
|
- meta_content_scope: entity.name.section.orgmode
|
||||||
|
- match: (?=\s*$\n?)
|
||||||
|
pop: true
|
||||||
|
- include: heading-inline
|
||||||
|
- match: "^-{5,}$"
|
||||||
|
scope: meta.separator.orgmode
|
||||||
|
- match: '^\s*([-+]|\s+\*)\s+(.*?)\s+::'
|
||||||
|
captures:
|
||||||
|
1: keyword.operator.list.orgmode
|
||||||
|
2: markup.bold.definition.orgmode
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.list.definition.orgmode
|
||||||
|
- match: $
|
||||||
|
pop: true
|
||||||
|
- include: inline
|
||||||
|
- match: '^\s*?([-+]|\s+\*|\d+[).])'
|
||||||
|
captures:
|
||||||
|
1: keyword.operator.list.orgmode
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.list.plain.orgmode
|
||||||
|
- match: $
|
||||||
|
pop: true
|
||||||
|
- include: list-inline
|
||||||
|
- match: (?i)^#\+(BEGIN_(QUOTE|VERSE|CENTER))$
|
||||||
|
captures:
|
||||||
|
1: keyword.control.block.orgmode
|
||||||
|
push:
|
||||||
|
- meta_scope: markup.quote.orgmode
|
||||||
|
- match: (?i)^#\+(END_\2)$
|
||||||
|
captures:
|
||||||
|
1: keyword.control.block.orgmode
|
||||||
|
pop: true
|
||||||
|
- match: "^#[^+].*$"
|
||||||
|
scope: comment.line.number-sign.orgmode
|
||||||
|
- match: ^:(PROPERTIES):$
|
||||||
|
captures:
|
||||||
|
1: keyword.control.drawer.orgmode
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.drawer.properties.orgmode
|
||||||
|
- match: ^:(END):$
|
||||||
|
captures:
|
||||||
|
1: keyword.control.drawer.orgmode
|
||||||
|
pop: true
|
||||||
|
- include: properties
|
||||||
|
- match: ^:(.+):$
|
||||||
|
captures:
|
||||||
|
1: keyword.control.drawer.orgmode
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.drawer.other.orgmode
|
||||||
|
- match: ^:(END):$
|
||||||
|
captures:
|
||||||
|
1: keyword.control.drawer.orgmode
|
||||||
|
pop: true
|
||||||
|
- match: (?i)#\+(BEGIN_LaTeX)$
|
||||||
|
captures:
|
||||||
|
1: keyword.control.block.orgmode
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.block.latex.orgmode
|
||||||
|
- match: (?i)#\+(END_LaTeX)$
|
||||||
|
captures:
|
||||||
|
1: keyword.control.block.orgmode
|
||||||
|
pop: true
|
||||||
|
- include: scope:text.tex.latex
|
||||||
|
- match: (?i)#\+(BEGIN_HTML)$
|
||||||
|
captures:
|
||||||
|
1: keyword.control.block.orgmode
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.block.html.orgmode
|
||||||
|
- match: (?i)#\+(END_HTML)$
|
||||||
|
captures:
|
||||||
|
1: keyword.control.block.orgmode
|
||||||
|
pop: true
|
||||||
|
- include: scope:text.html.basic
|
||||||
|
- match: (?i)#\+(BEGIN_SRC)\s+(python)\s*(.*)$
|
||||||
|
captures:
|
||||||
|
1: keyword.control.block.orgmode
|
||||||
|
2: constant.other.language.orgmode
|
||||||
|
3: string.other.header-args.orgmode
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.block.source.python.orgmode
|
||||||
|
- match: (?i)#\+(END_SRC)$
|
||||||
|
captures:
|
||||||
|
1: keyword.control.block.orgmode
|
||||||
|
pop: true
|
||||||
|
- include: scope:source.python
|
||||||
|
- match: (?i)#\+(BEGIN_SRC)\s+(ruby)\s*(.*)$
|
||||||
|
captures:
|
||||||
|
1: keyword.control.block.orgmode
|
||||||
|
2: constant.other.language.orgmode
|
||||||
|
3: string.other.header-args.orgmode
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.block.source.ruby.orgmode
|
||||||
|
- match: (?i)#\+(END_SRC)$
|
||||||
|
captures:
|
||||||
|
1: keyword.control.block.orgmode
|
||||||
|
pop: true
|
||||||
|
- include: scope:source.ruby
|
||||||
|
- match: (?i)#\+(BEGIN_SRC)\s+((?:emacs-)?lisp)\s*(.*)$
|
||||||
|
captures:
|
||||||
|
1: keyword.control.block.orgmode
|
||||||
|
2: constant.other.language.orgmode
|
||||||
|
3: string.other.header-args.orgmode
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.block.source.lisp.orgmode
|
||||||
|
- match: (?i)#\+(END_SRC)$
|
||||||
|
captures:
|
||||||
|
1: keyword.control.block.orgmode
|
||||||
|
pop: true
|
||||||
|
- include: scope:source.lisp
|
||||||
|
- match: (?i)#\+(BEGIN_SRC)\s+(sh)\s*(.*)$
|
||||||
|
captures:
|
||||||
|
1: keyword.control.block.orgmode
|
||||||
|
2: constant.other.language.orgmode
|
||||||
|
3: string.other.header-args.orgmode
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.block.source.shell.orgmode
|
||||||
|
- match: (?i)#\+(END_SRC)$
|
||||||
|
captures:
|
||||||
|
1: keyword.control.block.orgmode
|
||||||
|
pop: true
|
||||||
|
- include: scope:source.shell
|
||||||
|
- match: '(?i)#\+(BEGIN_(SRC|EXAMPLE))(?:\s+([\w-]+)?\s*(.*))?$'
|
||||||
|
captures:
|
||||||
|
1: keyword.control.block.orgmode
|
||||||
|
3: constant.other.language.orgmode
|
||||||
|
4: string.other.header-args.orgmode
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.block.source.other.orgmode
|
||||||
|
- meta_content_scope: markup.raw.block.orgmode
|
||||||
|
- match: (?i)#\+(END_\2)$
|
||||||
|
captures:
|
||||||
|
1: keyword.control.block.orgmode
|
||||||
|
pop: true
|
||||||
|
- match: '#\+(OPTIONS):'
|
||||||
|
captures:
|
||||||
|
1: keyword.control.pragma.orgmode
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.pragma.options.orgmode
|
||||||
|
- match: $
|
||||||
|
pop: true
|
||||||
|
- match: '([^\s]+):([^\s]+)'
|
||||||
|
scope: meta.option.orgmode
|
||||||
|
captures:
|
||||||
|
1: variable.parameter.option.orgmode
|
||||||
|
2: string.other.option.orgmode
|
||||||
|
- match: '#\+(CALL):\s+[A-Za-z-]+(?:\[([^\]]*)\])?\(?'
|
||||||
|
captures:
|
||||||
|
1: keyword.control.pragma.orgmode
|
||||||
|
2: string.other.header-args.orgmode
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.pragma.call.orgmode
|
||||||
|
- match: '\)?([^)]*)$'
|
||||||
|
captures:
|
||||||
|
1: string.other.header-args.orgmode
|
||||||
|
pop: true
|
||||||
|
- match: (\w+)=
|
||||||
|
scope: meta.assignment.orgmode
|
||||||
|
captures:
|
||||||
|
1: variable.parameter.header-args.orgmode
|
||||||
|
- match: '^#\+([a-zA-Z_-]+): ?(.*)$'
|
||||||
|
scope: meta.pragma.orgmode
|
||||||
|
captures:
|
||||||
|
1: keyword.control.pragma.orgmode
|
||||||
|
2: string.unquoted.pragma.orgmode
|
||||||
|
- include: inline
|
||||||
|
heading-inline:
|
||||||
|
- match: ':([^:^\s]*)(?=:)'
|
||||||
|
scope: meta.keyword.orgmode
|
||||||
|
captures:
|
||||||
|
1: string.quoted.keyword.orgmode
|
||||||
|
- include: inline
|
||||||
|
inline:
|
||||||
|
- match: '(?<=^|[.,:;\s])/[^/]+/(?=$|[.,:;\s])'
|
||||||
|
scope: markup.italic.orgmode
|
||||||
|
- match: '(?<=^|[.,:;\s])\*[^*]+\*(?=$|[.,:;\s])'
|
||||||
|
scope: markup.bold.orgmode
|
||||||
|
- match: '(?<=^|[.,:;\s])_[^_]+_(?=$|[.,:;\s])'
|
||||||
|
scope: markup.underline.orgmode
|
||||||
|
- match: '(?<=^|[.,:;\s])([~=]).+?\1(?=$|[.,:;\s])'
|
||||||
|
scope: markup.raw.inline.orgmode
|
||||||
|
- match: '\[(?:\[([^\]]*)\])?\[([^\]]*)\]\]'
|
||||||
|
scope: meta.link.orgmode
|
||||||
|
captures:
|
||||||
|
1: markup.underline.link.orgmode
|
||||||
|
2: string.other.link.orgmode
|
||||||
|
- match: (?:http|ftp)s?:\/\/\S+
|
||||||
|
scope: markup.underline.url.orgmode
|
||||||
|
list-inline:
|
||||||
|
- match: '\[[ -X]\]'
|
||||||
|
scope: keyword.operator.checkbox.orgmode
|
||||||
|
- include: inline
|
||||||
|
properties:
|
||||||
|
- match: '^:([A-Za-z_]+):\s(.*)$'
|
||||||
|
scope: meta.property.orgmode
|
||||||
|
captures:
|
||||||
|
1: keyword.control.property.orgmode
|
||||||
|
2: string.unquoted.propval.orgmode
|
||||||
+71
@@ -0,0 +1,71 @@
|
|||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
# http://www.sublimetext.com/docs/3/syntax.html
|
||||||
|
name: passwd
|
||||||
|
file_extensions:
|
||||||
|
- passwd
|
||||||
|
scope: source.passwd
|
||||||
|
|
||||||
|
contexts:
|
||||||
|
main:
|
||||||
|
- comment: name
|
||||||
|
match: ^[^:]+
|
||||||
|
scope: keyword
|
||||||
|
|
||||||
|
- comment: password
|
||||||
|
match: ":"
|
||||||
|
push: password
|
||||||
|
|
||||||
|
password:
|
||||||
|
- comment: uid
|
||||||
|
match: ":"
|
||||||
|
set: uid
|
||||||
|
|
||||||
|
- comment: shadowpassword
|
||||||
|
match: "[^:]+"
|
||||||
|
scope: invalid
|
||||||
|
|
||||||
|
uid:
|
||||||
|
- comment: gid
|
||||||
|
match: ":"
|
||||||
|
set: gid
|
||||||
|
|
||||||
|
- comment: number
|
||||||
|
match: "[0-9]+"
|
||||||
|
scope: constant.numeric
|
||||||
|
|
||||||
|
gid:
|
||||||
|
- comment: comment
|
||||||
|
match: ":"
|
||||||
|
set: comment
|
||||||
|
|
||||||
|
- comment: number
|
||||||
|
match: "[0-9]+"
|
||||||
|
scope: constant.language
|
||||||
|
|
||||||
|
comment:
|
||||||
|
- comment: directory
|
||||||
|
match: ":"
|
||||||
|
set: directory
|
||||||
|
|
||||||
|
- comment: comment
|
||||||
|
match: "[^:]+"
|
||||||
|
scope: entity.name
|
||||||
|
|
||||||
|
directory:
|
||||||
|
- comment: shell
|
||||||
|
match: ":"
|
||||||
|
set: shell
|
||||||
|
|
||||||
|
- comment: directory
|
||||||
|
match: "[^:]+"
|
||||||
|
scope: string.unquoted
|
||||||
|
|
||||||
|
shell:
|
||||||
|
- comment: newline
|
||||||
|
match: "\n"
|
||||||
|
pop: true
|
||||||
|
|
||||||
|
- comment: directory
|
||||||
|
match: "[^:\n]+"
|
||||||
|
scope: variable.parameter
|
||||||
+1
Submodule assets/syntaxes/02_Extra/PowerShell added at 4a0a076661
+451
@@ -0,0 +1,451 @@
|
|||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
# http://www.sublimetext.com/docs/3/syntax.html
|
||||||
|
name: PowerShell
|
||||||
|
file_extensions:
|
||||||
|
- ps1
|
||||||
|
- psm1
|
||||||
|
- psd1
|
||||||
|
scope: source.powershell
|
||||||
|
contexts:
|
||||||
|
main:
|
||||||
|
- match: "<#"
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.comment.block.begin.powershell
|
||||||
|
push:
|
||||||
|
- meta_scope: comment.block.powershell
|
||||||
|
- match: "#>"
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.comment.block.end.powershell
|
||||||
|
pop: true
|
||||||
|
- include: commentEmbeddedDocs
|
||||||
|
- match: '[2-6]>&1|>>|>|<<|<|>|>\||[1-6]>|[1-6]>>'
|
||||||
|
scope: keyword.operator.redirection.powershell
|
||||||
|
- include: commands
|
||||||
|
- include: commentLine
|
||||||
|
- include: variable
|
||||||
|
- include: interpolatedStringContent
|
||||||
|
- include: function
|
||||||
|
- include: attribute
|
||||||
|
- include: UsingDirective
|
||||||
|
- include: type
|
||||||
|
- include: hashtable
|
||||||
|
- include: doubleQuotedString
|
||||||
|
- include: scriptblock
|
||||||
|
- include: doubleQuotedStringEscapes
|
||||||
|
- match: (?<!')'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.begin.powershell
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.single.powershell
|
||||||
|
- match: "'(?!')"
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.end.powershell
|
||||||
|
pop: true
|
||||||
|
- match: "''"
|
||||||
|
scope: constant.character.escape.powershell
|
||||||
|
- match: \@"(?=$)
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.double.heredoc.powershell
|
||||||
|
- match: ^"@
|
||||||
|
pop: true
|
||||||
|
- include: variableNoProperty
|
||||||
|
- include: doubleQuotedStringEscapes
|
||||||
|
- include: interpolation
|
||||||
|
- match: \@'(?=$)
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.single.heredoc.powershell
|
||||||
|
- match: ^'@
|
||||||
|
pop: true
|
||||||
|
- match: "''"
|
||||||
|
scope: constant.character.escape.powershell
|
||||||
|
- include: numericConstant
|
||||||
|
- match: (@)(\()
|
||||||
|
captures:
|
||||||
|
1: keyword.other.array.begin.powershell
|
||||||
|
2: punctuation.section.group.begin.powershell
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.group.array-expression.powershell
|
||||||
|
- match: \)
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.group.end.powershell
|
||||||
|
pop: true
|
||||||
|
- include: main
|
||||||
|
- match: (\$)(\()
|
||||||
|
comment: "TODO: move to repo; make recursive."
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.variable.powershell
|
||||||
|
2: punctuation.section.group.begin.powershell
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.group.complex.subexpression.powershell
|
||||||
|
- match: \)
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.group.end.powershell
|
||||||
|
pop: true
|
||||||
|
- include: main
|
||||||
|
- match: '(\b(([A-Za-z0-9\-_\.]+)\.(?i:exe|com|cmd|bat))\b)'
|
||||||
|
scope: support.function.powershell
|
||||||
|
- match: (?<!\w|-|\.)((?i:begin|break|catch|continue|data|default|define|do|dynamicparam|else|elseif|end|exit|finally|for|from|if|in|inlinescript|parallel|param|process|return|sequence|switch|throw|trap|try|until|var|while)|%|\?)(?!\w)
|
||||||
|
scope: keyword.control.powershell
|
||||||
|
- match: '(?<!\w|-|[^\)]\.)((?i:(foreach|where)(?!-object))|%|\?)(?!\w)'
|
||||||
|
scope: keyword.control.powershell
|
||||||
|
- match: (?<!\w)(--%)(?!\w)
|
||||||
|
comment: This should be moved to the repository at some point.
|
||||||
|
captures:
|
||||||
|
1: keyword.control.powershell
|
||||||
|
push:
|
||||||
|
- match: $
|
||||||
|
pop: true
|
||||||
|
- match: .+
|
||||||
|
scope: string.unquoted.powershell
|
||||||
|
- match: (?<!\w)((?i:hidden|static))(?!\w)
|
||||||
|
comment: This should only be relevant inside a class but will require a rework of how classes are matched. This is a temp fix.
|
||||||
|
scope: storage.modifier.powershell
|
||||||
|
- match: '(?<!\w|-)((?i:class)|%|\?)(?:\s)+((?:\p{L}|\d|_|-|)+)\b'
|
||||||
|
comment: capture should be entity.name.type, but it doesn't provide a good color in the default schema.
|
||||||
|
captures:
|
||||||
|
1: storage.type.powershell
|
||||||
|
2: entity.name.function
|
||||||
|
- match: (?<!\w)-(?i:is(?:not)?|as)\b
|
||||||
|
scope: keyword.operator.comparison.powershell
|
||||||
|
- match: '(?<!\w)-(?i:[ic]?(?:eq|ne|[gl][te]|(?:not)?(?:like|match|contains|in)|replace))(?!\p{L})'
|
||||||
|
scope: keyword.operator.comparison.powershell
|
||||||
|
- match: '(?<!\w)-(?i:join|split)(?!\p{L})|!'
|
||||||
|
scope: keyword.operator.unary.powershell
|
||||||
|
- match: '(?<!\w)-(?i:and|or|not|xor)(?!\p{L})|!'
|
||||||
|
scope: keyword.operator.logical.powershell
|
||||||
|
- match: '(?<!\w)-(?i:band|bor|bnot|bxor|shl|shr)(?!\p{L})'
|
||||||
|
scope: keyword.operator.bitwise.powershell
|
||||||
|
- match: '(?<!\w)-(?i:f)(?!\p{L})'
|
||||||
|
scope: keyword.operator.string-format.powershell
|
||||||
|
- match: "[+%*/-]?=|[+/*%-]"
|
||||||
|
scope: keyword.operator.assignment.powershell
|
||||||
|
- match: '\|{2}|&{2}|;'
|
||||||
|
scope: punctuation.terminator.statement.powershell
|
||||||
|
- match: '&|(?<!\w)\.(?= )|`|,|\|'
|
||||||
|
scope: keyword.operator.other.powershell
|
||||||
|
- match: (?<!\s|^)\.\.(?=\-?\d|\(|\$)
|
||||||
|
comment: This is very imprecise, is there a syntax for 'must come after...'
|
||||||
|
scope: keyword.operator.range.powershell
|
||||||
|
RequiresDirective:
|
||||||
|
- match: (?<=#)(?i:(requires))\s
|
||||||
|
captures:
|
||||||
|
0: keyword.control.requires.powershell
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.requires.powershell
|
||||||
|
- match: $
|
||||||
|
pop: true
|
||||||
|
- match: \-(?i:Modules|PSSnapin|RunAsAdministrator|ShellId|Version)
|
||||||
|
scope: keyword.other.powershell
|
||||||
|
- match: '(?<!-)\b\p{L}+|\d+(?:\.\d+)*'
|
||||||
|
scope: variable.parameter.powershell
|
||||||
|
- include: hashtable
|
||||||
|
UsingDirective:
|
||||||
|
- match: (?<!\w)(?i:(using))\s+(?i:(namespace|module))\s+(?i:((?:\w+(?:\.)?)+))
|
||||||
|
captures:
|
||||||
|
1: keyword.control.using.powershell
|
||||||
|
2: keyword.other.powershell
|
||||||
|
3: variable.parameter.powershell
|
||||||
|
attribute:
|
||||||
|
- match: '(\[)\s*\b(?i)(cmdletbinding|alias|outputtype|parameter|validatenotnull|validatenotnullorempty|validatecount|validateset|allownull|allowemptycollection|allowemptystring|validatescript|validaterange|validatepattern|validatelength|supportswildcards)\b'
|
||||||
|
captures:
|
||||||
|
1: punctuation.section.bracket.begin.powershell
|
||||||
|
2: support.function.attribute.powershell
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.attribute.powershell
|
||||||
|
- match: '(\])'
|
||||||
|
captures:
|
||||||
|
1: punctuation.section.bracket.end.powershell
|
||||||
|
pop: true
|
||||||
|
- match: \(
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.group.begin.powershell
|
||||||
|
push:
|
||||||
|
- match: \)
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.group.end.powershell
|
||||||
|
pop: true
|
||||||
|
- include: main
|
||||||
|
- match: (?i)\b(mandatory|valuefrompipeline|valuefrompipelinebypropertyname|valuefromremainingarguments|position|parametersetname|defaultparametersetname|supportsshouldprocess|supportspaging|positionalbinding|helpuri|confirmimpact|helpmessage)\b(?:\s+)?(=)?
|
||||||
|
captures:
|
||||||
|
1: variable.parameter.attribute.powershell
|
||||||
|
2: keyword.operator.assignment.powershell
|
||||||
|
commands:
|
||||||
|
- match: '(?:(\p{L}|\d|_|-|\\|\:)*\\)?\b(?i:Add|Approve|Assert|Backup|Block|Build|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Deploy|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Mount|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Write)\-.+?(?:\.(?i:exe|cmd|bat|ps1))?\b'
|
||||||
|
comment: "Verb-Noun pattern:"
|
||||||
|
scope: support.function.powershell
|
||||||
|
- match: (?<!\w)(?i:foreach-object)(?!\w)
|
||||||
|
comment: Builtin cmdlets with reserved verbs
|
||||||
|
scope: support.function.powershell
|
||||||
|
- match: (?<!\w)(?i:where-object)(?!\w)
|
||||||
|
comment: Builtin cmdlets with reserved verbs
|
||||||
|
scope: support.function.powershell
|
||||||
|
- match: (?<!\w)(?i:sort-object)(?!\w)
|
||||||
|
comment: Builtin cmdlets with reserved verbs
|
||||||
|
scope: support.function.powershell
|
||||||
|
- match: (?<!\w)(?i:tee-object)(?!\w)
|
||||||
|
comment: Builtin cmdlets with reserved verbs
|
||||||
|
scope: support.function.powershell
|
||||||
|
commentEmbeddedDocs:
|
||||||
|
- match: ^(?i:(?:\s?|#)+(\.)(COMPONENT|DESCRIPTION|EXAMPLE|EXTERNALHELP|FORWARDHELPCATEGORY|FORWARDHELPTARGETNAME|FUNCTIONALITY|INPUTS|LINK|NOTES|OUTPUTS|REMOTEHELPRUNSPACE|ROLE|SYNOPSIS))
|
||||||
|
scope: comment.documentation.embedded.powershell
|
||||||
|
captures:
|
||||||
|
1: constant.string.documentation.powershell
|
||||||
|
2: keyword.operator.documentation.powershell
|
||||||
|
- match: '(?i:\s?(\.)(PARAMETER|FORWARDHELPTARGETNAME|FORWARDHELPCATEGORY|REMOTEHELPRUNSPACE|EXTERNALHELP)\s+([a-z0-9-_]+))'
|
||||||
|
scope: comment.documentation.embedded.powershell
|
||||||
|
captures:
|
||||||
|
1: constant.string.documentation.powershell
|
||||||
|
2: keyword.operator.documentation.powershell
|
||||||
|
3: keyword.operator.documentation.powershell
|
||||||
|
commentLine:
|
||||||
|
- match: '(?<![`\\-])#'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.comment.powershell
|
||||||
|
push:
|
||||||
|
- meta_scope: comment.line.powershell
|
||||||
|
- match: $\n?
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.comment.powershell
|
||||||
|
pop: true
|
||||||
|
- include: commentEmbeddedDocs
|
||||||
|
- include: RequiresDirective
|
||||||
|
doubleQuotedString:
|
||||||
|
- match: (?<!(?<!`)")"
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.begin.powershell
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.double.powershell
|
||||||
|
- match: '"(?!")'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.end.powershell
|
||||||
|
pop: true
|
||||||
|
- match: '(?i)\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,64}\b'
|
||||||
|
- include: variableNoProperty
|
||||||
|
- include: doubleQuotedStringEscapes
|
||||||
|
- include: interpolation
|
||||||
|
- match: '`\s*$'
|
||||||
|
scope: keyword.other.powershell
|
||||||
|
doubleQuotedStringEscapes:
|
||||||
|
- match: '`[`0abefnrtv"''$]'
|
||||||
|
scope: constant.character.escape.powershell
|
||||||
|
- include: unicodeEscape
|
||||||
|
- match: '""'
|
||||||
|
scope: constant.character.escape.powershell
|
||||||
|
function:
|
||||||
|
- match: '^(?:\s*+)(?i)(function|filter|configuration|workflow)\s+(?:(global|local|script|private):)?((?:\p{L}|\d|_|-|\.)+)'
|
||||||
|
captures:
|
||||||
|
0: meta.function.powershell
|
||||||
|
1: storage.type.powershell
|
||||||
|
2: storage.modifier.scope.powershell
|
||||||
|
3: entity.name.function.powershell
|
||||||
|
push:
|
||||||
|
- match: '(?=\{|\()'
|
||||||
|
pop: true
|
||||||
|
- include: commentLine
|
||||||
|
hashtable:
|
||||||
|
- match: '(@)(\{)'
|
||||||
|
captures:
|
||||||
|
1: keyword.other.hashtable.begin.powershell
|
||||||
|
2: punctuation.section.braces.begin.powershell
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.hashtable.powershell
|
||||||
|
- match: '(\})'
|
||||||
|
captures:
|
||||||
|
1: punctuation.section.braces.end.powershell
|
||||||
|
pop: true
|
||||||
|
- match: \b((?:\'|\")?)(\w+)((?:\'|\")?)(?:\s+)?(=)(?:\s+)?
|
||||||
|
scope: meta.hashtable.assignment.powershell
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.string.begin.powershell
|
||||||
|
2: variable.other.readwrite.powershell
|
||||||
|
3: punctuation.definition.string.end.powershell
|
||||||
|
4: keyword.operator.assignment.powershell
|
||||||
|
- include: scriptblock
|
||||||
|
- include: main
|
||||||
|
interpolatedStringContent:
|
||||||
|
- match: \(
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.group.begin.powershell
|
||||||
|
push:
|
||||||
|
- meta_content_scope: interpolated.simple.source.powershell
|
||||||
|
- match: \)
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.group.end.powershell
|
||||||
|
pop: true
|
||||||
|
- include: main
|
||||||
|
- include: interpolation
|
||||||
|
- include: interpolatedStringContent
|
||||||
|
interpolation:
|
||||||
|
- match: (\$)(\()
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.variable.powershell
|
||||||
|
2: punctuation.section.group.begin.powershell
|
||||||
|
push:
|
||||||
|
- meta_content_scope: interpolated.complex.source.powershell
|
||||||
|
- match: \)
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.group.end.powershell
|
||||||
|
pop: true
|
||||||
|
- include: main
|
||||||
|
- include: interpolation
|
||||||
|
- include: interpolatedStringContent
|
||||||
|
numericConstant:
|
||||||
|
- match: '(?<!\w)([-+]?0(?:x|X)[0-9a-fA-F_]+(?:U|u|L|l|UL|Ul|uL|ul|LU|Lu|lU|lu)?)((?i:[kmgtp]b)?)\b'
|
||||||
|
captures:
|
||||||
|
1: constant.numeric.hex.powershell
|
||||||
|
2: keyword.other.powershell
|
||||||
|
- match: '(?<!\w)([-+]?(?:[0-9_]+)?\.[0-9_]+(?:(?:e|E)[0-9]+)?(?:F|f|D|d|M|m)?)((?i:[kmgtp]b)?)\b'
|
||||||
|
captures:
|
||||||
|
1: constant.numeric.integer.powershell
|
||||||
|
2: keyword.other.powershell
|
||||||
|
- match: '(?<!\w)([-+]?0(?:b|B)[01_]+(?:U|u|L|l|UL|Ul|uL|ul|LU|Lu|lU|lu)?)((?i:[kmgtp]b)?)\b'
|
||||||
|
captures:
|
||||||
|
1: constant.numeric.octal.powershell
|
||||||
|
2: keyword.other.powershell
|
||||||
|
- match: '(?<!\w)([-+]?[0-9_]+(?:e|E)(?:[0-9_])?+(?:F|f|D|d|M|m)?)((?i:[kmgtp]b)?)\b'
|
||||||
|
captures:
|
||||||
|
1: constant.numeric.integer.powershell
|
||||||
|
2: keyword.other.powershell
|
||||||
|
- match: '(?<!\w)([-+]?[0-9_]+\.(?:e|E)(?:[0-9_])?+(?:F|f|D|d|M|m)?)((?i:[kmgtp]b)?)\b'
|
||||||
|
captures:
|
||||||
|
1: constant.numeric.integer.powershell
|
||||||
|
2: keyword.other.powershell
|
||||||
|
- match: '(?<!\w)([-+]?[0-9_]+[\.]?(?:F|f|D|d|M|m))((?i:[kmgtp]b)?)\b'
|
||||||
|
captures:
|
||||||
|
1: constant.numeric.integer.powershell
|
||||||
|
2: keyword.other.powershell
|
||||||
|
- match: '(?<!\w)([-+]?[0-9_]+[\.]?(?:U|u|L|l|UL|Ul|uL|ul|LU|Lu|lU|lu)?)((?i:[kmgtp]b)?)\b'
|
||||||
|
captures:
|
||||||
|
1: constant.numeric.integer.powershell
|
||||||
|
2: keyword.other.powershell
|
||||||
|
scriptblock:
|
||||||
|
- match: '\{'
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.braces.begin.powershell
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.scriptblock.powershell
|
||||||
|
- match: '\}'
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.braces.end.powershell
|
||||||
|
pop: true
|
||||||
|
- include: main
|
||||||
|
type:
|
||||||
|
- match: '\['
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.bracket.begin.powershell
|
||||||
|
push:
|
||||||
|
- match: '\]'
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.bracket.end.powershell
|
||||||
|
pop: true
|
||||||
|
- match: '(?!\d+|\.)(?:\p{L}|\p{N}|\.)+'
|
||||||
|
scope: storage.type.powershell
|
||||||
|
- include: main
|
||||||
|
unicodeEscape:
|
||||||
|
- match: '`u\{(?:(?:10)?([0-9a-fA-F]){1,4}|0?\g<1>{1,5})}'
|
||||||
|
scope: constant.character.escape.powershell
|
||||||
|
- match: '`u(?:\{[0-9a-fA-F]{,6}.)?'
|
||||||
|
scope: invalid.character.escape.powershell
|
||||||
|
variable:
|
||||||
|
- match: (\$)(?i:(False|Null|True))\b
|
||||||
|
comment: These are special constants.
|
||||||
|
captures:
|
||||||
|
0: constant.language.powershell
|
||||||
|
1: punctuation.definition.variable.powershell
|
||||||
|
- match: '(\$)(?i:(Error|ExecutionContext|Host|Home|PID|PsHome|PsVersionTable|ShellID))((?:\.(?:\p{L}|\d|_)+)*\b)?\b'
|
||||||
|
comment: These are the other built-in constants.
|
||||||
|
captures:
|
||||||
|
0: support.constant.variable.powershell
|
||||||
|
1: punctuation.definition.variable.powershell
|
||||||
|
3: variable.other.member.powershell
|
||||||
|
- match: '(\$)((?:[$^?])|(?i:_|Args|ConsoleFileName|Event|EventArgs|EventSubscriber|ForEach|Input|LastExitCode|Matches|MyInvocation|NestedPromptLevel|Profile|PSBoundParameters|PsCmdlet|PsCulture|PSDebugContext|PSItem|PSCommandPath|PSScriptRoot|PsUICulture|Pwd|Sender|SourceArgs|SourceEventArgs|StackTrace|Switch|This)\b)((?:\.(?:\p{L}|\d|_)+)*\b)?'
|
||||||
|
comment: Automatic variables are not constants, but they are read-only. In monokai (default) color schema support.variable doesn't have color, so we use constant.
|
||||||
|
captures:
|
||||||
|
0: support.variable.automatic.powershell
|
||||||
|
1: punctuation.definition.variable.powershell
|
||||||
|
3: variable.other.member.powershell
|
||||||
|
- match: '(\$)(?i:(ConfirmPreference|DebugPreference|ErrorActionPreference|ErrorView|FormatEnumerationLimit|InformationPreference|LogCommandHealthEvent|LogCommandLifecycleEvent|LogEngineHealthEvent|LogEngineLifecycleEvent|LogProviderHealthEvent|LogProviderLifecycleEvent|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount|MaximumHistoryCount|MaximumVariableCount|OFS|OutputEncoding|PSCulture|PSDebugContext|PSDefaultParameterValues|PSEmailServer|PSItem|PSModuleAutoLoadingPreference|PSModuleAutoloadingPreference|PSSenderInfo|PSSessionApplicationName|PSSessionConfigurationName|PSSessionOption|ProgressPreference|VerbosePreference|WarningPreference|WhatIfPreference))((?:\.(?:\p{L}|\d|_)+)*\b)?\b'
|
||||||
|
comment: Style preference variables as language variables so that they stand out.
|
||||||
|
captures:
|
||||||
|
0: variable.language.powershell
|
||||||
|
1: punctuation.definition.variable.powershell
|
||||||
|
3: variable.other.member.powershell
|
||||||
|
- match: '(?i:(\$|@)(global|local|private|script|using|workflow):((?:\p{L}|\d|_)+))((?:\.(?:\p{L}|\d|_)+)*\b)?'
|
||||||
|
captures:
|
||||||
|
0: variable.other.readwrite.powershell
|
||||||
|
1: punctuation.definition.variable.powershell
|
||||||
|
2: storage.modifier.scope.powershell
|
||||||
|
4: variable.other.member.powershell
|
||||||
|
- match: '(?i:(\$)(\{)(global|local|private|script|using|workflow):([^}]*[^}`])(\}))((?:\.(?:\p{L}|\d|_)+)*\b)?'
|
||||||
|
captures:
|
||||||
|
0: variable.other.readwrite.powershell
|
||||||
|
1: punctuation.definition.variable.powershell
|
||||||
|
2: punctuation.section.braces.begin.powershell
|
||||||
|
3: storage.modifier.scope.powershell
|
||||||
|
5: punctuation.section.braces.end.powershell
|
||||||
|
6: variable.other.member.powershell
|
||||||
|
- match: '(?i:(\$|@)((?:\p{L}|\d|_)+:)?((?:\p{L}|\d|_)+))((?:\.(?:\p{L}|\d|_)+)*\b)?'
|
||||||
|
captures:
|
||||||
|
0: variable.other.readwrite.powershell
|
||||||
|
1: punctuation.definition.variable.powershell
|
||||||
|
2: support.variable.drive.powershell
|
||||||
|
4: variable.other.member.powershell
|
||||||
|
- match: '(?i:(\$)(\{)((?:\p{L}|\d|_)+:)?([^}]*[^}`])(\}))((?:\.(?:\p{L}|\d|_)+)*\b)?'
|
||||||
|
captures:
|
||||||
|
0: variable.other.readwrite.powershell
|
||||||
|
1: punctuation.definition.variable.powershell
|
||||||
|
2: punctuation.section.braces.begin.powershell
|
||||||
|
3: support.variable.drive.powershell
|
||||||
|
5: punctuation.section.braces.end.powershell
|
||||||
|
6: variable.other.member.powershell
|
||||||
|
variableNoProperty:
|
||||||
|
- match: (\$)(?i:(False|Null|True))\b
|
||||||
|
comment: These are special constants.
|
||||||
|
captures:
|
||||||
|
0: constant.language.powershell
|
||||||
|
1: punctuation.definition.variable.powershell
|
||||||
|
- match: (\$)(?i:(Error|ExecutionContext|Host|Home|PID|PsHome|PsVersionTable|ShellID))\b
|
||||||
|
comment: These are the other built-in constants.
|
||||||
|
captures:
|
||||||
|
0: support.constant.variable.powershell
|
||||||
|
1: punctuation.definition.variable.powershell
|
||||||
|
3: variable.other.member.powershell
|
||||||
|
- match: '(\$)((?:[$^?])|(?i:_|Args|ConsoleFileName|Event|EventArgs|EventSubscriber|ForEach|Input|LastExitCode|Matches|MyInvocation|NestedPromptLevel|Profile|PSBoundParameters|PsCmdlet|PsCulture|PSDebugContext|PSItem|PSCommandPath|PSScriptRoot|PsUICulture|Pwd|Sender|SourceArgs|SourceEventArgs|StackTrace|Switch|This)\b)'
|
||||||
|
comment: Automatic variables are not constants, but they are read-only...
|
||||||
|
captures:
|
||||||
|
0: support.variable.automatic.powershell
|
||||||
|
1: punctuation.definition.variable.powershell
|
||||||
|
3: variable.other.member.powershell
|
||||||
|
- match: (\$)(?i:(ConfirmPreference|DebugPreference|ErrorActionPreference|ErrorView|FormatEnumerationLimit|InformationPreference|LogCommandHealthEvent|LogCommandLifecycleEvent|LogEngineHealthEvent|LogEngineLifecycleEvent|LogProviderHealthEvent|LogProviderLifecycleEvent|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount|MaximumHistoryCount|MaximumVariableCount|OFS|OutputEncoding|PSCulture|PSDebugContext|PSDefaultParameterValues|PSEmailServer|PSItem|PSModuleAutoLoadingPreference|PSModuleAutoloadingPreference|PSSenderInfo|PSSessionApplicationName|PSSessionConfigurationName|PSSessionOption|ProgressPreference|VerbosePreference|WarningPreference|WhatIfPreference))\b
|
||||||
|
comment: Style preference variables as language variables so that they stand out.
|
||||||
|
captures:
|
||||||
|
0: variable.language.powershell
|
||||||
|
1: punctuation.definition.variable.powershell
|
||||||
|
3: variable.other.member.powershell
|
||||||
|
- match: '(?i:(\$)(global|local|private|script|using|workflow):((?:\p{L}|\d|_)+))'
|
||||||
|
captures:
|
||||||
|
0: variable.other.readwrite.powershell
|
||||||
|
1: punctuation.definition.variable.powershell
|
||||||
|
2: storage.modifier.scope.powershell
|
||||||
|
4: variable.other.member.powershell
|
||||||
|
- match: '(?i:(\$)(\{)(global|local|private|script|using|workflow):([^}]*[^}`])(\}))'
|
||||||
|
captures:
|
||||||
|
0: variable.other.readwrite.powershell
|
||||||
|
1: punctuation.definition.variable.powershell
|
||||||
|
2: storage.modifier.scope.powershell
|
||||||
|
4: keyword.other.powershell
|
||||||
|
5: variable.other.member.powershell
|
||||||
|
- match: '(?i:(\$)((?:\p{L}|\d|_)+:)?((?:\p{L}|\d|_)+))'
|
||||||
|
captures:
|
||||||
|
0: variable.other.readwrite.powershell
|
||||||
|
1: punctuation.definition.variable.powershell
|
||||||
|
2: support.variable.drive.powershell
|
||||||
|
4: variable.other.member.powershell
|
||||||
|
- match: '(?i:(\$)(\{)((?:\p{L}|\d|_)+:)?([^}]*[^}`])(\}))'
|
||||||
|
captures:
|
||||||
|
0: variable.other.readwrite.powershell
|
||||||
|
1: punctuation.definition.variable.powershell
|
||||||
|
2: punctuation.section.braces.begin
|
||||||
|
3: support.variable.drive.powershell
|
||||||
|
5: punctuation.section.braces.end
|
||||||
+1
Submodule assets/syntaxes/02_Extra/Protobuf added at 726e21d74d
+1
Submodule assets/syntaxes/02_Extra/Puppet added at 2a224343d2
+1
Submodule assets/syntaxes/02_Extra/PureScript added at 5acebc1850
+1
Submodule assets/syntaxes/02_Extra/QML added at e3e058a21f
+103
@@ -0,0 +1,103 @@
|
|||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
# http://www.sublimetext.com/docs/3/syntax.html
|
||||||
|
name: QML
|
||||||
|
file_extensions:
|
||||||
|
- qml
|
||||||
|
- qmlproject
|
||||||
|
scope: source.qml
|
||||||
|
contexts:
|
||||||
|
main:
|
||||||
|
- match: /\*(?!/)
|
||||||
|
comment: Block comment.
|
||||||
|
push:
|
||||||
|
- meta_scope: comment.block.documentation.qml
|
||||||
|
- match: \*/
|
||||||
|
pop: true
|
||||||
|
- match: //.*$
|
||||||
|
comment: Line comment.
|
||||||
|
scope: comment.line.double-slash.qml
|
||||||
|
- match: \b(import)\s+
|
||||||
|
comment: import statement.
|
||||||
|
captures:
|
||||||
|
1: keyword.other.import.qml
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.import.qml
|
||||||
|
- match: $
|
||||||
|
pop: true
|
||||||
|
- match: '([\w\d\.]+)\s+(\d+\.\d+)(?:\s+(as)\s+([A-Z][\w\d]*))?'
|
||||||
|
comment: "import Namespace VersionMajor.VersionMinor [as SingletonTypeIdentifier]"
|
||||||
|
scope: meta.import.namespace.qml
|
||||||
|
captures:
|
||||||
|
1: entity.name.class.qml
|
||||||
|
2: constant.numeric.qml
|
||||||
|
3: keyword.other.import.qml
|
||||||
|
4: entity.name.class.qml
|
||||||
|
- match: '(\"[^\"]+\")(?:\s+(as)\s+([A-Z][\w\d]*))?'
|
||||||
|
comment: "import <string> [as Script]"
|
||||||
|
scope: meta.import.dirjs.qml
|
||||||
|
captures:
|
||||||
|
1: string.quoted.double.qml
|
||||||
|
2: keyword.other.import.qml
|
||||||
|
3: entity.name.class.qml
|
||||||
|
- match: '\b[A-Z]\w*\b'
|
||||||
|
comment: Capitalized word (class or enum).
|
||||||
|
scope: support.class.qml
|
||||||
|
- match: '(((^|\{)\s*)|\b)on[A-Z]\w*\b'
|
||||||
|
comment: onSomething - handler.
|
||||||
|
scope: support.class.qml
|
||||||
|
- match: '(?:^|\{)\s*(id)\s*\:\s*([^;\s]+)\b'
|
||||||
|
comment: "id: <something>"
|
||||||
|
scope: meta.id.qml
|
||||||
|
captures:
|
||||||
|
1: keyword.other.qml
|
||||||
|
2: storage.modifier.qml
|
||||||
|
- match: '^\s*(?:(default|readonly)\s+)?(property)\s+(?:(alias)|([\w\<\>]+))\s+(\w+)'
|
||||||
|
comment: property definition.
|
||||||
|
scope: meta.propertydef.qml
|
||||||
|
captures:
|
||||||
|
1: keyword.other.qml
|
||||||
|
2: keyword.other.qml
|
||||||
|
3: keyword.other.qml
|
||||||
|
4: storage.type.qml
|
||||||
|
5: entity.other.attribute-name.qml
|
||||||
|
- match: \b(signal)\s+(\w+)\s*
|
||||||
|
comment: "signal <signalName>[([<type> <parameter>[, ...]])]"
|
||||||
|
captures:
|
||||||
|
1: keyword.other.qml
|
||||||
|
2: support.function.qml
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.signal.qml
|
||||||
|
- match: ;|(?=/)|$
|
||||||
|
pop: true
|
||||||
|
- match: (\w+)\s+(\w+)
|
||||||
|
scope: meta.signal.parameters.qml
|
||||||
|
captures:
|
||||||
|
1: storage.type.qml
|
||||||
|
2: variable.parameter.qml
|
||||||
|
- match: (?:\b|\s+)(?:(true|false|null|undefined)|(var|void)|(on|as|enum|connect|break|case|catch|continue|debugger|default|delete|do|else|finally|for|if|in|instanceof|new|return|switch|this|throw|try|typeof|while|with))\b
|
||||||
|
comment: js keywords.
|
||||||
|
scope: meta.keyword.qml
|
||||||
|
captures:
|
||||||
|
1: constant.language.qml
|
||||||
|
2: storage.type.qml
|
||||||
|
3: keyword.control.qml
|
||||||
|
- match: '\b(function)\s+([\w_]+)\s*(?=\()'
|
||||||
|
comment: function definition.
|
||||||
|
scope: meta.function.qml
|
||||||
|
captures:
|
||||||
|
1: storage.type.qml
|
||||||
|
2: entity.name.function.untitled
|
||||||
|
- match: '\b[\w_]+\s*(?=\()'
|
||||||
|
comment: function call.
|
||||||
|
scope: support.function.qml
|
||||||
|
- match: '(?:^|\{|;)\s*[a-z][\w\.]*\s*(?=\:)'
|
||||||
|
comment: "property (property: <something>)."
|
||||||
|
scope: entity.other.attribute-name.qml
|
||||||
|
- match: (?<=\.)\b\w*
|
||||||
|
comment: property of the variable (name.property).
|
||||||
|
scope: entity.other.attribute-name.qml
|
||||||
|
- match: '\b([a-z_]\w*)\b'
|
||||||
|
comment: All non colored words are assumed to be variables.
|
||||||
|
scope: variable.parameter
|
||||||
|
- include: scope:source.js
|
||||||
+97
@@ -0,0 +1,97 @@
|
|||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
# http://www.sublimetext.com/docs/3/syntax.html
|
||||||
|
name: Rego
|
||||||
|
file_extensions:
|
||||||
|
- rego
|
||||||
|
scope: source.rego
|
||||||
|
contexts:
|
||||||
|
main:
|
||||||
|
- include: comment
|
||||||
|
- include: keyword
|
||||||
|
- include: operator
|
||||||
|
- include: head
|
||||||
|
- include: term
|
||||||
|
comment:
|
||||||
|
- match: (#).*$\n?
|
||||||
|
scope: comment.line.number-sign.rego
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.comment.rego
|
||||||
|
call:
|
||||||
|
- match: '([a-zA-Z_][a-zA-Z0-9_]*)\('
|
||||||
|
scope: meta.function-call.rego
|
||||||
|
captures:
|
||||||
|
1: support.function.any-method.rego
|
||||||
|
constant:
|
||||||
|
- match: \b(?:true|false|null)\b
|
||||||
|
scope: constant.language.rego
|
||||||
|
head:
|
||||||
|
- match: "^([[:alpha:]_][[:alnum:]_]*)"
|
||||||
|
captures:
|
||||||
|
1: entity.name.function.declaration
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.function.rego
|
||||||
|
- match: '(=|{|\n)'
|
||||||
|
pop: true
|
||||||
|
- include: term
|
||||||
|
keyword:
|
||||||
|
- match: (^|\s+)(?:(default|not|package|import|as|with|else|some))\s+
|
||||||
|
scope: keyword.other.rego
|
||||||
|
number:
|
||||||
|
- match: |-
|
||||||
|
(?x: # turn on extended mode
|
||||||
|
-? # an optional minus
|
||||||
|
(?:
|
||||||
|
0 # a zero
|
||||||
|
| # ...or...
|
||||||
|
[1-9] # a 1-9 character
|
||||||
|
\d* # followed by zero or more digits
|
||||||
|
)
|
||||||
|
(?:
|
||||||
|
(?:
|
||||||
|
\. # a period
|
||||||
|
\d+ # followed by one or more digits
|
||||||
|
)?
|
||||||
|
(?:
|
||||||
|
[eE] # an e character
|
||||||
|
[+-]? # followed by an option +/-
|
||||||
|
\d+ # followed by one or more digits
|
||||||
|
)? # make exponent optional
|
||||||
|
)? # make decimal portion optional
|
||||||
|
)
|
||||||
|
scope: constant.numeric.rego
|
||||||
|
operator:
|
||||||
|
- match: \=|\!\=|>|<|<\=|>\=|\+|-|\*|%|/|\||&|:\=
|
||||||
|
scope: keyword.operator.comparison.rego
|
||||||
|
string:
|
||||||
|
- match: '"'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.begin.rego
|
||||||
|
push:
|
||||||
|
- meta_scope: string.quoted.double.rego
|
||||||
|
- match: '"'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.string.end.rego
|
||||||
|
pop: true
|
||||||
|
- match: |-
|
||||||
|
(?x: # turn on extended mode
|
||||||
|
\\ # a literal backslash
|
||||||
|
(?: # ...followed by...
|
||||||
|
["\\/bfnrt] # one of these characters
|
||||||
|
| # ...or...
|
||||||
|
u # a u
|
||||||
|
[0-9a-fA-F]{4} # and four hex digits
|
||||||
|
)
|
||||||
|
)
|
||||||
|
scope: constant.character.escape.rego
|
||||||
|
- match: \\.
|
||||||
|
scope: invalid.illegal.unrecognized-string-escape.rego
|
||||||
|
term:
|
||||||
|
- include: constant
|
||||||
|
- include: string
|
||||||
|
- include: number
|
||||||
|
- include: call
|
||||||
|
- include: variable
|
||||||
|
variable:
|
||||||
|
- match: '\b[[:alpha:]_][[:alnum:]_]*\b'
|
||||||
|
scope: meta.identifier.rego
|
||||||
+21
@@ -0,0 +1,21 @@
|
|||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
# http://www.sublimetext.com/docs/3/syntax.html
|
||||||
|
name: resolv
|
||||||
|
file_extensions:
|
||||||
|
- resolv.conf
|
||||||
|
scope: source.resolv
|
||||||
|
|
||||||
|
contexts:
|
||||||
|
main:
|
||||||
|
- scope: comment.line.number-sign
|
||||||
|
match: \#.*
|
||||||
|
comment: comment
|
||||||
|
|
||||||
|
- comment: configuration
|
||||||
|
match: "(nameserver|domain|search|sortlist|options)"
|
||||||
|
scope: keyword.control
|
||||||
|
|
||||||
|
- comment: options
|
||||||
|
match: "(debug|ndots|timeout|attempts|rotate|no-check-names|inet6|ip6-bytestring|ip6-dotint|no-ip6-dotint|edns0|single-request|single-request-reopen|no-tld-query|use-vc|no-reload)"
|
||||||
|
scope: entity.name
|
||||||
+1
Submodule assets/syntaxes/02_Extra/Robot added at fcd3323b56
+57
@@ -0,0 +1,57 @@
|
|||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
# http://www.sublimetext.com/docs/3/syntax.html
|
||||||
|
name: Robot Framework syntax highlighting.
|
||||||
|
file_extensions:
|
||||||
|
- robot
|
||||||
|
scope: source.robot
|
||||||
|
contexts:
|
||||||
|
main:
|
||||||
|
- match: '\$\{(\d+|\d+\.\d*|0[bB][01]+|0[oO][0-7]+|0[xX][0-9a-fA-F]+)\}'
|
||||||
|
comment: "Robot Framework numbers, like ${1} or ${12.3}"
|
||||||
|
scope: constant.numeric.robot
|
||||||
|
- match: '(?i)(%\{[\w|\s]+\})'
|
||||||
|
comment: "Robot Framework environment variable, like %{USER}"
|
||||||
|
scope: variable.parameter.robot
|
||||||
|
- match: '((?<!\\)|(?<=\\\\))[$&]{'
|
||||||
|
comment: Robot Framework scalar and dictionary variables
|
||||||
|
push:
|
||||||
|
- meta_scope: entity.name.class
|
||||||
|
- match: '\}'
|
||||||
|
pop: true
|
||||||
|
- match: '((?<!\\)(@{)|(?<=\\\\)(@{))'
|
||||||
|
comment: Robot Framework list variables
|
||||||
|
push:
|
||||||
|
- meta_scope: entity.name.class
|
||||||
|
- match: '(}\[.+])|(})'
|
||||||
|
pop: true
|
||||||
|
- match: '(?i)^(\|\s*)?(\*{1,3} ?)(settings?|variables?|keywords?|test cases?)( ?\*{1,3})?(\s*\|)?'
|
||||||
|
comment: Robot Framework data tables
|
||||||
|
scope: string.robot.header
|
||||||
|
- match: '(?i)(^\|\s*)?\[?Documentation\]?\s+'
|
||||||
|
comment: Test case, keyword and settings table documentation
|
||||||
|
push:
|
||||||
|
- meta_scope: comment
|
||||||
|
- match: ^(?!\s*+\.\.\.)
|
||||||
|
pop: true
|
||||||
|
- match: '(^| {2,}|\t|\\| {1,})(?<!\\\\)#'
|
||||||
|
comment: Comment character
|
||||||
|
push:
|
||||||
|
- meta_scope: comment
|
||||||
|
- match: $
|
||||||
|
pop: true
|
||||||
|
- match: '(?i)\s+\[(Tags|Setup|Teardown|Template|Timeout|Arguments|Return)\]'
|
||||||
|
comment: Tests case and keyword settings
|
||||||
|
scope: storage.type
|
||||||
|
- match: (?i)^(\|\s*)?(Library|Resource|Test Timeout|Test Template|Test Teardown|Test Setup|Default Tags|Force Tags|Metadata|Variables|Suite Setup|Suite Teardown)(?:( )|( \| ))
|
||||||
|
comment: Settings table settings, like Library
|
||||||
|
scope: constant.language
|
||||||
|
- match: '^(\|\s+)?(?!^\.{3})(?![\|$&])\S+'
|
||||||
|
comment: Keywords and test cases
|
||||||
|
push:
|
||||||
|
- meta_scope: keyword.control.robot
|
||||||
|
- match: '($|\||\s{2,})'
|
||||||
|
pop: true
|
||||||
|
- match: (?i)^\s+(Given|When|and|but|Then)
|
||||||
|
comment: BDD keywords
|
||||||
|
scope: string.robot.bdd
|
||||||
+1
Submodule assets/syntaxes/02_Extra/SCSS_Sass added at b98a3f3ccf
+1
Submodule assets/syntaxes/02_Extra/SLS added at f8a8cf90b1
+1
Submodule assets/syntaxes/02_Extra/Strace added at 3ec51e0bca
+1
Submodule assets/syntaxes/02_Extra/Stylus added at 30908e3b57
+711
@@ -0,0 +1,711 @@
|
|||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
# http://www.sublimetext.com/docs/3/syntax.html
|
||||||
|
name: Stylus
|
||||||
|
file_extensions:
|
||||||
|
- styl
|
||||||
|
- stylus
|
||||||
|
scope: source.stylus
|
||||||
|
contexts:
|
||||||
|
main:
|
||||||
|
- include: comments
|
||||||
|
- match: '^\s*(@(?:import|charset|css|font-face|(?:-webkit-)?keyframes)(?:\s+([\w-]+))?)\b'
|
||||||
|
captures:
|
||||||
|
1: keyword.control.at-rule.other.stylus
|
||||||
|
2: variable.other.animation-name.stylus
|
||||||
|
push:
|
||||||
|
- match: '$|;|(?=\{)'
|
||||||
|
pop: true
|
||||||
|
- include: string-quoted
|
||||||
|
- match: ^\s*(@media)\s*
|
||||||
|
captures:
|
||||||
|
1: keyword.control.at-rule.media.stylus
|
||||||
|
push:
|
||||||
|
- match: '$|(?=\{)'
|
||||||
|
pop: true
|
||||||
|
- include: media-query
|
||||||
|
- match: |-
|
||||||
|
(?x)
|
||||||
|
(?<=^|;|})
|
||||||
|
\s*
|
||||||
|
(?=
|
||||||
|
[\[\]'".\w$-]+
|
||||||
|
\s*
|
||||||
|
([?:]?=)
|
||||||
|
(?![^\[]*\])
|
||||||
|
)
|
||||||
|
push:
|
||||||
|
- match: $|;
|
||||||
|
pop: true
|
||||||
|
- include: expression
|
||||||
|
- include: iteration
|
||||||
|
- include: conditionals
|
||||||
|
- include: return
|
||||||
|
- match: |-
|
||||||
|
(?x) # multi-line regex definition mode
|
||||||
|
|
||||||
|
^(\s*) # starts at the beginning of line
|
||||||
|
([\w$-]+) # identifier (name)
|
||||||
|
(\() # start of argument list
|
||||||
|
(?=
|
||||||
|
.*?
|
||||||
|
\)\s*\{ # we see a curly brace afterwards
|
||||||
|
) # which means this is a function definition
|
||||||
|
captures:
|
||||||
|
2: entity.name.function.stylus
|
||||||
|
3: punctuation.definition.parameters.start.stylus
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.function-call.stylus
|
||||||
|
- match: (\))
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.parameters.end.stylus
|
||||||
|
pop: true
|
||||||
|
- include: expression
|
||||||
|
- match: |-
|
||||||
|
(?x) # multi-line regex definition mode
|
||||||
|
(
|
||||||
|
|
||||||
|
(^|;) # starts at the beginning of line or at a ;
|
||||||
|
\s*
|
||||||
|
(\+?\s* # for block mixins
|
||||||
|
[\w$-]+) # identifier (name)
|
||||||
|
(\() # start of argument list
|
||||||
|
(?=
|
||||||
|
.*?
|
||||||
|
\)\s*;?\s* # if there are only spaces and semicolons
|
||||||
|
$|; # then this a
|
||||||
|
)
|
||||||
|
)
|
||||||
|
captures:
|
||||||
|
3: entity.other.attribute-name.mixin.stylus
|
||||||
|
4: punctuation.definition.parameters.start.stylus
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.function-call.stylus
|
||||||
|
- match: (\))
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.parameters.end.stylus
|
||||||
|
pop: true
|
||||||
|
- include: expression
|
||||||
|
- match: |-
|
||||||
|
(?x) # multi-line regex definition mode
|
||||||
|
(^|(?<=\*/|\}))\s*
|
||||||
|
(?=
|
||||||
|
font(?!
|
||||||
|
\s*:\s
|
||||||
|
|
|
||||||
|
-
|
||||||
|
|
|
||||||
|
.*?
|
||||||
|
(?:
|
||||||
|
\/|normal|bold|light(er?)|serif|sans|monospace|
|
||||||
|
\b\d+(?:\b|px|r?em|%)|
|
||||||
|
var\s*\(|
|
||||||
|
['"][^\]]*$
|
||||||
|
)
|
||||||
|
) | # we need to distinguish between tag and property `cursor`
|
||||||
|
cursor(?!
|
||||||
|
\s*[:;]\s
|
||||||
|
|
|
||||||
|
-
|
||||||
|
|
|
||||||
|
.*?
|
||||||
|
(?:
|
||||||
|
(?:url\s*\()|
|
||||||
|
(?:-moz-|-webkit-|-ms-)?
|
||||||
|
(?:auto|default|none|context-menu|help|pointer|progress|
|
||||||
|
wait|cell|crosshair|text|vertical-text|alias|copy|
|
||||||
|
move|no-drop|not-allowed|e-resize|n-resize|ne-resize|
|
||||||
|
nw-resize|s-resize|se-resize|sw-resize|w-resize|
|
||||||
|
ew-resize|ns-resize|nesw-resize|nwse-resize|col-resize|
|
||||||
|
row-resize|all-scroll|zoom-in|zoom-out|grab|grabbing
|
||||||
|
normal|bold|light(er?)|serif|sans|monospace)
|
||||||
|
)
|
||||||
|
) | (
|
||||||
|
(
|
||||||
|
altGlyph|altGlyphDef|altGlyphItem|animate|animateColor|
|
||||||
|
animateMotion|animateTransform|circle|clipPath|color-profile|
|
||||||
|
defs|desc|ellipse|feBlend|feColorMatrix|
|
||||||
|
feComponentTransfer|feComposite|feConvolveMatrix|
|
||||||
|
feDiffuseLighting|feDisplacementMap|feDistantLight|feFlood|
|
||||||
|
feFuncA|feFuncB|feFuncG|feFuncR|feGaussianBlur|feImage|feMerge|
|
||||||
|
feMergeNode|feMorphology|feOffset|fePointLight|
|
||||||
|
feSpecularLighting|feSpotLight|feTile|feTurbulence|filter|
|
||||||
|
font-face|font-face-format|font-face-name|font-face-src|
|
||||||
|
font-face-uri|foreignObject|g|glyph|glyphRef|hkern|image|line|
|
||||||
|
linearGradient|marker|mask|metadata|missing-glyph|mpath|path|
|
||||||
|
pattern|polygon|polyline|radialGradient|rect|set|stop|svg|
|
||||||
|
switch|symbol|text|textPath|tref|tspan|use|view|vkern|
|
||||||
|
a|abbr|acronym|address|applet|area|article|aside|audio|b|base|
|
||||||
|
basefont|bdi|bdo|bgsound|big|blink|blockquote|body|br|button|
|
||||||
|
canvas|caption|center|cite|code|col|colgroup|data|
|
||||||
|
datalist|dd|decorator|del|details|dfn|dir|div|dl|dt|element|
|
||||||
|
em|embed|fieldset|figcaption|figure|footer|form|frame|
|
||||||
|
frameset|h1|h2|h3|h4|h5|h6|head|header|hgroup|hr|html|i|iframe|
|
||||||
|
img|input|ins|isindex|kbd|keygen|label|legend|li|link|listing|
|
||||||
|
main|map|mark|marquee|menu|menuitem|meta|meter|nav|nobr|
|
||||||
|
noframes|noscript|object|ol|optgroup|option|output|p|param|
|
||||||
|
plaintext|pre|progress|q|rp|rt|ruby|s|samp|script|section|
|
||||||
|
select|shadow|small|source|spacer|span|strike|strong|style|
|
||||||
|
sub|summary|sup|table|tbody|td|template|textarea|tfoot|th|
|
||||||
|
thead|time|title|tr|track|tt|u|ul|var|video|wbr|xmp)
|
||||||
|
|
||||||
|
\s*([\s,.#\[]|:[^\s]|(?=\{|$))
|
||||||
|
|
||||||
|
) | (
|
||||||
|
[:~>\[*\/] # symbols but they are valid for selector
|
||||||
|
|
||||||
|
) | (
|
||||||
|
|
||||||
|
\+\s*[\w$-]+\b\s* # are an identifier starting with $
|
||||||
|
(?!\() # and they can't have anything besides
|
||||||
|
|
||||||
|
) | ( # for animtions
|
||||||
|
|
||||||
|
\d+(\.\d+)?%|(from|to)\b
|
||||||
|
|
||||||
|
) | ( # Placeholder selectors
|
||||||
|
|
||||||
|
\$[\w$-]+\b\s* # are an identifier starting with $
|
||||||
|
(?=$|\{) # and they can't have anything besides
|
||||||
|
|
||||||
|
) | ( # CSS class
|
||||||
|
|
||||||
|
\.[a-zA-Z0-9_-]+
|
||||||
|
|
||||||
|
) | ( # CSS id
|
||||||
|
|
||||||
|
\#[a-zA-Z0-9_-]+
|
||||||
|
|
||||||
|
) | ( # Reference to parent
|
||||||
|
|
||||||
|
([\w\d_-]+)? # matching any word right before &
|
||||||
|
(&) # & itself, escaped because of plist
|
||||||
|
([\w\d_-]+)? # matching any word right after &
|
||||||
|
)
|
||||||
|
)
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.selector.stylus
|
||||||
|
- match: |-
|
||||||
|
|
||||||
|
|$|(?=\{\s*\}.*$)|(?=\{.*?[:;])|(?=\{)(?!.+\}.*$)
|
||||||
|
pop: true
|
||||||
|
- include: comma
|
||||||
|
- match: \d+(\.\d+)?%|from|to
|
||||||
|
scope: entity.other.animation-keyframe.stylus
|
||||||
|
- include: selector-components
|
||||||
|
- match: .
|
||||||
|
scope: entity.other.attribute-name.stylus
|
||||||
|
- match: |-
|
||||||
|
(?x) # multi-line regex definition mode
|
||||||
|
(?<=^|;|{)\s* # starts after begining of line, '{' or ';''
|
||||||
|
(?= # lookahead for
|
||||||
|
(
|
||||||
|
[a-zA-Z0-9_-] # then a letter
|
||||||
|
| # or
|
||||||
|
(\{(.*?)\}) # interpolation
|
||||||
|
| # or
|
||||||
|
(/\*.*?\*/) # comment
|
||||||
|
)+
|
||||||
|
|
||||||
|
\s*[:\s]\s* # value is separted by colon or space
|
||||||
|
|
||||||
|
(?!(\s*\{)) # if there are only spaces afterwards
|
||||||
|
|
||||||
|
(?!
|
||||||
|
[^}]*? # checking for an unclosed curly braces on this
|
||||||
|
\{ # line because if one exists it means that
|
||||||
|
[^}]* # this is a selector and not a property
|
||||||
|
($|\})
|
||||||
|
)
|
||||||
|
)
|
||||||
|
push:
|
||||||
|
- match: '(?=\}|;)|(?<!,)\s*\n'
|
||||||
|
pop: true
|
||||||
|
- include: comments
|
||||||
|
- include: interpolation
|
||||||
|
- match: '(?<!^|;|{)\s*(?:(:)|\s)'
|
||||||
|
captures:
|
||||||
|
1: punctuation.separator.key-value.stylus
|
||||||
|
push:
|
||||||
|
- match: '(;)|(?=\})|(?=(?<!\,)\s*\n)'
|
||||||
|
captures:
|
||||||
|
1: punctuation.terminator.rule.stylus
|
||||||
|
pop: true
|
||||||
|
- include: comments
|
||||||
|
- include: expression
|
||||||
|
- match: "-(moz|o|ms|webkit|khtml)-"
|
||||||
|
scope: support.type.vendor-prefix.stylus
|
||||||
|
- match: .
|
||||||
|
scope: meta.property-name.stylus support.type.property-name.stylus
|
||||||
|
- match: '@extends?\s'
|
||||||
|
captures:
|
||||||
|
0: keyword.language.stylus
|
||||||
|
push:
|
||||||
|
- match: (?=$|;)
|
||||||
|
pop: true
|
||||||
|
- include: selector-components
|
||||||
|
- include: string-quoted
|
||||||
|
- include: escape
|
||||||
|
- include: language-constants
|
||||||
|
- include: language-operators
|
||||||
|
- include: language-keywords
|
||||||
|
- include: property-reference
|
||||||
|
- include: function-call
|
||||||
|
- match: '\{'
|
||||||
|
scope: punctuation.section.start.stylus
|
||||||
|
- match: '\}'
|
||||||
|
scope: punctuation.section.end.stylus
|
||||||
|
attribute-selector:
|
||||||
|
- match: '\[(?=[^\]]*\])'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.entity.start.stylus
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.attribute-selector.stylus
|
||||||
|
- match: '\]'
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.entity.end.stylus
|
||||||
|
pop: true
|
||||||
|
- match: '(?<=\[)|(?<=\{)'
|
||||||
|
push:
|
||||||
|
- match: '(?=[|~=\]\s])'
|
||||||
|
pop: true
|
||||||
|
- include: interpolation
|
||||||
|
- match: .
|
||||||
|
captures:
|
||||||
|
0: entity.other.attribute-name.stylus
|
||||||
|
- include: interpolation
|
||||||
|
- match: "([|~]?=)"
|
||||||
|
captures:
|
||||||
|
1: keyword.operator.stylus
|
||||||
|
- include: string-quoted
|
||||||
|
- match: .
|
||||||
|
captures:
|
||||||
|
0: string.unquoted.stylus
|
||||||
|
color-values:
|
||||||
|
- match: \b(aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow)\b
|
||||||
|
scope: constant.color.w3c-standard-color-name.stylus
|
||||||
|
- match: (hsla?|rgba?)\s*(\()
|
||||||
|
captures:
|
||||||
|
1: keyword.language.function.misc.stylus
|
||||||
|
2: punctuation.definition.parameters.start.stylus
|
||||||
|
push:
|
||||||
|
- match: \)
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.parameters.end.stylus
|
||||||
|
pop: true
|
||||||
|
- match: |-
|
||||||
|
(?x) # multi-line regex definition mode
|
||||||
|
\b
|
||||||
|
(?:0*((?:1?[0-9]{1,2})|(?:2(?:[0-4][0-9]|5[0-5])))\s*(,)\s*)
|
||||||
|
(?:0*((?:1?[0-9]{1,2})|(?:2(?:[0-4][0-9]|5[0-5])))\s*(,)\s*)
|
||||||
|
(?:0*((?:1?[0-9]{1,2})|(?:2(?:[0-4][0-9]|5[0-5])))\b)
|
||||||
|
captures:
|
||||||
|
1: constant.other.color.rgb-value.stylus constant.other.color.rgb-value.red.stylus
|
||||||
|
2: punctuation.delimiter.comma.stylus
|
||||||
|
3: constant.other.color.rgb-value.stylus constant.other.color.rgb-value.green.stylus
|
||||||
|
4: punctuation.delimiter.comma.stylus
|
||||||
|
5: constant.other.color.rgb-value.stylus constant.other.color.rgb-value.blue.stylus
|
||||||
|
- match: |-
|
||||||
|
(?x) # multi-line regex definition mode
|
||||||
|
\b
|
||||||
|
((?:[0-9]{1,2}|100)%)(,) # red
|
||||||
|
\s*
|
||||||
|
((?:[0-9]{1,2}|100)%)(,) # green
|
||||||
|
\s*
|
||||||
|
((?:[0-9]{1,2}|100)%) # blue
|
||||||
|
captures:
|
||||||
|
1: constant.other.color.rgb-value.stylus constant.other.color.rgb-value.red.stylus
|
||||||
|
2: punctuation.delimiter.comma.stylus
|
||||||
|
3: constant.other.color.rgb-value.stylus constant.other.color.rgb-value.green.stylus
|
||||||
|
4: punctuation.delimiter.comma.stylus
|
||||||
|
5: constant.other.color.rgb-value.stylus constant.other.color.rgb-value.blue.stylus
|
||||||
|
- match: |-
|
||||||
|
(?x) # multi-line regex definition mode
|
||||||
|
(?:\s*(,)\s*((0?\.[0-9]+)|[0-1]))?
|
||||||
|
captures:
|
||||||
|
1: punctuation.delimiter.comma.stylus
|
||||||
|
2: constant.other.color.rgb-value.stylus constant.other.color.rgb-value.alpha.stylus
|
||||||
|
- include: numeric-values
|
||||||
|
- include: numeric-values
|
||||||
|
comma:
|
||||||
|
- match: \s*,\s*
|
||||||
|
scope: punctuation.delimiter.comma.stylus
|
||||||
|
comments:
|
||||||
|
- include: single-line-comment
|
||||||
|
- match: \/\*
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.comment.stylus
|
||||||
|
push:
|
||||||
|
- meta_scope: comment.block.stylus
|
||||||
|
- match: \*\/
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.comment.stylus
|
||||||
|
pop: true
|
||||||
|
conditionals:
|
||||||
|
- match: '(^\s*|\s+)(if|unless|else)(?=[\s({]|$)\s*'
|
||||||
|
captures:
|
||||||
|
2: keyword.control.stylus
|
||||||
|
push:
|
||||||
|
- match: '(?=$|\{)'
|
||||||
|
pop: true
|
||||||
|
- include: expression
|
||||||
|
escape:
|
||||||
|
- match: \\.
|
||||||
|
scope: constant.character.escape.stylus
|
||||||
|
expression:
|
||||||
|
- include: single-line-comment
|
||||||
|
- include: comma
|
||||||
|
- include: iteration
|
||||||
|
- include: conditionals
|
||||||
|
- include: language-operators
|
||||||
|
- include: language-keywords
|
||||||
|
- include: hash-definition
|
||||||
|
- include: color-values
|
||||||
|
- include: url
|
||||||
|
- include: function-call
|
||||||
|
- include: string-quoted
|
||||||
|
- include: escape
|
||||||
|
- include: hash-access
|
||||||
|
- include: language-constants
|
||||||
|
- include: language-property-value-constants
|
||||||
|
- include: property-reference
|
||||||
|
- include: variable
|
||||||
|
function-call:
|
||||||
|
- match: '([\w$-]+)(\()'
|
||||||
|
captures:
|
||||||
|
1: entity.function-name.stylus
|
||||||
|
2: punctuation.definition.parameters.start.stylus
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.function-call.stylus
|
||||||
|
- match: (\))
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.parameters.end.stylus
|
||||||
|
pop: true
|
||||||
|
- include: expression
|
||||||
|
hash-access:
|
||||||
|
- match: '(?=[\w$-]+(?:\.|\[[^\]=]*\]))'
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.hash-access.stylus
|
||||||
|
- match: '(?=[^''''""\[\]\w.$-]|\s|$)'
|
||||||
|
pop: true
|
||||||
|
- match: \.
|
||||||
|
scope: punctuation.delimiter.hash.stylus
|
||||||
|
- match: '\['
|
||||||
|
scope: punctuation.definition.entity.start.stylus
|
||||||
|
- match: '\]'
|
||||||
|
scope: punctuation.definition.entity.end.stylus
|
||||||
|
- include: string-quoted
|
||||||
|
- include: variable
|
||||||
|
hash-definition:
|
||||||
|
- match: '\{'
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.embedded.start.stylus
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.hash.stylus
|
||||||
|
- match: '\}'
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.embedded.end.stylus
|
||||||
|
pop: true
|
||||||
|
- include: single-line-comment
|
||||||
|
- match: |-
|
||||||
|
(?x)
|
||||||
|
(?:
|
||||||
|
([\w$-]+)
|
||||||
|
|
|
||||||
|
('[^']*')
|
||||||
|
|
|
||||||
|
("[^"]*")
|
||||||
|
)
|
||||||
|
\s*
|
||||||
|
(:)
|
||||||
|
\s*
|
||||||
|
captures:
|
||||||
|
1: support.type.property-name.stylus
|
||||||
|
2: string.quoted.single.stylus
|
||||||
|
3: string.quoted.double.stylus
|
||||||
|
4: punctuation.separator.key-value.stylus
|
||||||
|
push:
|
||||||
|
- match: '(;)|(?=\}|$)'
|
||||||
|
captures:
|
||||||
|
1: punctuation.terminator.statement.stylus
|
||||||
|
pop: true
|
||||||
|
- include: expression
|
||||||
|
interpolation:
|
||||||
|
- match: '\{'
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.embedded.start.stylus
|
||||||
|
push:
|
||||||
|
- meta_scope: stylus.embedded.source
|
||||||
|
- match: '\}'
|
||||||
|
captures:
|
||||||
|
0: punctuation.section.embedded.end.stylus
|
||||||
|
pop: true
|
||||||
|
- include: expression
|
||||||
|
iteration:
|
||||||
|
- match: (^\s*|\s+)(for)\s+(?=.*?\s+in\s+)
|
||||||
|
captures:
|
||||||
|
2: keyword.control.stylus
|
||||||
|
push:
|
||||||
|
- match: '$|\{'
|
||||||
|
pop: true
|
||||||
|
- include: expression
|
||||||
|
language-constants:
|
||||||
|
- match: \b(true|false|null)\b
|
||||||
|
scope: constant.language.stylus
|
||||||
|
language-keywords:
|
||||||
|
- match: (\b|\s)(return|else)\b
|
||||||
|
scope: keyword.control.stylus
|
||||||
|
- match: (\b|\s)(!important|in|is defined|is a)\b
|
||||||
|
scope: keyword.other.stylus
|
||||||
|
- match: \barguments\b
|
||||||
|
scope: variable.language.stylus
|
||||||
|
language-operators:
|
||||||
|
- match: ((?:\?|:|!|~|\+|-|(?:\*)?\*|\/|%|(\.)?\.\.|<|>|(?:=|:|\?|\+|-|\*|\/|%|<|>)?=|!=)|\b(?:in|is(?:nt)?|(?<!:)not)\b)
|
||||||
|
scope: keyword.operator.stylus
|
||||||
|
language-property-value-constants:
|
||||||
|
- match: \b(absolute|all(-scroll)?|always|armenian|auto|avoid|baseline|below|bidi-override|block|bold(er)?|(border|content|padding)-box|both|bottom|break-all|break-word|capitalize|center|char|circle|cjk-ideographic|col-resize|collapse|crosshair|cursive|dashed|decimal-leading-zero|decimal|default|disabled|disc|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ellipsis|fantasy|fixed|geometricPrecision|georgian|groove|hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|inactive|inherit|inline-block|inline|inset|inside|inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|keep-all|left|lighter|line-edge|line-through|line|list-item|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|medium|middle|move|monospace|n-resize|ne-resize|newspaper|no-drop|no-repeat|nw-resize|none|normal|not-allowed|nowrap|oblique|optimize(Legibility|Quality|Speed)|outset|outside|overline|pointer|pre(-(wrap|line))?|progress|relative|repeat-x|repeat-y|repeat|right|ridge|row-resize|rtl|(sans-)?serif|s-resize|scroll|se-resize|separate|small-caps|solid|square|static|strict|sub|super|sw-resize|table(-(row|cell|footer-group|header-group))?|tb-rl|text-bottom|text-top|text|thick|thin|top|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|vertical(-(ideographic|text))?|visible(Painted|Fill|Stroke)?|w-resize|wait|whitespace|zero|smaller|larger|((xx?-)?(small(er)?|large(r)?))|painted|fill|stroke)\b
|
||||||
|
scope: constant.property-value.stylus
|
||||||
|
media-query:
|
||||||
|
- match: '\s*(?![{;]|$)'
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.at-rule.media.stylus
|
||||||
|
- match: '\s*(?=[{;]|$)'
|
||||||
|
pop: true
|
||||||
|
- match: '(?i)\s*(only|not)?\s*(all|aural|braille|embossed|handheld|print|projection|screen|tty|tv)?(?![\w\d$-]+)'
|
||||||
|
captures:
|
||||||
|
1: keyword.operator.logic.media.stylus
|
||||||
|
2: support.constant.media.stylus
|
||||||
|
push:
|
||||||
|
- match: '\s*(?:(,)|(?=[{;]|$))'
|
||||||
|
pop: true
|
||||||
|
- include: media-query-list
|
||||||
|
- include: variable
|
||||||
|
media-query-list:
|
||||||
|
- match: \s*(and)?\s*(\()\s*
|
||||||
|
captures:
|
||||||
|
1: keyword.operator.logic.media.stylus
|
||||||
|
2: punctuation.definition.parameters.start.stylus
|
||||||
|
push:
|
||||||
|
- match: \)
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.parameters.end.stylus
|
||||||
|
pop: true
|
||||||
|
- include: media-query-properties
|
||||||
|
- include: numeric-values
|
||||||
|
media-query-properties:
|
||||||
|
- match: \s*:\s*
|
||||||
|
captures:
|
||||||
|
0: punctuation.separator.key-value.stylus
|
||||||
|
- match: |-
|
||||||
|
(?x)
|
||||||
|
(
|
||||||
|
((min|max)-)?
|
||||||
|
(
|
||||||
|
((device-)?(height|width|aspect-ratio))|
|
||||||
|
(color(-index)?)|monochrome|resolution
|
||||||
|
)
|
||||||
|
)|grid|scan|orientation
|
||||||
|
captures:
|
||||||
|
0: support.type.property-name.media.stylus
|
||||||
|
- match: \b(portrait|landscape|progressive|interlace)\b
|
||||||
|
captures:
|
||||||
|
1: support.constant.property-value.stylus
|
||||||
|
numeric-values:
|
||||||
|
- match: |-
|
||||||
|
(?x) # multi-line regex definition mode
|
||||||
|
(\#)(?:
|
||||||
|
([0-9a-fA-F])
|
||||||
|
([0-9a-fA-F])
|
||||||
|
([0-9a-fA-F])
|
||||||
|
([0-9a-fA-F])?
|
||||||
|
| ([0-9a-fA-F]{2})
|
||||||
|
([0-9a-fA-F]{2})
|
||||||
|
([0-9a-fA-F]{2})
|
||||||
|
([0-9a-fA-F]{2})?
|
||||||
|
)\b
|
||||||
|
scope: constant.other.color.rgb-value.stylus
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.constant.stylus
|
||||||
|
2: constant.other.color.rgb-value.red.stylus
|
||||||
|
3: constant.other.color.rgb-value.green.stylus
|
||||||
|
4: constant.other.color.rgb-value.blue.stylus
|
||||||
|
5: constant.other.color.rgb-value.alpha.stylus
|
||||||
|
6: constant.other.color.rgb-value.red.stylus
|
||||||
|
7: constant.other.color.rgb-value.green.stylus
|
||||||
|
8: constant.other.color.rgb-value.blue.stylus
|
||||||
|
9: constant.other.color.rgb-value.alpha.stylus
|
||||||
|
- match: |-
|
||||||
|
(?x) # multi-line regex definition mode
|
||||||
|
(?:-|\+)? # negative / positive
|
||||||
|
(?:
|
||||||
|
(?:
|
||||||
|
[0-9]+ # integer part
|
||||||
|
(?:\.[0-9]+)? # fraction
|
||||||
|
) |
|
||||||
|
(?:\.[0-9]+) # fraction without leading zero
|
||||||
|
)
|
||||||
|
((?: # units
|
||||||
|
px|pt|ch|cm|mm|in|
|
||||||
|
r?em|ex|pc|vw|vh|vmin|vmax|deg|
|
||||||
|
g?rad|turn|dpi|dpcm|dppx|m?s|k?Hz
|
||||||
|
)\b|%)?
|
||||||
|
scope: constant.numeric.stylus
|
||||||
|
captures:
|
||||||
|
1: keyword.other.unit.stylus
|
||||||
|
property-reference:
|
||||||
|
- match: "@[a-z-]+"
|
||||||
|
scope: variable.other.property.stylus
|
||||||
|
pseudo:
|
||||||
|
- match: (:)(active|checked|default|disabled|empty|enabled|first-child|first-of-type|first|fullscreen|focus|hover|indeterminate|in-range|invalid|last-child|last-of-type|left|link|only-child|only-of-type|optional|out-of-range|read-only|read-write|required|right|root|scope|target|valid|visited)\b
|
||||||
|
scope: entity.other.attribute-name.pseudo-class.stylus
|
||||||
|
captures:
|
||||||
|
1: puncutation.definition.entity.stylus
|
||||||
|
- match: (:?:)(before|after)\b
|
||||||
|
scope: entity.other.attribute-name.pseudo-element.stylus
|
||||||
|
captures:
|
||||||
|
1: puncutation.definition.entity.stylus
|
||||||
|
- match: (::)(first-letter|first-number|selection)\b
|
||||||
|
scope: entity.other.attribute-name.pseudo-element.stylus
|
||||||
|
captures:
|
||||||
|
1: puncutation.definition.entity.stylus
|
||||||
|
- match: ((:)dir)\s*(?:(\()(ltr|rtl)?(\)))?
|
||||||
|
captures:
|
||||||
|
1: entity.other.attribute-name.pseudo-element.stylus
|
||||||
|
2: puncutation.definition.entity.stylus
|
||||||
|
3: puncutation.definition.parameters.start.stylus
|
||||||
|
4: constant.language.stylus
|
||||||
|
5: puncutation.definition.parameters.end.stylus
|
||||||
|
- match: ((:)lang)\s*(?:(\()(\w+(-\w+)?)?(\)))?
|
||||||
|
captures:
|
||||||
|
1: entity.other.attribute-name.pseudo-element.stylus
|
||||||
|
2: puncutation.definition.entity.stylus
|
||||||
|
3: puncutation.definition.parameters.start.stylus
|
||||||
|
4: constant.language.stylus
|
||||||
|
5: puncutation.definition.parameters.end.stylus
|
||||||
|
- include: pseudo-nth
|
||||||
|
- include: pseudo-not
|
||||||
|
pseudo-not:
|
||||||
|
- match: ((:)not)\s*(\()
|
||||||
|
captures:
|
||||||
|
1: entity.other.attribute-name.pseudo-element.stylus
|
||||||
|
2: puncutation.definition.entity.stylus
|
||||||
|
3: puncutation.definition.parameters.start.stylus
|
||||||
|
push:
|
||||||
|
- match: \)
|
||||||
|
captures:
|
||||||
|
0: puncutation.definition.parameters.end.stylus
|
||||||
|
pop: true
|
||||||
|
- include: selector-components
|
||||||
|
pseudo-nth:
|
||||||
|
- match: ((:)(?:nth-child|nth-last-child|nth-of-type|nth-last-of-type|nth-match|nth-last-match|nth-column|nth-last-column))\s*(\()
|
||||||
|
captures:
|
||||||
|
1: entity.other.attribute-name.pseudo-class.stylus
|
||||||
|
2: puncutation.definition.entity.stylus
|
||||||
|
3: puncutation.definition.parameters.start.stylus
|
||||||
|
push:
|
||||||
|
- match: \)
|
||||||
|
captures:
|
||||||
|
0: puncutation.definition.parameters.end.stylus
|
||||||
|
pop: true
|
||||||
|
- include: language-operators
|
||||||
|
- include: interpolation
|
||||||
|
- match: \b(odd|even)\b
|
||||||
|
scope: constant.language.stylus
|
||||||
|
- match: \b(\d+)?n\b
|
||||||
|
scope: variable.language.stylus
|
||||||
|
captures:
|
||||||
|
1: constant.numeric.stylus
|
||||||
|
- match: \d+
|
||||||
|
scope: constant.numeric.stylus
|
||||||
|
return:
|
||||||
|
- match: ^\s*(return)
|
||||||
|
captures:
|
||||||
|
1: keyword.control.stylus
|
||||||
|
push:
|
||||||
|
- match: (;)|(?=$)
|
||||||
|
captures:
|
||||||
|
1: punctuation.terminator.statement.stylus
|
||||||
|
pop: true
|
||||||
|
- include: expression
|
||||||
|
selector-components:
|
||||||
|
- include: comments
|
||||||
|
- include: interpolation
|
||||||
|
- include: attribute-selector
|
||||||
|
- include: pseudo
|
||||||
|
- match: '\$[\w$-]+\b'
|
||||||
|
scope: entity.other.placeholder.stylus
|
||||||
|
- match: "[:~>]"
|
||||||
|
scope: keyword.operator.selector.stylus
|
||||||
|
- match: |-
|
||||||
|
(?x) # multi-line regex definition mode
|
||||||
|
\b(
|
||||||
|
altGlyph|altGlyphDef|altGlyphItem|animate|animateColor|
|
||||||
|
animateMotion|animateTransform|circle|clipPath|color-profile|
|
||||||
|
defs|desc|ellipse|feBlend|feColorMatrix|
|
||||||
|
feComponentTransfer|feComposite|feConvolveMatrix|
|
||||||
|
feDiffuseLighting|feDisplacementMap|feDistantLight|feFlood|
|
||||||
|
feFuncA|feFuncB|feFuncG|feFuncR|feGaussianBlur|feImage|feMerge|
|
||||||
|
feMergeNode|feMorphology|feOffset|fePointLight|
|
||||||
|
feSpecularLighting|feSpotLight|feTile|feTurbulence|filter|
|
||||||
|
font-face|font-face-format|font-face-name|font-face-src|
|
||||||
|
font-face-uri|foreignObject|g|glyph|glyphRef|hkern|image|line|
|
||||||
|
linearGradient|marker|mask|metadata|missing-glyph|mpath|path|
|
||||||
|
pattern|polygon|polyline|radialGradient|rect|set|stop|svg|
|
||||||
|
switch|symbol|text|textPath|tref|tspan|use|view|vkern|
|
||||||
|
a|abbr|acronym|address|applet|area|article|aside|audio|b|base|
|
||||||
|
basefont|bdi|bdo|bgsound|big|blink|blockquote|body|br|button|
|
||||||
|
canvas|caption|center|cite|code|col|colgroup|content|data|
|
||||||
|
datalist|dd|decorator|del|details|dfn|dir|div|dl|dt|element|
|
||||||
|
em|embed|fieldset|figcaption|figure|font|footer|form|frame|
|
||||||
|
frameset|h1|h2|h3|h4|h5|h6|head|header|hgroup|hr|html|i|iframe|
|
||||||
|
img|input|ins|isindex|kbd|keygen|label|legend|li|link|listing|
|
||||||
|
main|map|mark|marquee|menu|menuitem|meta|meter|nav|nobr|
|
||||||
|
noframes|noscript|object|ol|optgroup|option|output|p|param|
|
||||||
|
plaintext|pre|progress|q|rp|rt|ruby|s|samp|script|section|
|
||||||
|
select|shadow|small|source|spacer|span|strike|strong|style|
|
||||||
|
sub|summary|sup|table|tbody|td|template|textarea|tfoot|th|
|
||||||
|
thead|time|title|tr|track|tt|u|ul|var|video|wbr|xmp
|
||||||
|
)\b
|
||||||
|
scope: entity.name.tag.stylus
|
||||||
|
- match: '\.[a-zA-Z0-9_-]+'
|
||||||
|
scope: entity.other.attribute-name.class.stylus
|
||||||
|
- match: "#[a-zA-Z0-9_-]+"
|
||||||
|
scope: entity.other.attribute-name.id.stylus
|
||||||
|
- match: |-
|
||||||
|
(?x) # multi-line regex definition mode
|
||||||
|
([\w\d_-]+)? # matching any word right before &
|
||||||
|
(&) # & itself, escaped because of plist
|
||||||
|
([\w\d_-]+)? # matching any word right after &
|
||||||
|
captures:
|
||||||
|
1: entity.other.attribute-name.stylus
|
||||||
|
2: variable.language.stylus
|
||||||
|
3: entity.other.attribute-name.stylus
|
||||||
|
single-line-comment:
|
||||||
|
- match: (\/\/).*$
|
||||||
|
scope: comment.line.stylus
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.comment.stylus
|
||||||
|
string-quoted:
|
||||||
|
- match: "'[^']*'"
|
||||||
|
scope: string.quoted.single.stylus
|
||||||
|
- match: '"[^"]*"'
|
||||||
|
scope: string.quoted.double.stylus
|
||||||
|
url:
|
||||||
|
- match: (url)\s*(\()
|
||||||
|
captures:
|
||||||
|
1: entity.function-name.stylus
|
||||||
|
2: punctuation.definition.parameters.start.stylus
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.function-call.stylus
|
||||||
|
- match: (\))
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.parameters.end.stylus
|
||||||
|
pop: true
|
||||||
|
- include: string-quoted
|
||||||
|
- include: language-constants
|
||||||
|
- include: language-property-value-constants
|
||||||
|
- include: property-reference
|
||||||
|
- include: variable
|
||||||
|
variable:
|
||||||
|
- match: '([\w$-]+\b)'
|
||||||
|
scope: variable.other.stylus
|
||||||
+1
Submodule assets/syntaxes/02_Extra/Swift added at fef17119ce
+371
@@ -0,0 +1,371 @@
|
|||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
# http://www.sublimetext.com/docs/3/syntax.html
|
||||||
|
name: Swift
|
||||||
|
file_extensions:
|
||||||
|
- swift
|
||||||
|
first_line_match: ^#!/.*\bswift
|
||||||
|
scope: source.swift
|
||||||
|
contexts:
|
||||||
|
main:
|
||||||
|
- include: shebang-line
|
||||||
|
- include: comment
|
||||||
|
- include: attribute
|
||||||
|
- include: literal
|
||||||
|
- include: operator
|
||||||
|
- include: declaration
|
||||||
|
- include: storage-type
|
||||||
|
- include: keyword
|
||||||
|
- include: type
|
||||||
|
- include: boolean
|
||||||
|
comment:
|
||||||
|
- include: documentation-comment
|
||||||
|
- include: block-comment
|
||||||
|
- include: in-line-comment
|
||||||
|
access-level-modifier:
|
||||||
|
- match: \b(open|public|internal|fileprivate|private)\b(?:\(set\))?
|
||||||
|
comment: access-level-modifier
|
||||||
|
scope: keyword.other.access-level-modifier.swift
|
||||||
|
arithmetic-operator:
|
||||||
|
- match: '(?<![/=\-+!*%<>&|\^~.])(\+|\-|\*|\/)(?![/=\-+!*%<>&|\^~.])'
|
||||||
|
scope: keyword.operator.arithmetic.swift
|
||||||
|
array-type:
|
||||||
|
- match: \b(Array)(<)
|
||||||
|
captures:
|
||||||
|
1: support.type.array.swift
|
||||||
|
2: punctuation.array.begin.swift
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.array.swift
|
||||||
|
- match: (>)
|
||||||
|
captures:
|
||||||
|
1: punctuation.array.end.swift
|
||||||
|
pop: true
|
||||||
|
- include: main
|
||||||
|
assignment-operator:
|
||||||
|
- match: '(?<![/=\-+!*%<>&|\^~.])(\+|\-|\*|\/|%|<<|>>|&|\^|\||&&|\|\|)?=(?![/=\-+!*%<>&|\^~.])'
|
||||||
|
scope: keyword.operator.assignment.swift
|
||||||
|
attribute:
|
||||||
|
- match: '((@)(\B\$[0-9]+|\b[\w^\d][\w\d]*\b|\B`[\w^\d][\w\d]*`\B))(\()'
|
||||||
|
captures:
|
||||||
|
1: storage.modifier.attribute.swift
|
||||||
|
2: punctuation.definition.attribute.swift
|
||||||
|
3: punctuation.definition.attribute-arguments.begin.swift
|
||||||
|
push:
|
||||||
|
- meta_content_scope: meta.attribute.arguments.swift
|
||||||
|
- match: \)
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.attribute-arguments.end.swift
|
||||||
|
pop: true
|
||||||
|
- include: main
|
||||||
|
- match: '((@)(\B\$[0-9]+|\b[\w^\d][\w\d]*\b|\B`[\w^\d][\w\d]*`\B))'
|
||||||
|
captures:
|
||||||
|
1: storage.modifier.attribute.swift
|
||||||
|
2: punctuation.definition.attribute.swift
|
||||||
|
bitwise-operator:
|
||||||
|
- match: '(?<![/=\-+!*%<>&|\^~.])(&|\||\^|<<|>>)(?![/=\-+!*%<>&|\^~.])'
|
||||||
|
scope: keyword.operator.bitwise.swift
|
||||||
|
block-comment:
|
||||||
|
- match: /\*
|
||||||
|
comment: Block comment
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.comment.block.begin.swift
|
||||||
|
push:
|
||||||
|
- meta_scope: comment.block.swift
|
||||||
|
- match: \*/
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.comment.block.end.swift
|
||||||
|
pop: true
|
||||||
|
boolean:
|
||||||
|
- match: \b(true|false)\b
|
||||||
|
scope: keyword.constant.boolean.swift
|
||||||
|
branch-statement-keyword:
|
||||||
|
- include: if-statement-keyword
|
||||||
|
- include: switch-statement-keyword
|
||||||
|
catch-statement-keyword:
|
||||||
|
- match: \b(catch|do)\b
|
||||||
|
comment: catch-statement
|
||||||
|
scope: kewyord.control.catch.swift
|
||||||
|
code-block:
|
||||||
|
- match: '(\{)'
|
||||||
|
comment: code-block
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.code-block.begin.swift
|
||||||
|
push:
|
||||||
|
- match: '(\})'
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.code-block.end.swift
|
||||||
|
pop: true
|
||||||
|
- include: main
|
||||||
|
collection-type:
|
||||||
|
- include: array-type
|
||||||
|
- include: dictionary-type
|
||||||
|
- match: \b(Array|Dictionary)\b
|
||||||
|
scope: support.type.swift
|
||||||
|
comparative-operator:
|
||||||
|
- match: '(?<![/=\-+!*%<>&|\^~.])((=|!)==?|(<|>)=?|~=)(?![/=\-+!*%<>&|\^~.])'
|
||||||
|
scope: keyword.operator.comparative.swift
|
||||||
|
control-transfer-statement-keyword:
|
||||||
|
- match: \b(continue|break|fallthrough|return)\b
|
||||||
|
comment: control-transfer-statement
|
||||||
|
scope: keyword.control.transfer.swift
|
||||||
|
custom-operator:
|
||||||
|
- match: '(?<=[\s(\[{,;:])([/=\-+!*%<>&|\^~.]++)(?![\s)\]},;:])'
|
||||||
|
scope: keyword.operator.custom.prefix.unary.swift
|
||||||
|
- match: '(?<![\s(\[{,;:])([/=\-+!*%<>&|\^~.]++)(?![\s)\]},;:\.])'
|
||||||
|
scope: keyword.operator.custom.postfix.unary.swift
|
||||||
|
- match: '(?<=[\s(\[{,;:])([/=\-+!*%<>&|\^~.]++)(?=[\s)\]},;:])'
|
||||||
|
scope: keyword.operator.custom.binary.swift
|
||||||
|
declaration:
|
||||||
|
- include: import-declaration
|
||||||
|
- include: function-declaration
|
||||||
|
declaration-modifier:
|
||||||
|
- match: \b(class|convenience|dynamic|final|lazy|(non)?mutating|optional|override|required|static|unowned((un)?safe)?|weak)\b
|
||||||
|
comment: declaration-modifier
|
||||||
|
scope: keyword.other.declaration-modifier.swift
|
||||||
|
dictionary-type:
|
||||||
|
- match: \b(Dictionary)(<)
|
||||||
|
captures:
|
||||||
|
1: support.type.dictionary.swift
|
||||||
|
2: punctuation.dictionary.begin.swift
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.dictionary.swift
|
||||||
|
- match: (>)
|
||||||
|
captures:
|
||||||
|
1: punctuation.dictionary.end.swift
|
||||||
|
pop: true
|
||||||
|
- include: main
|
||||||
|
documentation-comment:
|
||||||
|
- match: /\*\*
|
||||||
|
comment: Documentation comment
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.comment.block.documentation.begin.swift
|
||||||
|
push:
|
||||||
|
- meta_scope: comment.block.documentation.swift
|
||||||
|
- match: \*/
|
||||||
|
captures:
|
||||||
|
0: punctuation.definition.comment.block.documentation.end.swift
|
||||||
|
pop: true
|
||||||
|
floating-point-literal:
|
||||||
|
- match: '\b([0-9][0-9_]*)(\.([0-9][0-9_]*))?([eE][+\-]?([0-9][0-9_]*))?\b'
|
||||||
|
comment: floating-point-literal -> (decimal-literal)(decimal-fraction)?(decimal-exponent)?
|
||||||
|
- match: '\b(0x\h[\h_]*)(\.(0x\h[\h_]*))?([pP][+\-]?(0x\h[\h_]*))\b'
|
||||||
|
comment: floating-point-literal -> (hexadecimal-literal)(hexadecimal-fraction)?(hexadecimal-exponent)
|
||||||
|
function-body:
|
||||||
|
- include: code-block
|
||||||
|
function-declaration:
|
||||||
|
- match: '\b(func)\s+(\B\$[0-9]+|\b[\w^\d][\w\d]*\b|\B`[\w^\d][\w\d]*`\B|[/=\-+!*%<>&|\^~.]+)\s*(?=\(|<)'
|
||||||
|
comment: function-declaration
|
||||||
|
captures:
|
||||||
|
1: storage.type.function.swift
|
||||||
|
2: entity.type.function.swift
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.function-declaration.swift
|
||||||
|
- match: '(?<=\})'
|
||||||
|
pop: true
|
||||||
|
- include: generic-parameter-clause
|
||||||
|
- include: parameter-clause
|
||||||
|
- include: function-result
|
||||||
|
- include: function-body
|
||||||
|
function-result:
|
||||||
|
- match: '(?<![/=\-+!*%<>&|\^~.])(\->)(?![/=\-+!*%<>&|\^~.])\s*'
|
||||||
|
comment: function-result
|
||||||
|
captures:
|
||||||
|
1: keyword.operator.function-result.swift
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.function-result.swift
|
||||||
|
- match: '\s*(?=\{)'
|
||||||
|
pop: true
|
||||||
|
- include: type
|
||||||
|
generic-parameter-clause:
|
||||||
|
- match: (<)
|
||||||
|
comment: generic-parameter-clause
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.generic-parameter-clause.begin.swift
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.generic-parameter-clause.swift
|
||||||
|
- match: (>)
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.generic-parameter-clause.end.swift
|
||||||
|
pop: true
|
||||||
|
- include: main
|
||||||
|
identifier:
|
||||||
|
- match: '(\B\$[0-9]+|\b[\w^\d][\w\d]*\b|\B`[\w^\d][\w\d]*`\B)'
|
||||||
|
comment: identifier
|
||||||
|
scope: meta.identifier.swift
|
||||||
|
if-statement-keyword:
|
||||||
|
- match: \b(if|else)\b
|
||||||
|
comment: if-statement
|
||||||
|
scope: keyword.control.if.swift
|
||||||
|
import-declaration:
|
||||||
|
- match: '\b(import)\s+(?:(typealias|struct|class|enum|protocol|var|func)\s+)?((?:\B\$[0-9]+|\b[\w^\d][\w\d]*\b|\B`[\w^\d][\w\d]*`\B|[/=\-+!*%<>&|\^~.]+)(?:\.(?:\B\$[0-9]+|\b[\w^\d][\w\d]*\b|\B`[\w^\d][\w\d]*`\B|[/=\-+!*%<>&|\^~.]+))*)'
|
||||||
|
comment: import-declaration
|
||||||
|
scope: meta.import.swift
|
||||||
|
captures:
|
||||||
|
1: keyword.other.import.swift
|
||||||
|
2: storage.modifier.swift
|
||||||
|
3: support.type.module.import.swift
|
||||||
|
in-line-comment:
|
||||||
|
- match: (//).*
|
||||||
|
comment: In-line comment
|
||||||
|
scope: comment.line.double-slash.swift
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.comment.line.double-slash.swift
|
||||||
|
increment-decrement-operator:
|
||||||
|
- match: '(?<![/=\-+!*%<>&|\^~.])(\+\+|\-\-)(?![/=\-+!*%<>&|\^~.])'
|
||||||
|
scope: keyword.operator.increment-or-decrement.swift
|
||||||
|
integer-literal:
|
||||||
|
- match: '(\B\-|\b)(0b[01][01_]*)\b'
|
||||||
|
comment: binary-literal
|
||||||
|
scope: constant.numeric.integer.binary.swift
|
||||||
|
- match: '(\B\-|\b)(0o[0-7][0-7_]*)\b'
|
||||||
|
comment: octal-literal
|
||||||
|
scope: constant.numeric.integer.octal.swift
|
||||||
|
- match: '(\B\-|\b)([0-9][0-9_]*)\b'
|
||||||
|
comment: decimal-literal
|
||||||
|
scope: constant.numeric.integer.decimal.swift
|
||||||
|
- match: '(\B\-|\b)(0x\h[\h_]*)\b'
|
||||||
|
comment: hexadecimal-literal
|
||||||
|
scope: constant.numeric.integer.hexadecimal.swift
|
||||||
|
integer-type:
|
||||||
|
- match: \bU?Int(8|16|32|64)?\b
|
||||||
|
comment: Int types
|
||||||
|
scope: support.type.swift
|
||||||
|
keyword:
|
||||||
|
- include: branch-statement-keyword
|
||||||
|
- include: control-transfer-statement-keyword
|
||||||
|
- include: loop-statement-keyword
|
||||||
|
- include: catch-statement-keyword
|
||||||
|
- include: operator-declaration-modifier
|
||||||
|
- include: declaration-modifier
|
||||||
|
- include: access-level-modifier
|
||||||
|
- match: \b(class|deinit|enum|extension|func|import|init|let|protocol|static|struct|subscript|typealias|var|throws|rethrows)\b
|
||||||
|
comment: declaration keyword
|
||||||
|
scope: keyword.declaration.swift
|
||||||
|
- match: \b(break|case|continue|default|do|else|fallthrough|if|in|for|return|switch|where|while|repeat|catch|guard|defer|try|throw)\b
|
||||||
|
comment: statement keyword
|
||||||
|
scope: keyword.statement.swift
|
||||||
|
- match: \b(as|dynamicType|is|new|super|self|Self|Type)\b
|
||||||
|
comment: expression and type keyword
|
||||||
|
scope: keyword.other.statement.swift
|
||||||
|
- match: \b(associativity|didSet|get|infix|inout|left|mutating|none|nonmutating|operator|override|postfix|precedence|prefix|right|set|unowned((un)?safe)?|weak|willSet)\b
|
||||||
|
comment: other keyword
|
||||||
|
scope: keyword.other.swift
|
||||||
|
literal:
|
||||||
|
- include: integer-literal
|
||||||
|
- include: floating-point-literal
|
||||||
|
- include: nil-literal
|
||||||
|
- include: string-literal
|
||||||
|
- include: special-literal
|
||||||
|
logical-operator:
|
||||||
|
- match: '(?<![/=\-+!*%<>&|\^~.])(!|&&|\|\|)(?![/=\-+!*%<>&|\^~.])'
|
||||||
|
scope: keyword.operator.logical.swift
|
||||||
|
loop-statement-keyword:
|
||||||
|
- match: \b(while|repeat|for|in)\b
|
||||||
|
comment: loop-statement
|
||||||
|
scope: keyword.control.loop.swift
|
||||||
|
nil-literal:
|
||||||
|
- match: \bnil\b
|
||||||
|
comment: nil-literal
|
||||||
|
scope: constant.nil.swift
|
||||||
|
operator:
|
||||||
|
- include: comparative-operator
|
||||||
|
- include: assignment-operator
|
||||||
|
- include: logical-operator
|
||||||
|
- include: remainder-operator
|
||||||
|
- include: increment-decrement-operator
|
||||||
|
- include: overflow-operator
|
||||||
|
- include: range-operator
|
||||||
|
- include: bitwise-operator
|
||||||
|
- include: arithmetic-operator
|
||||||
|
- include: ternary-operator
|
||||||
|
- include: type-casting-operator
|
||||||
|
- include: custom-operator
|
||||||
|
operator-declaration-modifier:
|
||||||
|
- match: \b(operator|prefix|infix|postfix)\b
|
||||||
|
comment: operator-declaration
|
||||||
|
scope: keyword.other.operator.swift
|
||||||
|
optional-type:
|
||||||
|
- match: \b(Optional)(<)
|
||||||
|
scope: meta.optional.swift
|
||||||
|
overflow-operator:
|
||||||
|
- match: '(?<![/=\-+!*%<>&|\^~.])\&(\+|\-|\*|\/|%)(?![/=\-+!*%<>&|\^~.])'
|
||||||
|
scope: keyword.operator.overflow.swift
|
||||||
|
parameter-clause:
|
||||||
|
- match: (\()
|
||||||
|
comment: parameter-clause
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.function-arguments.begin.swift
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.parameter-clause.swift
|
||||||
|
- match: (\))
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.function-arguments.end.swift
|
||||||
|
pop: true
|
||||||
|
- include: main
|
||||||
|
primitive-type:
|
||||||
|
- match: \b(Int|Float|Double|String|Bool|Character|Void)\b
|
||||||
|
comment: Primitive types
|
||||||
|
scope: support.type.swift
|
||||||
|
protocol-composition-type:
|
||||||
|
- match: \b(protocol)(<)
|
||||||
|
scope: meta.protocol.swift
|
||||||
|
range-operator:
|
||||||
|
- match: '(?<![/=\-+!*%<>&|\^~.])\.\.(?:\.)?(?![/=\-+!*%<>&|\^~.])'
|
||||||
|
scope: keyword.operator.range.swift
|
||||||
|
remainder-operator:
|
||||||
|
- match: '(?<![/=\-+!*%<>&|\^~.])\%(?![/=\-+!*%<>&|\^~.])'
|
||||||
|
scope: keyword.operator.remainder.swift
|
||||||
|
shebang-line:
|
||||||
|
- match: ^(#!).*$
|
||||||
|
comment: Shebang line
|
||||||
|
scope: comment.line.shebang.swift
|
||||||
|
captures:
|
||||||
|
1: punctuation.definition.comment.line.shebang.swift
|
||||||
|
special-literal:
|
||||||
|
- match: \b__(FILE|LINE|COLUMN|FUNCTION)__\b
|
||||||
|
scope: keyword.other.literal.swift
|
||||||
|
storage-type:
|
||||||
|
- match: \b(var|func|let|class|enum|struct|protocol|extension|typealias)\b
|
||||||
|
scope: storage.type.swift
|
||||||
|
string-literal:
|
||||||
|
- match: \"
|
||||||
|
captures:
|
||||||
|
0: string.quoted.double.swift
|
||||||
|
push:
|
||||||
|
- meta_scope: meta.literal.string.swift
|
||||||
|
- match: \"
|
||||||
|
captures:
|
||||||
|
0: string.quoted.double.swift
|
||||||
|
pop: true
|
||||||
|
- match: '\\([0tnr\"\''\\]|x\h{2}|u\h{4}|U\h{8})'
|
||||||
|
scope: constant.character.escape.swift
|
||||||
|
- match: (\\\()
|
||||||
|
captures:
|
||||||
|
1: support.punctuation.expression.begin.swift
|
||||||
|
push:
|
||||||
|
- meta_content_scope: meta.expression.swift
|
||||||
|
- match: (\))
|
||||||
|
captures:
|
||||||
|
1: support.punctuation.expression.end.swift
|
||||||
|
pop: true
|
||||||
|
- include: scope:source.swift
|
||||||
|
- match: (\"|\\)
|
||||||
|
scope: invalid.illegal.swift
|
||||||
|
- match: (.)
|
||||||
|
scope: string.quoted.double.swift
|
||||||
|
switch-statement-keyword:
|
||||||
|
- match: \b(switch|case|default|where)\b
|
||||||
|
comment: switch-statement
|
||||||
|
scope: keyword.control.switch.swift
|
||||||
|
ternary-operator:
|
||||||
|
- match: '(?<=[\s(\[{,;:])(\?|:)(?=[\s)\]},;:])'
|
||||||
|
scope: keyword.operator.ternary.swift
|
||||||
|
type:
|
||||||
|
- include: primitive-type
|
||||||
|
- include: integer-type
|
||||||
|
- include: collection-type
|
||||||
|
- include: optional-type
|
||||||
|
- include: protocol-composition-type
|
||||||
|
type-casting-operator:
|
||||||
|
- match: \b(is\b|as(\?\B|\b))
|
||||||
|
scope: keyword.operator.type-casting.swift
|
||||||
+1
Submodule assets/syntaxes/02_Extra/Syslog added at 7628d4e0b8
+1
Submodule assets/syntaxes/02_Extra/TOML added at 0f14b7caf3
+1
Submodule assets/syntaxes/02_Extra/Terraform added at 64208ea816
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user