1

Refresh generated neovim config

This commit is contained in:
2024-07-14 21:12:36 +02:00
parent f215ce2ab5
commit 00464e0e65
731 changed files with 6780 additions and 31110 deletions

View File

@ -366,6 +366,7 @@ We are looking for maintainers to add more parsers and to write query files for
- [x] [Tree-Sitter query language](https://github.com/nvim-treesitter/tree-sitter-query) (maintained by @steelsojka)
- [x] [r](https://github.com/r-lib/tree-sitter-r) (maintained by @echasnovski)
- [ ] [racket](https://github.com/6cdh/tree-sitter-racket)
- [x] [ralph](https://github.com/alephium/tree-sitter-ralph) (maintained by @tdroxler)
- [x] [rasi](https://github.com/Fymyte/tree-sitter-rasi) (maintained by @Fymyte)
- [x] [rbs](https://github.com/joker1007/tree-sitter-rbs) (maintained by @joker1007)
- [x] [re2c](https://github.com/amaanq/tree-sitter-re2c) (maintained by @amaanq)
@ -375,7 +376,7 @@ We are looking for maintainers to add more parsers and to write query files for
- [x] [pip requirements](https://github.com/ObserverOfTime/tree-sitter-requirements) (maintained by @ObserverOfTime)
- [x] [rnoweb](https://github.com/bamonroe/tree-sitter-rnoweb) (maintained by @bamonroe)
- [x] [robot](https://github.com/Hubro/tree-sitter-robot) (maintained by @Hubro)
- [x] [roc](https://github.com/nat-418/tree-sitter-roc) (maintained by @nat-418)
- [x] [roc](https://github.com/faldor20/tree-sitter-roc) (maintained by @nat-418)
- [x] [ron](https://github.com/amaanq/tree-sitter-ron) (maintained by @amaanq)
- [x] [rst](https://github.com/stsewd/tree-sitter-rst) (maintained by @stsewd)
- [x] [ruby](https://github.com/tree-sitter/tree-sitter-ruby) (maintained by @TravonteD)
@ -547,11 +548,13 @@ If you want to install the parsers to a custom directory you can specify this
directory with `parser_install_dir` option in that is passed to `setup`.
`nvim-treesitter` will then install the parser files into this directory.
This directory must be writeable and must be explicitly added to the
This directory must be writeable and must be explicitly prepended to the
`runtimepath`. For example:
```lua
vim.opt.runtimepath:append("/some/path/to/store/parsers")
-- It MUST be at the beginning of runtimepath. Otherwise the parsers from Neovim itself
-- is loaded that may not be compatible with the queries from the 'nvim-treesitter' plugin.
vim.opt.runtimepath:prepend("/some/path/to/store/parsers")
require'nvim-treesitter.configs'.setup {
parser_install_dir = "/some/path/to/store/parsers",

View File

@ -12,7 +12,7 @@
"revision": "c99ad4b16d112fea91745e3f1b769754239fdaba"
},
"arduino": {
"revision": "babb6d4da69b359bbb80adbf1fe39c0da9175210"
"revision": "afb34b2c65f507932c5c6ddbf0d5a9ca6a772f2f"
},
"asm": {
"revision": "b0306e9bb2ebe01c6562f1aef265cc42ccc53070"
@ -51,7 +51,7 @@
"revision": "2326d709fb9cf73cf124fdbc803c267f851721a4"
},
"c": {
"revision": "00ed08f1a6c18141bfd7a81638e4d239a0bb55cc"
"revision": "deca017a554045b4c203e7ddff39ae64ff05e071"
},
"c_sharp": {
"revision": "82fa8f05f41a33e9bc830f85d74a9548f0291738"
@ -69,7 +69,7 @@
"revision": "f4236d4da8aa92bc105d9c118746474c608e6af7"
},
"cmake": {
"revision": "20ffd6d3b4da1acdbf2d08204b2130a5b2f7c4b3"
"revision": "4864abb95a1f6e54d6b362677beef9fb674b41e9"
},
"comment": {
"revision": "5d8b29f6ef3bf64d59430dcfe76b31cc44b5abfd"
@ -81,13 +81,13 @@
"revision": "4ebe237c1cf64cf3826fc249e9ec0988fe07e58e"
},
"corn": {
"revision": "604d73c38d4c28ca68e9e441ffd405d68cb63051"
"revision": "464654742cbfd3a3de560aba120998f1d5dfa844"
},
"cpon": {
"revision": "594289eadfec719198e560f9d7fd243c4db678d5"
},
"cpp": {
"revision": "d29fbff09a8c9ff4f3074de2595dfca12cb33da9"
"revision": "7ce8946cae4bb25adebe5b50394f702beb007026"
},
"css": {
"revision": "f6be52c3d1cdb1c5e4dd7d8bce0a57497f55d6af"
@ -96,7 +96,7 @@
"revision": "7eb7297823605392d2bbcc4c09b1cd18d6fa9529"
},
"cuda": {
"revision": "e7878a9cf4157e9d6c8013ff5605c9f26d62894d"
"revision": "1f188eff83b562ffae36d13e1b804ec6f3b9f1d9"
},
"cue": {
"revision": "8a5f273bfa281c66354da562f2307c2d394b6c81"
@ -120,7 +120,7 @@
"revision": "0229c0211dba909c5d45129ac784a3f4d49c243a"
},
"djot": {
"revision": "0e9a836ec47612ade15645fb1680adb549894a6c"
"revision": "87bf82874c86dcf563f5521069d603ed50e5f0cc"
},
"dockerfile": {
"revision": "087daa20438a6cc01fa5e6fe6906d77c869d19fe"
@ -129,25 +129,25 @@
"revision": "9ab85550c896d8b294d9b9ca1e30698736f08cea"
},
"doxygen": {
"revision": "4a30eba5d047d6a8c5b005202b4848c0b33d76ca"
"revision": "ccd998f378c3f9345ea4eeb223f56d7b84d16687"
},
"dtd": {
"revision": "648183d86f6f8ffb240ea11b4c6873f6f45d8b67"
},
"earthfile": {
"revision": "336001d79dd62668088bc6fe6d72a774a449fa2d"
"revision": "b5bdcb5813ce0e582fbd8e03eb42c80d3cc8984e"
},
"ebnf": {
"revision": "8e635b0b723c620774dfb8abf382a7f531894b40"
},
"eds": {
"revision": "5517bdb90c90703df49579a4b04689a614780be2"
"revision": "0ad62cb635c2f4353359a88dec9e3a57bbf9f66d"
},
"eex": {
"revision": "f742f2fe327463335e8671a87c0b9b396905d1d1"
},
"elixir": {
"revision": "de690fa8a028f122af46d9d2685679fe5f2d7d60"
"revision": "c7ae8b77e2749826dcf23df6514f08fdd68c66a3"
},
"elm": {
"revision": "09dbf221d7491dc8d8839616b27c21b9c025c457"
@ -162,7 +162,7 @@
"revision": "38d5004a797298dc42c85e7706c5ceac46a3f29f"
},
"erlang": {
"revision": "98ea1f9c957b2ad520415eecb5a5b406e931101e"
"revision": "b8e44bc0a3b2ce6bceea47c0b1c0f303a6b322b8"
},
"facility": {
"revision": "a52579670e2b14ec03d410c3c980fafaf6d659c4"
@ -171,7 +171,7 @@
"revision": "f3b9274514b5f9bf6b0dd4a01c30f9cc15c58bc4"
},
"fennel": {
"revision": "8ad17704b3c2469155947d4e8fcb618cf1328459"
"revision": "cfbfa478dc2dbef267ee94ae4323d9c886f45e94"
},
"fidl": {
"revision": "0a8910f293268e27ff554357c229ba172b0eaed2"
@ -222,13 +222,13 @@
"revision": "f4685bf11ac466dd278449bcfe5fd014e94aa504"
},
"gleam": {
"revision": "8432ffe32ccd360534837256747beb5b1c82fca1"
"revision": "02a17bf9d0553406268cdbf466d57808ae712bf3"
},
"glimmer": {
"revision": "6b25d265c990139353e1f7f97baf84987ebb7bf0"
},
"glsl": {
"revision": "33a16b6ff4d7206a16f2dc96c40e149c657db65f"
"revision": "7f91bf34cadc06a96efc475df501ffca4dda9410"
},
"gn": {
"revision": "bc06955bc1e3c9ff8e9b2b2a55b38b94da923c05"
@ -279,7 +279,7 @@
"revision": "577259b4068b2c281c9ebf94c109bd50a74d5857"
},
"hcl": {
"revision": "e936d3fef8bac884661472dce71ad82284761eb1"
"revision": "422cbe1d93a8ae3847744b664041fc76876babcd"
},
"heex": {
"revision": "b5ad6e34eea18a15bbd1466ca707a17f9bff7b93"
@ -291,7 +291,7 @@
"revision": "02fa3b79b3ff9a296066da6277adfc3f26cbc9e0"
},
"hlsl": {
"revision": "a84e8d4f675d0006f7c07f6c7bcea2fca04cdb6e"
"revision": "5e1225a30712ca0a9040509806c7ba274a1bbcde"
},
"hlsplaylist": {
"revision": "64f19029339e75d6762feae39e7878595860c980"
@ -315,13 +315,13 @@
"revision": "ad705af8c44c737bdb965fc081329c50716d2d03"
},
"hyprlang": {
"revision": "e5da7d0aa44403153e0394d87d9edea4e5bd6609"
"revision": "c9012d6dcaaa939f17c21e1fdb17b013d139e6b9"
},
"idl": {
"revision": "b5b53e2ca0521b98277d5e4b109f0b0e362e850e"
"revision": "9f56001f8ed29b0ea9fa4f02813f3e83ab0a2aaa"
},
"ini": {
"revision": "bcb84a2d4bcd6f55b911c42deade75c8f90cb0c5"
"revision": "87176e524f0a98f5be75fa44f4f0ff5c6eac069c"
},
"inko": {
"revision": "234c87be1dac20f766ddf6f486a7bde2a4bc5594"
@ -330,13 +330,13 @@
"revision": "9b2f9aec2106b94b4e099fe75e73ebd8ae707c04"
},
"janet_simple": {
"revision": "f3d6e09cc47e76833f23f83b2c59ea0878660953"
"revision": "2a05cab838dfec52daa76f10920917d2e69a85bc"
},
"java": {
"revision": "953abfc8bb3eb2f578e1f461edba4a9885f974b8"
},
"javascript": {
"revision": "a5de24dc7939cb07a758f8d89c089cfdb6f479aa"
"revision": "391a8fcc48a11f63bf18ec9885f6f069e760949a"
},
"jq": {
"revision": "13990f530e8e6709b7978503da9bc8701d366791"
@ -357,7 +357,7 @@
"revision": "d34615fa12cc1d1cfc1f1f1a80acc9db80ee4596"
},
"julia": {
"revision": "acd5ca12cc278df7960629c2429a096c7ac4bbea"
"revision": "f1baa5f8e271109d01cc8ff7473c11df2d8a9aee"
},
"just": {
"revision": "fd814fc6c579f68c2a642f5e0268cf69daae92d7"
@ -366,13 +366,13 @@
"revision": "486fea71f61ad9f3fd4072a118402e97fe88d26c"
},
"kdl": {
"revision": "49fb89a854d93b58a65a19724ac307195ca11941"
"revision": "b37e3d58e5c5cf8d739b315d6114e02d42e66664"
},
"kotlin": {
"revision": "c9cb8504b81684375e7beb8907517dbd6947a1be"
},
"koto": {
"revision": "919440e1376109bab4edac52594c17c02ae0be5a"
"revision": "d4109879ba1387d19095269a7473bd7d274ab848"
},
"kusto": {
"revision": "8353a1296607d6ba33db7c7e312226e5fc83e8ce"
@ -393,7 +393,7 @@
"revision": "f99011a3554213b654985a4b0a65b3b032ec4621"
},
"liquid": {
"revision": "293369818da219d97327908aab33707b04b63fd9"
"revision": "0419ac4868585320eee8615c90b864a1b04ef433"
},
"liquidsoap": {
"revision": "14feafa91630afb1ab9988cf9b738b7ea29f3f89"
@ -408,7 +408,7 @@
"revision": "873612aadd3f684dd4e631bdf42ea8990c57634e"
},
"luap": {
"revision": "31461ae9bd0866cb5117cfe5de71189854fd0f3e"
"revision": "c134aaec6acf4fa95fe4aa0dc9aba3eacdbbe55a"
},
"luau": {
"revision": "5aa9b88a8e3327276ec6e72de997f04ac80b1ae4"
@ -447,7 +447,7 @@
"revision": "570f3d7be01fffc751237f4cfcf52d04e20532d1"
},
"nickel": {
"revision": "52478738c5a072ab3ad62c74db5d0902dab064cd"
"revision": "43433d8477b24cd13acaac20a66deda49b7e2547"
},
"nim": {
"revision": "961c2798cec9250c44f7d7225ddb33d47d25856a"
@ -501,10 +501,10 @@
"revision": "309cb8d33bcfd0a81050b21be08f9eb3f2fe2138"
},
"php": {
"revision": "b38c53537769df05871643c9688c264074fb6076"
"revision": "4f124bc6075e1c3333e80190c1c170933ed72c95"
},
"php_only": {
"revision": "b38c53537769df05871643c9688c264074fb6076"
"revision": "4f124bc6075e1c3333e80190c1c170933ed72c95"
},
"phpdoc": {
"revision": "1d0e255b37477d0ca46f1c9e9268c8fa76c0b3fc"
@ -555,7 +555,7 @@
"revision": "daf9b3e2be18b0b2996a1281f7783e0d041d8b80"
},
"pymanifest": {
"revision": "e3b82b78721aee07f676dac8473ae69db51debcf"
"revision": "be062582956165019d3253794b4d712f66dfeaaa"
},
"python": {
"revision": "71778c2a472ed00a64abf4219544edbf8e4b86d7"
@ -567,7 +567,7 @@
"revision": "6b2b5e41734bd6f07ea4c36ac20fb6f14061c841"
},
"qmljs": {
"revision": "2c57cac27e207425f8df15327884434cb12365a3"
"revision": "febf48a5b6928600cd8fb2a01254743af550780d"
},
"query": {
"revision": "f767fb0ac5e711b6d44c5e0c8d1f349687a86ce0"
@ -578,11 +578,14 @@
"racket": {
"revision": "171f52a8c0ed635b85cd42d1e36d82f1066a03b4"
},
"ralph": {
"revision": "48b9d9d6e2b55ce8f9eb09ceb0d952e4b1cc87a0"
},
"rasi": {
"revision": "6c9bbcfdf5f0f553d9ebc01750a3aa247a37b8aa"
},
"rbs": {
"revision": "e5e807a50fcd104a2d740d354632fc671700a0bf"
"revision": "88d8ed487b5449ddda2fc0c4fe23b71cba29ca24"
},
"re2c": {
"revision": "47aa19cf5f7aba2ed30e2b377f7172df76e819a6"
@ -594,10 +597,10 @@
"revision": "47007f195752d8e57bda80b0b6cdb2d173a9f7d7"
},
"rego": {
"revision": "9ac75e71b2d791e0aadeef68098319d86a2a14cf"
"revision": "20b5a5958c837bc9f74b231022a68a594a313f6d"
},
"requirements": {
"revision": "360c6a6b31076a482663806f7a8241de9cad6b4e"
"revision": "5ad9b7581b3334f6ad492847d007f2fac6e6e5f2"
},
"rnoweb": {
"revision": "1a74dc0ed731ad07db39f063e2c5a6fe528cae7f"
@ -606,7 +609,7 @@
"revision": "322e4cc65754d2b3fdef4f2f8a71e0762e3d13af"
},
"roc": {
"revision": "7df2c0892e62efb81a7504d9799d4e0d0443d241"
"revision": "df46a85abda9f948d38f5d4e3684cec49c42fef2"
},
"ron": {
"revision": "78938553b93075e638035f624973083451b29055"
@ -633,10 +636,10 @@
"revision": "c478c6868648eff49eb04a4df90d703dc45b312a"
},
"slang": {
"revision": "989bfe5ae69e7bad13454b8f52e4ab0c343d8ded"
"revision": "865d79e236c7f0e04276c969453d021d1da4b15f"
},
"slint": {
"revision": "0701312b74b87fe20e61aa662ba41c5815b5d428"
"revision": "d82ab8c19ea1b60ff570256eaef7d137cc5ecb63"
},
"smali": {
"revision": "fdfa6a1febc43c7467aa7e937b87b607956f2346"
@ -645,10 +648,10 @@
"revision": "fa898ac0885d1da9a253695c3e0e91f5efc587cd"
},
"snakemake": {
"revision": "ba1b3868eaa960b945593404af9a7c2f296d3643"
"revision": "5a7b14074bca95b25935e865ca8f1efad32317e4"
},
"solidity": {
"revision": "1c94fe3d5351dfcff3551ec1f49614cbf758e444"
"revision": "ee5a2d2ba30b487c4bbf613d2ef310a454c09c7c"
},
"soql": {
"revision": "c99ad4b16d112fea91745e3f1b769754239fdaba"
@ -657,13 +660,13 @@
"revision": "c99ad4b16d112fea91745e3f1b769754239fdaba"
},
"sourcepawn": {
"revision": "227656e72a5f0d430bb82a467bc8078f078bba84"
"revision": "645d093763bcaaf7535edbdf6575a5c978b16491"
},
"sparql": {
"revision": "05f949d3c1c15e3261473a244d3ce87777374dec"
},
"sql": {
"revision": "25f94f998de79bae9df28add9782f9ea6ea0e2b8"
"revision": "89fd00d0aff3bc9985ac37caf362ec4fd9b2ba1d"
},
"squirrel": {
"revision": "0a50d31098e83c668d34d1160a0f6c7d23b571cc"
@ -678,7 +681,7 @@
"revision": "d819cdd5dbe455bd3c859193633c8d91c0df7c36"
},
"styled": {
"revision": "c68a4572e2d6403b6e99066c9a113b43f4a07a27"
"revision": "65835cca33a5f033bcde580ed66cde01c1fabbbe"
},
"supercollider": {
"revision": "affa4389186b6939d89673e1e9d2b28364f5ca6f"
@ -687,10 +690,10 @@
"revision": "f4586b35ac8548667a9aaa4eae44456c1f43d032"
},
"svelte": {
"revision": "2c97326cd96b7c3016c3d249e8dc244c89b4abeb"
"revision": "7218cf622b057ae9c530e1f0a7a3ce49806ca55e"
},
"swift": {
"revision": "26354ddec08c7efde4fa16bd29429f3310d2e2c5"
"revision": "d657f98dd6bbc34cb48438c9e5956f15a6d89f1d"
},
"sxhkdrc": {
"revision": "440d5f913d9465c9c776a1bd92334d32febcf065"
@ -711,13 +714,13 @@
"revision": "8784024358c233efd0f3a6fd9e7a3c5852e628bc"
},
"teal": {
"revision": "33482c92a0dfa694491d34e167a1d2f52b0dccb1"
"revision": "19b02da829d1721a521bf7b802eb80a50bd53aab"
},
"templ": {
"revision": "cf84ea53e2e2531f23009d676ac206090c1e2392"
},
"terraform": {
"revision": "e936d3fef8bac884661472dce71ad82284761eb1"
"revision": "422cbe1d93a8ae3847744b664041fc76876babcd"
},
"textproto": {
"revision": "8dacf02aa402892c91079f8577998ed5148c0496"
@ -744,19 +747,19 @@
"revision": "7eb7297823605392d2bbcc4c09b1cd18d6fa9529"
},
"tsx": {
"revision": "4ad3010c91d700026d036b5230e2d99ba94ae8a4"
"revision": "4f3eb6655a1cd1a1f87ef10201f8e22886dcd76e"
},
"turtle": {
"revision": "085437f5cb117703b7f520dd92161140a684f092"
},
"twig": {
"revision": "eaf80e6af969e25993576477a9dbdba3e48c1305"
"revision": "085648e01d1422163a1702a44e72303b4e2a0bd1"
},
"typescript": {
"revision": "4ad3010c91d700026d036b5230e2d99ba94ae8a4"
"revision": "4f3eb6655a1cd1a1f87ef10201f8e22886dcd76e"
},
"typespec": {
"revision": "fd9a83c6c0aaaff4b1354454b5b9f130f59dd553"
"revision": "28821d0d6da5f0a6b5eb02b9bad953fecafd7248"
},
"typoscript": {
"revision": "43b221c0b76e77244efdaa9963e402a17c930fbc"
@ -780,7 +783,7 @@
"revision": "ad9b638b914095320de85d59c49ab271603af048"
},
"v": {
"revision": "7e11a6f8f369df935664fadd2f0c99d90fe3226f"
"revision": "e91f8a42de7842f24f4ce600754f2b6651985fd4"
},
"vala": {
"revision": "8f690bfa639f2b83d1fb938ed3dd98a7ba453e8b"
@ -798,7 +801,7 @@
"revision": "b448ca63f972ade12c373c808acdd2bf972937db"
},
"vimdoc": {
"revision": "b711df784dd43d0a8ed8ddbfca0ddcc3239d94b4"
"revision": "2249c44ecd3f5cf22da3dcccfb74f816ddb29245"
},
"vue": {
"revision": "22bdfa6c9fc0f5ffa44c6e938ec46869ac8a99ff"
@ -831,9 +834,9 @@
"revision": "e877f6ade4b77d5ef8787075141053631ba12318"
},
"zathurarc": {
"revision": "5918bf1785662c43a841b0b6a27a129337ec3a23"
"revision": "6e7c8edfcd6f5f7c12b2fa9ffc6d042f1b6d7068"
},
"zig": {
"revision": "0d08703e4c3f426ec61695d7617415fff97029bd"
"revision": "7c5a29b721d409be8842017351bf007d7e384401"
}
}

View File

@ -454,7 +454,7 @@ list.dtd = {
list.earthfile = {
install_info = {
url = "https://github.com/glehmann/tree-sitter-earthfile",
files = { "src/parser.c", "src/scanner.c" },
files = { "src/parser.c" },
},
maintainers = { "@glehmann" },
}
@ -1699,6 +1699,14 @@ list.racket = {
},
}
list.ralph = {
install_info = {
url = "https://github.com/alephium/tree-sitter-ralph",
files = { "src/parser.c" },
},
maintainers = { "@tdroxler" },
}
list.rasi = {
install_info = {
url = "https://github.com/Fymyte/tree-sitter-rasi",
@ -1774,7 +1782,7 @@ list.robot = {
list.roc = {
install_info = {
url = "https://github.com/nat-418/tree-sitter-roc",
url = "https://github.com/faldor20/tree-sitter-roc",
files = { "src/parser.c", "src/scanner.c" },
},
maintainers = { "@nat-418" },

View File

@ -124,7 +124,7 @@ end, true)
---@param _bufnr integer
---@param pred string[]
---@return boolean|nil
query.add_predicate("has-type?", function(match, _pattern, _bufnr, pred)
query.add_predicate("kind-eq?", function(match, _pattern, _bufnr, pred)
if not valid_args(pred[1], pred, 2) then
return
end

View File

@ -397,6 +397,7 @@ function M.swap_nodes(node_or_range1, node_or_range2, bufnr, cursor_to_second)
local edit1 = { range = range1, newText = table.concat(text2, "\n") }
local edit2 = { range = range2, newText = table.concat(text1, "\n") }
bufnr = bufnr == 0 and vim.api.nvim_get_current_buf() or bufnr
vim.lsp.util.apply_text_edits({ edit1, edit2 }, bufnr, "utf-8")
if cursor_to_second then

View File

@ -152,6 +152,9 @@
field: (identifier) @variable.member)
; Variables
(variable_declarator
(identifier) @property)
(field_declaration
(modifiers
(modifier
@ -167,9 +170,6 @@
(variable_declarator
name: (identifier) @constant))
(variable_declarator
(identifier) @property)
((identifier) @constant
(#lua-match? @constant "^[A-Z][A-Z0-9_]+$")) ; SCREAM SNAKE CASE

View File

@ -24,14 +24,14 @@
((for_statement
body: (_) @_body) @indent.begin
(#not-has-type? @_body compound_statement))
(#not-kind-eq? @_body "compound_statement"))
(while_statement
condition: (_) @indent.begin)
((while_statement
body: (_) @_body) @indent.begin
(#not-has-type? @_body compound_statement))
(#not-kind-eq? @_body "compound_statement"))
((if_statement)
.
@ -45,7 +45,7 @@
(if_statement
consequence: (_
";" @indent.end) @_consequence
(#not-has-type? @_consequence compound_statement)
(#not-kind-eq? @_consequence "compound_statement")
alternative: (else_clause
"else" @indent.branch
[

View File

@ -31,8 +31,6 @@
"$"
"{"
"}"
"<"
">"
] @punctuation.special
[

View File

@ -105,24 +105,19 @@
(#lua-match? @variable.builtin "^[*].+[*]$"))
; quote
"'" @string.escape
(format_specifier) @string.escape
(quoting_lit) @string.escape
(quoting_lit
"'" @string.escape)
; syntax quote
"`" @string.escape
(syn_quoting_lit
"`" @string.escape)
"," @string.escape
(unquoting_lit
"," @string.escape)
",@" @string.escape
(syn_quoting_lit) @string.escape
(unquoting_lit) @none
(unquote_splicing_lit) @none
(unquote_splicing_lit
",@" @string.escape)
[
"("

View File

@ -1,5 +1,14 @@
(metadata) @comment
(comment) @comment @spell
[
"{"
"}"
] @punctuation.bracket
"%" @punctuation.special
(ingredient
"@" @punctuation.delimiter
(name)? @string.special.symbol

View File

@ -1,6 +1,7 @@
"let" @keyword
"in" @keyword
[
"let"
"in"
] @keyword
[
"{"
@ -11,8 +12,15 @@
"." @punctuation.delimiter
[
".."
"="
] @operator
(input) @constant
(null) @constant.builtin
(comment) @comment @spell
(string) @string
@ -21,6 +29,9 @@
(float) @number.float
(float
"." @number.float)
(boolean) @boolean
(null) @keyword
(path_seg) @property

View File

@ -1,3 +1,6 @@
((comment) @injection.content
(#set! injection.language "comment"))
(code_block
(language) @injection.language
(code) @injection.content)

View File

@ -29,15 +29,15 @@
(arrow_function
body: (_) @_body
(#not-has-type? @_body statement_block)) @indent.begin
(#not-kind-eq? @_body "statement_block")) @indent.begin
(assignment_expression
right: (_) @_right
(#not-has-type? @_right arrow_function function)) @indent.begin
(#not-kind-eq? @_right "arrow_function" "function")) @indent.begin
(variable_declarator
value: (_) @_value
(#not-has-type? @_value arrow_function call_expression function)) @indent.begin
(#not-kind-eq? @_value "arrow_function" "call_expression" "function")) @indent.begin
(arguments
")" @indent.end)

View File

@ -1,3 +1,6 @@
((comment) @injection.content
(#set! injection.language "comment"))
; Pass code blocks to Cpp highlighter
(code
(code_body) @injection.content

View File

@ -1,3 +1,6 @@
((comment) @injection.content
(#set! injection.language "comment"))
((operation
(command) @_command
(message) @injection.content)

View File

@ -9,7 +9,7 @@
(change) @keyword
(filepath) @string.special.url
(filepath) @string.special.path
(arrow) @punctuation.delimiter

View File

@ -147,9 +147,6 @@
(type_var)
] @type
((type_identifier) @type.builtin
(#any-of? @type.builtin "Int" "Float" "String" "List"))
; Type Qualifiers
[
"const"

View File

@ -19,7 +19,7 @@
((for_loop
body: (_) @_body) @indent.begin
(#not-has-type? @_body closure))
(#not-kind-eq? @_body "closure"))
; TODO: while, try
(list

View File

@ -20,7 +20,7 @@
(aura) @constant.builtin
(Gap) @comment
(lineComment) @comment
(boolean) @constant.builtin

View File

@ -1,13 +1,12 @@
[
((element
(start_tag
(tag_name) @_not_void_element))
(#not-any-of? @_not_void_element
"area" "base" "basefont" "bgsound" "br" "col" "command" "embed" "frame" "hr" "image" "img"
"input" "isindex" "keygen" "link" "menuitem" "meta" "nextid" "param" "source" "track" "wbr"))
(element
(self_closing_tag))
] @indent.begin
((element
(start_tag
(tag_name) @_not_void_element))
(#not-any-of? @_not_void_element
"area" "base" "basefont" "bgsound" "br" "col" "command" "embed" "frame" "hr" "image" "img"
"input" "isindex" "keygen" "link" "menuitem" "meta" "nextid" "param" "source" "track" "wbr")) @indent.begin
(element
(self_closing_tag)) @indent.begin
((start_tag
(tag_name) @_void_element)

View File

@ -22,6 +22,15 @@
(variable_name) @variable
(unpaired_statement
(tag_name)
(variable
(variable_name) @variable.parameter)
.
"="
.
(_))
(filter_name) @function.method
(filter_argument) @variable.parameter

View File

@ -1,3 +1,9 @@
([
(paired_comment)
(unpaired_comment)
] @injection.content
(#set! injection.language "comment"))
((content) @injection.content
(#set! injection.language "html")
(#set! injection.combined))

View File

@ -1,3 +1,6 @@
((comment) @injection.content
(#set! injection.language "comment"))
; injections.scm
((json_value) @injection.content
(#set! injection.language "json"))

View File

@ -36,6 +36,8 @@
(legacy_hex)
(angle)
(hex)
(display)
(position)
] @number
"deg" @type

View File

@ -1,3 +1,6 @@
((comment) @injection.content
(#set! injection.language "comment"))
(exec
(string) @injection.content
(#set! injection.language "bash"))

View File

@ -2,8 +2,8 @@
((foreach_statement
body: (_) @_body) @indent.begin
(#not-has-type? @_body compound_statement))
(#not-kind-eq? @_body "compound_statement"))
((foreach_instance_statement
body: (_) @_body) @indent.begin
(#not-has-type? @_body compound_statement))
(#not-kind-eq? @_body "compound_statement"))

View File

@ -75,13 +75,14 @@
"%=" "*=" "++" "+=" "--" "-=" "->" "->>" "-?>" "-?>>" "/=" "and" "as->" "as-macro" "as?->"
"assert" "case" "catseq" "chr" "comment" "compif" "comptime" "compwhen" "cond" "coro" "def-"
"default" "defdyn" "defer" "defmacro" "defmacro-" "defn" "defn-" "delay" "doc" "each" "eachk"
"eachp" "eachy"
; XXX: obsolete
"edefer" "ev/do-thread" "ev/gather" "ev/spawn" "ev/spawn-thread" "ev/with-deadline"
"ffi/defbind" "fiber-fn" "for" "forever" "forv" "generate" "if-let" "if-not" "if-with" "import"
"juxt" "label" "let" "loop" "match" "or" "prompt" "protect" "repeat" "seq" "short-fn" "tabseq"
"toggle" "tracev" "try" "unless" "use" "var-" "varfn" "when" "when-let" "when-with" "with"
"with-dyns" "with-syms" "with-vars"))
"eachp" "edefer" "ev/do-thread" "ev/gather" "ev/spawn" "ev/spawn-thread" "ev/with-deadline"
"ev/with-lock" "ev/with-rlock" "ev/with-wlock" "ffi/defbind" "ffi/defbind-alias" "fiber-fn"
"for" "forever" "forv" "generate" "if-let" "if-not" "if-with" "import" "juxt" "label" "let"
"loop" "match" "or" "prompt" "protect" "repeat" "seq" "short-fn" "tabseq" "toggle" "tracev"
"try" "unless" "use" "var-" "varfn" "when" "when-let" "when-with" "with" "with-dyns" "with-env"
"with-syms" "with-vars"
; obsolete builtin macros
"eachy"))
; All builtin functions
;
@ -101,74 +102,77 @@
"abstract?" "accumulate" "accumulate2" "all" "all-bindings" "all-dynamics" "any?" "apply"
"array" "array/clear" "array/concat" "array/ensure" "array/fill" "array/insert" "array/new"
"array/new-filled" "array/peek" "array/pop" "array/push" "array/remove" "array/slice"
"array/trim" "array?" "asm" "bad-compile" "bad-parse" "band" "blshift" "bnot" "boolean?" "bor"
"brshift" "brushift" "buffer" "buffer/bit" "buffer/bit-clear" "buffer/bit-set"
"buffer/bit-toggle" "buffer/blit" "buffer/clear" "buffer/fill" "buffer/format" "buffer/new"
"buffer/new-filled" "buffer/popn" "buffer/push" "buffer/push-at" "buffer/push-byte"
"buffer/push-string" "buffer/push-word" "buffer/slice" "buffer/trim" "buffer?" "bxor" "bytes?"
"cancel" "cfunction?" "cli-main" "cmp" "comp" "compare" "compare<" "compare<=" "compare="
"compare>" "compare>=" "compile" "complement" "count" "curenv" "debug" "debug/arg-stack"
"debug/break" "debug/fbreak" "debug/lineage" "debug/stack" "debug/stacktrace" "debug/step"
"debug/unbreak" "debug/unfbreak" "debugger" "debugger-on-status" "dec" "deep-not=" "deep="
"defglobal" "describe" "dictionary?" "disasm" "distinct" "div" "doc*" "doc-format" "doc-of"
"dofile" "drop" "drop-until" "drop-while" "dyn" "eflush" "empty?" "env-lookup" "eprin" "eprinf"
"eprint" "eprintf" "error" "errorf" "ev/acquire-lock" "ev/acquire-rlock" "ev/acquire-wlock"
"ev/all-tasks" "ev/call" "ev/cancel" "ev/capacity" "ev/chan" "ev/chan-close" "ev/chunk"
"ev/close" "ev/count" "ev/deadline" "ev/full" "ev/give" "ev/give-supervisor" "ev/go" "ev/lock"
"ev/read" "ev/release-lock" "ev/release-rlock" "ev/release-wlock" "ev/rselect" "ev/rwlock"
"ev/select" "ev/sleep" "ev/take" "ev/thread" "ev/thread-chan" "ev/write" "eval" "eval-string"
"even?" "every?" "extreme" "false?" "ffi/align" "ffi/call" "ffi/calling-convetions" "ffi/close"
"ffi/context" "ffi/free" "ffi/jitfn" "ffi/lookup" "ffi/malloc" "ffi/native" "ffi/pointer-buffer"
"ffi/pointer-cfunction" "ffi/read" "ffi/signature" "ffi/size" "ffi/struct" "ffi/trampoline"
"ffi/write" "fiber/can-resume?" "fiber/current" "fiber/getenv" "fiber/last-value"
"fiber/maxstack" "fiber/new" "fiber/root" "fiber/setenv" "fiber/setmaxstack" "fiber/status"
"fiber?" "file/close" "file/flush" "file/lines" "file/open" "file/read" "file/seek" "file/tell"
"file/temp" "file/write" "filter" "find" "find-index" "first" "flatten" "flatten-into" "flush"
"flycheck" "freeze" "frequencies" "from-pairs" "function?" "gccollect" "gcinterval"
"gcsetinterval" "gensym" "get" "get-in" "getline" "getproto" "group-by" "has-key?" "has-value?"
"hash" "idempotent?" "identity" "import*" "in" "inc" "index-of" "indexed?" "int/s64"
"int/to-bytes" "int/to-number" "int/u64" "int?" "interleave" "interpose" "invert" "juxt*" "keep"
"keep-syntax" "keep-syntax!" "keys" "keyword" "keyword/slice" "keyword?" "kvs" "last" "length"
"load-image" "macex" "macex1" "maclintf" "make-env" "make-image" "map" "mapcat" "marshal"
"math/abs" "math/acos" "math/acosh" "math/asin" "math/asinh" "math/atan" "math/atan2"
"math/atanh" "math/cbrt" "math/ceil" "math/cos" "math/cosh" "math/erf" "math/erfc" "math/exp"
"math/exp2" "math/expm1" "math/floor" "math/gamma" "math/gcd" "math/hypot" "math/lcm" "math/log"
"math/log-gamma" "math/log10" "math/log1p" "math/log2" "math/next" "math/pow" "math/random"
"math/rng" "math/rng-buffer" "math/rng-int" "math/rng-uniform" "math/round" "math/seedrandom"
"math/sin" "math/sinh" "math/sqrt" "math/tan" "math/tanh" "math/trunc" "max" "max-of" "mean"
"memcmp" "merge" "merge-into" "merge-module" "min" "min-of" "mod" "module/add-paths"
"module/expand-path" "module/find" "module/value" "nan?" "nat?" "native" "neg?" "net/accept"
"net/accept-loop" "net/address" "net/address-unpack" "net/chunk" "net/close" "net/connect"
"net/flush" "net/listen" "net/localname" "net/peername" "net/read" "net/recv-from" "net/send-to"
"net/server" "net/setsockopt" "net/shutdown" "net/write" "next" "nil?" "not" "not=" "number?"
"odd?" "one?" "os/arch" "os/cd" "os/chmod" "os/clock" "os/compiler" "os/cpu-count"
"os/cryptorand" "os/cwd" "os/date" "os/dir" "os/environ" "os/execute" "os/exit" "os/getenv"
"os/link" "os/lstat" "os/mkdir" "os/mktime" "os/open" "os/perm-int" "os/perm-string" "os/pipe"
"os/proc-close" "os/proc-kill" "os/proc-wait" "os/readlink" "os/realpath" "os/rename" "os/rm"
"os/rmdir" "os/setenv" "os/shell" "os/sleep" "os/spawn" "os/stat" "os/symlink" "os/time"
"os/touch" "os/umask" "os/which" "pairs" "parse" "parse-all" "parser/byte" "parser/clone"
"parser/consume" "parser/eof" "parser/error" "parser/flush" "parser/has-more" "parser/insert"
"parser/new" "parser/produce" "parser/state" "parser/status" "parser/where" "partial"
"partition" "partition-by" "peg/compile" "peg/find" "peg/find-all" "peg/match" "peg/replace"
"peg/replace-all" "pos?" "postwalk" "pp" "prewalk" "prin" "prinf" "print" "printf" "product"
"propagate" "put" "put-in" "quit" "range" "reduce" "reduce2" "repl" "require" "resume" "return"
"reverse" "reverse!" "run-context" "sandbox" "scan-number" "setdyn" "signal" "slice" "slurp"
"some" "sort" "sort-by" "sorted" "sorted-by" "spit" "string" "string/ascii-lower"
"string/ascii-upper" "string/bytes" "string/check-set" "string/find" "string/find-all"
"string/format" "string/from-bytes" "string/has-prefix?" "string/has-suffix?" "string/join"
"string/repeat" "string/replace" "string/replace-all" "string/reverse" "string/slice"
"string/split" "string/trim" "string/triml" "string/trimr" "string?" "struct" "struct/getproto"
"struct/proto-flatten" "struct/to-table" "struct/with-proto" "struct?" "sum" "symbol"
"symbol/slice" "symbol?" "table" "table/clear" "table/clone" "table/getproto" "table/new"
"table/proto-flatten" "table/rawget" "table/setproto" "table/to-struct" "table?" "take"
"take-until" "take-while"
"array/trim" "array/weak" "array?" "asm" "bad-compile" "bad-parse" "band" "blshift" "bnot"
"boolean?" "bor" "brshift" "brushift" "buffer" "buffer/bit" "buffer/bit-clear" "buffer/bit-set"
"buffer/bit-toggle" "buffer/blit" "buffer/clear" "buffer/fill" "buffer/format"
"buffer/format-at" "buffer/from-bytes" "buffer/new" "buffer/new-filled" "buffer/popn"
"buffer/push" "buffer/push-at" "buffer/push-byte" "buffer/push-float32" "buffer/push-float64"
"buffer/push-string" "buffer/push-uint16" "buffer/push-uint32" "buffer/push-uint64"
"buffer/push-word" "buffer/slice" "buffer/trim" "buffer?" "bundle/add" "bundle/add-directory"
"bundle/add-file" "bundle/install" "bundle/installed?" "bundle/list" "bundle/manifest"
"bundle/prune" "bundle/reinstall" "bundle/topolist" "bundle/uninstall" "bundle/update-all"
"bxor" "bytes?" "cancel" "cfunction?" "cli-main" "cmp" "comp" "compare" "compare<" "compare<="
"compare=" "compare>" "compare>=" "compile" "complement" "count" "curenv" "debug"
"debug/arg-stack" "debug/break" "debug/fbreak" "debug/lineage" "debug/stack" "debug/stacktrace"
"debug/step" "debug/unbreak" "debug/unfbreak" "debugger" "debugger-on-status" "dec" "deep-not="
"deep=" "defglobal" "describe" "dictionary?" "disasm" "distinct" "div" "doc*" "doc-format"
"doc-of" "dofile" "drop" "drop-until" "drop-while" "dyn" "eflush" "empty?" "env-lookup" "eprin"
"eprinf" "eprint" "eprintf" "error" "errorf" "ev/acquire-lock" "ev/acquire-rlock"
"ev/acquire-wlock" "ev/all-tasks" "ev/call" "ev/cancel" "ev/capacity" "ev/chan" "ev/chan-close"
"ev/chunk" "ev/close" "ev/count" "ev/deadline" "ev/full" "ev/give" "ev/give-supervisor" "ev/go"
"ev/lock" "ev/read" "ev/release-lock" "ev/release-rlock" "ev/release-wlock" "ev/rselect"
"ev/rwlock" "ev/select" "ev/sleep" "ev/take" "ev/thread" "ev/thread-chan" "ev/write" "eval"
"eval-string" "even?" "every?" "extreme" "false?" "ffi/align" "ffi/call"
"ffi/calling-conventions" "ffi/close" "ffi/context" "ffi/free" "ffi/jitfn" "ffi/lookup"
"ffi/malloc" "ffi/native" "ffi/pointer-buffer" "ffi/pointer-cfunction" "ffi/read"
"ffi/signature" "ffi/size" "ffi/struct" "ffi/trampoline" "ffi/write" "fiber/can-resume?"
"fiber/current" "fiber/getenv" "fiber/last-value" "fiber/maxstack" "fiber/new" "fiber/root"
"fiber/setenv" "fiber/setmaxstack" "fiber/status" "fiber?" "file/close" "file/flush"
"file/lines" "file/open" "file/read" "file/seek" "file/tell" "file/temp" "file/write" "filter"
"find" "find-index" "first" "flatten" "flatten-into" "flush" "flycheck" "freeze" "frequencies"
"from-pairs" "function?" "gccollect" "gcinterval" "gcsetinterval" "gensym" "get" "get-in"
"getline" "getproto" "group-by" "has-key?" "has-value?" "hash" "idempotent?" "identity"
"import*" "in" "inc" "index-of" "indexed?" "int/s64" "int/to-bytes" "int/to-number" "int/u64"
"int?" "interleave" "interpose" "invert" "juxt*" "keep" "keep-syntax" "keep-syntax!" "keys"
"keyword" "keyword/slice" "keyword?" "kvs" "last" "length" "lengthable?" "load-image" "macex"
"macex1" "maclintf" "make-env" "make-image" "map" "mapcat" "marshal" "math/abs" "math/acos"
"math/acosh" "math/asin" "math/asinh" "math/atan" "math/atan2" "math/atanh" "math/cbrt"
"math/ceil" "math/cos" "math/cosh" "math/erf" "math/erfc" "math/exp" "math/exp2" "math/expm1"
"math/floor" "math/frexp" "math/gamma" "math/gcd" "math/hypot" "math/lcm" "math/ldexp"
"math/log" "math/log-gamma" "math/log10" "math/log1p" "math/log2" "math/next" "math/pow"
"math/random" "math/rng" "math/rng-buffer" "math/rng-int" "math/rng-uniform" "math/round"
"math/seedrandom" "math/sin" "math/sinh" "math/sqrt" "math/tan" "math/tanh" "math/trunc" "max"
"max-of" "mean" "memcmp" "merge" "merge-into" "merge-module" "min" "min-of" "mod"
"module/add-paths" "module/expand-path" "module/find" "module/value" "nan?" "nat?" "native"
"neg?" "net/accept" "net/accept-loop" "net/address" "net/address-unpack" "net/chunk" "net/close"
"net/connect" "net/flush" "net/listen" "net/localname" "net/peername" "net/read" "net/recv-from"
"net/send-to" "net/server" "net/setsockopt" "net/shutdown" "net/write" "next" "nil?" "not"
"not=" "number?" "odd?" "one?" "os/arch" "os/cd" "os/chmod" "os/clock" "os/compiler"
"os/cpu-count" "os/cryptorand" "os/cwd" "os/date" "os/dir" "os/environ" "os/execute" "os/exit"
"os/getenv" "os/isatty" "os/link" "os/lstat" "os/mkdir" "os/mktime" "os/open" "os/perm-int"
"os/perm-string" "os/pipe" "os/posix-exec" "os/posix-fork" "os/proc-close" "os/proc-kill"
"os/proc-wait" "os/readlink" "os/realpath" "os/rename" "os/rm" "os/rmdir" "os/setenv"
"os/setlocale" "os/shell" "os/sigaction" "os/sleep" "os/spawn" "os/stat" "os/strftime"
"os/symlink" "os/time" "os/touch" "os/umask" "os/which" "pairs" "parse" "parse-all"
"parser/byte" "parser/clone" "parser/consume" "parser/eof" "parser/error" "parser/flush"
"parser/has-more" "parser/insert" "parser/new" "parser/produce" "parser/state" "parser/status"
"parser/where" "partial" "partition" "partition-by" "peg/compile" "peg/find" "peg/find-all"
"peg/match" "peg/replace" "peg/replace-all" "pos?" "postwalk" "pp" "prewalk" "prin" "prinf"
"print" "printf" "product" "propagate" "put" "put-in" "quit" "range" "reduce" "reduce2" "repl"
"require" "resume" "return" "reverse" "reverse!" "run-context" "sandbox" "scan-number" "setdyn"
"signal" "slice" "slurp" "some" "sort" "sort-by" "sorted" "sorted-by" "spit" "string"
"string/ascii-lower" "string/ascii-upper" "string/bytes" "string/check-set" "string/find"
"string/find-all" "string/format" "string/from-bytes" "string/has-prefix?" "string/has-suffix?"
"string/join" "string/repeat" "string/replace" "string/replace-all" "string/reverse"
"string/slice" "string/split" "string/trim" "string/triml" "string/trimr" "string?" "struct"
"struct/getproto" "struct/proto-flatten" "struct/to-table" "struct/with-proto" "struct?" "sum"
"symbol" "symbol/slice" "symbol?" "table" "table/clear" "table/clone" "table/getproto"
"table/new" "table/proto-flatten" "table/rawget" "table/setproto" "table/to-struct" "table/weak"
"table/weak-keys" "table/weak-values" "table?" "take" "take-until" "take-while" "thaw" "trace"
"true?" "truthy?" "tuple" "tuple/brackets" "tuple/setmap" "tuple/slice" "tuple/sourcemap"
"tuple/type" "tuple?" "type" "unmarshal" "untrace" "update" "update-in" "values" "varglobal"
"walk" "warn-compile" "xprin" "xprinf" "xprint" "xprintf" "yield" "zero?" "zipcoll"
; XXX: obsolete
"tarray/buffer" "tarray/copy-bytes" "tarray/length" "tarray/new" "tarray/properties"
"tarray/slice" "tarray/swap-bytes"
; XXX: obsolete
"thread/close" "thread/current" "thread/exit" "thread/new" "thread/receive" "thread/send"
; end of obsolete
"trace" "true?" "truthy?" "tuple" "tuple/brackets" "tuple/setmap" "tuple/slice"
"tuple/sourcemap" "tuple/type" "tuple?" "type" "unmarshal" "untrace" "update" "update-in"
"values" "varglobal" "walk" "warn-compile" "xprin" "xprinf" "xprint" "xprintf" "yield" "zero?"
"zipcoll"))
"tarray/slice" "tarray/swap-bytes" "thread/close" "thread/current" "thread/exit" "thread/new"
"thread/receive" "thread/send"))

View File

@ -58,26 +58,25 @@
; jq -n 'builtins | map(split("/")[0]) | unique | .[]'
((funcname) @function.builtin
(#any-of? @function.builtin
"IN" "INDEX" "JOIN" "acos" "acosh" "add" "all" "any" "arrays" "ascii_downcase" "ascii_upcase"
"asin" "asinh" "atan" "atan2" "atanh" "booleans" "bsearch" "builtins" "capture" "cbrt" "ceil"
"combinations" "contains" "copysign" "cos" "cosh" "debug" "del" "delpaths" "drem" "empty"
"endswith" "env" "erf" "erfc" "error" "exp" "exp10" "exp2" "explode" "expm1" "fabs" "fdim"
"finites" "first" "flatten" "floor" "fma" "fmax" "fmin" "fmod" "format" "frexp" "from_entries"
"fromdate" "fromdateiso8601" "fromjson" "fromstream" "gamma" "get_jq_origin" "get_prog_origin"
"get_search_list" "getpath" "gmtime" "group_by" "gsub" "halt" "halt_error" "has" "hypot"
"implode" "in" "index" "indices" "infinite" "input" "input_filename" "input_line_number"
"inputs" "inside" "isempty" "isfinite" "isinfinite" "isnan" "isnormal" "iterables" "j0" "j1"
"jn" "join" "keys" "keys_unsorted" "last" "ldexp" "leaf_paths" "length" "lgamma" "lgamma_r"
"limit" "localtime" "log" "log10" "log1p" "log2" "logb" "ltrimstr" "map" "map_values" "match"
"max" "max_by" "min" "min_by" "mktime" "modf" "modulemeta" "nan" "nearbyint" "nextafter"
"nexttoward" "normals" "not" "now" "nth" "nulls" "numbers" "objects" "path" "paths" "pow"
"pow10" "range" "recurse" "recurse_down" "remainder" "repeat" "reverse" "rindex" "rint" "round"
"rtrimstr" "scalars" "scalars_or_empty" "scalb" "scalbln" "scan" "select" "setpath"
"significand" "sin" "sinh" "sort" "sort_by" "split" "splits" "sqrt" "startswith" "stderr"
"strflocaltime" "strftime" "strings" "strptime" "sub" "tan" "tanh" "test" "tgamma" "to_entries"
"todate" "todateiso8601" "tojson" "tonumber" "tostream" "tostring" "transpose" "trunc"
"truncate_stream" "type" "unique" "unique_by" "until" "utf8bytelength" "values" "walk" "while"
"with_entries" "y0" "y1" "yn"))
"IN" "INDEX" "JOIN" "abs" "acos" "acosh" "add" "all" "any" "arrays" "ascii_downcase"
"ascii_upcase" "asin" "asinh" "atan" "atan2" "atanh" "booleans" "bsearch" "builtins" "capture"
"cbrt" "ceil" "combinations" "contains" "copysign" "cos" "cosh" "debug" "del" "delpaths" "drem"
"empty" "endswith" "env" "erf" "erfc" "error" "exp" "exp10" "exp2" "explode" "expm1" "fabs"
"fdim" "finites" "first" "flatten" "floor" "fma" "fmax" "fmin" "fmod" "format" "frexp"
"from_entries" "fromdate" "fromdateiso8601" "fromjson" "fromstream" "gamma" "get_jq_origin"
"get_prog_origin" "get_search_list" "getpath" "gmtime" "group_by" "gsub" "halt" "halt_error"
"has" "hypot" "implode" "in" "index" "indices" "infinite" "input" "input_filename"
"input_line_number" "inputs" "inside" "isempty" "isfinite" "isinfinite" "isnan" "isnormal"
"iterables" "j0" "j1" "jn" "join" "keys" "keys_unsorted" "last" "ldexp" "length" "lgamma"
"lgamma_r" "limit" "localtime" "log" "log10" "log1p" "log2" "logb" "ltrimstr" "map" "map_values"
"match" "max" "max_by" "min" "min_by" "mktime" "modf" "modulemeta" "nan" "nearbyint" "nextafter"
"nexttoward" "normals" "not" "now" "nth" "nulls" "numbers" "objects" "path" "paths" "pick" "pow"
"pow10" "range" "recurse" "remainder" "repeat" "reverse" "rindex" "rint" "round" "rtrimstr"
"scalars" "scalb" "scalbln" "scan" "select" "setpath" "significand" "sin" "sinh" "sort"
"sort_by" "split" "splits" "sqrt" "startswith" "stderr" "strflocaltime" "strftime" "strings"
"strptime" "sub" "tan" "tanh" "test" "tgamma" "to_entries" "todate" "todateiso8601" "tojson"
"tonumber" "tostream" "tostring" "transpose" "trunc" "truncate_stream" "type" "unique"
"unique_by" "until" "utf8bytelength" "values" "walk" "while" "with_entries" "y0" "y1" "yn"))
; Keywords
[

View File

@ -1,3 +1,6 @@
((comment) @injection.content
(#set! injection.language "comment"))
; The right side of =~ literals
(regex_literal
(_) @injection.content

View File

@ -4,16 +4,16 @@
; Definitions
(arg
(identifier) @local.definition.parameter)
(variable) @local.definition.parameter)
(assign
(identifier) @local.definition.var)
(for_args
(identifier) @local.definition.var)
(variable) @local.definition.var)
(match_patterns
(identifier) @local.definition.var)
(variable) @local.definition.var)
(import_item
(identifier) @local.definition.import)

View File

@ -104,7 +104,7 @@
(bool) @boolean
(comment) @comment
(comment) @comment @spell
(regexp) @string.regexp

View File

@ -12,7 +12,6 @@
(return_statement)
(table_constructor)
(arguments)
(return_statement)
] @indent.begin
[

View File

@ -8,28 +8,22 @@
(setext_h2_underline) @markup.heading.2)
(atx_heading
(atx_h1_marker) @markup.heading.1
(inline) @markup.heading.1)
(atx_h1_marker)) @markup.heading.1
(atx_heading
(atx_h2_marker) @markup.heading.2
(inline) @markup.heading.2)
(atx_h2_marker)) @markup.heading.2
(atx_heading
(atx_h3_marker) @markup.heading.3
(inline) @markup.heading.3)
(atx_h3_marker)) @markup.heading.3
(atx_heading
(atx_h4_marker) @markup.heading.4
(inline) @markup.heading.4)
(atx_h4_marker)) @markup.heading.4
(atx_heading
(atx_h5_marker) @markup.heading.5
(inline) @markup.heading.5)
(atx_h5_marker)) @markup.heading.5
(atx_heading
(atx_h6_marker) @markup.heading.6
(inline) @markup.heading.6)
(atx_h6_marker)) @markup.heading.6
(info_string) @label

View File

@ -85,12 +85,15 @@
[
(link_destination)
(uri_autolink)
(email_autolink)
] @markup.link.url @nospell
(entity_reference) @nospell
; Replace common HTML entities.
((entity_reference) @character.special
(#eq? @character.special "&nbsp;")
(#set! conceal ""))
(#set! conceal " "))
((entity_reference) @character.special
(#eq? @character.special "&lt;")

View File

@ -1,2 +1,9 @@
([
(comment)
(line_comment)
(ocaml_comment)
] @injection.content
(#set! injection.language "comment"))
((ocaml) @injection.content
(#set! injection.language "ocaml"))

View File

@ -28,7 +28,7 @@
((else_clause
(_) @_not_if) @indent.begin
(#not-has-type? @_not_if if_expression))
(#not-kind-eq? @_not_if "if_expression"))
((parameter) @indent.begin
(#set! indent.start_at_same_line))

View File

@ -192,7 +192,7 @@
(identifier) @type)
((identifier) @type
(#lua-match? @type "^[A-Z][a-zA-Z0-9]*$")
(#lua-match? @type "^[_A-Z][_a-zA-Z0-9]*$")
(#not-has-parent? @type parameter procedure_declaration call_expression))
; Fields

View File

@ -23,9 +23,6 @@
(match_expression)
]) @indent.dedent
(member_call_expression
object: (member_call_expression) @indent.branch)
[
")"
"}"

View File

@ -1,3 +1,6 @@
((comment) @injection.content
(#set! injection.language "comment"))
((label_value) @injection.content
(#set! injection.language "regex")
(#offset! @injection.content 0 1 0 -1))

View File

@ -1,3 +1,6 @@
((comment) @injection.content
(#set! injection.language "comment"))
((javascript) @injection.content
(#set! injection.language "javascript"))

View File

@ -79,29 +79,12 @@
] @keyword
;----headers-----
(interface_header
(name) @type.definition)
(imports
(imports_entry
(module) @module))
(packages
(record_pattern
(record_field_pattern
(field_name) @module)))
(app_name) @string.special
(import_path) @string.special.path
[
"app"
"packages"
"provides"
"interface"
"exposes"
"expect"
"module"
"package"
"import"
] @keyword
[
@ -184,6 +167,9 @@
(float)
] @number.float
(string) @string
[
(string)
(multiline_string)
] @string
(char) @character

View File

@ -8,6 +8,10 @@
(exposes_list
(ident) @local.reference)
(import_expr
(as)
(module) @local.definition)
(opaque_type_def
(apply_type
(concrete_type) @local.definition.type))
@ -31,9 +35,6 @@
(identifier_pattern
(identifier) @local.definition)
(exposes
(ident) @local.reference)
(identifier) @local.reference
(tag_expr

View File

@ -21,4 +21,5 @@
(macro_definition)
(macro_invocation)
(attribute_item)
(block)
] @fold

View File

@ -120,6 +120,9 @@
(binding
name: (identifier) @variable.parameter)
(lambda_expression
parameters: (identifier) @variable.parameter)
; expressions
(field_expression
field: (identifier) @variable.member)
@ -177,7 +180,6 @@
; `macro` not implemented yet
"object"
"override"
"package"
"val"
"var"
"with"
@ -211,6 +213,8 @@
(wildcard) @variable.parameter
(namespace_wildcard) @punctuation.special
(annotation) @attribute
; special keywords
@ -235,6 +239,7 @@
[
"."
","
":"
] @punctuation.delimiter
[
@ -248,6 +253,9 @@
[
"=>"
"?=>"
"="
"!"
"<-"
"@"
] @operator
@ -255,6 +263,7 @@
[
"import"
"export"
"package"
] @keyword.import
[
@ -278,6 +287,10 @@
(case_clause
"case" @keyword.conditional))
(case_block
(case_clause
"=>" @punctuation.delimiter))
(operator_identifier) @operator
((identifier) @type

View File

@ -2,6 +2,7 @@
[
(rule_definition)
(rule_inheritance)
(module_definition)
(checkpoint_definition)
] @fold

View File

@ -100,6 +100,8 @@
(modify_specifier)
] @keyword
(shebang_line) @keyword.directive
(class_body
(property_declaration
(pattern

View File

@ -66,7 +66,7 @@
(_)* @indent.branch)
.
_ @indent.branch
(#not-has-type? @indent.branch type_parameters parameter))
(#not-kind-eq? @indent.branch "type_parameters" "parameter"))
(ERROR
[

View File

@ -33,7 +33,8 @@
; ('...'):format()
((function_call
(method_index
(string) @printf
(parenthesized_expression
(string) @printf)
key: (identifier) @_func))
(#eq? @_func "format")
(#set! injection.language "printf"))

View File

@ -2,7 +2,7 @@
(field_name) @variable.member
(comment) @comment
(comment) @comment @spell
(number) @number

View File

@ -1,3 +1,6 @@
((comment) @injection.content
(#set! injection.language "comment"))
((content) @injection.content
(#set! injection.language "html")
(#set! injection.combined))

View File

@ -1,13 +1,19 @@
(h1) @markup.heading.1
(h1
(delimiter) @markup.heading.1
(heading) @markup.heading.1)
(h2) @markup.heading.2
(h2
(delimiter) @markup.heading.2
(heading) @markup.heading.2)
(h3) @markup.heading.3
(column_heading) @markup.heading.4
(h3
(heading) @markup.heading.3)
(column_heading
"~" @markup.heading.4
(heading) @markup.heading.4)
(column_heading
(delimiter) @markup.heading.4
(#set! conceal ""))
(tag

View File

@ -1,4 +1,4 @@
#!/nix/store/php4qidg2bxzmm79vpri025bqi0fa889-coreutils-9.5/bin/env -S -l
#!/nix/store/i7qhgc0bs725qw3wdanznfkdna4z2ns2-coreutils-9.5/bin/env -S -l
vim.opt.rtp:prepend "./"
-- Equivalent to print(), but this will ensure consistent output regardless of

View File

@ -1,4 +1,4 @@
#!/nix/store/306znyj77fv49kwnkpxmb0j2znqpa8bj-bash-5.2p26/bin/bash
#!/nix/store/agkxax48k35wdmkhmmija2i2sxg8i7ny-bash-5.2p26/bin/bash
set -e

View File

@ -1,4 +1,4 @@
#!/nix/store/php4qidg2bxzmm79vpri025bqi0fa889-coreutils-9.5/bin/env -S -l
#!/nix/store/i7qhgc0bs725qw3wdanznfkdna4z2ns2-coreutils-9.5/bin/env -S -l
local ts = vim.treesitter
local get_node_text = ts.get_node_text
@ -13,7 +13,7 @@ else
files = vim.fn.split(vim.fn.glob(arg .. "/**/*.scm"))
end
ts.query.add_predicate("has-type?", function(match, _, _, pred)
ts.query.add_predicate("kind-eq?", function(match, _, _, pred)
local node = match[pred[2]]
if not node then
return true
@ -132,7 +132,7 @@ local format_queries = [[
;; Append newlines for nodes inside the list
(list
(_) @format.append-newline
(#not-has-type? @format.append-newline capture quantifier))
(#not-kind-eq? @format.append-newline "capture" "quantifier"))
;; (_), "_" and _ handler
;; Start indents if it's one of these patterns
@ -194,7 +194,7 @@ local format_queries = [[
] @format.cancel-append
.
")"
(#not-has-type? @format.cancel-append comment))
(#not-kind-eq? @format.cancel-append "comment"))
;; All captures should be separated with a space
(capture) @format.prepend-space
@ -233,7 +233,7 @@ local format_queries = [[
;; Collapsing closing parens
(grouping
(_) @format.cancel-append . ")"
(#not-has-type? @format.cancel-append comment))
(#not-kind-eq? @format.cancel-append "comment"))
(grouping
(capture) @format.prepend-space)
;; Remove unnecessary parens

View File

@ -1,4 +1,4 @@
#!/nix/store/306znyj77fv49kwnkpxmb0j2znqpa8bj-bash-5.2p26/bin/bash
#!/nix/store/agkxax48k35wdmkhmmija2i2sxg8i7ny-bash-5.2p26/bin/bash
# Can be used as a pre-push hook
# Just symlink this file to .git/hooks/pre-push

View File

@ -1,4 +1,4 @@
#!/nix/store/306znyj77fv49kwnkpxmb0j2znqpa8bj-bash-5.2p26/bin/bash
#!/nix/store/agkxax48k35wdmkhmmija2i2sxg8i7ny-bash-5.2p26/bin/bash
HERE="$(dirname "$(realpath "${BASH_SOURCE[0]}")")"
cd $HERE/..

View File

@ -1,4 +1,4 @@
#!/nix/store/306znyj77fv49kwnkpxmb0j2znqpa8bj-bash-5.2p26/bin/bash
#!/nix/store/agkxax48k35wdmkhmmija2i2sxg8i7ny-bash-5.2p26/bin/bash
make_ignored() {
if [[ -n $1 ]]; then

View File

@ -1,4 +1,4 @@
#!/nix/store/php4qidg2bxzmm79vpri025bqi0fa889-coreutils-9.5/bin/env -S -l
#!/nix/store/i7qhgc0bs725qw3wdanznfkdna4z2ns2-coreutils-9.5/bin/env -S -l
---@class Parser
---@field name string

View File

@ -1,4 +1,4 @@
#!/nix/store/php4qidg2bxzmm79vpri025bqi0fa889-coreutils-9.5/bin/env -S -l
#!/nix/store/i7qhgc0bs725qw3wdanznfkdna4z2ns2-coreutils-9.5/bin/env -S -l
---@type string|any[]
local skip_langs = vim.fn.getenv "SKIP_LOCKFILE_UPDATE_FOR_LANGS"

View File

@ -5,14 +5,14 @@ pub fn add(x: Int, y: Int) -> Int {
// ^ @punctuation.bracket
// ^ @variable.parameter
// ^ @punctuation.delimiter
// ^^^ @type.builtin
// ^^^ @type
// ^ @punctuation.delimiter
// ^ @variable.parameter
// ^ @punctuation.delimiter
// ^^^ @type.builtin
// ^^^ @type
// ^ @punctuation.bracket
// ^ @punctuation.delimiter
// ^^^ @type.builtin
// ^^^ @type
// ^ @punctuation.bracket
}
// <- @punctuation.bracket
@ -50,7 +50,7 @@ fn list_of_two(my_value: a) -> List(a) {
// ^ @type
// ^ @punctuation.bracket
// ^ @punctuation.delimiter
// ^^^^ @type.builtin
// ^^^^ @type
// ^ @punctuation.bracket
// ^ @type
// ^ @punctuation.bracket
@ -66,19 +66,19 @@ fn replace(
// <- @label
// ^^^^^^ @variable.parameter
// ^ @punctuation.delimiter
// ^^^^^^ @type.builtin
// ^^^^^^ @type
// ^ @punctuation.delimiter
each pattern: String,
// <- @label
// ^^^^^^^ @variable.parameter
// ^ @punctuation.delimiter
// ^^^^^^ @type.builtin
// ^^^^^^ @type
// ^ @punctuation.delimiter
with replacement: String,
// <- @label
// ^^^^^^^^^^^ @variable.parameter
// ^ @punctuation.delimiter
// ^^^^^^ @type.builtin
// ^^^^^^ @type
// ^ @punctuation.delimiter
) {
replace(in: "A,B,C", each: ",", with: " ")
@ -107,7 +107,7 @@ pub external fn random_float() -> Float = "rand" "uniform"
// ^ @punctuation.bracket
// ^ @punctuation.bracket
// ^^ @punctuation.delimiter
// ^^^^^ @type.builtin
// ^^^^^ @type
// ^ @operator
// ^^^^^^ @module
// ^^^^^^^^^ @function

View File

@ -8,11 +8,11 @@ pub type Cat {
// ^ @punctuation.bracket
// ^^^^ @variable.member
// ^ @punctuation.delimiter
// ^^^^^^ @type.builtin
// ^^^^^^ @type
// ^ @punctuation.delimiter
// ^^^^^^^^ @variable.member
// ^ @punctuation.delimiter
// ^^^ @type.builtin
// ^^^ @type
// ^ @punctuation.bracket
}

View File

@ -29,6 +29,7 @@ local function check_assertions(file)
)
)
local parser = parsers.get_parser(buf, lang)
parser:parse(true)
local self = highlighter.new(parser, {})
@ -39,12 +40,13 @@ local function check_assertions(file)
local captures = {}
local highlights = {}
self.tree:for_each_tree(function(tstree, tree)
if not tstree then
self:prepare_highlight_states(row, row + 1)
self:for_each_highlight_state(function(state)
if not state.tstree then
return
end
local root = tstree:root()
local root = state.tstree:root()
local root_start_row, _, root_end_row, _ = root:range()
-- Only worry about trees within the line range
@ -52,7 +54,7 @@ local function check_assertions(file)
return
end
local query = self:get_query(tree:lang())
local query = state.highlighter_query
-- Some injected languages may not have highlight queries.
if not query:query() then
@ -62,7 +64,7 @@ local function check_assertions(file)
local iter = query:query():iter_captures(root, self.bufnr, row, row + 1)
for capture, node, _ in iter do
local hl = query.hl_cache[capture]
local hl = query:get_hl_from_capture(capture)
assert.is.truthy(hl)
assert.Truthy(node)

View File

@ -1,5 +1,4 @@
require "nvim-treesitter.highlight" -- yes, this is necessary to set the hlmap
local highlighter = require "vim.treesitter.highlighter"
local configs = require "nvim-treesitter.configs"
local parsers = require "nvim-treesitter.parsers"
local ts = vim.treesitter
@ -21,8 +20,8 @@ local function check_assertions(file)
)
local parser = parsers.get_parser(buf, lang)
local self = highlighter.new(parser, {})
local top_level_root = parser:parse()[1]:root()
local self = parser
local top_level_root = parser:parse(true)[1]:root()
for _, assertion in ipairs(assertions) do
local row = assertion.position.row
@ -32,7 +31,7 @@ local function check_assertions(file)
assertion.expected_capture_name = neg_assert and assertion.expected_capture_name:sub(2)
or assertion.expected_capture_name
local found = false
self.tree:for_each_tree(function(tstree, tree)
self:for_each_tree(function(tstree, tree)
if not tstree then
return
end