diff --git a/.gitmodules b/.gitmodules index 2407001d..9856f3c5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,39 +1,63 @@ -[submodule "sublime_syntaxes/Packages"] - path = sublime_syntaxes/Packages +[submodule "sublime/syntaxes/Packages"] + path = sublime/syntaxes/Packages url = https://github.com/sublimehq/Packages.git -[submodule "sublime_syntaxes/sublimeassembly"] - path = sublime_syntaxes/sublimeassembly - url = https://github.com/Nessphoro/sublimeassembly.git -[submodule "sublime_syntaxes/LESS-sublime"] - path = sublime_syntaxes/LESS-sublime - url = https://github.com/danro/LESS-sublime.git -[submodule "sublime_syntaxes/Handlebars"] - path = sublime_syntaxes/Handlebars - url = https://github.com/daaain/Handlebars.git -[submodule "sublime_syntaxes/Julia-sublime"] - path = sublime_syntaxes/Julia-sublime - url = https://github.com/JuliaEditorSupport/Julia-sublime.git -[submodule "sublime_syntaxes/sublime_toml_highlighting"] - path = sublime_syntaxes/sublime_toml_highlighting - url = https://github.com/Jayflux/sublime_toml_highlighting.git -[submodule "sublime_syntaxes/SublimeTextLinkerSyntax"] - path = sublime_syntaxes/SublimeTextLinkerSyntax - url = https://github.com/jbw3/SublimeTextLinkerSyntax.git -[submodule "sublime_syntaxes/Sublime-GenericConfig"] - path = sublime_syntaxes/Sublime-GenericConfig - url = https://github.com/skozlovf/Sublime-GenericConfig.git -[submodule "sublime_syntaxes/Sublime-VimL"] - path = sublime_syntaxes/Sublime-VimL +[submodule "sublime/syntaxes/awk-sublime"] + path = sublime/syntaxes/awk-sublime + url = https://github.com/JohnNilsson/awk-sublime.git +[submodule "sublime/syntaxes/AsciiDoc"] + path = sublime/syntaxes/AsciiDoc + url = https://github.com/SublimeText/AsciiDoc.git +[submodule "sublime/syntaxes/Sublime-CMakeLists"] + path = sublime/syntaxes/Sublime-CMakeLists + url = https://github.com/zyxar/Sublime-CMakeLists.git +[submodule "sublime/syntaxes/SublimeTextLinkerSyntax"] + path = sublime/syntaxes/SublimeTextLinkerSyntax + url = https://github.com/jbw3/SublimeTextLinkerSyntax +[submodule "sublime/syntaxes/Docker.tmbundle"] + path = sublime/syntaxes/Docker.tmbundle + url = https://github.com/asbjornenge/Docker.tmbundle.git +[submodule "sublime/syntaxes/Sublime-VimL"] + path = sublime/syntaxes/Sublime-VimL url = https://github.com/SalGnt/Sublime-VimL.git -[submodule "sublime_syntaxes/TypeScript-TmLanguage"] - path = sublime_syntaxes/TypeScript-TmLanguage - url = https://github.com/Microsoft/TypeScript-TmLanguage -[submodule "sublime_syntaxes/SublimeElmLanguageSupport"] - path = sublime_syntaxes/SublimeElmLanguageSupport - url = https://github.com/elm-community/SublimeElmLanguageSupport -[submodule "sublime_syntaxes/Sublime-CMakeLists"] - path = sublime_syntaxes/Sublime-CMakeLists - url = https://github.com/zyxar/Sublime-CMakeLists -[submodule "sublime_syntaxes/Swift-for-f-ing-sublime"] - path = sublime_syntaxes/Swift-for-f-ing-sublime - url = https://github.com/colinta/Swift-for-f-ing-sublime.git +[submodule "sublime/syntaxes/elixir-sublime-syntax"] + path = sublime/syntaxes/elixir-sublime-syntax + url = https://github.com/princemaple/elixir-sublime-syntax.git +[submodule "sublime/syntaxes/SublimeElmLanguageSupport"] + path = sublime/syntaxes/SublimeElmLanguageSupport + url = https://github.com/elm-community/SublimeElmLanguageSupport.git +[submodule "sublime/syntaxes/sublimetext-fsharp"] + path = sublime/syntaxes/sublimetext-fsharp + url = https://github.com/hoest/sublimetext-fsharp.git +[submodule "sublime/syntaxes/sublime-fish"] + path = sublime/syntaxes/sublime-fish + url = https://github.com/Phidica/sublime-fish.git +[submodule "sublime/syntaxes/SublimeFortran"] + path = sublime/syntaxes/SublimeFortran + url = https://github.com/315234/SublimeFortran.git +[submodule "sublime/syntaxes/GraphQL-SublimeText3"] + path = sublime/syntaxes/GraphQL-SublimeText3 + url = https://github.com/dncrews/GraphQL-SublimeText3.git +[submodule "sublime/syntaxes/Sublime-GenericConfig"] + path = sublime/syntaxes/Sublime-GenericConfig + url = https://github.com/skozlovf/Sublime-GenericConfig.git +[submodule "sublime/syntaxes/sublime-jinja2"] + path = sublime/syntaxes/sublime-jinja2 + url = https://github.com/Martin819/sublime-jinja2.git +[submodule "sublime/syntaxes/Julia-sublime"] + path = sublime/syntaxes/Julia-sublime + url = https://github.com/JuliaEditorSupport/Julia-sublime.git +[submodule "sublime/syntaxes/LESS-sublime"] + path = sublime/syntaxes/LESS-sublime + url = https://github.com/danro/LESS-sublime.git +[submodule "sublime/syntaxes/sublime-purescript-syntax"] + path = sublime/syntaxes/sublime-purescript-syntax + url = https://github.com/tellnobody1/sublime-purescript-syntax.git +[submodule "sublime/syntaxes/SublimeSass"] + path = sublime/syntaxes/SublimeSass + url = https://github.com/braver/SublimeSass.git +[submodule "sublime/syntaxes/sublime_toml_highlighting"] + path = sublime/syntaxes/sublime_toml_highlighting + url = https://github.com/jasonwilliams/sublime_toml_highlighting.git +[submodule "sublime/syntaxes/vue-syntax-highlight"] + path = sublime/syntaxes/vue-syntax-highlight + url = https://github.com/vuejs/vue-syntax-highlight.git diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f8b66458..988853f7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -35,7 +35,7 @@ Tools > Developer > New Syntax from ... and put it at the root of `sublime_synta You can also add a submodule to the repository of the wanted syntax: ```bash -$ cd sublime_syntaxes +$ cd sublime/syntaxes $ git submodule add https://github.com/elm-community/SublimeElmLanguageSupport ``` @@ -51,7 +51,7 @@ $ git submodule update --remote --merge And finally from the root of the components/config crate run the following command: ```bash -$ cargo run --example generate_sublime synpack ../../sublime_syntaxes ../../sublime_syntaxes/newlines.packdump +$ cargo run --example generate_sublime synpack ../../sublime/syntaxes ../../sublime/syntaxes/newlines.packdump ``` ### Adding a theme @@ -60,7 +60,7 @@ More themes can be easily added to Zola, just make a PR with the wanted theme ad and run the following command from the root of the components/config: ```bash -$ cargo run --example generate_sublime themepack ../../sublime_themes ../../sublime_themes/all.themedump +$ cargo run --example generate_sublime themepack ../../sublime/themes ../../sublime/themes/all.themedump ``` You should see the list of themes being added. diff --git a/Cargo.lock b/Cargo.lock index ccadbd1a..ddb6ca89 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -87,6 +87,19 @@ dependencies = [ "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "bit-set" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bit-vec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "bit-vec" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "bitflags" version = "1.2.1" @@ -225,7 +238,7 @@ dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)", - "syntect 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "syntect 4.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "utils 0.1.0", ] @@ -406,7 +419,7 @@ name = "errors" version = "0.1.0" dependencies = [ "image 0.23.4 (registry+https://github.com/rust-lang/crates.io-index)", - "syntect 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "syntect 4.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "tera 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -427,6 +440,15 @@ name = "fake-simd" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "fancy-regex" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bit-set 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "filetime" version = "0.2.9" @@ -707,14 +729,6 @@ name = "humansize" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "humantime" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "hyper" version = "0.13.5" @@ -1222,26 +1236,6 @@ dependencies = [ "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "onig" -version = "4.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)", - "onig_sys 69.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "onig_sys" -version = "69.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cc 1.0.52 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "opaque-debug" version = "0.2.3" @@ -1381,12 +1375,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "plist" -version = "0.4.2" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "line-wrap 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)", "xml-rs 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1474,11 +1468,6 @@ dependencies = [ "unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "quote" version = "0.6.13" @@ -1627,7 +1616,7 @@ dependencies = [ "regex 1.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)", - "syntect 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "syntect 4.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "templates 0.1.0", "tera 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "utils 0.1.0", @@ -1991,17 +1980,17 @@ dependencies = [ [[package]] name = "syntect" -version = "3.2.0" +version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bincode 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fancy-regex 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "flate2 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "onig 4.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "plist 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "plist 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "regex-syntax 0.6.17 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2583,6 +2572,8 @@ dependencies = [ "checksum base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" "checksum base64 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7d5ca2cd0adc3f48f9e9ea5a6bbdf9ccc0bfade884847e484d452414c7ccffb3" "checksum bincode 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5753e2a71534719bf3f4e57006c3a4f0d2c672a4b676eec84161f763eca87dbf" +"checksum bit-set 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e84c238982c4b1e1ee668d136c510c67a13465279c0cb367ea6baf6310620a80" +"checksum bit-vec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f59bbe95d4e52a6398ec21238d31577f2b28a9d86807f06ca59d191d8440d0bb" "checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" "checksum block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" "checksum block-padding 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" @@ -2622,6 +2613,7 @@ dependencies = [ "checksum encoding_rs 0.8.22 (registry+https://github.com/rust-lang/crates.io-index)" = "cd8d03faa7fe0c1431609dfad7bbe827af30f82e1e2ae6f7ee4fca6bd764bc28" "checksum extend 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fe9db393664b0e6c6230a14115e7e798f80b70f54038dc21165db24c6b7f28fc" "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" +"checksum fancy-regex 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ae91abf6555234338687bb47913978d275539235fcb77ba9863b779090b42b14" "checksum filetime 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "f59efc38004c988e4201d11d263b8171f49a2e7ec0bdbb71773433f271504a5e" "checksum flate2 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)" = "2cfff41391129e0a856d6d822600b8d71179d46879e310417eb9c762eb178b42" "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" @@ -2653,7 +2645,6 @@ dependencies = [ "checksum http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" "checksum httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" "checksum humansize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b6cab2627acfc432780848602f3f558f7e9dd427352224b0d9324025796d2a5e" -"checksum humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" "checksum hyper 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)" = "96816e1d921eca64d208a85aab4f7798455a8e34229ee5a88c935bdee1b78b14" "checksum hyper-rustls 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac965ea399ec3a25ac7d13b8affd4b8f39325cca00858ddf5eb29b79e6b14b08" "checksum hyper-staticfile 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "241e2c25e6221c5bfaea5034cbf09879e30a443ad7ec674116091bab47207a5b" @@ -2701,8 +2692,6 @@ dependencies = [ "checksum num-rational 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" "checksum num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" "checksum num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" -"checksum onig 4.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8518fcb2b1b8c2f45f0ad499df4fda6087fc3475ca69a185c173b8315d2fb383" -"checksum onig_sys 69.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388410bf5fa341f10e58e6db3975f4bea1ac30247dd79d37a9e5ced3cb4cc3b0" "checksum opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" "checksum open 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7c283bf0114efea9e42f1a60edea9859e8c47528eae09d01df4b29c1e489cc48" "checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" @@ -2721,7 +2710,7 @@ dependencies = [ "checksum pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "237844750cfbb86f67afe27eee600dfbbcb6188d734139b534cbfbf4f96792ae" "checksum pin-utils 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" "checksum pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)" = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" -"checksum plist 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5f2a9f075f6394100e7c105ed1af73fb1859d6fd14e49d4290d578120beb167f" +"checksum plist 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "9b59eb8d91dfa89208ec74a920e3b55f840476cf46568026c18dbaa2999e0d48" "checksum png 0.16.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2c68a431ed29933a4eb5709aca9800989758c97759345860fa5db3cfced0b65d" "checksum ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" "checksum precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" @@ -2732,7 +2721,6 @@ dependencies = [ "checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" "checksum proc-macro2 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)" = "df246d292ff63439fea9bc8c0a270bed0e390d5ebd4db4ba15aba81111b5abe3" "checksum pulldown-cmark 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2c2d7fd131800e0d63df52aff46201acaab70b431a4a1ec6f0343fe8e64f35a4" -"checksum quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" "checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" "checksum quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2bdc6c187c65bca4260c9011c9e3132efe4909da44726bad24cf7572ae338d7f" "checksum rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" @@ -2782,7 +2770,7 @@ dependencies = [ "checksum syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)" = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" "checksum syn 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)" = "410a7488c0a728c7ceb4ad59b9567eb4053d02e8cc7f5c0e0eeeb39518369213" "checksum syn-mid 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338a" -"checksum syntect 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e80b8831c5a543192ffc3727f01cf0e57579c6ac15558e3048bfb5708892167b" +"checksum syntect 4.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6bc79276a4d38e39fbeb83c5fd9c23fbd027eeec7c50ee6a3d07deee33d7f621" "checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" "checksum tendril 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "707feda9f2582d5d680d733e38755547a3e8fb471e7ba11452ecfd9ce93a5d3b" "checksum tera 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "19d25bed9d2cf684de6ffdaa9ac35373739eeed0d6bef1de545bbe6cf571ad07" diff --git a/components/config/Cargo.toml b/components/config/Cargo.toml index 588996ff..3f10ece8 100644 --- a/components/config/Cargo.toml +++ b/components/config/Cargo.toml @@ -11,7 +11,7 @@ serde_derive = "1" chrono = "0.4" globset = "0.4" lazy_static = "1" -syntect = "=3.2.0" +syntect = { version = "4.1", default-features = false, features = ["default-fancy"]} errors = { path = "../errors" } utils = { path = "../utils" } diff --git a/components/config/examples/generate_sublime.rs b/components/config/examples/generate_sublime.rs index 9bce4528..b916bb80 100644 --- a/components/config/examples/generate_sublime.rs +++ b/components/config/examples/generate_sublime.rs @@ -26,7 +26,10 @@ fn main() { (Some(ref cmd), Some(ref package_dir), Some(ref packpath_newlines)) if cmd == "synpack" => { let mut builder = SyntaxSetBuilder::new(); builder.add_plain_text_syntax(); - builder.add_from_folder(package_dir, true).unwrap(); + match builder.add_from_folder(package_dir, true) { + Ok(_) => println!("Added from folder"), + Err(e) => println!("Loading error: {:?}", e) + }; let ss = builder.build(); dump_to_file(&ss, packpath_newlines).unwrap(); let mut syntaxes: HashMap> = HashMap::new(); diff --git a/components/config/src/highlighting.rs b/components/config/src/highlighting.rs index 33ccc16a..263b5f98 100644 --- a/components/config/src/highlighting.rs +++ b/components/config/src/highlighting.rs @@ -9,11 +9,11 @@ use crate::config::Config; lazy_static! { pub static ref SYNTAX_SET: SyntaxSet = { let ss: SyntaxSet = - from_binary(include_bytes!("../../../sublime_syntaxes/newlines.packdump")); + from_binary(include_bytes!("../../../sublime/syntaxes/newlines.packdump")); ss }; pub static ref THEME_SET: ThemeSet = - from_binary(include_bytes!("../../../sublime_themes/all.themedump")); + from_binary(include_bytes!("../../../sublime/themes/all.themedump")); } /// Returns the highlighter and whether it was found in the extra or not diff --git a/components/errors/Cargo.toml b/components/errors/Cargo.toml index 46d7d256..e634be43 100644 --- a/components/errors/Cargo.toml +++ b/components/errors/Cargo.toml @@ -8,4 +8,4 @@ edition = "2018" tera = "1" toml = "0.5" image = "0.23" -syntect = "=3.2.0" +syntect = { version = "4.1", default-features = false, features = ["default-fancy"]} diff --git a/components/rendering/Cargo.toml b/components/rendering/Cargo.toml index c5fd3e8f..789ade51 100644 --- a/components/rendering/Cargo.toml +++ b/components/rendering/Cargo.toml @@ -6,7 +6,7 @@ edition = "2018" [dependencies] tera = { version = "1", features = ["preserve_order"] } -syntect = "=3.2.0" +syntect = { version = "4.1", default-features = false, features = ["default-fancy"]} pulldown-cmark = "0.7" serde = "1" serde_derive = "1" diff --git a/docs/content/documentation/content/syntax-highlighting.md b/docs/content/documentation/content/syntax-highlighting.md index 553ab669..3401f3ac 100644 --- a/docs/content/documentation/content/syntax-highlighting.md +++ b/docs/content/documentation/content/syntax-highlighting.md @@ -24,16 +24,17 @@ Here is a full list of supported languages and their short names: ``` - ActionScript -> ["as"] +- Advanced CSV -> ["csv", "tsv"] - AppleScript -> ["applescript", "script editor"] - ASP -> ["asa"] - Assembly x86 (NASM) -> ["asm", "inc", "nasm"] - Batch File -> ["bat", "cmd"] - BibTeX -> ["bib"] -- Bourne Again Shell (bash) -> [".bash_aliases", ".bash_completions", ".bash_functions", ".bash_login", ".bash_logout", ".bash_profile", ".bash_variables", ".bashrc", ".profile", ".textmate_init", ".zshrc", "bash", "fish", "sh", "zsh"] +- Bourne Again Shell (bash) -> [".bash_aliases", ".bash_completions", ".bash_functions", ".bash_login", ".bash_logout", ".bash_profile", ".bash_variables", ".bashrc", ".ebuild", ".eclass", ".profile", ".textmate_init", ".zlogin", ".zlogout", ".zprofile", ".zshenv", ".zshrc", "PKGBUILD", "ash", "bash", "sh", "zsh"] - C -> ["c", "h"] - C# -> ["cs", "csx"] - C++ -> ["C", "c++", "cc", "cp", "cpp", "cxx", "h", "h++", "hh", "hpp", "hxx", "inl", "ipp"] -- Clojure -> ["clj"] +- Clojure -> ["clj", "cljc", "cljs", "edn"] - CMake -> ["CMakeLists.txt", "cmake"] - CMake C Header -> ["h.in"] - CMake C++ Header -> ["h++.in", "hh.in", "hpp.in", "hxx.in"] @@ -43,10 +44,12 @@ Here is a full list of supported languages and their short names: - D -> ["d", "di"] - Dart -> ["dart"] - Diff -> ["diff", "patch"] -- Elixir -> ["ex", "exs"] +- Dockerfile -> ["Dockerfile", "dockerfile"] - Elm -> ["elm"] -- Erlang -> ["Emakefile", "emakefile", "erl", "hrl"] -- fsharp -> ["fs"] +- Erlang -> ["Emakefile", "emakefile", "erl", "escript", "hrl"] +- Fortran (Fixed Form) -> ["F", "F77", "FOR", "FPP", "f", "f77", "for", "fpp"] +- Fortran (Modern) -> ["F03", "F08", "F90", "F95", "f03", "f08", "f90", "f95"] +- Fortran Namelist -> ["namelist"] - Generic Config -> [".dircolors", ".gitattributes", ".gitignore", ".gitmodules", ".inputrc", "Doxyfile", "cfg", "conf", "config", "dircolors", "gitattributes", "gitignore", "gitmodules", "ini", "inputrc", "mak", "mk", "pro"] - Git Attributes -> [".gitattributes", "attributes", "gitattributes"] - Git Commit -> ["COMMIT_EDITMSG", "MERGE_MSG", "TAG_EDITMSG"] @@ -54,8 +57,10 @@ Here is a full list of supported languages and their short names: - Git Ignore -> [".gitignore", "exclude", "gitignore"] - Git Link -> [".git"] - Git Log -> ["gitlog"] +- Git Mailmap -> [".mailmap", "mailmap"] - Git Rebase Todo -> ["git-rebase-todo"] - Go -> ["go"] +- GraphQL -> ["gql", "graphql"] - Graphviz (DOT) -> ["DOT", "dot", "gv"] - Groovy -> ["Jenkinsfile", "gradle", "groovy", "gvy"] - Handlebars -> ["handlebars", "handlebars.html", "hbr", "hbrs", "hbs", "hdbs", "hjs", "mu", "mustache", "rac", "stache", "template", "tmpl"] @@ -70,8 +75,7 @@ Here is a full list of supported languages and their short names: - Java Server Page (JSP) -> ["jsp"] - JavaScript -> ["htc", "js"] - JavaScript (Rails) -> ["js.erb"] -- Jinja2 -> ["j2", "jinja2"] -- JSON -> ["json", "sublime-build", "sublime-color-scheme", "sublime-commands", "sublime-completions", "sublime-keymap", "sublime-macro", "sublime-menu", "sublime-mousemap", "sublime-project", "sublime-settings", "sublime-theme"] +- JSON -> ["Pipfile.lock", "ipynb", "json", "sublime-build", "sublime-color-scheme", "sublime-commands", "sublime-completions", "sublime-keymap", "sublime-macro", "sublime-menu", "sublime-mousemap", "sublime-project", "sublime-settings", "sublime-theme"] - Julia -> ["jl"] - Kotlin -> ["kt", "kts"] - LaTeX -> ["ltx", "tex"] @@ -79,7 +83,6 @@ Here is a full list of supported languages and their short names: - Linker Script -> ["ld"] - Lisp -> ["cl", "clisp", "el", "fasl", "l", "lisp", "lsp", "mud", "scm", "ss"] - Literate Haskell -> ["lhs"] -- lrc -> ["lrc", "lyric"] - Lua -> ["lua"] - Makefile -> ["GNUmakefile", "Makefile", "Makefile.am", "Makefile.in", "OCamlMakefile", "mak", "make", "makefile", "makefile.am", "makefile.in", "mk"] - Markdown -> ["markdn", "markdown", "md", "mdown"] @@ -94,34 +97,33 @@ Here is a full list of supported languages and their short names: - OCamllex -> ["mll"] - OCamlyacc -> ["mly"] - Pascal -> ["dpr", "p", "pas"] -- Perl -> ["PL", "pl", "pm", "pod", "t"] +- Perl -> ["pc", "pl", "pm", "pmc", "pod", "t"] - PHP -> ["php", "php3", "php4", "php5", "php7", "phps", "phpt", "phtml"] - Plain Text -> ["txt"] - PowerShell -> ["ps1", "psd1", "psm1"] -- Python -> ["SConscript", "SConstruct", "Sconstruct", "Snakefile", "cpy", "gyp", "gypi", "pxd", "pxd.in", "pxi", "pxi.in", "py", "py3", "pyi", "pyw", "pyx", "pyx.in", "rpy", "sconstruct", "wscript"] -- R -> ["R", "Rprofile", "S", "r", "s"] +- Python -> ["SConscript", "SConstruct", "Sconstruct", "Snakefile", "bazel", "bzl", "cpy", "gyp", "gypi", "pxd", "pxd.in", "pxi", "pxi.in", "py", "py3", "pyi", "pyw", "pyx", "pyx.in", "rpy", "sconstruct", "vpy", "wscript"] +- R -> ["R", "Rprofile", "r"] +- Racket -> ["rkt"] - Rd (R Documentation) -> ["rd"] - Reason -> ["re", "rei"] - Regular Expression -> ["re"] - reStructuredText -> ["rest", "rst"] -- Ruby -> ["Appfile", "Appraisals", "Berksfile", "Brewfile", "Cheffile", "Deliverfile", "Fastfile", "Gemfile", "Guardfile", "Rakefile", "Rantfile", "Scanfile", "Snapfile", "Thorfile", "Vagrantfile", "capfile", "cgi", "config.ru", "fcgi", "gemspec", "irbrc", "jbuilder", "podspec", "prawn", "rabl", "rake", "rb", "rbx", "rjs", "ruby.rail", "simplecov", "thor"] +- Ruby -> ["Appfile", "Appraisals", "Berksfile", "Brewfile", "Cheffile", "Deliverfile", "Fastfile", "Gemfile", "Guardfile", "Podfile", "Rakefile", "Rantfile", "Scanfile", "Snapfile", "Thorfile", "Vagrantfile", "capfile", "cgi", "config.ru", "fcgi", "gemspec", "irbrc", "jbuilder", "podspec", "prawn", "rabl", "rake", "rb", "rbx", "rjs", "ruby.rail", "simplecov", "thor"] - Ruby Haml -> ["haml", "sass"] - Ruby on Rails -> ["builder", "rxml"] - Rust -> ["rs"] -- Scala -> ["sbt", "scala"] +- Sass -> ["sass"] +- Scala -> ["sbt", "sc", "scala"] +- SCSS -> ["scss"] - SQL -> ["ddl", "dml", "sql"] - SQL (Rails) -> ["erbsql", "sql.erb"] -- srt -> ["srt", "subrip"] +- Stylus -> ["styl", "stylus"] - SWI-Prolog -> ["pro"] - Swift -> ["swift"] - Tcl -> ["tcl"] - TeX -> ["cls", "sty"] - Textile -> ["textile"] -- TOML -> ["Cargo.lock", "Gopkg.lock", "Pipfile", "tml", "toml"] -- TypeScript -> ["ts"] -- TypeScriptReact -> ["tsx"] -- VimL -> ["vim"] -- XML -> ["dtml", "opml", "rss", "svg", "tld", "xml", "xsd", "xslt"] +- XML -> ["dtml", "opml", "rng", "rss", "svg", "tld", "xml", "xsd", "xslt"] - YAML -> ["sublime-syntax", "yaml", "yml"] ``` diff --git a/docs/content/documentation/getting-started/configuration.md b/docs/content/documentation/getting-started/configuration.md index 4b106b23..8c1b79c0 100644 --- a/docs/content/documentation/getting-started/configuration.md +++ b/docs/content/documentation/getting-started/configuration.md @@ -160,6 +160,7 @@ Zola currently has the following highlight themes available: - [material-dark](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Material%20Dark) - [material-light](https://github.com/morhetz/gruvbox) - [monokai](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Monokai) +- [nord](https://github.com/crabique/Nord-plist/tree/0d655b23d6b300e691676d9b90a68d92b267f7ec) - [nyx-bold](https://github.com/GalAster/vscode-theme-nyx) - [one-dark](https://github.com/andresmichel/one-dark-theme) - [solarized-dark](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Solarized%20(dark)) @@ -167,6 +168,7 @@ Zola currently has the following highlight themes available: - [subway-madrid](https://github.com/idleberg/Subway.tmTheme) - [subway-moscow](https://github.com/idleberg/Subway.tmTheme) - [Tomorrow](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Tomorrow) +- [TwoDark](https://github.com/erremauro/TwoDark) - [visual-studio-dark](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Visual%20Studio%20Dark) - [zenburn](https://github.com/colinta/zenburn) diff --git a/sublime_syntaxes/Assembly x86.sublime-syntax b/sublime/syntaxes/Assembly x86.sublime-syntax similarity index 100% rename from sublime_syntaxes/Assembly x86.sublime-syntax rename to sublime/syntaxes/Assembly x86.sublime-syntax diff --git a/sublime/syntaxes/CSV.sublime-syntax b/sublime/syntaxes/CSV.sublime-syntax new file mode 100644 index 00000000..1bbc5b97 --- /dev/null +++ b/sublime/syntaxes/CSV.sublime-syntax @@ -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 diff --git a/sublime_syntaxes/Crystal.sublime-syntax b/sublime/syntaxes/Crystal.sublime-syntax similarity index 98% rename from sublime_syntaxes/Crystal.sublime-syntax rename to sublime/syntaxes/Crystal.sublime-syntax index 7e864832..e4bca726 100644 --- a/sublime_syntaxes/Crystal.sublime-syntax +++ b/sublime/syntaxes/Crystal.sublime-syntax @@ -131,9 +131,9 @@ contexts: scope: keyword.control.pseudo-method.crystal - match: '\b(nil|true|false)\b(?![?!])' scope: constant.language.crystal - - match: '\b(__(DIR|FILE|LINE)__|self)\b(?![?!])' + - match: '\b(__(DIR|FILE|LINE|END_LINE)__|self)\b(?![?!])' scope: variable.language.crystal - - match: '\b(initialize|new|loop|include|extend|raise|getter|setter|property|class_getter|class_setter|class_property|describe|it|with|delegate|def_hash|def_equals|def_equals_and_hash|forward_missing_to|record|assert_responds_to|spawn)\b[!?]?' + - match: '\b(initialize|new|loop|include|extend|raise|getter|setter|property|class_getter|class_setter|class_property|describe|context|it|with|delegate|def_hash|def_equals|def_equals_and_hash|forward_missing_to|record|assert_responds_to|spawn|annotation|verbatim)\b[!?]?' comment: everything being a method but having a special function is a.. scope: keyword.control.special-method.crystal - match: \b(require)\b @@ -180,7 +180,7 @@ contexts: (?<=^|\s)(def)\s+ # the def keyword ( (?>[a-zA-Z_\x{80}-\x{10FFFF}][\x{80}-\x{10FFFF}\w]*(?>\.|::))? # a method name prefix (?>[a-zA-Z_\x{80}-\x{10FFFF}][\x{80}-\x{10FFFF}\w]*(?>[?!]|=(?!>))? # the method name - |===?|>[>=]?|<=>|<[<=]?|[%&`/\|]|\*\*?|=?~|[-+]@?|\[\]=?) ) # …or an operator method + |===?|>[>=]?|<=>|<[<=]?|[%&`/\|]|\*\*?|=?~|[-+]@?|\[\](?:=|\?)?) ) # …or an operator method \s*(\() # the openning parenthesis for arguments comment: the method pattern comes from the symbol pattern, see there for a explaination captures: @@ -201,7 +201,7 @@ contexts: (?<=^|\s)(def)\s+ # the def keyword ( (?>[a-zA-Z_\x{80}-\x{10FFFF}][\w\x{80}-\x{10FFFF}]*(?>\.|::))? # a method name prefix (?>[a-zA-Z_\x{80}-\x{10FFFF}][\w\x{80}-\x{10FFFF}]*(?>[?!]|=(?!>))? # the method name - |===?|>[>=]?|<=>|<[<=]?|[%&`/\|]|\*\*?|=?~|[-+]@?|\[\]=?) ) # …or an operator method + |===?|>[>=]?|<=>|<[<=]?|[%&`/\|]|\*\*?|=?~|[-+]@?|\[\](?:=|\?)?) ) # …or an operator method [ \t] # the space separating the arguments (?=[ \t]*[^\s#;]) # make sure arguments and not a comment follow comment: same as the previous rule, but without parentheses around the arguments @@ -221,7 +221,7 @@ contexts: ( \s+ # an optional group of whitespace followed by… ( (?>[a-zA-Z_\x{80}-\x{10FFFF}][\w\x{80}-\x{10FFFF}]*(?>\.|::))? # a method name prefix (?>[a-zA-Z_\x{80}-\x{10FFFF}][\w\x{80}-\x{10FFFF}]*(?>[?!]|=(?!>))? # the method name - |===?|>[>=]?|<=>|<[<=]?|[%&`/\|]|\*\*?|=?~|[-+]@?|\[\]=?) ) )? # …or an operator method + |===?|>[>=]?|<=>|<[<=]?|[%&`/\|]|\*\*?|=?~|[-+]@?|\[\](?:=|\?)?) ) )? # …or an operator method comment: the optional name is just to catch the def also without a method-name scope: meta.function.method.without-arguments.crystal captures: @@ -588,7 +588,7 @@ contexts: pop: true - match: \\. comment: Cant be named because its not neccesarily an escape. - - match: '(?[a-zA-Z_\x{80}-\x{10FFFF}][\w\x{80}-\x{10FFFF}]*(?>[?!]|=(?![>=]))?|===?|>[>=]?|<[<=]?|<=>|[%&`/\|]|\*\*?|=?~|[-+]@?|\[\]=?|@@?[a-zA-Z_\x{80}-\x{10FFFF}][\w\x{80}-\x{10FFFF}]*)' + - match: '(?[a-zA-Z_\x{80}-\x{10FFFF}][\w\x{80}-\x{10FFFF}]*(?>[?!]|=(?![>=]))?|===?|>[>=]?|<[<=]?|<=>|[%&`/\|]|\*\*?|=?~|[-+]@?|\[\](?:=|\?)?|@@?[a-zA-Z_\x{80}-\x{10FFFF}][\w\x{80}-\x{10FFFF}]*|!=?(?![?!]))' comment: symbols scope: constant.other.symbol.crystal captures: @@ -713,14 +713,14 @@ contexts: captures: 0: punctuation.definition.string.begin.crystal push: - - meta_scope: string.unquoted.embedded.js.jquery.crystal - - meta_content_scope: text.js.jquery.embedded.crystal + - meta_scope: string.unquoted.embedded.js.crystal + - meta_content_scope: text.js.embedded.crystal - match: \s*\2$ captures: 0: punctuation.definition.string.end.crystal pop: true - include: heredoc - - include: scope:source.js.jquery + - include: scope:source.js - include: interpolated_crystal - include: escaped_char - match: '(?><<-("?)((?:[_\w]+_|)(?:SH|SHELL))\b\1)' diff --git a/sublime_syntaxes/Dart.sublime-syntax b/sublime/syntaxes/Dart.sublime-syntax similarity index 90% rename from sublime_syntaxes/Dart.sublime-syntax rename to sublime/syntaxes/Dart.sublime-syntax index 223d9458..20b4407c 100644 --- a/sublime_syntaxes/Dart.sublime-syntax +++ b/sublime/syntaxes/Dart.sublime-syntax @@ -39,22 +39,31 @@ contexts: - include: comments-doc-oldschool - include: comments-doc - include: comments-inline + comments-block: + - match: /\* + push: + - meta_scope: comment.block.dart + - match: \*/ + pop: true + - include: comments-block comments-doc: - match: /// - scope: comment.block.documentation.dart + push: + - meta_scope: comment.block.documentation.dart + - match: .* + pop: true + - include: dartdoc comments-doc-oldschool: - match: /\*\* push: - meta_scope: comment.block.documentation.dart - match: \*/ pop: true + - include: comments-doc-oldschool + - include: comments-block - include: dartdoc comments-inline: - - match: /\* - push: - - meta_scope: comment.block.dart - - match: \*/ - pop: true + - include: comments-block - match: ((//).*)$ captures: 1: comment.line.double-slash.dart @@ -65,16 +74,16 @@ contexts: scope: variable.language.dart - match: '(?)' + - match: '([_$]*[a-z][a-zA-Z0-9_$]*)(<|\(|\s+=>)' captures: 1: entity.name.function.dart dartdoc: - match: '(\[.*?\])' captures: 0: variable.name.source.dart - - match: " .*" + - match: '^ {4,}(?![ \*]).*' captures: 0: variable.name.source.dart - match: "```.*?$" @@ -105,7 +114,7 @@ contexts: scope: keyword.control.dart - 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.kotlin - match: (\+=|\-=|\*=|\/=) scope: keyword.operator.arithmetic.assign.kotlin - - match: (!|&&|\|\|) - scope: keyword.operator.logical.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: @@ -315,11 +324,11 @@ contexts: - include: generics - include: expressions types: - - match: \b(Any|Unit|String|Int|Boolean|Char|Long|Double|Float|Short|Byte|dynamic)\b + - 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|List|Map)<\b + - match: \b(Array|Collection|List|Map|Set|MutableList|MutableMap|MutableSet|Sequence)<\b captures: 1: storage.type.buildin.collection.kotlin push: @@ -333,13 +342,6 @@ contexts: pop: true - include: types - include: keywords - - match: (#)\( - captures: - 1: keyword.operator.tuple.kotlin - push: - - match: \) - pop: true - - include: expressions - match: '\{' push: - match: '\}' @@ -353,15 +355,15 @@ contexts: - match: (->) scope: keyword.operator.declaration.kotlin variables: - - match: (?=\s*(?:var|val)) + - match: (?=\s*\b(?:var|val)\b) push: - - match: (?=:|=|$) + - match: (?=:|=|(\b(by)\b)|$) pop: true - match: \b(var|val)\b captures: 1: keyword.other.kotlin push: - - match: (?=:|=|$) + - match: (?=:|=|(\b(by)\b)|$) pop: true - match: < push: @@ -379,6 +381,13 @@ contexts: 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 diff --git a/sublime/syntaxes/LESS-sublime b/sublime/syntaxes/LESS-sublime new file mode 160000 index 00000000..30209936 --- /dev/null +++ b/sublime/syntaxes/LESS-sublime @@ -0,0 +1 @@ +Subproject commit 302099365866daca49d25288111696a30a4b4e03 diff --git a/sublime_syntaxes/MZN.sublime-syntax b/sublime/syntaxes/MZN.sublime-syntax similarity index 100% rename from sublime_syntaxes/MZN.sublime-syntax rename to sublime/syntaxes/MZN.sublime-syntax diff --git a/sublime_syntaxes/Nim.sublime-syntax b/sublime/syntaxes/Nim.sublime-syntax similarity index 100% rename from sublime_syntaxes/Nim.sublime-syntax rename to sublime/syntaxes/Nim.sublime-syntax diff --git a/sublime_syntaxes/nix.sublime-syntax b/sublime/syntaxes/Nix.sublime-syntax similarity index 100% rename from sublime_syntaxes/nix.sublime-syntax rename to sublime/syntaxes/Nix.sublime-syntax diff --git a/sublime/syntaxes/Packages b/sublime/syntaxes/Packages new file mode 160000 index 00000000..f36b8f80 --- /dev/null +++ b/sublime/syntaxes/Packages @@ -0,0 +1 @@ +Subproject commit f36b8f807d5f30d2b8ef639232a9fc5960f550fa diff --git a/sublime_syntaxes/PowerShell.sublime-syntax b/sublime/syntaxes/PowerShell.sublime-syntax similarity index 87% rename from sublime_syntaxes/PowerShell.sublime-syntax rename to sublime/syntaxes/PowerShell.sublime-syntax index 63488230..8b92d401 100644 --- a/sublime_syntaxes/PowerShell.sublime-syntax +++ b/sublime/syntaxes/PowerShell.sublime-syntax @@ -147,7 +147,7 @@ contexts: 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)\b' + - 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 @@ -165,31 +165,11 @@ contexts: captures: 0: punctuation.section.group.end.powershell pop: true - - include: variable - - include: variableNoProperty - - include: hashtable - - include: scriptblock - - include: doubleQuotedStringEscapes - - include: doubleQuotedString - - include: type - - include: numericConstant - - include: doubleQuotedString - 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 - - match: (?|define|define-values|define-syntax|define-syntaxes|define-for-syntax|define-require-syntax|define-provide-syntax|define-syntax-rule|define-record-type|begin|begin0|begin-for-syntax|when|unless|set!|set!-values|for|for/list|for/vector|for/hash|for/hasheq|for/hasheqv|for/and|for/or|for/lists|for/first|for/last|for/fold|for*|for*/list|for*/vector|for*/hash|for*/hasheq|for*/hasheqv|for*/and|for*/or|for*/lists|for*/first|for*/last|for*/fold|for/fold/derived|for*/fold/derived|define-sequence-syntax|:do-in|do|with-continuation-mark|quasiquote|unquote|unquote-splicing|quote-syntax|#%top-interaction|define-package|open-package|package-begin|define*|define*-values|define*-syntax|define*-syntaxes|open*-package|package?|package-exported-identifiers|package-original-identifiers|block|#%stratified-body|match|match*|match/values|define/match|match-lambda|match-lambda*|match-lambda**|match-let|match-let*|match-let-values|match-let*-values|match-letrec|match-define|match-define-values|with-handlers|with-handlers*|let/cc|let/ec|%|prompt|control|prompt-at|control-at|reset|shift|reset-at|shift-at|prompt0|reset0|control0|shift0|prompt0-at|reset0-at|control0-at|shift0-at|set|cupto|write|display|displayln|print|fprintf|printf|eprintf|format|print-pair-curly-braces|print-mpair-curly-braces|print-unreadable|print-graph|print-struct|print-box|print-vector-length|print-hash-table|print-boolean-long-form|print-reader-abbreviations|print-as-expression|print-syntax-width|current-write-relative-directory|port-write-handler|port-display-handler|port-print-handler|global-port-print-handler)[\s\)]' + scope: meta.keywords.source.racket + captures: + 1: keyword.source.racket + - match: '[\s\(](true|false|empty|null)[\s\)]' + captures: + 1: constant.language.source.racket + - match: '[\s\(\{\[](#t|#f|#true|#false)[\s\)\}\]]' + captures: + 1: constant.language.source.racket + - match: '(#\\[a-zA-Z0-9_\-?\+\.\!\"]+)' + captures: + 1: constant.language.source.racket + - match: '\b(0|([1-9][0-9_]*))\b' + scope: constant.numeric.integer.source.racket + - match: ; + push: + - meta_scope: comment.line.documentation.source.racket + - match: $\n + pop: true + - match: '#\|' + push: + - meta_scope: comment.block.source.racket + - match: '\|#' + pop: true diff --git a/sublime_syntaxes/Reason.sublime-syntax b/sublime/syntaxes/Reason.sublime-syntax similarity index 97% rename from sublime_syntaxes/Reason.sublime-syntax rename to sublime/syntaxes/Reason.sublime-syntax index 580f0144..60ad4c29 100644 --- a/sublime_syntaxes/Reason.sublime-syntax +++ b/sublime/syntaxes/Reason.sublime-syntax @@ -10,6 +10,7 @@ contexts: main: - include: reason_comment_doc_block - include: reason_comment_block + - include: reason_comment - include: reason_named_arg - include: reason_module - include: reason_lifetime @@ -102,6 +103,12 @@ contexts: scope: storage.modifier.rec.source.reason - match: \bmodule\b scope: storage.modifier.module.source.reason + reason_comment: + - match: // + push: + - meta_scope: comment.source.reason + - match: (?=^) + pop: true reason_comment_block: - match: /\* push: diff --git a/sublime/syntaxes/Stylus.sublime-syntax b/sublime/syntaxes/Stylus.sublime-syntax new file mode 100644 index 00000000..0b4e5156 --- /dev/null +++ b/sublime/syntaxes/Stylus.sublime-syntax @@ -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: '(?=\}|;)|(?|(?:=|:|\?|\+|-|\*|\/|%|<|>)?=|!=)|\b(?:in|is(?:nt)?|(?]" + 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 diff --git a/sublime_syntaxes/Sublime-CMakeLists b/sublime/syntaxes/Sublime-CMakeLists similarity index 100% rename from sublime_syntaxes/Sublime-CMakeLists rename to sublime/syntaxes/Sublime-CMakeLists diff --git a/sublime/syntaxes/Sublime-GenericConfig b/sublime/syntaxes/Sublime-GenericConfig new file mode 160000 index 00000000..926b6818 --- /dev/null +++ b/sublime/syntaxes/Sublime-GenericConfig @@ -0,0 +1 @@ +Subproject commit 926b6818067c741d1d5cd9bfe901954fc23eb049 diff --git a/sublime/syntaxes/SublimeElmLanguageSupport b/sublime/syntaxes/SublimeElmLanguageSupport new file mode 160000 index 00000000..e266d279 --- /dev/null +++ b/sublime/syntaxes/SublimeElmLanguageSupport @@ -0,0 +1 @@ +Subproject commit e266d279c8074aa342f106554cfa87ebe839a782 diff --git a/sublime/syntaxes/SublimeFortran b/sublime/syntaxes/SublimeFortran new file mode 160000 index 00000000..dcf4f24f --- /dev/null +++ b/sublime/syntaxes/SublimeFortran @@ -0,0 +1 @@ +Subproject commit dcf4f24f1cecd9eebf6b1eb388e4f5db671a7b08 diff --git a/sublime/syntaxes/SublimeSass b/sublime/syntaxes/SublimeSass new file mode 160000 index 00000000..b98a3f3c --- /dev/null +++ b/sublime/syntaxes/SublimeSass @@ -0,0 +1 @@ +Subproject commit b98a3f3ccff0134c38544d9bc41caf7f61048cdf diff --git a/sublime/syntaxes/SublimeTextLinkerSyntax b/sublime/syntaxes/SublimeTextLinkerSyntax new file mode 160000 index 00000000..041d1566 --- /dev/null +++ b/sublime/syntaxes/SublimeTextLinkerSyntax @@ -0,0 +1 @@ +Subproject commit 041d15667eca429afd4ff3df3b8f8617a66fc410 diff --git a/sublime/syntaxes/Swift.sublime-syntax b/sublime/syntaxes/Swift.sublime-syntax new file mode 100644 index 00000000..9194cc37 --- /dev/null +++ b/sublime/syntaxes/Swift.sublime-syntax @@ -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)\]},;:\.])' + 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 diff --git a/sublime/syntaxes/TypeScript.sublime-syntax b/sublime/syntaxes/TypeScript.sublime-syntax new file mode 100644 index 00000000..b491d3ba --- /dev/null +++ b/sublime/syntaxes/TypeScript.sublime-syntax @@ -0,0 +1,3340 @@ +%YAML 1.2 +--- +# http://www.sublimetext.com/docs/3/syntax.html +name: TypeScript +file_extensions: + - ts +scope: source.ts +contexts: + main: + - include: directives + - include: statements + - match: \A(#!).*(?=$) + scope: comment.line.shebang.ts + captures: + 1: punctuation.definition.comment.ts + comment: + - match: /\*\*(?!/) + captures: + 0: punctuation.definition.comment.ts + push: + - meta_scope: comment.block.documentation.ts + - match: \*/ + captures: + 0: punctuation.definition.comment.ts + pop: true + - include: docblock + - match: (/\*)(?:\s*((@)internal)(?=\s|(\*/)))? + captures: + 1: punctuation.definition.comment.ts + 2: storage.type.internaldeclaration.ts + 3: punctuation.decorator.internaldeclaration.ts + push: + - meta_scope: comment.block.ts + - match: \*/ + captures: + 0: punctuation.definition.comment.ts + pop: true + - match: '(^[ \t]+)?((//)(?:\s*((@)internal)(?=\s|$))?)' + captures: + 1: punctuation.whitespace.comment.leading.ts + 2: comment.line.double-slash.ts + 3: punctuation.definition.comment.ts + 4: storage.type.internaldeclaration.ts + 5: punctuation.decorator.internaldeclaration.ts + push: + - meta_content_scope: comment.line.double-slash.ts + - match: (?=$) + pop: true + access-modifier: + - match: '(?]|^await|[^\._$[:alnum:]]await|^return|[^\._$[:alnum:]]return|^yield|[^\._$[:alnum:]]yield|^throw|[^\._$[:alnum:]]throw|^in|[^\._$[:alnum:]]in|^of|[^\._$[:alnum:]]of|^typeof|[^\._$[:alnum:]]typeof|&&|\|\||\*)\s*(\{)' + captures: + 1: punctuation.definition.block.ts + push: + - meta_scope: meta.objectliteral.ts + - match: '\}' + captures: + 0: punctuation.definition.block.ts + pop: true + - include: object-member + array-binding-pattern: + - match: '(?:(\.\.\.)\s*)?(\[)' + captures: + 1: keyword.operator.rest.ts + 2: punctuation.definition.binding-pattern.array.ts + push: + - match: '\]' + captures: + 0: punctuation.definition.binding-pattern.array.ts + pop: true + - include: binding-element + - include: punctuation-comma + array-binding-pattern-const: + - match: '(?:(\.\.\.)\s*)?(\[)' + captures: + 1: keyword.operator.rest.ts + 2: punctuation.definition.binding-pattern.array.ts + push: + - match: '\]' + captures: + 0: punctuation.definition.binding-pattern.array.ts + pop: true + - include: binding-element-const + - include: punctuation-comma + array-literal: + - match: '\s*(\[)' + captures: + 1: meta.brace.square.ts + push: + - meta_scope: meta.array.literal.ts + - match: '\]' + captures: + 0: meta.brace.square.ts + pop: true + - include: expression + - include: punctuation-comma + arrow-function: + - match: '(?:(?)' + scope: meta.arrow.ts + captures: + 1: storage.modifier.async.ts + 2: variable.parameter.ts + - match: |- + (?x) (?: + (? is on new line + ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? + [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) + ) | + + # arrow function possible to detect only with => on same line + ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters + \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters + (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type + \s*=> # arrow operator + ) + ) + ) + captures: + 1: storage.modifier.async.ts + push: + - meta_scope: meta.arrow.ts + - match: '(?==>|\{|(^\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\s+))' + pop: true + - include: comment + - include: type-parameters + - include: function-parameters + - include: arrow-return-type + - include: possibly-arrow-return-type + - match: "=>" + captures: + 0: storage.type.function.arrow.ts + push: + - meta_scope: meta.arrow.ts + - match: '((?<=\}|\S)(?)|((?!\{)(?=\S)))(?!\/[\/\*])' + pop: true + - include: single-line-comment-consuming-line-ending + - include: decl-block + - include: expression + arrow-return-type: + - match: (?<=\))\s*(:) + captures: + 1: keyword.operator.type.annotation.ts + push: + - meta_scope: meta.return.type.arrow.ts + - match: '(?==>|\{|(^\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\s+))' + pop: true + - include: arrow-return-type-body + arrow-return-type-body: + - match: '(?<=[:])(?=\s*\{)' + push: + - match: '(?<=\})' + pop: true + - include: type-object + - include: type-predicate-operator + - include: type + async-modifier: + - match: '(?) + scope: cast.expr.ts + captures: + 1: meta.brace.angle.ts + 2: storage.modifier.ts + 3: meta.brace.angle.ts + - match: '(?:(?*?\&\|\^]|[^_$[:alnum:]](?:\+\+|\-\-)|[^\+]\+|[^\-]\-))\s*(<)(?!) + captures: + 1: meta.brace.angle.ts + pop: true + - include: type + - match: '(?:(?<=^))\s*(<)(?=[_$[:alpha:]][_$[:alnum:]]*\s*>)' + captures: + 1: meta.brace.angle.ts + push: + - meta_scope: cast.expr.ts + - match: (\>) + captures: + 1: meta.brace.angle.ts + pop: true + - include: type + class-declaration: + - match: '(?\s*$)' + captures: + 1: punctuation.definition.comment.ts + push: + - meta_scope: comment.line.triple-slash.directive.ts + - match: (?=$) + pop: true + - match: (<)(reference|amd-dependency|amd-module) + captures: + 1: punctuation.definition.tag.directive.ts + 2: entity.name.tag.directive.ts + push: + - meta_scope: meta.tag.ts + - match: /> + captures: + 0: punctuation.definition.tag.directive.ts + pop: true + - match: path|types|no-default-lib|lib|name + scope: entity.other.attribute-name.directive.ts + - match: "=" + scope: keyword.operator.assignment.ts + - include: string + docblock: + - match: |- + (?x) + ((@)(?:access|api)) + \s+ + (private|protected|public) + \b + captures: + 1: storage.type.class.jsdoc + 2: punctuation.definition.block.tag.jsdoc + 3: constant.language.access-type.jsdoc + - match: |- + (?x) + ((@)author) + \s+ + ( + [^@\s<>*/] + (?:[^@<>*/]|\*[^/])* + ) + (?: + \s* + (<) + ([^>\s]+) + (>) + )? + captures: + 1: storage.type.class.jsdoc + 2: punctuation.definition.block.tag.jsdoc + 3: entity.name.type.instance.jsdoc + 4: punctuation.definition.bracket.angle.begin.jsdoc + 5: constant.other.email.link.underline.jsdoc + 6: punctuation.definition.bracket.angle.end.jsdoc + - match: |- + (?x) + ((@)borrows) \s+ + ((?:[^@\s*/]|\*[^/])+) # + \s+ (as) \s+ # as + ((?:[^@\s*/]|\*[^/])+) # + captures: + 1: storage.type.class.jsdoc + 2: punctuation.definition.block.tag.jsdoc + 3: entity.name.type.instance.jsdoc + 4: keyword.operator.control.jsdoc + 5: entity.name.type.instance.jsdoc + - match: ((@)example)\s+ + captures: + 1: storage.type.class.jsdoc + 2: punctuation.definition.block.tag.jsdoc + push: + - meta_scope: meta.example.jsdoc + - match: (?=@|\*/) + pop: true + - match: ^\s\*\s+ + - match: \G(<)caption(>) + captures: + 0: entity.name.tag.inline.jsdoc + 1: punctuation.definition.bracket.angle.begin.jsdoc + 2: punctuation.definition.bracket.angle.end.jsdoc + push: + - meta_content_scope: constant.other.description.jsdoc + - match: ()|(?=\*/) + captures: + 0: entity.name.tag.inline.jsdoc + 1: punctuation.definition.bracket.angle.begin.jsdoc + 2: punctuation.definition.bracket.angle.end.jsdoc + pop: true + - match: '[^\s@*](?:[^*]|\*[^/])*' + captures: + 0: source.embedded.ts + - match: (?x) ((@)kind) \s+ (class|constant|event|external|file|function|member|mixin|module|namespace|typedef) \b + captures: + 1: storage.type.class.jsdoc + 2: punctuation.definition.block.tag.jsdoc + 3: constant.language.symbol-type.jsdoc + - match: |- + (?x) + ((@)see) + \s+ + (?: + # URL + ( + (?=https?://) + (?:[^\s*]|\*[^/])+ + ) + | + # JSDoc namepath + ( + (?! + # Avoid matching bare URIs (also acceptable as links) + https?:// + | + # Avoid matching {@inline tags}; we match those below + (?:\[[^\[\]]*\])? # Possible description [preceding]{@tag} + {@(?:link|linkcode|linkplain|tutorial)\b + ) + # Matched namepath + (?:[^@\s*/]|\*[^/])+ + ) + ) + captures: + 1: storage.type.class.jsdoc + 2: punctuation.definition.block.tag.jsdoc + 3: variable.other.link.underline.jsdoc + 4: entity.name.type.instance.jsdoc + - match: |- + (?x) + ((@)template) + \s+ + # One or more valid identifiers + ( + [A-Za-z_$] # First character: non-numeric word character + [\w$.\[\]]* # Rest of identifier + (?: # Possible list of additional identifiers + \s* , \s* + [A-Za-z_$] + [\w$.\[\]]* + )* + ) + captures: + 1: storage.type.class.jsdoc + 2: punctuation.definition.block.tag.jsdoc + 3: variable.other.jsdoc + - match: |- + (?x) + ( + (@) + (?:arg|argument|const|constant|member|namespace|param|var) + ) + \s+ + ( + [A-Za-z_$] + [\w$.\[\]]* + ) + captures: + 1: storage.type.class.jsdoc + 2: punctuation.definition.block.tag.jsdoc + 3: variable.other.jsdoc + - match: '((@)typedef)\s+(?={)' + captures: + 1: storage.type.class.jsdoc + 2: punctuation.definition.block.tag.jsdoc + push: + - match: '(?=\s|\*/|[^{}\[\]A-Za-z_$])' + pop: true + - include: jsdoctype + - match: '(?:[^@\s*/]|\*[^/])+' + scope: entity.name.type.instance.jsdoc + - match: '((@)(?:arg|argument|const|constant|member|namespace|param|prop|property|var))\s+(?={)' + captures: + 1: storage.type.class.jsdoc + 2: punctuation.definition.block.tag.jsdoc + push: + - match: '(?=\s|\*/|[^{}\[\]A-Za-z_$])' + pop: true + - include: jsdoctype + - match: '([A-Za-z_$][\w$.\[\]]*)' + scope: variable.other.jsdoc + - match: |- + (?x) + (\[)\s* + [\w$]+ + (?: + (?:\[\])? # Foo[ ].bar properties within an array + \. # Foo.Bar namespaced parameter + [\w$]+ + )* + (?: + \s* + (=) # [foo=bar] Default parameter value + \s* + ( + # The inner regexes are to stop the match early at */ and to not stop at escaped quotes + (?> + "(?:(?:\*(?!/))|(?:\\(?!"))|[^*\\])*?" | # [foo="bar"] Double-quoted + '(?:(?:\*(?!/))|(?:\\(?!'))|[^*\\])*?' | # [foo='bar'] Single-quoted + \[ (?:(?:\*(?!/))|[^*])*? \] | # [foo=[1,2]] Array literal + (?:(?:\*(?!/))|\s(?!\s*\])|\[.*?(?:\]|(?=\*/))|[^*\s\[\]])* # Everything else + )* + ) + )? + \s*(?:(\])((?:[^*\s]|\*[^\s/])+)?|(?=\*/)) + scope: variable.other.jsdoc + captures: + 1: punctuation.definition.optional-value.begin.bracket.square.jsdoc + 2: keyword.operator.assignment.jsdoc + 3: source.embedded.ts + 4: punctuation.definition.optional-value.end.bracket.square.jsdoc + 5: invalid.illegal.syntax.jsdoc + - match: |- + (?x) + ( + (@) + (?:define|enum|exception|export|extends|lends|implements|modifies + |namespace|private|protected|returns?|suppress|this|throws|type + |yields?) + ) + \s+(?={) + captures: + 1: storage.type.class.jsdoc + 2: punctuation.definition.block.tag.jsdoc + push: + - match: '(?=\s|\*/|[^{}\[\]A-Za-z_$])' + pop: true + - include: jsdoctype + - match: |- + (?x) + ( + (@) + (?:alias|augments|callback|constructs|emits|event|fires|exports? + |extends|external|function|func|host|lends|listens|interface|memberof!? + |method|module|mixes|mixin|name|requires|see|this|typedef|uses) + ) + \s+ + ( + (?: + [^{}@\s*] | \*[^/] + )+ + ) + captures: + 1: storage.type.class.jsdoc + 2: punctuation.definition.block.tag.jsdoc + 3: entity.name.type.instance.jsdoc + - match: '((@)(?:default(?:value)?|license|version))\s+(([''''"]))' + captures: + 1: storage.type.class.jsdoc + 2: punctuation.definition.block.tag.jsdoc + 3: variable.other.jsdoc + 4: punctuation.definition.string.begin.jsdoc + push: + - meta_content_scope: variable.other.jsdoc + - match: (\3)|(?=$|\*/) + captures: + 0: variable.other.jsdoc + 1: punctuation.definition.string.end.jsdoc + pop: true + - match: '((@)(?:default(?:value)?|license|tutorial|variation|version))\s+([^\s*]+)' + captures: + 1: storage.type.class.jsdoc + 2: punctuation.definition.block.tag.jsdoc + 3: variable.other.jsdoc + - match: '(?x) (@) (?:abstract|access|alias|api|arg|argument|async|attribute|augments|author|beta|borrows|bubbles |callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright |default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exception |exports?|extends|extension(?:_?for)?|external|externs|file|fileoverview|final|fires|for|func |function|generator|global|hideconstructor|host|ignore|implements|implicitCast|inherit[Dd]oc |inner|instance|interface|internal|kind|lends|license|listens|main|member|memberof!?|method |mixes|mixins?|modifies|module|name|namespace|noalias|nocollapse|nocompile|nosideeffects |override|overview|package|param|polymer(?:Behavior)?|preserve|private|prop|property|protected |public|read[Oo]nly|record|require[ds]|returns?|see|since|static|struct|submodule|summary |suppress|template|this|throws|todo|tutorial|type|typedef|unrestricted|uses|var|variation |version|virtual|writeOnce|yields?) \b' + scope: storage.type.class.jsdoc + captures: + 1: punctuation.definition.block.tag.jsdoc + - include: inline-tags + - match: '((@)(?:[_$[:alpha:]][_$[:alnum:]]*))(?=\s+)' + captures: + 1: storage.type.class.jsdoc + 2: punctuation.definition.block.tag.jsdoc + enum-declaration: + - match: '(?) + )) | + ((async\s*)?( + ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) | + # sure shot arrow functions even if => is on new line + ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? + [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) + ) | + + # arrow function possible to detect only with => on same line + ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters + \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters + (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type + \s*=> # arrow operator + ) + )) + )) | + # typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) => + (:\s*( + (<) | + ([(]\s*( + ([)]) | + (\.\.\.) | + ([_$[:alnum:]]+\s*( + ([:,?=])| + ([)]\s*=>) + )) + )) + )) | + (:\s*(?]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) | + (:\s*(=>|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*( + ((async\s+)?( + (function\s*[(<*]) | + (function\s+) | + ([_$[:alpha:]][_$[:alnum:]]*\s*=>) + )) | + ((async\s*)?( + ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) | + # sure shot arrow functions even if => is on new line + ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? + [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) + ) | + + # arrow function possible to detect only with => on same line + ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters + \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters + (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type + \s*=> # arrow operator + ) + )) + ))) + captures: + 1: storage.modifier.ts + 2: keyword.operator.rest.ts + 3: entity.name.function.ts variable.language.this.ts + 4: entity.name.function.ts + 5: keyword.operator.optional.ts + - match: '(?x)(?:(?>=|>>>=|\|= + scope: keyword.operator.assignment.compound.bitwise.ts + - match: "<<|>>>|>>" + scope: keyword.operator.bitwise.shift.ts + - match: "===|!==|==|!=" + scope: keyword.operator.comparison.ts + - match: <=|>=|<>|<|> + scope: keyword.operator.relational.ts + - match: '(\!)\s*(/)(?![/*])' + captures: + 1: keyword.operator.logical.ts + 2: keyword.operator.arithmetic.ts + - match: \!|&&|\|\||\?\? + scope: keyword.operator.logical.ts + - match: \&|~|\^|\| + scope: keyword.operator.bitwise.ts + - match: \= + scope: keyword.operator.assignment.ts + - match: "--" + scope: keyword.operator.decrement.ts + - match: \+\+ + scope: keyword.operator.increment.ts + - match: '%|\*|/|-|\+' + scope: keyword.operator.arithmetic.ts + - match: '(?<=[_$[:alnum:])\]])\s*(?=(\/\*([^\*]|(\*[^\/]))*\*\/\s*)+(/)(?![/*]))' + push: + - match: '(/)(?!\*([^\*]|(\*[^\/]))*\*\/)' + captures: + 1: keyword.operator.arithmetic.ts + pop: true + - include: comment + - match: '(?<=[_$[:alnum:])\]])\s*(/)(?![/*])' + captures: + 1: keyword.operator.arithmetic.ts + expressionPunctuations: + - include: punctuation-comma + - include: punctuation-accessor + expressionWithoutIdentifiers: + - include: string + - include: regex + - include: comment + - include: function-expression + - include: class-expression + - include: arrow-function + - include: paren-expression-possibly-arrow + - include: cast + - include: ternary-expression + - include: new-expr + - include: instanceof-expr + - include: object-literal + - include: expression-operators + - include: function-call + - include: literal + - include: support-objects + - include: paren-expression + field-declaration: + - match: |- + (?x)(?) + )) | + ((async\s*)?( + ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) | + # sure shot arrow functions even if => is on new line + ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? + [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) + ) | + + # arrow function possible to detect only with => on same line + ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters + \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters + (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type + \s*=> # arrow operator + ) + )) + )) | + # typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) => + (:\s*( + (<) | + ([(]\s*( + ([)]) | + (\.\.\.) | + ([_$[:alnum:]]+\s*( + ([:,?=])| + ([)]\s*=>) + )) + )) + )) | + (:\s*(?]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) | + (:\s*(=>|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*( + ((async\s+)?( + (function\s*[(<*]) | + (function\s+) | + ([_$[:alpha:]][_$[:alnum:]]*\s*=>) + )) | + ((async\s*)?( + ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) | + # sure shot arrow functions even if => is on new line + ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? + [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) + ) | + + # arrow function possible to detect only with => on same line + ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters + \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters + (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type + \s*=> # arrow operator + ) + )) + ))) + captures: + 1: meta.definition.property.ts entity.name.function.ts + 2: keyword.operator.optional.ts + 3: keyword.operator.definiteassignment.ts + - match: '\#?[_$[:alpha:]][_$[:alnum:]]*' + scope: meta.definition.property.ts variable.object.property.ts + - match: \? + scope: keyword.operator.optional.ts + - match: \! + scope: keyword.operator.definiteassignment.ts + for-loop: + - match: '(?\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?))*(?)*(?\s*)?\()' + push: + - match: '(?<=\))(?!(((([_$[:alpha:]][_$[:alnum:]]*)(\s*\??\.\s*(\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\)]))\s*(?:(\?\.\s*)|(\!))?(<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?))*(?)*(?\s*)?\()' + pop: true + - match: '(?=(([_$[:alpha:]][_$[:alnum:]]*)(\s*\??\.\s*(\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*))' + push: + - meta_scope: meta.function-call.ts + - match: '(?=\s*(?:(\?\.\s*)|(\!))?(<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?))*(?)*(?\s*)?\()' + pop: true + - include: support-function-call-identifiers + - match: '(\#?[_$[:alpha:]][_$[:alnum:]]*)' + scope: entity.name.function.ts + - include: comment + - match: \?\. + scope: meta.function-call.ts punctuation.accessor.optional.ts + - match: \! + scope: meta.function-call.ts keyword.operator.definiteassignment.ts + - include: type-arguments + - include: paren-expression + function-declaration: + - match: '(?) + )) | + ((async\s*)?( + ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) | + # sure shot arrow functions even if => is on new line + ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? + [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) + ) | + + # arrow function possible to detect only with => on same line + ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters + \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters + (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type + \s*=> # arrow operator + ) + )) + )) + captures: + 1: punctuation.accessor.ts + 2: punctuation.accessor.optional.ts + 3: entity.name.function.ts + - match: '(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(\#?[[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])' + captures: + 1: punctuation.accessor.ts + 2: punctuation.accessor.optional.ts + 3: variable.other.constant.property.ts + - match: '(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(\#?[_$[:alpha:]][_$[:alnum:]]*)' + captures: + 1: punctuation.accessor.ts + 2: punctuation.accessor.optional.ts + 3: variable.other.property.ts + - match: "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])" + scope: variable.other.constant.ts + - match: "[_$[:alpha:]][_$[:alnum:]]*" + scope: variable.other.readwrite.ts + if-statement: + - match: '(?]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?[\(])' + captures: + 1: storage.modifier.ts + 2: storage.modifier.ts + 3: storage.modifier.async.ts + 4: keyword.operator.new.ts + 5: keyword.generator.asterisk.ts + push: + - meta_scope: meta.method.declaration.ts + - match: '(?=\}|;|,|$)|(?<=\})' + pop: true + - include: method-declaration-name + - include: function-body + - match: |- + (?x)(?]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?[\(]) + captures: + 1: storage.modifier.ts + 2: storage.modifier.ts + 3: storage.modifier.async.ts + 4: storage.type.property.ts + 5: keyword.generator.asterisk.ts + push: + - meta_scope: meta.method.declaration.ts + - match: '(?=\}|;|,|$)|(?<=\})' + pop: true + - include: method-declaration-name + - include: function-body + method-declaration-name: + - match: |- + (?x)(?=((\b(?]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?[\(]) + captures: + 1: storage.modifier.async.ts + 2: storage.type.property.ts + 3: keyword.generator.asterisk.ts + push: + - meta_scope: meta.method.declaration.ts + - match: '(?=\}|;|,)|(?<=\})' + pop: true + - include: method-declaration-name + - include: function-body + - match: |- + (?x)(?]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?[\(]) + captures: + 1: storage.modifier.async.ts + 2: storage.type.property.ts + 3: keyword.generator.asterisk.ts + push: + - match: (?=\(|\<) + pop: true + - include: method-declaration-name + object-member: + - include: comment + - include: object-literal-method-declaration + - match: '(?=\[)' + push: + - meta_scope: meta.object.member.ts meta.object-literal.key.ts + - match: '(?=:)|((?<=[\]])(?=\s*[\(\<]))' + pop: true + - include: comment + - include: array-literal + - match: '(?=[\''\"\`])' + push: + - meta_scope: meta.object.member.ts meta.object-literal.key.ts + - match: '(?=:)|((?<=[\''\"\`])(?=((\s*[\(\<,}])|(\s+(as)\s+))))' + pop: true + - include: comment + - include: string + - match: |- + (?x)(?=(\b(?) + )) | + ((async\s*)?( + ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) | + # sure shot arrow functions even if => is on new line + ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? + [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) + ) | + + # arrow function possible to detect only with => on same line + ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters + \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters + (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type + \s*=> # arrow operator + ) + )) + ))) + scope: meta.object.member.ts + captures: + 0: meta.object-literal.key.ts + 1: entity.name.function.ts + - match: '(?:[_$[:alpha:]][_$[:alnum:]]*)\s*(?=(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*:)' + scope: meta.object.member.ts + captures: + 0: meta.object-literal.key.ts + - match: \.\.\. + captures: + 0: keyword.operator.spread.ts + push: + - meta_scope: meta.object.member.ts + - match: '(?=,|\})' + pop: true + - include: expression + - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?=,|\}|$|\/\/|\/\*)' + scope: meta.object.member.ts + captures: + 1: variable.other.readwrite.ts + - match: '(?]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)\(\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))' + captures: + 1: storage.modifier.async.ts + push: + - match: (?<=\)) + pop: true + - include: type-parameters + - match: \( + captures: + 0: meta.brace.round.ts + push: + - match: \) + captures: + 0: meta.brace.round.ts + pop: true + - include: expression-inside-possibly-arrow-parens + - match: '(?<=:)\s*(async)?\s*(\()(?=\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))' + captures: + 1: storage.modifier.async.ts + 2: meta.brace.round.ts + push: + - match: \) + captures: + 0: meta.brace.round.ts + pop: true + - include: expression-inside-possibly-arrow-parens + - match: (?<=:)\s*(async)?\s*(?=\<\s*$) + captures: + 1: storage.modifier.async.ts + push: + - match: (?<=\>) + pop: true + - include: type-parameters + - match: '(?<=\>)\s*(\()(?=\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))' + captures: + 1: meta.brace.round.ts + push: + - match: \) + captures: + 0: meta.brace.round.ts + pop: true + - include: expression-inside-possibly-arrow-parens + - include: possibly-arrow-return-type + - include: expression + - include: punctuation-comma + parameter-array-binding-pattern: + - match: '(?:(\.\.\.)\s*)?(\[)' + captures: + 1: keyword.operator.rest.ts + 2: punctuation.definition.binding-pattern.array.ts + push: + - match: '\]' + captures: + 0: punctuation.definition.binding-pattern.array.ts + pop: true + - include: parameter-binding-element + - include: punctuation-comma + parameter-binding-element: + - include: comment + - include: string + - include: numeric-literal + - include: regex + - include: parameter-object-binding-pattern + - include: parameter-array-binding-pattern + - include: destructuring-parameter-rest + - include: variable-initializer + parameter-name: + - match: '(?) + )) | + ((async\s*)?( + ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) | + # sure shot arrow functions even if => is on new line + ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? + [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) + ) | + + # arrow function possible to detect only with => on same line + ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters + \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters + (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type + \s*=> # arrow operator + ) + )) + )) | + # typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) => + (:\s*( + (<) | + ([(]\s*( + ([)]) | + (\.\.\.) | + ([_$[:alnum:]]+\s*( + ([:,?=])| + ([)]\s*=>) + )) + )) + )) | + (:\s*(?]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) | + (:\s*(=>|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*( + ((async\s+)?( + (function\s*[(<*]) | + (function\s+) | + ([_$[:alpha:]][_$[:alnum:]]*\s*=>) + )) | + ((async\s*)?( + ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) | + # sure shot arrow functions even if => is on new line + ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? + [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) + ) | + + # arrow function possible to detect only with => on same line + ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters + \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters + (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type + \s*=> # arrow operator + ) + )) + ))) + captures: + 1: storage.modifier.ts + 2: keyword.operator.rest.ts + 3: entity.name.function.ts variable.language.this.ts + 4: entity.name.function.ts + 5: keyword.operator.optional.ts + - match: '(?x)(?:(?])" + pop: true + - include: type + paren-expression: + - match: \( + captures: + 0: meta.brace.round.ts + push: + - match: \) + captures: + 0: meta.brace.round.ts + pop: true + - include: expression + paren-expression-possibly-arrow: + - match: '(?<=[(=,])\s*(async)?(?=\s*((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?\(\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))' + captures: + 1: storage.modifier.async.ts + push: + - match: (?<=\)) + pop: true + - include: paren-expression-possibly-arrow-with-typeparameters + - match: '(?<=[(=,]|=>|^return|[^\._$[:alnum:]]return)\s*(async)?(?=\s*((((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*))?\()|(<))\s*$)' + captures: + 1: storage.modifier.async.ts + push: + - match: (?<=\)) + pop: true + - include: paren-expression-possibly-arrow-with-typeparameters + - include: possibly-arrow-return-type + paren-expression-possibly-arrow-with-typeparameters: + - include: type-parameters + - match: \( + captures: + 0: meta.brace.round.ts + push: + - match: \) + captures: + 0: meta.brace.round.ts + pop: true + - include: expression-inside-possibly-arrow-parens + possibly-arrow-return-type: + - match: '(?<=\)|^)\s*(:)(?=\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*=>)' + captures: + 1: meta.arrow.ts meta.return.type.arrow.ts keyword.operator.type.annotation.ts + push: + - meta_content_scope: meta.arrow.ts meta.return.type.arrow.ts + - match: '(?==>|\{|(^\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\s+))' + pop: true + - include: arrow-return-type-body + property-accessor: + - match: '(?|&&|\|\||\*\/)\s*(\/)(?![\/*])(?=(?:[^\/\\\[\()]|\\.|\[([^\]\\]|\\.)+\]|\(([^\)\\]|\\.)+\))+\/([gimsuy]+|(?![\/\*])|(?=\/\*))(?!\s*[a-zA-Z0-9_$]))' + captures: + 1: punctuation.definition.string.begin.ts + push: + - meta_scope: string.regexp.ts + - match: "(/)([gimsuy]*)" + captures: + 1: punctuation.definition.string.end.ts + 2: keyword.other.ts + pop: true + - include: regexp + - match: '((?' + captures: + 0: keyword.other.back-reference.regexp + 1: variable.other.regexp + - match: '[?+*]|\{(\d+,\d+|\d+,|,\d+|\d+)\}\??' + scope: keyword.operator.quantifier.regexp + - match: \| + scope: keyword.operator.or.regexp + - match: (\()((\?=)|(\?!)|(\?<=)|(\?))?' + captures: + 0: punctuation.definition.group.regexp + 1: punctuation.definition.group.no-capture.regexp + 2: variable.other.regexp + push: + - meta_scope: meta.group.regexp + - match: \) + captures: + 0: punctuation.definition.group.regexp + pop: true + - include: regexp + - match: '(\[)(\^)?' + captures: + 1: punctuation.definition.character-class.regexp + 2: keyword.operator.negation.regexp + push: + - meta_scope: constant.other.character-class.set.regexp + - match: '(\])' + captures: + 1: punctuation.definition.character-class.regexp + pop: true + - match: '(?:.|(\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\c[A-Z])|(\\.))\-(?:[^\]\\]|(\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\c[A-Z])|(\\.))' + scope: constant.other.character-class.range.regexp + captures: + 1: constant.character.numeric.regexp + 2: constant.character.control.regexp + 3: constant.character.escape.backslash.regexp + 4: constant.character.numeric.regexp + 5: constant.character.control.regexp + 6: constant.character.escape.backslash.regexp + - include: regex-character-class + - include: regex-character-class + return-type: + - match: (?<=\))\s*(:)(?=\s*\S) + captures: + 1: keyword.operator.type.annotation.ts + push: + - meta_scope: meta.return.type.ts + - match: "(?]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?\()) + | + (?:(EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY)\b(?!\$))) + captures: + 1: punctuation.accessor.ts + 2: punctuation.accessor.optional.ts + 3: support.variable.property.ts + 4: support.constant.ts + - match: |- + (?x) (?]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?\() + captures: + 1: punctuation.accessor.ts + 2: punctuation.accessor.optional.ts + 3: support.constant.dom.ts + 4: support.variable.property.dom.ts + - match: |- + (?x)(?\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?))*(?)*(?\s*)?`)' + push: + - meta_scope: string.template.ts + - match: (?=`) + pop: true + - match: '(?=(([_$[:alpha:]][_$[:alnum:]]*\s*\??\.\s*)*|(\??\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*))' + push: + - match: '(?=(<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?))*(?)*(?\s*)?`)' + pop: true + - include: support-function-call-identifiers + - match: "([_$[:alpha:]][_$[:alnum:]]*)" + scope: entity.name.function.tagged-template.ts + - include: type-arguments + - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?=(<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?))*(?)*(?\s*)`)' + captures: + 1: entity.name.function.tagged-template.ts + push: + - meta_scope: string.template.ts + - match: (?=`) + pop: true + - include: type-arguments + - match: "([_$[:alpha:]][_$[:alnum:]]*)?(`)" + captures: + 1: entity.name.function.tagged-template.ts + 2: punctuation.definition.string.template.begin.ts + push: + - meta_scope: string.template.ts + - match: "`" + captures: + 0: punctuation.definition.string.template.end.ts + pop: true + - include: template-substitution-element + - include: string-character-escape + template-substitution-element: + - match: '\$\{' + captures: + 0: punctuation.definition.template-expression.begin.ts + push: + - meta_scope: meta.template.expression.ts + - meta_content_scope: meta.embedded.line.ts + - match: '\}' + captures: + 0: punctuation.definition.template-expression.end.ts + pop: true + - include: expression + ternary-expression: + - match: '(?!\?\.\s*[^[:digit:]])(\?)(?!\?)' + captures: + 1: keyword.operator.ternary.ts + push: + - match: \s*(:) + captures: + 1: keyword.operator.ternary.ts + pop: true + - include: expression + this-literal: + - match: '(?])|((?<=[\}>\]\)]|[_$[:alpha:]])\s*(?=\{)))' + pop: true + - include: type + - match: (:) + captures: + 1: keyword.operator.type.annotation.ts + push: + - meta_scope: meta.type.annotation.ts + - match: '(?])|(?=^\s*$)|((?<=\S)(?=\s*$))|((?<=[\}>\]\)]|[_$[:alpha:]])\s*(?=\{)))' + pop: true + - include: type + type-arguments: + - match: \< + captures: + 0: punctuation.definition.typeparameters.begin.ts + push: + - meta_scope: meta.type.parameters.ts + - match: \> + captures: + 0: punctuation.definition.typeparameters.end.ts + pop: true + - include: type-arguments-body + type-arguments-body: + - match: '(?) + pop: true + - include: comment + - include: type-parameters + - match: '(?) + )) + ) + ) + ) + push: + - meta_scope: meta.type.function.ts + - match: (?<=\)) + pop: true + - include: function-parameters + type-function-return-type: + - match: (=>)(?=\s*\S) + captures: + 1: storage.type.function.arrow.ts + push: + - meta_scope: meta.type.function.return.ts + - match: '(?)(?:\?]|//|$)' + pop: true + - include: type-function-return-type-core + - match: "=>" + captures: + 0: storage.type.function.arrow.ts + push: + - meta_scope: meta.type.function.return.ts + - match: '(?)(?]|//|^\s*$)|((?<=\S)(?=\s*$)))' + pop: true + - include: type-function-return-type-core + type-function-return-type-core: + - include: comment + - match: '(?<==>)(?=\s*\{)' + push: + - match: '(?<=\})' + pop: true + - include: type-object + - include: type-predicate-operator + - include: type + type-name: + - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(<)' + captures: + 1: entity.name.type.module.ts + 2: punctuation.accessor.ts + 3: punctuation.accessor.optional.ts + 4: meta.type.parameters.ts punctuation.definition.typeparameters.begin.ts + push: + - meta_content_scope: meta.type.parameters.ts + - match: (>) + captures: + 1: meta.type.parameters.ts punctuation.definition.typeparameters.end.ts + pop: true + - include: type-arguments-body + - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(<)' + captures: + 1: entity.name.type.ts + 2: meta.type.parameters.ts punctuation.definition.typeparameters.begin.ts + push: + - meta_content_scope: meta.type.parameters.ts + - match: (>) + captures: + 1: meta.type.parameters.ts punctuation.definition.typeparameters.end.ts + pop: true + - include: type-arguments-body + - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))' + captures: + 1: entity.name.type.module.ts + 2: punctuation.accessor.ts + 3: punctuation.accessor.optional.ts + - match: "[_$[:alpha:]][_$[:alnum:]]*" + scope: entity.name.type.ts + type-object: + - match: '\{' + captures: + 0: punctuation.definition.block.ts + push: + - meta_scope: meta.object.type.ts + - match: '\}' + captures: + 0: punctuation.definition.block.ts + pop: true + - include: comment + - include: method-declaration + - include: indexer-declaration + - include: indexer-mapped-type-declaration + - include: field-declaration + - include: type-annotation + - match: \.\.\. + captures: + 0: keyword.operator.spread.ts + push: + - match: '(?=\}|;|,|$)|(?<=\})' + pop: true + - include: type + - include: punctuation-comma + - include: punctuation-semicolon + - include: type + type-operators: + - include: typeof-operator + - match: '([&|])(?=\s*\{)' + captures: + 0: keyword.operator.type.ts + push: + - match: '(?<=\})' + pop: true + - include: type-object + - match: "[&|]" + captures: + 0: keyword.operator.type.ts + push: + - match: (?=\S) + pop: true + - match: '(?) + captures: + 1: punctuation.definition.typeparameters.end.ts + pop: true + - include: comment + - match: '(?) + scope: keyword.operator.assignment.ts + type-paren-or-function-parameters: + - match: \( + captures: + 0: meta.brace.round.ts + push: + - meta_scope: meta.type.paren.cover.ts + - match: \) + captures: + 0: meta.brace.round.ts + pop: true + - match: |- + (?x)(?:(?) + )) + )) + )) | + (:\s*(?]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))))) + captures: + 1: storage.modifier.ts + 2: keyword.operator.rest.ts + 3: entity.name.function.ts variable.language.this.ts + 4: entity.name.function.ts + 5: keyword.operator.optional.ts + - match: '(?x)(?:(?) + )) | + ((async\s*)?( + ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) | + # sure shot arrow functions even if => is on new line + ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? + [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) + ) | + + # arrow function possible to detect only with => on same line + ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters + \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters + (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type + \s*=> # arrow operator + ) + )) + )) | + # typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) => + (:\s*( + (<) | + ([(]\s*( + ([)]) | + (\.\.\.) | + ([_$[:alnum:]]+\s*( + ([:,?=])| + ([)]\s*=>) + )) + )) + )) | + (:\s*(?]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) | + (:\s*(=>|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*( + ((async\s+)?( + (function\s*[(<*]) | + (function\s+) | + ([_$[:alpha:]][_$[:alnum:]]*\s*=>) + )) | + ((async\s*)?( + ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) | + # sure shot arrow functions even if => is on new line + ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? + [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) + ) | + + # arrow function possible to detect only with => on same line + ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters + \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters + (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type + \s*=> # arrow operator + ) + )) + ))) + captures: + 1: meta.definition.variable.ts variable.other.constant.ts entity.name.function.ts + push: + - meta_scope: meta.var-single-variable.expr.ts + - match: '(?=$|^|[;,=}]|((?) + )) | + ((async\s*)?( + ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) | + # sure shot arrow functions even if => is on new line + ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? + [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) + ) | + + # arrow function possible to detect only with => on same line + ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters + \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters + (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type + \s*=> # arrow operator + ) + )) + )) | + # typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) => + (:\s*( + (<) | + ([(]\s*( + ([)]) | + (\.\.\.) | + ([_$[:alnum:]]+\s*( + ([:,?=])| + ([)]\s*=>) + )) + )) + )) | + (:\s*(?]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*))))))) | + (:\s*(=>|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*( + ((async\s+)?( + (function\s*[(<*]) | + (function\s+) | + ([_$[:alpha:]][_$[:alnum:]]*\s*=>) + )) | + ((async\s*)?( + ((<\s*$)|((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)?[\(]\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))) | + # sure shot arrow functions even if => is on new line + ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? + [(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) + ) | + + # arrow function possible to detect only with => on same line + ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*\>)*>\s*)? # typeparameters + \(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters + (\s*:\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type + \s*=> # arrow operator + ) + )) + ))) + captures: + 1: meta.definition.variable.ts entity.name.function.ts + 2: keyword.operator.definiteassignment.ts + push: + - meta_scope: meta.var-single-variable.expr.ts + - match: '(?=$|^|[;,=}]|((?\s*$) + captures: + 1: keyword.operator.assignment.ts + push: + - match: '(?=$|^|[,);}\]]|((?]|^await|[^\._$[:alnum:]]await|^return|[^\._$[:alnum:]]return|^yield|[^\._$[:alnum:]]yield|^throw|[^\._$[:alnum:]]throw|^in|[^\._$[:alnum:]]in|^of|[^\._$[:alnum:]]of|^typeof|[^\._$[:alnum:]]typeof|&&|\|\||\*)\s*(\{)' captures: 1: punctuation.definition.block.tsx push: @@ -72,10 +72,22 @@ contexts: pop: true - include: binding-element - include: punctuation-comma - array-literal: - - match: '\[' + array-binding-pattern-const: + - match: '(?:(\.\.\.)\s*)?(\[)' captures: - 0: meta.brace.square.tsx + 1: keyword.operator.rest.tsx + 2: punctuation.definition.binding-pattern.array.tsx + push: + - match: '\]' + captures: + 0: punctuation.definition.binding-pattern.array.tsx + pop: true + - include: binding-element-const + - include: punctuation-comma + array-literal: + - match: '\s*(\[)' + captures: + 1: meta.brace.square.tsx push: - meta_scope: meta.array.literal.tsx - match: '\]' @@ -97,21 +109,22 @@ contexts: (?= # sure shot arrow functions even if => is on new line ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? [(]\s* ( - ([)]\s*:) | # (): - ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: ) ) | ( - [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends + [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends ) | # arrow function possible to detect only with => on same line ( - (<\s*([_$[:alpha:]]|(\{[^\{\}]*\})|(\([^\(\)]*\))|(\[[^\[\]]*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{[^\{\}]*\})|(\([^\(\)]*\))|(\[[^\[\]]*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters - \(\s*([_$[:alpha:]\{\[]([^()]|\((\s*[^()]*)?\))*)?\) # parameteres - (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type - \s*=> # arrow operator + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters + \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters + (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type + \s*=> # arrow operator ) ) ) @@ -142,19 +155,32 @@ contexts: - meta_scope: meta.return.type.arrow.tsx - match: '(?==>|\{|(^\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\s+))' pop: true - - match: '(?<=[:])(?=\s*\{)' - push: - - match: '(?<=\})' - pop: true - - include: type-object - - include: type-predicate-operator - - include: type + - include: arrow-return-type-body + arrow-return-type-body: + - match: '(?<=[:])(?=\s*\{)' + push: + - match: '(?<=\})' + pop: true + - include: type-object + - include: type-predicate-operator + - include: type + async-modifier: + - match: '(?\s*$)' + - match: '^(///)\s*(?=<(reference|amd-dependency|amd-module)(\s+(path|types|no-default-lib|lib|name)\s*=\s*((\''([^\''\\]|\\\''|\\)*\'')|(\"([^\"\\]|\\\"|\\)*\")))+\s*/>\s*$)' captures: 1: punctuation.definition.comment.tsx push: @@ -363,7 +418,7 @@ contexts: captures: 0: punctuation.definition.tag.directive.tsx pop: true - - match: path|types|no-default-lib|name + - match: path|types|no-default-lib|lib|name scope: entity.other.attribute-name.directive.tsx - match: "=" scope: keyword.operator.assignment.tsx @@ -665,7 +720,7 @@ contexts: 3: keyword.control.default.tsx push: - meta_scope: meta.export.default.tsx - - match: (?=;|$|\babstract\b|\basync\b|\bclass\b|\bconst\b|\bdeclare\b|\benum\b|\bexport\b|\bfunction\b|\bimport\b|\binterface\b|\blet\b|\bmodule\b|\bnamespace\b|\btype\b|\bvar\b) + - match: (?=$|;|^\s*abstract\b|^\s*async\b|^\s*class\b|^\s*const\b|^\s*declare\b|^\s*enum\b|^\s*export\b|^\s*function\b|^\s*import\b|^\s*interface\b|^\s*let\b|^\s*module\b|^\s*namespace\b|^\s*return\b|^\s*type\b|^\s*var\b) pop: true - include: expression - match: '(?) )) | ((async\s*)?( + ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) | # sure shot arrow functions even if => is on new line ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? [(]\s* ( - ([)]\s*:) | # (): - ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: ) ) | ( - [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends + [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends ) | # arrow function possible to detect only with => on same line ( - (<\s*([_$[:alpha:]]|(\{[^\{\}]*\})|(\([^\(\)]*\))|(\[[^\[\]]*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{[^\{\}]*\})|(\([^\(\)]*\))|(\[[^\[\]]*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters - \(\s*([_$[:alpha:]\{\[]([^()]|\((\s*[^()]*)?\))*)?\) # parameteres - (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type - \s*=> # arrow operator + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters + \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters + (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type + \s*=> # arrow operator ) )) )) | @@ -813,41 +927,82 @@ contexts: ([)]\s*=>) )) )) + )) | + (:\s*((<\s*$)|([\(]\s*([\{\[]\s*)?$))) | + (:\s*(=>|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*( + ((async\s+)?( + (function\s*[(<*]) | + (function\s+) | + ([_$[:alpha:]][_$[:alnum:]]*\s*=>) + )) | + ((async\s*)?( + ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) | + # sure shot arrow functions even if => is on new line + ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? + [(]\s* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) + ) | + ( + [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends + ) | + # arrow function possible to detect only with => on same line + ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters + \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters + (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type + \s*=> # arrow operator + ) + )) ))) - scope: meta.definition.property.tsx entity.name.function.tsx + captures: + 1: meta.definition.property.tsx entity.name.function.tsx + 2: keyword.operator.optional.tsx - match: "[_$[:alpha:]][_$[:alnum:]]*" scope: meta.definition.property.tsx variable.object.property.tsx - match: \? scope: keyword.operator.optional.tsx for-loop: - - match: '(?\(]|(\([^\(\)]*\))|\<\s*(([_$[:alpha:]]|(\{[^\{\}]*\})|(\([^\(\)]*\))|(\[[^\[\]]*\]))|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))([^<>\(]|(\([^\(\)]*\)))*\>)*>\s*)?\()' + - match: '(?=(([_$[:alpha:]][_$[:alnum:]]*\s*\??\.\s*)*|(\??\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\s*(\?\.\s*)?(<\s*(((keyof|infer)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[=]|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[=]|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?!=)\>)*(?!=)>\s*)?\()' push: - - match: '(?<=\))(?!(([_$[:alpha:]][_$[:alnum:]]*\s*\??\.\s*)*|(\??\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\s*(\?\.\s*)?(<\s*(([_$[:alpha:]]|(\{[^\{\}]*\})|(\([^\(\)]*\))|(\[[^\[\]]*\]))|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))([^<>\(]|(\([^\(\)]*\))|\<\s*(([_$[:alpha:]]|(\{[^\{\}]*\})|(\([^\(\)]*\))|(\[[^\[\]]*\]))|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))([^<>\(]|(\([^\(\)]*\)))*\>)*>\s*)?\()' + - match: '(?<=\))(?!(([_$[:alpha:]][_$[:alnum:]]*\s*\??\.\s*)*|(\??\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\s*(\?\.\s*)?(<\s*(((keyof|infer)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[=]|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[=]|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?!=)\>)*(?!=)>\s*)?\()' pop: true - match: '(?=(([_$[:alpha:]][_$[:alnum:]]*\s*\??\.\s*)*|(\??\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*))' push: - meta_scope: meta.function-call.tsx - - match: '(?=\s*(\?\.\s*)?(<\s*(([_$[:alpha:]]|(\{[^\{\}]*\})|(\([^\(\)]*\))|(\[[^\[\]]*\]))|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))([^<>\(]|(\([^\(\)]*\))|\<\s*(([_$[:alpha:]]|(\{[^\{\}]*\})|(\([^\(\)]*\))|(\[[^\[\]]*\]))|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))([^<>\(]|(\([^\(\)]*\)))*\>)*>\s*)?\()' + - match: '(?=\s*(\?\.\s*)?(<\s*(((keyof|infer)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[=]|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[=]|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?!=)\>)*(?!=)>\s*)?\()' pop: true - include: literal - include: support-objects @@ -860,17 +1015,7 @@ contexts: - include: comment - match: \?\. scope: meta.function-call.tsx punctuation.accessor.optional.tsx - - match: \< - captures: - 0: punctuation.definition.typeparameters.begin.tsx - push: - - meta_scope: meta.type.parameters.tsx - - match: \> - captures: - 0: punctuation.definition.typeparameters.end.tsx - pop: true - - include: type - - include: punctuation-comma + - include: type-arguments - include: paren-expression function-declaration: - match: '(?) )) | ((async\s*)?( + ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) | # sure shot arrow functions even if => is on new line ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? [(]\s* ( - ([)]\s*:) | # (): - ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: ) ) | ( - [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends + [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends ) | # arrow function possible to detect only with => on same line ( - (<\s*([_$[:alpha:]]|(\{[^\{\}]*\})|(\([^\(\)]*\))|(\[[^\[\]]*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{[^\{\}]*\})|(\([^\(\)]*\))|(\[[^\[\]]*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters - \(\s*([_$[:alpha:]\{\[]([^()]|\((\s*[^()]*)?\))*)?\) # parameteres - (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type - \s*=> # arrow operator + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters + \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters + (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type + \s*=> # arrow operator ) )) )) @@ -970,8 +1124,17 @@ contexts: 2: keyword.control.import.tsx push: - meta_scope: meta.import.tsx - - match: (?=;|$|^) + - match: '(?)) - push: - - match: '(/>)|(?:())' - captures: - 0: meta.tag.tsx - 1: punctuation.definition.tag.end.tsx - 2: punctuation.definition.tag.begin.tsx - 3: entity.name.tag.tsx - 4: support.class.component.tsx - 5: punctuation.definition.tag.end.tsx - pop: true - - include: jsx-tag jsx-children: - include: jsx-tag-without-attributes - - include: jsx-child-tag + - include: jsx-tag - include: jsx-evaluated-code - include: jsx-entities jsx-entities: @@ -1195,31 +1352,32 @@ contexts: pop: true - include: jsx-entities jsx-tag: - - match: |- - (?x) - (?=(<)\s* - ([_$a-zA-Z][-$\w.]*(?)) + - match: '(?=(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?))' push: - meta_scope: meta.tag.tsx - - match: '(?=(/>)|(?:()))' + - match: '(/>)|(?:())' + captures: + 1: punctuation.definition.tag.end.tsx + 2: punctuation.definition.tag.begin.tsx + 3: entity.name.tag.namespace.tsx + 4: punctuation.separator.namespace.tsx + 5: entity.name.tag.tsx + 6: support.class.component.tsx + 7: punctuation.definition.tag.end.tsx pop: true - - match: |- - (?x) - (<)\s* - ((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\w.]*))(?) + - match: '(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?)' captures: 1: punctuation.definition.tag.begin.tsx - 2: entity.name.tag.tsx - 3: support.class.component.tsx + 2: entity.name.tag.namespace.tsx + 3: punctuation.separator.namespace.tsx + 4: entity.name.tag.tsx + 5: support.class.component.tsx push: - - meta_content_scope: meta.tag.attributes.tsx - match: "(?=[/]?>)" pop: true - include: comment + - include: type-arguments - include: jsx-tag-attributes - - include: jsx-tag-attributes-illegal - match: (>) captures: 1: punctuation.definition.tag.end.tsx @@ -1235,65 +1393,80 @@ contexts: - match: |- (?x) \s* - ([_$a-zA-Z][-$\w]*) + (?:([_$[:alpha:]][-$[:alnum:].]*)(:))? + ([_$[:alpha:]][-$[:alnum:]]*) (?=\s|=|/?>|/\*|//) captures: - 1: entity.other.attribute-name.tsx + 1: entity.other.attribute-name.namespace.tsx + 2: punctuation.separator.namespace.tsx + 3: entity.other.attribute-name.tsx jsx-tag-attributes: - - include: jsx-tag-attribute-name - - include: jsx-tag-attribute-assignment - - include: jsx-string-double-quoted - - include: jsx-string-single-quoted - - include: jsx-evaluated-code + - match: \s+ + push: + - meta_scope: meta.tag.attributes.tsx + - match: "(?=[/]?>)" + pop: true + - include: comment + - include: jsx-tag-attribute-name + - include: jsx-tag-attribute-assignment + - include: jsx-string-double-quoted + - include: jsx-string-single-quoted + - include: jsx-evaluated-code + - include: jsx-tag-attributes-illegal jsx-tag-attributes-illegal: - match: \S+ scope: invalid.illegal.attribute.tsx jsx-tag-in-expression: - match: |- (?x) - (?<=[({\[,?=>:*]|&&|\|\||\?|\Wreturn|^return|\Wdefault|^)\s* + (?:*]|&&|\|\||\?|^await|[^\._$[:alnum:]]await|^return|[^\._$[:alnum:]]return|^default|[^\._$[:alnum:]]default|^yield|[^\._$[:alnum:]]yield|^)\s* (?!<\s*[_$[:alpha:]][_$[:alnum:]]*((\s+extends\s+[^=>])|,)) # look ahead is not type parameter of arrow - (?=(<)\s* - ([_$a-zA-Z][-$\w.]*(?)) + (?=(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?)) push: - - match: '(/>)|(?:())' - captures: - 0: meta.tag.tsx - 1: punctuation.definition.tag.end.tsx - 2: punctuation.definition.tag.begin.tsx - 3: entity.name.tag.tsx - 4: support.class.component.tsx - 5: punctuation.definition.tag.end.tsx + - match: '(?!(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?))' pop: true - include: jsx-tag jsx-tag-without-attributes: - - match: '(<)\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\w.]*))(?)' + - match: '(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?)' captures: 1: punctuation.definition.tag.begin.tsx - 2: entity.name.tag.tsx - 3: support.class.component.tsx - 4: punctuation.definition.tag.end.tsx + 2: entity.name.tag.namespace.tsx + 3: punctuation.separator.namespace.tsx + 4: entity.name.tag.tsx + 5: support.class.component.tsx + 6: punctuation.definition.tag.end.tsx push: - meta_scope: meta.tag.without-attributes.tsx - meta_content_scope: meta.jsx.children.tsx - - match: '()' + - match: '()' captures: 1: punctuation.definition.tag.begin.tsx - 2: entity.name.tag.tsx - 3: support.class.component.tsx - 4: punctuation.definition.tag.end.tsx + 2: entity.name.tag.namespace.tsx + 3: punctuation.separator.namespace.tsx + 4: entity.name.tag.tsx + 5: support.class.component.tsx + 6: punctuation.definition.tag.end.tsx pop: true - include: jsx-children jsx-tag-without-attributes-in-expression: - - match: |- - (?x) - (?<=[({\[,?=>:*]|&&|\|\||\?|\Wreturn|^return|\Wdefault|^)\s* - (?=(<)\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\w.]*))(?)) + - match: '(?:*]|&&|\|\||\?|^await|[^\._$[:alnum:]]await|^return|[^\._$[:alnum:]]return|^default|[^\._$[:alnum:]]default|^yield|[^\._$[:alnum:]]yield|^)\s*(?=(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?))' push: - - match: '(?!\s*(<)\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\w.]*))(?))' + - match: '(?!(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?))' pop: true - include: jsx-tag-without-attributes + label: + - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(:)(?=\s*\{)' + captures: + 1: entity.name.label.tsx + 2: punctuation.separator.label.tsx + push: + - match: '(?<=\})' + pop: true + - include: decl-block + - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(:)' + captures: + 1: entity.name.label.tsx + 2: punctuation.separator.label.tsx literal: - include: numeric-literal - include: boolean-literal @@ -1304,7 +1477,42 @@ contexts: - include: this-literal - include: super-literal method-declaration: - - match: '(?) )) | ((async\s*)?( + ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) | # sure shot arrow functions even if => is on new line ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? [(]\s* ( - ([)]\s*:) | # (): - ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: ) ) | ( - [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends + [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends ) | # arrow function possible to detect only with => on same line ( - (<\s*([_$[:alpha:]]|(\{[^\{\}]*\})|(\([^\(\)]*\))|(\[[^\[\]]*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{[^\{\}]*\})|(\([^\(\)]*\))|(\[[^\[\]]*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters - \(\s*([_$[:alpha:]\{\[]([^()]|\((\s*[^()]*)?\))*)?\) # parameteres - (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type - \s*=> # arrow operator + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters + \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters + (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type + \s*=> # arrow operator ) )) ))) @@ -1571,6 +1858,32 @@ contexts: - meta_scope: meta.object.member.tsx - match: '(?=,|\})' pop: true + - match: '(?<=:)\s*(async)?(?=\s*(<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)\(\s*([\{\[]\s*)?$)' + captures: + 1: storage.modifier.async.tsx + push: + - match: (?<=\)) + pop: true + - include: type-parameters + - match: \( + captures: + 0: meta.brace.round.tsx + push: + - match: \) + captures: + 0: meta.brace.round.tsx + pop: true + - include: expression-inside-possibly-arrow-parens + - match: '(?<=:)\s*(async)?\s*(\()(?=\s*([\{\[]\s*)?$)' + captures: + 1: storage.modifier.async.tsx + 2: meta.brace.round.tsx + push: + - match: \) + captures: + 0: meta.brace.round.tsx + pop: true + - include: expression-inside-possibly-arrow-parens - include: expression - include: punctuation-comma parameter-array-binding-pattern: @@ -1587,16 +1900,17 @@ contexts: - include: punctuation-comma parameter-binding-element: - include: comment + - include: string - include: parameter-object-binding-pattern - include: parameter-array-binding-pattern - include: destructuring-parameter-rest - include: variable-initializer parameter-name: - - match: \s*\b(public|protected|private|readonly)(?=\s+(public|protected|private|readonly)\s+) + - match: '(?) )) | ((async\s*)?( + ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) | # sure shot arrow functions even if => is on new line ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? [(]\s* ( - ([)]\s*:) | # (): - ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: ) ) | ( - [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends + [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends ) | # arrow function possible to detect only with => on same line ( - (<\s*([_$[:alpha:]]|(\{[^\{\}]*\})|(\([^\(\)]*\))|(\[[^\[\]]*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{[^\{\}]*\})|(\([^\(\)]*\))|(\[[^\[\]]*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters - \(\s*([_$[:alpha:]\{\[]([^()]|\((\s*[^()]*)?\))*)?\) # parameteres - (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type - \s*=> # arrow operator + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters + \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters + (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type + \s*=> # arrow operator ) )) )) | @@ -1636,6 +1952,36 @@ contexts: ([)]\s*=>) )) )) + )) | + (:\s*((<\s*$)|([\(]\s*([\{\[]\s*)?$))) | + (:\s*(=>|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*( + ((async\s+)?( + (function\s*[(<*]) | + (function\s+) | + ([_$[:alpha:]][_$[:alnum:]]*\s*=>) + )) | + ((async\s*)?( + ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) | + # sure shot arrow functions even if => is on new line + ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? + [(]\s* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) + ) | + ( + [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends + ) | + # arrow function possible to detect only with => on same line + ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters + \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters + (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type + \s*=> # arrow operator + ) + )) ))) captures: 1: storage.modifier.tsx @@ -1643,7 +1989,7 @@ contexts: 3: entity.name.function.tsx variable.language.this.tsx 4: entity.name.function.tsx 5: keyword.operator.optional.tsx - - match: '(?x)(?:\s*\b(public|private|protected|readonly)\s+)?(\.\.\.)?\s*(?]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*))?\(\s*[\{\[]\s*$)' + captures: + 1: storage.modifier.async.tsx + push: + - match: (?<=\)) + pop: true + - include: paren-expression-possibly-arrow-with-typeparameters + - match: '(?<=[(=,]|=>)\s*(async)?(?=\s*((((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*))?\()|(<))\s*$)' + captures: + 1: storage.modifier.async.tsx + push: + - match: (?<=\)) + pop: true + - include: paren-expression-possibly-arrow-with-typeparameters + - include: possibly-arrow-return-type + paren-expression-possibly-arrow-with-typeparameters: + - include: type-parameters + - match: \( + captures: + 0: meta.brace.round.tsx + push: + - match: \) + captures: + 0: meta.brace.round.tsx + pop: true + - include: expression-inside-possibly-arrow-parens + possibly-arrow-return-type: + - match: '(?<=\))\s*(:)(?=\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+\s*=>)' + captures: + 1: meta.arrow.tsx meta.return.type.arrow.tsx keyword.operator.type.annotation.tsx + push: + - meta_content_scope: meta.arrow.tsx meta.return.type.arrow.tsx + - match: '(?==>|\{|(^\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\s+))' + pop: true + - include: arrow-return-type-body property-accessor: - match: '(?|&&|\|\||\*\/)\s*(\/)(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)+\])+\/(?![\/*])[gimuy]*(?!\s*[a-zA-Z0-9_$]))' + - match: '(?|&&|\|\||\*\/)\s*(\/)(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)+\])+\/[gimsuy]*(?!\s*[a-zA-Z0-9_$]))' captures: 1: punctuation.definition.string.begin.tsx push: - meta_scope: string.regexp.tsx - - match: "(/)([gimuy]*)" + - match: "(/)([gimsuy]*)" captures: 1: punctuation.definition.string.end.tsx 2: keyword.other.tsx pop: true - include: regexp - - match: '(?' + captures: + 0: keyword.other.back-reference.regexp + 1: variable.other.regexp - match: '[?+*]|\{(\d+,\d+|\d+,|,\d+|\d+)\}\??' scope: keyword.operator.quantifier.regexp - match: \| scope: keyword.operator.or.regexp - - match: (\()((\?=)|(\?!)) + - match: (\()((\?=)|(\?!)|(\?<=)|(\?))?' captures: 0: punctuation.definition.group.regexp 1: punctuation.definition.group.no-capture.regexp + 2: variable.other.regexp push: - meta_scope: meta.group.regexp - match: \) @@ -1842,6 +2238,7 @@ contexts: - include: control-statement - include: after-operator-block-as-object-literal - include: decl-block + - include: label - include: expression - include: punctuation-semicolon string: @@ -1858,12 +2255,14 @@ contexts: scope: variable.language.arguments.tsx - match: |- (?x)(?]|=[^<]|\<\s*([_$[:alpha:]]|(\{[^\{\}]*\})|(\([^\(\)]*\))|(\[[^\[\]]*\]))([^=<>]|=[^<])*\>)*>\s*)?\() + |vAlign|value|valueType|vendor|vendorSub|version|visibility|vspace|whiteSpace|width|X[MS]LDocument|zIndex))\b(?!\$|\s*(<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?\() captures: 1: punctuation.accessor.tsx 2: punctuation.accessor.optional.tsx @@ -2109,6 +2520,8 @@ contexts: slice|splitText|stepDown|stepUp|stopImmediatePropagation|stopPropagation| submit|substringData|supports|surroundContents|takeRecords|terminate|toBlob| toDataURL|toggle|toString|values|write|writeln + ) | + (all|catch|finally|race|reject|resolve|then ) )(?=\s*\() captures: @@ -2117,6 +2530,7 @@ contexts: 3: support.function.event-handler.tsx 4: support.function.tsx 5: support.function.dom.tsx + 6: support.function.promise.tsx switch-statement: - match: '(?\,\.\[=]|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[=]|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?!=)\>)*(?!=)>\s*)`)' + captures: + 1: entity.name.function.tagged-template.tsx + push: + - meta_scope: string.template.tsx + - match: (?=`) + pop: true + - include: type-arguments - match: "([_$[:alpha:]][_$[:alnum:]]*)?(`)" captures: 1: entity.name.function.tagged-template.tsx @@ -2184,9 +2618,9 @@ contexts: captures: 1: keyword.operator.ternary.tsx push: - - match: (:) + - match: \s*(:) captures: - 0: keyword.operator.ternary.tsx + 1: keyword.operator.ternary.tsx pop: true - include: expression this-literal: @@ -2201,6 +2635,7 @@ contexts: - include: type-parameters - include: type-tuple - include: type-object + - include: type-conditional - include: type-operators - include: type-fn-type-parameters - include: type-paren-or-function-parameters @@ -2214,14 +2649,17 @@ contexts: 3: entity.name.type.alias.tsx push: - meta_scope: meta.type.declaration.tsx - - match: '(?=[};]|\babstract\b|\basync\b|\bclass\b|\bconst\b|\bdeclare\b|\benum\b|\bexport\b|\bfunction\b|\bimport\b|\binterface\b|\blet\b|\bmodule\b|\bnamespace\b|\btype\b|\bvar\b)' + - match: '(?=\}|;|^\s*abstract\b|^\s*async\b|^\s*class\b|^\s*const\b|^\s*declare\b|^\s*enum\b|^\s*export\b|^\s*function\b|^\s*import\b|^\s*interface\b|^\s*let\b|^\s*module\b|^\s*namespace\b|^\s*return\b|^\s*type\b|^\s*var\b)' pop: true - include: comment - include: type-parameters - - include: type - match: (=)\s* captures: 1: keyword.operator.assignment.tsx + push: + - match: '(?=\}|;|^\s*abstract\b|^\s*async\b|^\s*class\b|^\s*const\b|^\s*declare\b|^\s*enum\b|^\s*export\b|^\s*function\b|^\s*import\b|^\s*interface\b|^\s*let\b|^\s*module\b|^\s*namespace\b|^\s*return\b|^\s*type\b|^\s*var\b)' + pop: true + - include: type type-annotation: - match: (:)(?=\s*\S) captures: @@ -2239,9 +2677,38 @@ contexts: - match: '(?])|(?=^\s*$)|((?<=\S)(?=\s*$))|((?<=[\}>\]\)]|[_$[:alpha:]])\s*(?=\{)))' pop: true - include: type + type-arguments: + - match: \< + captures: + 0: punctuation.definition.typeparameters.begin.tsx + push: + - meta_scope: meta.type.parameters.tsx + - match: \> + captures: + 0: punctuation.definition.typeparameters.end.tsx + pop: true + - include: type + - include: punctuation-comma type-builtin-literals: - match: '(?)(?]|//|$)' + - match: '(?)(?:\?]|//|$)' pop: true - include: type-function-return-type-core - match: "=>" @@ -2287,7 +2754,7 @@ contexts: 0: storage.type.function.arrow.tsx push: - meta_scope: meta.type.function.return.tsx - - match: '(?)(?]|//|^\s*$)|((?<=\S)(?=\s*$)))' + - match: '(?)(?]|//|^\s*$)|((?<=\S)(?=\s*$)))' pop: true - include: type-function-return-type-core type-function-return-type-core: @@ -2335,21 +2802,29 @@ contexts: - include: type type-operators: - include: typeof-operator - - match: '([&|])(?=\s*\{)' + - match: '(?:([&|])|(=(?!>)))(?=\s*\{)' captures: - 0: keyword.operator.type.tsx + 1: keyword.operator.type.tsx + 2: keyword.operator.assignment.tsx push: - match: '(?<=\})' pop: true - include: type-object - - match: "[&|]" + - match: "([&|])|(=(?!>))" captures: - 0: keyword.operator.type.tsx + 1: keyword.operator.type.tsx + 2: keyword.operator.assignment.tsx push: - match: (?=\S) pop: true - match: '(?) - scope: keyword.operator.assignment.tsx - include: type - include: punctuation-comma type-paren-or-function-parameters: @@ -2377,8 +2850,37 @@ contexts: captures: 0: meta.brace.round.tsx pop: true + - include: destructuring-parameter + - match: |- + (?x)(?:(?) + )) + )) + )) | + (:\s*((<\s*$)|([\(]\s*([\{\[]\s*)?$)))) + captures: + 1: storage.modifier.tsx + 2: keyword.operator.rest.tsx + 3: entity.name.function.tsx variable.language.this.tsx + 4: entity.name.function.tsx + 5: keyword.operator.optional.tsx + - match: '(?x)(?:(?) )) | ((async\s*)?( + ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) | # sure shot arrow functions even if => is on new line ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? [(]\s* ( - ([)]\s*:) | # (): - ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: ) ) | ( - [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends + [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends ) | # arrow function possible to detect only with => on same line ( - (<\s*([_$[:alpha:]]|(\{[^\{\}]*\})|(\([^\(\)]*\))|(\[[^\[\]]*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{[^\{\}]*\})|(\([^\(\)]*\))|(\[[^\[\]]*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters - \(\s*([_$[:alpha:]\{\[]([^()]|\((\s*[^()]*)?\))*)?\) # parameteres - (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type - \s*=> # arrow operator + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters + \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters + (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type + \s*=> # arrow operator ) )) )) | @@ -2469,6 +2996,126 @@ contexts: ([)]\s*=>) )) )) + )) | + (:\s*((<\s*$)|([\(]\s*([\{\[]\s*)?$))) | + (:\s*(=>|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*( + ((async\s+)?( + (function\s*[(<*]) | + (function\s+) | + ([_$[:alpha:]][_$[:alnum:]]*\s*=>) + )) | + ((async\s*)?( + ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) | + # sure shot arrow functions even if => is on new line + ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? + [(]\s* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) + ) | + ( + [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends + ) | + # arrow function possible to detect only with => on same line + ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters + \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters + (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type + \s*=> # arrow operator + ) + )) + ))) + captures: + 1: meta.definition.variable.tsx variable.other.constant.tsx entity.name.function.tsx + push: + - meta_scope: meta.var-single-variable.expr.tsx + - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))' + pop: true + - include: var-single-variable-type-annotation + - match: "([_$[:alpha:]][_$[:alnum:]]*)" + captures: + 1: meta.definition.variable.tsx variable.other.constant.tsx + push: + - meta_scope: meta.var-single-variable.expr.tsx + - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))' + pop: true + - include: var-single-variable-type-annotation + var-single-variable: + - match: |- + (?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\s* + # function assignment | + (=\s*( + ((async\s+)?( + (function\s*[(<*]) | + (function\s+) | + ([_$[:alpha:]][_$[:alnum:]]*\s*=>) + )) | + ((async\s*)?( + ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) | + # sure shot arrow functions even if => is on new line + ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? + [(]\s* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) + ) | + ( + [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends + ) | + # arrow function possible to detect only with => on same line + ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters + \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters + (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type + \s*=> # arrow operator + ) + )) + )) | + # typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) => + (:\s*( + (<) | + ([(]\s*( + ([)]) | + (\.\.\.) | + ([_$[:alnum:]]+\s*( + ([:,?=])| + ([)]\s*=>) + )) + )) + )) | + (:\s*((<\s*$)|([\(]\s*([\{\[]\s*)?$))) | + (:\s*(=>|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*( + ((async\s+)?( + (function\s*[(<*]) | + (function\s+) | + ([_$[:alpha:]][_$[:alnum:]]*\s*=>) + )) | + ((async\s*)?( + ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) | + # sure shot arrow functions even if => is on new line + ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? + [(]\s* + ( + ([)]\s*:) | # (): + ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: + ) + ) | + ( + [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends + ) | + # arrow function possible to detect only with => on same line + ( + (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters + \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters + (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type + \s*=> # arrow operator + ) + )) ))) captures: 1: meta.definition.variable.tsx entity.name.function.tsx diff --git a/sublime_syntaxes/VimL.sublime-syntax b/sublime/syntaxes/VimL.sublime-syntax similarity index 100% rename from sublime_syntaxes/VimL.sublime-syntax rename to sublime/syntaxes/VimL.sublime-syntax diff --git a/sublime/syntaxes/awk-sublime b/sublime/syntaxes/awk-sublime new file mode 160000 index 00000000..1ce5f90d --- /dev/null +++ b/sublime/syntaxes/awk-sublime @@ -0,0 +1 @@ +Subproject commit 1ce5f90d444d80b12af41bc051507e914730d4ef diff --git a/sublime/syntaxes/elixir-sublime-syntax b/sublime/syntaxes/elixir-sublime-syntax new file mode 160000 index 00000000..1f010d5f --- /dev/null +++ b/sublime/syntaxes/elixir-sublime-syntax @@ -0,0 +1 @@ +Subproject commit 1f010d5f63f20aa8eafa57aaaeafe736e0748dca diff --git a/sublime_syntaxes/lrc.sublime-syntax b/sublime/syntaxes/lrc.sublime-syntax similarity index 100% rename from sublime_syntaxes/lrc.sublime-syntax rename to sublime/syntaxes/lrc.sublime-syntax diff --git a/sublime/syntaxes/newlines.packdump b/sublime/syntaxes/newlines.packdump new file mode 100644 index 00000000..ebe067d1 Binary files /dev/null and b/sublime/syntaxes/newlines.packdump differ diff --git a/sublime_syntaxes/srt.sublime-syntax b/sublime/syntaxes/srt.sublime-syntax similarity index 100% rename from sublime_syntaxes/srt.sublime-syntax rename to sublime/syntaxes/srt.sublime-syntax diff --git a/sublime/syntaxes/sublime-fish b/sublime/syntaxes/sublime-fish new file mode 160000 index 00000000..2c254cc8 --- /dev/null +++ b/sublime/syntaxes/sublime-fish @@ -0,0 +1 @@ +Subproject commit 2c254cc8512d53b7af306e4379fc9744ee5b4aee diff --git a/sublime/syntaxes/sublime-jinja2 b/sublime/syntaxes/sublime-jinja2 new file mode 160000 index 00000000..45355633 --- /dev/null +++ b/sublime/syntaxes/sublime-jinja2 @@ -0,0 +1 @@ +Subproject commit 45355633d17ee562481ca1d2ad0e3502c238f58a diff --git a/sublime/syntaxes/sublime-purescript-syntax b/sublime/syntaxes/sublime-purescript-syntax new file mode 160000 index 00000000..5acebc18 --- /dev/null +++ b/sublime/syntaxes/sublime-purescript-syntax @@ -0,0 +1 @@ +Subproject commit 5acebc18503697be09df047591964e68e80fcf8e diff --git a/sublime/syntaxes/sublime_toml_highlighting b/sublime/syntaxes/sublime_toml_highlighting new file mode 160000 index 00000000..0f14b7ca --- /dev/null +++ b/sublime/syntaxes/sublime_toml_highlighting @@ -0,0 +1 @@ +Subproject commit 0f14b7caf3c775a5d18551a9563a9debdb10c9a9 diff --git a/sublime/syntaxes/sublimetext-fsharp b/sublime/syntaxes/sublimetext-fsharp new file mode 160000 index 00000000..c18616d6 --- /dev/null +++ b/sublime/syntaxes/sublimetext-fsharp @@ -0,0 +1 @@ +Subproject commit c18616d6bd55b188672276da837837070170d967 diff --git a/sublime/syntaxes/vue-syntax-highlight b/sublime/syntaxes/vue-syntax-highlight new file mode 160000 index 00000000..6d405948 --- /dev/null +++ b/sublime/syntaxes/vue-syntax-highlight @@ -0,0 +1 @@ +Subproject commit 6d405948df4a112eb7a4db2ed72bbfe76dd9f419 diff --git a/sublime_themes/1337.tmTheme b/sublime/themes/1337.tmTheme similarity index 100% rename from sublime_themes/1337.tmTheme rename to sublime/themes/1337.tmTheme diff --git a/sublime_themes/Tomorrow.tmTheme b/sublime/themes/Tomorrow.tmTheme similarity index 100% rename from sublime_themes/Tomorrow.tmTheme rename to sublime/themes/Tomorrow.tmTheme diff --git a/sublime_themes/agola-dark.tmTheme b/sublime/themes/agola-dark.tmTheme similarity index 100% rename from sublime_themes/agola-dark.tmTheme rename to sublime/themes/agola-dark.tmTheme diff --git a/sublime/themes/all.themedump b/sublime/themes/all.themedump new file mode 100644 index 00000000..a79c10bd Binary files /dev/null and b/sublime/themes/all.themedump differ diff --git a/sublime_themes/ascetic-white.tmTheme b/sublime/themes/ascetic-white.tmTheme similarity index 100% rename from sublime_themes/ascetic-white.tmTheme rename to sublime/themes/ascetic-white.tmTheme diff --git a/sublime_themes/axar.tmTheme b/sublime/themes/axar.tmTheme similarity index 100% rename from sublime_themes/axar.tmTheme rename to sublime/themes/axar.tmTheme diff --git a/sublime_themes/ayu-dark.tmTheme b/sublime/themes/ayu-dark.tmTheme similarity index 100% rename from sublime_themes/ayu-dark.tmTheme rename to sublime/themes/ayu-dark.tmTheme diff --git a/sublime_themes/ayu-light.tmTheme b/sublime/themes/ayu-light.tmTheme similarity index 100% rename from sublime_themes/ayu-light.tmTheme rename to sublime/themes/ayu-light.tmTheme diff --git a/sublime_themes/ayu-mirage.tmTheme b/sublime/themes/ayu-mirage.tmTheme similarity index 100% rename from sublime_themes/ayu-mirage.tmTheme rename to sublime/themes/ayu-mirage.tmTheme diff --git a/sublime_themes/base16-ocean-dark.tmTheme b/sublime/themes/base16-ocean-dark.tmTheme similarity index 100% rename from sublime_themes/base16-ocean-dark.tmTheme rename to sublime/themes/base16-ocean-dark.tmTheme diff --git a/sublime_themes/base16-ocean-light.tmTheme b/sublime/themes/base16-ocean-light.tmTheme similarity index 100% rename from sublime_themes/base16-ocean-light.tmTheme rename to sublime/themes/base16-ocean-light.tmTheme diff --git a/sublime_themes/bbedit.tmTheme b/sublime/themes/bbedit.tmTheme similarity index 100% rename from sublime_themes/bbedit.tmTheme rename to sublime/themes/bbedit.tmTheme diff --git a/sublime_themes/boron.tmTheme b/sublime/themes/boron.tmTheme similarity index 100% rename from sublime_themes/boron.tmTheme rename to sublime/themes/boron.tmTheme diff --git a/sublime_themes/charcoal.tmTheme b/sublime/themes/charcoal.tmTheme similarity index 100% rename from sublime_themes/charcoal.tmTheme rename to sublime/themes/charcoal.tmTheme diff --git a/sublime_themes/cheerfully-light.tmTheme b/sublime/themes/cheerfully-light.tmTheme similarity index 100% rename from sublime_themes/cheerfully-light.tmTheme rename to sublime/themes/cheerfully-light.tmTheme diff --git a/sublime_themes/classic-modified.tmTheme b/sublime/themes/classic-modified.tmTheme similarity index 100% rename from sublime_themes/classic-modified.tmTheme rename to sublime/themes/classic-modified.tmTheme diff --git a/sublime_themes/demain.tmTheme b/sublime/themes/demain.tmTheme similarity index 100% rename from sublime_themes/demain.tmTheme rename to sublime/themes/demain.tmTheme diff --git a/sublime_themes/dimmed-fluid.tmTheme b/sublime/themes/dimmed-fluid.tmTheme similarity index 100% rename from sublime_themes/dimmed-fluid.tmTheme rename to sublime/themes/dimmed-fluid.tmTheme diff --git a/sublime_themes/dracula.tmTheme b/sublime/themes/dracula.tmTheme similarity index 100% rename from sublime_themes/dracula.tmTheme rename to sublime/themes/dracula.tmTheme diff --git a/sublime_themes/gray-matter-dark.tmTheme b/sublime/themes/gray-matter-dark.tmTheme similarity index 100% rename from sublime_themes/gray-matter-dark.tmTheme rename to sublime/themes/gray-matter-dark.tmTheme diff --git a/sublime_themes/gruvbox-dark.tmTheme b/sublime/themes/gruvbox-dark.tmTheme similarity index 100% rename from sublime_themes/gruvbox-dark.tmTheme rename to sublime/themes/gruvbox-dark.tmTheme diff --git a/sublime_themes/gruvbox-light.tmTheme b/sublime/themes/gruvbox-light.tmTheme similarity index 100% rename from sublime_themes/gruvbox-light.tmTheme rename to sublime/themes/gruvbox-light.tmTheme diff --git a/sublime_themes/idle.tmTheme b/sublime/themes/idle.tmTheme similarity index 100% rename from sublime_themes/idle.tmTheme rename to sublime/themes/idle.tmTheme diff --git a/sublime_themes/inspired-github.tmTheme b/sublime/themes/inspired-github.tmTheme similarity index 100% rename from sublime_themes/inspired-github.tmTheme rename to sublime/themes/inspired-github.tmTheme diff --git a/sublime_themes/ir-white.tmTheme b/sublime/themes/ir-white.tmTheme similarity index 100% rename from sublime_themes/ir-white.tmTheme rename to sublime/themes/ir-white.tmTheme diff --git a/sublime_themes/kronuz.tmTheme b/sublime/themes/kronuz.tmTheme similarity index 100% rename from sublime_themes/kronuz.tmTheme rename to sublime/themes/kronuz.tmTheme diff --git a/sublime_themes/material-dark.tmTheme b/sublime/themes/material-dark.tmTheme similarity index 100% rename from sublime_themes/material-dark.tmTheme rename to sublime/themes/material-dark.tmTheme diff --git a/sublime_themes/material-light.tmTheme b/sublime/themes/material-light.tmTheme similarity index 100% rename from sublime_themes/material-light.tmTheme rename to sublime/themes/material-light.tmTheme diff --git a/sublime_themes/monokai.tmTheme b/sublime/themes/monokai.tmTheme similarity index 100% rename from sublime_themes/monokai.tmTheme rename to sublime/themes/monokai.tmTheme diff --git a/sublime/themes/nord.tmTheme b/sublime/themes/nord.tmTheme new file mode 100644 index 00000000..7893c955 --- /dev/null +++ b/sublime/themes/nord.tmTheme @@ -0,0 +1,1873 @@ + + + + + + + name + Nord + comment + A arctic, north-bluish clean and elegant Visual Studio Code theme. + author + Arctic Ice Studio + semanticClass + nord + colorSpaceName + sRGB + settings + + + + settings + + background + #2e3440 + foreground + #d8dee9 + caret + #d8dee9 + invisibles + #4c566a + lineHighlight + #434c5e52 + + misspelling + #bf616a + minimapBorder + #434c5e52 + accent + #88C0D0 + + gutter + #2e3440 + gutterForeground + #d8dee966 + + selection + #434c5ecc + selectionBorder + #434c5ecc + inactiveSelection + #434c5e99 + + highlight + #88c0d0 + findHighlight + #88c0d0 + findHighlightForeground + #2e3440 + + guide + #434c5eb3 + activeGuide + #88c0d0cc + stackGuide + #88c0d066 + + bracketsOptions + underline + bracketsForeground + #88c0d0 + bracketsContentsOptions + underline + bracketsContentsForeground + #88c0d0 + + tagsOptions + underline + tagsForeground + #88c0d0 + + shadow + #2e3440 + shadowWidth + 8 + + + + + name + [Comment] Comment + scope + + comment, + punctuation.definition.comment + + settings + + foreground + #616e88 + + + + + name + [Constants] Numeric + scope + constant.numeric + settings + + foreground + #b48ead + + + + name + [Constants] BuiltIn + scope + constant.language + settings + + foreground + #81a1c1 + + + + name + [Constants] Escape + scope + constant.character.escape + settings + + foreground + #ebcb8b + + + + name + [Constants] Placeholder + scope + constant.other.placeholder + settings + + foreground + #ebcb8b + + + + name + [Constants] Other + scope + constant.other + settings + + foreground + #d8dee9 + + + + + name + [Entity] Class + scope + entity.name.class + settings + + foreground + #8fbcbb + + + + name + [Entity] Struct + scope + entity.name.struct + settings + + foreground + #8fbcbb + + + + name + [Entity] Enum + scope + entity.name.enum + settings + + foreground + #8fbcbb + + + + name + [Entity] Unions + scope + entity.name.union + settings + + foreground + #8fbcbb + + + + name + [Entity] Traits + scope + entity.name.trait + settings + + foreground + #8fbcbb + + + + name + [Entity] Interface + scope + entity.name.interface + settings + + foreground + #8fbcbb + fontStyle + bold + + + + name + [Entity] Type + scope + entity.name.type + settings + + foreground + #81a1c1 + + + + name + [Entity] Inherited Class/Interface/Trait + scope + entity.other.inherited-class + settings + + foreground + #8fbcbb + + + + name + [Entity] Function + scope + entity.name.function + settings + + foreground + #88c0d0 + + + + name + [Entity] Constructor + scope + entity.name.function.constructor + settings + + foreground + #88c0d0 + + + + name + [Entity] Destructor + scope + entity.name.function.destructor + settings + + foreground + #88c0d0 + + + + name + [Entity] Namespace + scope + entity.name.namespace + settings + + foreground + #8fbcbb + + + + name + [Entity] Constant + scope + entity.name.constant + settings + + foreground + #81a1c1 + + + + name + [Entity] Label/Goto + scope + entity.name.label + settings + + foreground + #5e81ac + + + + name + [Entity] Section + scope + entity.name.section + settings + + foreground + #88c0d0 + + + + name + [Entity] Tag + scope + entity.name.tag + settings + + foreground + #81a1c1 + + + + name + [Entity] Attribute Name + scope + entity.other.attribute-name + settings + + foreground + #8fbcbb + + + + + name + [Invalid] Illegal + scope + invalid.illegal + settings + + background + #bf616a + foreground + #d8dee9 + + + + name + [Invalid] Deprecated + scope + invalid.deprecated + settings + + background + #ebcb8b + foreground + #d8dee9 + + + + + name + [Keyword] Control + scope + keyword.control + settings + + foreground + #81a1c1 + + + + name + [Keyword] Control Conditional + scope + keyword.control.conditional + settings + + foreground + #81a1c1 + + + + name + [Keyword] Control Import + scope + keyword.control.import + settings + + foreground + #81a1c1 + + + + name + [Keyword] Punctuation Definition + scope + punctuation.definition.keyword + settings + + foreground + #81a1c1 + + + + name + [Keyword] Other + scope + keyword.other + settings + + foreground + #81a1c1 + + + + name + [Keyword] Operator + scope + + keyword.operator, + keyword.operator.assignment, + keyword.operator.arithmetic, + keyword.operator.bitwise, + keyword.operator.logical, + keyword.operator.word + + settings + + foreground + #81a1c1 + + + + + name + [Markup] Heading + scope + markup.heading + settings + + foreground + #88c0d0 + + + + name + [Markup] List + scope + + markup.list.unnumbered, + markup.list.numbered + + settings + + foreground + #d8dee9 + + + + name + [Markup] Bold + scope + markup.bold + settings + + fontStyle + bold + + + + name + [Markup] Italic + scope + markup.italic + settings + + fontStyle + italic + + + + name + [Markup] Inserted + scope + markup.inserted + settings + + foreground + #a3be8c + + + + name + [Markup] Deleted + scope + markup.deleted + settings + + foreground + #bf616a + + + + name + [Markup] Changed + scope + markup.changed + settings + + foreground + #ebcb8b + + + + name + [Markup] Quote + scope + markup.quote + settings + + foreground + #616e88 + + + + name + [Markup] Raw + scope + + markup.raw.inline, + markup.raw.block + + settings + + foreground + #8fbcbb + + + + name + [Markup] Other + scope + markup.other + settings + + background + #eceff4 + + + + + name + [Punctuation] Separator/Terminator + scope + + punctuation.separator, + punctuation.terminator + + settings + + foreground + #eceff4 + + + + name + [Punctuation] Separator Continuation/Accessor + scope + + punctuation.separator.continuation, + punctuation.accessor + + settings + + foreground + #81a1c1 + + + + name + [Punctuation] Definition Tag + scope + punctuation.definition.tag + settings + + foreground + #81a1c1 + + + + + name + [Storage] Type + scope + + storage.type, + storage.modifier + + settings + + foreground + #81a1c1 + + + + + name + [String] Quoted/Unquoted + scope + + string.quoted.single, + string.quoted.double, + string.quoted.triple, + string.quoted.other, + string.unquoted + + settings + + foreground + #a3be8c + + + + name + [String] Punctuation Definition + scope + + punctuation.definition.string.begin, + punctuation.definition.string.end + + settings + + foreground + #a3be8c + + + + name + [String] RegExp + scope + string.regexp + settings + + foreground + #ebcb8b + + + + + name + [Support] Constant + scope + support.constant + settings + + foreground + #8fbcbb + + + + name + [Support] Function + scope + support.function + settings + + foreground + #88c0d0 + + + + name + [Support] Module + scope + support.module + settings + + foreground + #8fbcbb + + + + name + [Support] Type + scope + support.type + settings + + foreground + #8fbcbb + + + + name + [Support] Class + scope + support.class + settings + + foreground + #8fbcbb + + + + + name + [Text] HTML/XML + scope + + text.html.basic, + text.xml + + settings + + foreground + #eceff4 + + + + + name + [Variable] Other/ReadWrite + scope + + variable.other, + variable.other.readwrite + + settings + + foreground + #d8dee9 + + + + name + [Variable] Punctuation Definition + scope + punctuation.definition.variable + settings + + foreground + #81a1c1 + + + + name + [Variable] Constant + scope + variable.other.constant + settings + + foreground + #81a1c1 + + + + name + [Variable] Language + scope + variable.language + settings + + foreground + #81a1c1 + + + + name + [Variable] Parameter + scope + variable.parameter + settings + + foreground + #d8dee9 + + + + name + [Variable] Other Member + scope + variable.other.member + settings + + foreground + #d8dee9 + + + + name + [Variable] Function + scope + variable.function + settings + + foreground + #88c0d0 + + + + + + name + [Find Results] Gutter Number + scope + constant.numeric.line-number.find-in-files + settings + + foreground + #d8dee966 + + + + name + [Find Results] Gutter Number Match + scope + constant.numeric.line-number.match.find-in-files + settings + + foreground + #88c0d0 + + + + name + [Find Results] Filename + scope + entity.name.filename.find-in-files + settings + + foreground + #8fbcbb + + + + name + [Find Results] Text + scope + text.find-in-files + settings + + foreground + #d8dee9 + + + + + + name + [C/C++] Preprocessor/Include + scope + + source.c keyword.control.import.include.c, + source.c meta.preprocessor.c keyword.control.import.c, + source.c++ keyword.control.import.include.c++, + source.c++ meta.preprocessor.c++ keyword.control.import.c++ + + settings + + foreground + #5e81ac + + + + name + [C/C++] BuiltIn Function + scope + + source.c keyword.operator.word.c, + source.c++ keyword.operator.word.c++ + + settings + + foreground + #88c0d0 + fontStyle + italic + + + + + name + [CSS/Sass] Property Name + scope + + source.css support.type.property-name.css, + source.sass support.type.property-name.sass, + source.css support.type.vendor-prefix.css + + settings + + foreground + #d8dee9 + + + + name + [CSS/Sass] RGB Value + scope + + source.css constant.other.color.rgb-value.css, + source.sass constant.other.rgb-value.sass + + settings + + foreground + #b48ead + + + + name + [CSS] Property Value + scope + + source.css support.constant.color.w3c-special-color-keyword.css, + source.css support.constant.property-value.css, + source.sass support.constant.property-value.sass + + settings + + foreground + #81a1c1 + + + + name + [CSS] Pseudo Class + scope + source.css entity.other.pseudo-class.css + settings + + foreground + #8fbcbb + + + + name + [CSS/Sass] At-Rule + scope + + source.css keyword.control.at-rule.media.css, + source.css punctuation.definition.keyword.css, + source.sass keyword.control.at-rule.sass + + settings + + foreground + #d08770 + + + + name + [CSS] Color Names + scope + source.css support.constant.color.w3c-standard-color-name.css + settings + + foreground + #81a1c1 + fontStyle + italic + + + + name + [CSS/Sass] ID + scope + + source.css entity.other.attribute-name.id.css, + source.sass entity.other.attribute-name.id.sass + + settings + + fontStyle + bold + + + + + name + [diff] Meta Range Context + scope + source.diff meta.diff.range.context + settings + + foreground + #8fbcbb + + + + name + [diff] Meta Header From-File + scope + source.diff meta.diff.header.from-file + settings + + foreground + #8fbcbb + + + + name + [diff] Punctuation Definition From-File + scope + source.diff punctuation.definition.from-file + settings + + foreground + #8FBCBB + + + + name + [diff] Punctuation Definition Separator + scope + source.diff punctuation.definition.separator + settings + + foreground + #81a1c1 + + + + + name + [Go] BuiltIn Function + scope + source.go support.function.builtin.go + settings + + fontStyle + italic + + + + + name + [HTML] Entity + scope + text.html.basic constant.character.entity.html + settings + + foreground + #ebcb8b + + + + + name + [Java] Annotation + scope + + variable.annotation.java, + punctuation.definition.annotation.java + + settings + + foreground + #d08770 + + + + name + [Java] Punctuation + scope + punctuation.accessor.dot.java + settings + + foreground + #eceff4 + + + + name + [Java] Package + scope + support.other.package.java + settings + + foreground + #8fbcbb + + + + name + [Java] JavaDoc Comment Block Documentation HTML Entities + scope + source.java comment.block.documentation.javadoc punctuation.definition.entity.html + settings + + foreground + #81a1c1 + + + + name + [Java] Constant + scope + source.java entity.name.constant + settings + + foreground + #d8dee9 + + + + name + [Java] JavaDoc Tags + scope + + source.java keyword.other.documentation, + source.java comment.block.documentation.javadoc punctuation.definition.keyword.javadoc + + settings + + foreground + #8fbcbb + + + + name + [Java] Generic + scope + source.java variable.parameter.type.java + settings + + foreground + #8fbcbb + + + + name + [Java] Interface + scope + source.java entity.other.inherited-class.java + settings + + foreground + #8fbcbb + fontStyle + bold + + + + name + [Java] Implements Keyword + scope + source.java keyword.declaration.implements.java + settings + + foreground + #81a1c1 + + + + + name + [JSON] Key + scope + + source.json meta.structure.dictionary.json meta.structure.dictionary.key.json string.quoted.double.json, + source.json.sublime meta.structure.dictionary.json meta.structure.dictionary.key.json string.quoted.double.json + + settings + + foreground + #8fbcbb + + + + name + [JSON] Quote Punctuation + scope + + source.json meta.structure.dictionary.json punctuation.definition.string.begin.json, + source.json meta.structure.dictionary.json punctuation.definition.string.end.json, + source.json.sublime meta.structure.dictionary.json punctuation.definition.string.begin.json, + source.json.sublime meta.structure.dictionary.json punctuation.definition.string.end.json + + settings + + foreground + #eceff4 + + + + + name + [Markdown] Fenced Code Block + scope + + text.html.markdown punctuation.definition.raw.code-fence.begin.markdown, + text.html.markdown punctuation.definition.raw.code-fence.end.markdown, + text.html.markdown markup.raw.code-fence.markdown constant.other.language-name.markdown + + settings + + foreground + #8fbcbb + + + + name + [Markdown] List Bullet + scope + + text.html.markdown punctuation.definition.list_item.markdown, + text.html.markdown markup.list.numbered.bullet.markdown + + settings + + foreground + #81a1c1 + + + + name + [Markdown] Quote Punctuation + scope + text.html.markdown markup.quote.markdown punctuation.definition.blockquote.markdown + settings + + foreground + #8FBCBB + + + + name + [Markdown] Link Description + scope + + text.html.markdown meta.link.inline.description.markdown, + text.html.markdown meta.image.inline.description.markdown, + text.html.markdown meta.link.reference.description.markdown, + text.html.markdown constant.other.reference.link.markdown, + text.html.markdown entity.name.reference.link.markdown + + settings + + foreground + #88C0D0 + + + + name + [Markdown] Link Punctuation + scope + + text.html.markdown punctuation.definition.link.begin.markdown, + text.html.markdown punctuation.definition.link.end.markdown, + text.html.markdown punctuation.definition.image.begin.markdown, + text.html.markdown punctuation.definition.image.end.markdown, + text.html.markdown punctuation.definition.constant.begin.markdown, + text.html.markdown punctuation.definition.constant.end.markdown + + settings + + foreground + #81a1c1 + + + + name + [Markdown] Table Punctuation + scope + + text.html.markdown punctuation.separator.table-cell.markdown, + text.html.markdown punctuation.section.table-header.markdown + + settings + + foreground + #81a1c1 + + + + name + [Markdown] Table Header + scope + text.html.markdown meta.table.header.markdown + settings + + foreground + #88c0d0 + + + + name + [Markdown] Horizontal Line + scope + text.html.markdown punctuation.definition.thematic-break.markdown + settings + + foreground + #81a1c1 + fontStyle + bold + + + + + name + [PHP] Embedded Tag + scope + + embedding.php text.html.basic punctuation.section.embedded.begin.php, + embedding.php text.html.basic punctuation.section.embedded.end.php + + settings + + foreground + #5e81ac + + + + name + [PHP] PHPDoc Tag + scope + embedding.php text.html.basic comment.block.documentation.phpdoc.php keyword.other.phpdoc.php + settings + + foreground + #8fbcbb + + + + name + [PHP] Namespace + scope + embedding.php text.html.basic support.other.namespace.php + settings + + foreground + #8fbcbb + + + + + name + [Python] Decorator + scope + + source.python meta.annotation.python meta.qualified-name.python support.function.builtin.python, + source.python punctuation.definition.annotation.python + + settings + + foreground + #d08770 + + + + name + [Python] BuiltIn Function + scope + support.function.builtin.python + settings + + fontStyle + italic + + + + name + [Python] Exception + scope + source.python support.type.exception.python + settings + + foreground + #8fbcbb + + + + name + [Python] Type + scope + source.python support.type.python + settings + + foreground + #81a1c1 + + + + + name + [Sass] Variable + scope + source.sass variable.parameter.sass + settings + + foreground + #d8dee9 + fontStyle + bold + + + + + name + [Ruby] BuiltIn Function + scope + source.ruby support.function.builtin.ruby + settings + + fontStyle + italic + + + + + name + [Shell] BuiltIn Function + scope + source.shell support.function.builtin.shell + settings + + fontStyle + italic + + + + + name + [XML] Namespace + scope + text.xml entity.name.tag.namespace + settings + + foreground + #8fbcbb + + + + name + [XML] Doctype/Preprocessor + scope + + text.xml meta.tag.sgml.doctype.xml, + text.xml meta.tag.preprocessor entity.name.tag, + text.xml meta.tag.preprocessor.xml punctuation.definition.tag.begin.xml, + text.xml meta.tag.preprocessor.xml punctuation.definition.tag.end.xml, + text.xml meta.tag.sgml.doctype.xml punctuation.definition.tag.begin.xml, + text.xml meta.tag.sgml.doctype.xml punctuation.definition.tag.end.xml + + settings + + foreground + #5e81ac + + + + name + [XML] CDATA Tag + scope + + text.xml string.unquoted.cdata.xml punctuation.definition.string.begin.xml, + text.xml string.unquoted.cdata.xml punctuation.definition.string.end.xml + + settings + + foreground + #D08770 + fontStyle + italic + + + + + name + [YAML] Entity Name Tag + scope + source.yaml entity.name.tag + settings + + foreground + #8fbcbb + + + + + + + name + [SublimeLinter] Warning + scope + sublimelinter.mark.warning + settings + + foreground + #ebcb8b + + + + name + [SublimeLinter] Error + scope + sublimelinter.mark.error + settings + + foreground + #bf616a + + + + name + [SublimeLinter] Gutter Mark + scope + sublimelinter.gutter-mark + settings + + foreground + lime + + + + + name + [GitGutter] Ignored + scope + markup.ignored.git_gutter + settings + + foreground + #616e88 + + + + name + [GitGutter] Untracked + scope + markup.untracked.git_gutter + settings + + foreground + #88c0d0 + + + + name + [GitGutter] Inserted + scope + markup.inserted.git_gutter + settings + + foreground + #a3be8c + + + + name + [GitGutter] Changed + scope + markup.changed.git_gutter + settings + + foreground + #ebcb8b + + + + name + [GitGutter] Deleted + scope + markup.deleted.git_gutter + settings + + foreground + #bf616a + + + + + + name + [Babel] Decorator + scope + + source.js tag.decorator.js entity.name.tag.js, + source.js tag.decorator.js punctuation.definition.tag.js + + settings + + foreground + #d08770 + + + + name + [Babel] String (Interpolated/Template Expression) + scope + + source.js string.quoted.js, + source.js string.quoted.jsx, + source.js meta.class.js meta.class.property.js string.interpolated.js, + source.js string.interpolated.js, + source.js string.template.js + + settings + + foreground + #a3be8c + + + + name + [Babel] Constant + scope + source.js variable.other.constant.js + settings + + foreground + #d8dee9 + fontStyle + bold + + + + name + [Babel] Object Key/Variable + scope + + source.js constant.other.object.key.js string.unquoted.label.js, + source.js variable.other.readwrite.js + + settings + + foreground + #d8dee9 + + + + name + [Babel] Arrow Function + scope + source.js meta.class.js meta.class.property.js variable.other.property.js + settings + + foreground + #88c0d0 + + + + name + [Babel] Static Variable + scope + source.js variable.other.property.static.js + settings + + fontStyle + italic + + + + name + [Babel] Class + scope + source.js variable.other.class.js + settings + + foreground + #8fbcbb + + + + name + [Babel] String Interpolated/Template Expression Keyword + scope + + source.js string.interpolated.js keyword.other.substitution.begin.js, + source.js string.interpolated.js keyword.other.substitution.end.js, + source.js punctuation.definition.template-expression.begin.js, + source.js punctuation.definition.template-expression.end.js + + settings + + foreground + #5e81ac + + + + name + [Babel] Spread Operator + scope + source.js keyword.operator.spread.js + settings + + foreground + #81a1c1 + + + + name + [Babel] Export + scope + source.js meta.export.js variable.other.readwrite.js + settings + + foreground + #8fbcbb + + + + + name + [TypeScript] Inherited Class + scope + source.ts meta.class.ts entity.other.inherited-class.ts + settings + + foreground + #8fbcbb + fontStyle + bold + + + + name + [TypeScript] Class/Enum + scope + + source.ts entity.name.type.class.ts, + source.ts entity.name.type.enum.ts + + settings + + foreground + #8fbcbb + + + + name + [TypeScript] Type + scope + source.ts entity.name.type.ts + settings + + foreground + #8fbcbb + + + + name + [TypeScript] Primitive + scope + source.ts support.type.primitive.ts + settings + + foreground + #81a1c1 + + + + name + [TypeScript] Decorator + scope + + source.ts meta.class.ts meta.method.declaration.ts meta.parameters.ts meta.decorator.ts variable.other.readwrite.ts, + source.ts meta.class.ts meta.method.declaration.ts meta.parameters.ts meta.decorator.ts punctuation.decorator.ts + + settings + + foreground + #d08770 + + + + name + [TypeScript] Interpolated String Keyword + scope + + source.ts punctuation.definition.template-expression.begin.ts, + source.ts punctuation.definition.template-expression.end.ts + + settings + + foreground + #5e81ac + + + + name + [TypeScript] Interpolated String + scope + source.ts string.template.ts + settings + + foreground + #a3be8c + + + + name + [TypeScript] Static Support Function + scope + source.ts support.function.math.ts + settings + + fontStyle + italic + + + + name + [TypeScript] Constant + scope + + source.ts variable.other.constant.property.ts, + source.ts variable.other.enummember.ts, + source.ts variable.other.constant.ts + + settings + + foreground + #d8dee9 + fontStyle + bold + + + + name + [TypeScript] JSDoc Tag + scope + source.ts comment.block.documentation.ts storage.type.class.jsdoc + settings + + foreground + #8fbcbb + + + + uuid + 8F96BB94-BF86-4D5E-9733-0428E66FB894 + + diff --git a/sublime_themes/nyx-bold.tmTheme b/sublime/themes/nyx-bold.tmTheme similarity index 100% rename from sublime_themes/nyx-bold.tmTheme rename to sublime/themes/nyx-bold.tmTheme diff --git a/sublime_themes/one-dark.tmTheme b/sublime/themes/one-dark.tmTheme similarity index 100% rename from sublime_themes/one-dark.tmTheme rename to sublime/themes/one-dark.tmTheme diff --git a/sublime_themes/solarized-dark.tmTheme b/sublime/themes/solarized-dark.tmTheme similarity index 82% rename from sublime_themes/solarized-dark.tmTheme rename to sublime/themes/solarized-dark.tmTheme index b39a1395..f46fa226 100644 --- a/sublime_themes/solarized-dark.tmTheme +++ b/sublime/themes/solarized-dark.tmTheme @@ -22,16 +22,13 @@ invisibles #586e75 lineHighlight - #073642 + #1CD1FF12 + misspelling + #dc322f selection #2c4c55 selectionBorder #586e75 - - - - - @@ -102,6 +99,28 @@ #268bd2 + + name + Variable Function + scope + variable.function + settings + + foreground + #b58900 + + + + name + Variable Language + scope + variable.language + settings + + foreground + #d33682 + + name Keyword @@ -146,11 +165,44 @@ #859900 + + name + Storage modifier + scope + storage.modifier + settings + + foreground + #93a1a1 + + name Class scope - keyword.control.class, meta.class, entity.name.class, entity.name.type.class + keyword.control.class, entity.name, entity.name.class, entity.name.type.class + settings + + foreground + #b58900 + + + + name + Inherited Class + scope + entity.other.inherited-class + settings + + foreground + #268bd2 + + + + name + Attribute + scope + entity.other.attribute-name settings foreground @@ -161,7 +213,7 @@ name Library class scope - support.type, support.class + support, support.type, support.class settings foreground @@ -194,13 +246,24 @@ name Built-in constant scope - constant.language, meta.preprocessor + constant, constant.language, meta.preprocessor settings foreground #b58900 + + Name + Section heading + scope + entity.name.section + settings + + foreground + #cb4b16 + + name Support.construct @@ -324,9 +387,9 @@ name - Quoted Single + Quotes scope - punctuation.definition.string.begin, punctuation.definition.string.end + punctuation.definition.string settings foreground @@ -337,7 +400,7 @@ name [] scope - meta.brace.square + meta.brace.square, punctuation.section.brackets settings foreground @@ -346,20 +409,9 @@ name - () + (),{} scope - meta.brace.round, punctuation.definition.parameters.begin, punctuation.definition.parameters.end - settings - - foreground - #657b83 - - - - name - {} - scope - meta.brace.curly + meta.brace.round, meta.brace.curly, punctuation.section, punctuation.section.block, punctuation.definition.parameters, punctuation.section.group settings foreground @@ -407,7 +459,7 @@ name CSS .class scope - entity.other.attribute-name.class.css, entity.other.attribute-name.class.sass + entity.other.attribute-name.class settings foreground @@ -418,7 +470,7 @@ name CSS: #id scope - source.css entity.other.attribute-name.id, source.less entity.other.attribute-name.id, source.scss entity.other.attribute-name.id, source.sass entity.other.attribute-name.id + entity.other.attribute-name.id settings foreground @@ -429,7 +481,7 @@ name CSS :pseudo scope - entity.other.attribute-name.pseudo-element.css, entity.other.attribute-name.pseudo-class, entity.other.attribute-name.tag.pseudo-class + entity.other.attribute-name.pseudo-element, entity.other.attribute-name.tag.pseudo-element, entity.other.attribute-name.pseudo-class, entity.other.attribute-name.tag.pseudo-class settings foreground @@ -536,7 +588,7 @@ name C: include scope - meta.preprocessor.c.include string, meta.preprocessor.c.include punctuation.definition.string.begin, meta.preprocessor.c.include punctuation.definition.string.end + meta.preprocessor.c.include string.quoted.other.lt-gt.include.c, meta.preprocessor.c.include punctuation.definition.string.begin.c, meta.preprocessor.c.include punctuation.definition.string.end.c settings foreground @@ -757,7 +809,7 @@ settings foreground - #586e75 + #93a1a1 @@ -768,7 +820,7 @@ settings foreground - #586e75 + #93a1a1 @@ -783,16 +835,16 @@ - + name - Java: storage import + Storage scope - storage.modifier.import.java + storage.modifier.c++ settings foreground - #93a1a1 + #859900 @@ -851,7 +903,7 @@ settings foreground - #2aa198 + #b58900 @@ -866,6 +918,29 @@ + + name + Warning + scope + markup.warning + settings + + foreground + #b58900 + + + + name + Error + scope + markup.error + settings + + foreground + #dc322f + + + Name @@ -876,6 +951,8 @@ foreground #b58900 + fontStyle + bold @@ -945,126 +1022,6 @@ - - - name - SublimeLinter Annotations - scope - sublimelinter.notes - settings - - background - #586e75 - foreground - #586e75 - - - - name - SublimeLinter Error Outline - scope - sublimelinter.outline.illegal - settings - - background - #586e75 - foreground - #586e75 - - - - name - SublimeLinter Error Underline - scope - sublimelinter.underline.illegal - settings - - background - #dc322f - - - - name - SublimeLinter Warning Outline - scope - sublimelinter.outline.warning - settings - - background - #839496 - foreground - #839496 - - - - name - SublimeLinter Warning Underline - scope - sublimelinter.underline.warning - settings - - background - #b58900 - - - - name - SublimeLinter Violation Outline - scope - sublimelinter.outline.violation - settings - - background - #657b83 - foreground - #657b83 - - - - name - SublimeLinter Violation Underline - scope - sublimelinter.underline.violation - settings - - background - #cb4b16 - - - - name - SublimeLinter Warning - scope - sublimelinter.mark.warning - settings - - foreground - #b58900 - - - - name - SublimeLinter Error - scope - sublimelinter.mark.error - settings - - foreground - #dc322f - - - - name - SublimeLinter Gutter Mark - scope - sublimelinter.gutter-mark - settings - - foreground - #657b83 - - - name @@ -1102,41 +1059,6 @@ - - - name - GitGutter deleted - scope - markup.deleted.git_gutter - settings - - foreground - #dc322f - - - - name - GitGutter inserted - scope - markup.inserted.git_gutter - settings - - foreground - #859900 - - - - name - GitGutter changed - scope - markup.changed.git_gutter - settings - - foreground - #b58900 - - - name @@ -1149,39 +1071,6 @@ #839496 - - name - JavaScript Functions - scope - variable.function.js - settings - - foreground - #b58900 - - - - name - JavaScript punctation inside class - scope - meta.class punctuation - settings - - foreground - #839496 - - - - name - JavaScript Classes - scope - variable.language.this.js, variable.language.super.js - settings - - foreground - #d33682 - - uuid 5815b34d-fb7d-4593-bf0c-4f41f8b1f0a9 diff --git a/sublime_themes/solarized-light.tmTheme b/sublime/themes/solarized-light.tmTheme similarity index 83% rename from sublime_themes/solarized-light.tmTheme rename to sublime/themes/solarized-light.tmTheme index ed7956bc..8ffb73bd 100644 --- a/sublime_themes/solarized-light.tmTheme +++ b/sublime/themes/solarized-light.tmTheme @@ -20,18 +20,15 @@ gutter #eee8d5 invisibles - #eee8d5 + #93a1a1 lineHighlight - #eee8d5 + #3F3D3812 + misspelling + #dc322f selection #eee8d5 selectionBorder #c0c4bb - - - - - @@ -102,6 +99,28 @@ #268bd2 + + name + Variable Function + scope + variable.function + settings + + foreground + #b58900 + + + + name + Variable Language + scope + variable.language + settings + + foreground + #d33682 + + name Keyword @@ -146,11 +165,44 @@ #859900 + + name + Storage modifier + scope + storage.modifier + settings + + foreground + #586e75 + + name Class scope - keyword.control.class, meta.class, entity.name.class, entity.name.type.class + keyword.control.class, entity.name, entity.name.class, entity.name.type.class + settings + + foreground + #b58900 + + + + name + Inherited Class + scope + entity.other.inherited-class + settings + + foreground + #268bd2 + + + + name + Attribute + scope + entity.other.attribute-name settings foreground @@ -161,7 +213,7 @@ name Library class scope - support.type, support.class + support, support.type, support.class settings foreground @@ -194,13 +246,24 @@ name Built-in constant scope - constant.language, meta.preprocessor + constant, constant.language, meta.preprocessor settings foreground #b58900 + + Name + Section heading + scope + entity.name.section + settings + + foreground + #cb4b16 + + name Support.construct @@ -324,9 +387,9 @@ name - Quoted Single + Quotes scope - punctuation.definition.string.begin, punctuation.definition.string.end + punctuation.definition.string settings foreground @@ -337,7 +400,7 @@ name [] scope - meta.brace.square + meta.brace.square, punctuation.section.brackets settings foreground @@ -346,20 +409,9 @@ name - () + (),{} scope - meta.brace.round, punctuation.definition.parameters.begin, punctuation.definition.parameters.end - settings - - foreground - #657b83 - - - - name - {} - scope - meta.brace.curly + meta.brace.round, meta.brace.curly, punctuation.section, punctuation.section.block, punctuation.definition.parameters, punctuation.section.group settings foreground @@ -407,7 +459,7 @@ name CSS .class scope - entity.other.attribute-name.class.css, entity.other.attribute-name.class.sass + entity.other.attribute-name.class settings foreground @@ -418,7 +470,7 @@ name CSS: #id scope - source.css entity.other.attribute-name.id, source.less entity.other.attribute-name.id, source.scss entity.other.attribute-name.id, source.sass entity.other.attribute-name.id + entity.other.attribute-name.id settings foreground @@ -429,7 +481,7 @@ name CSS :pseudo scope - entity.other.attribute-name.pseudo-element.css, entity.other.attribute-name.pseudo-class, entity.other.attribute-name.tag.pseudo-class + entity.other.attribute-name.pseudo-element, entity.other.attribute-name.tag.pseudo-element, entity.other.attribute-name.pseudo-class, entity.other.attribute-name.tag.pseudo-class settings foreground @@ -783,16 +835,16 @@ - + name - Java: storage import + Storage scope - storage.modifier.import.java + storage.modifier.c++ settings foreground - #586e75 + #859900 @@ -851,7 +903,7 @@ settings foreground - #2aa198 + #b58900 @@ -866,6 +918,29 @@ + + name + Warning + scope + markup.warning + settings + + foreground + #b58900 + + + + name + Error + scope + markup.error + settings + + foreground + #dc322f + + + Name @@ -876,6 +951,8 @@ foreground #b58900 + fontStyle + bold @@ -945,126 +1022,6 @@ - - - name - SublimeLinter Annotations - scope - sublimelinter.notes - settings - - background - #eee8d5 - foreground - #eee8d5 - - - - name - SublimeLinter Error Outline - scope - sublimelinter.outline.illegal - settings - - background - #93a1a1 - foreground - #93a1a1 - - - - name - SublimeLinter Error Underline - scope - sublimelinter.underline.illegal - settings - - background - #dc322f - - - - name - SublimeLinter Warning Outline - scope - sublimelinter.outline.warning - settings - - background - #839496 - foreground - #839496 - - - - name - SublimeLinter Warning Underline - scope - sublimelinter.underline.warning - settings - - background - #b58900 - - - - name - SublimeLinter Violation Outline - scope - sublimelinter.outline.violation - settings - - background - #657b83 - foreground - #657b83 - - - - name - SublimeLinter Violation Underline - scope - sublimelinter.underline.violation - settings - - background - #cb4b16 - - - - name - SublimeLinter Warning - scope - sublimelinter.mark.warning - settings - - foreground - #b58900 - - - - name - SublimeLinter Error - scope - sublimelinter.mark.error - settings - - foreground - #dc322f - - - - name - SublimeLinter Gutter Mark - scope - sublimelinter.gutter-mark - settings - - foreground - #657b83 - - - name @@ -1102,41 +1059,6 @@ - - - name - GitGutter deleted - scope - markup.deleted.git_gutter - settings - - foreground - #dc322f - - - - name - GitGutter inserted - scope - markup.inserted.git_gutter - settings - - foreground - #859900 - - - - name - GitGutter changed - scope - markup.changed.git_gutter - settings - - foreground - #b58900 - - - name @@ -1149,39 +1071,6 @@ #657b83 - - name - JavaScript Functions - scope - variable.function.js - settings - - foreground - #b58900 - - - - name - JavaScript punctation inside class - scope - meta.class punctuation - settings - - foreground - #657b83 - - - - name - JavaScript Classes - scope - variable.language.this.js, variable.language.super.js - settings - - foreground - #d33682 - - uuid ca238b9c-28f7-42d4-9670-bd0829ef864e diff --git a/sublime_themes/subway-madrid.tmTheme b/sublime/themes/subway-madrid.tmTheme similarity index 100% rename from sublime_themes/subway-madrid.tmTheme rename to sublime/themes/subway-madrid.tmTheme diff --git a/sublime_themes/subway-moscow.tmTheme b/sublime/themes/subway-moscow.tmTheme similarity index 100% rename from sublime_themes/subway-moscow.tmTheme rename to sublime/themes/subway-moscow.tmTheme diff --git a/sublime/themes/two-dark.tmTheme b/sublime/themes/two-dark.tmTheme new file mode 100644 index 00000000..87fd3587 --- /dev/null +++ b/sublime/themes/two-dark.tmTheme @@ -0,0 +1,878 @@ + + + + + author + Roberto Mauro (erremauro@icloud.com) + name + TwoDark + semanticClass + theme.dark.two_dark + colorSpaceName + sRGB + gutterSettings + + background + #393939 + divider + #393939 + foreground + #747369 + selectionBackground + #515151 + selectionForeground + #a09f93 + + settings + + + settings + + background + #282C34 + caret + #528BFF + foreground + #ABB2BF + invisibles + #747369 + lineHighlight + #2B313A + selection + #3D4350 + + + + name + Text + scope + variable.parameter.function + settings + + foreground + #ABB2BF + + + + name + Comments + scope + comment, punctuation.definition.comment + settings + + foreground + #5C6370 + fontStyle + italic + + + + name + Delimiters + scope + none + settings + + foreground + #ABB2BF + + + + name + Operators + scope + keyword.operator + settings + + foreground + #ABB2BF + + + + name + Keywords + scope + keyword + settings + + foreground + #C678DD + + + + name + Variables + scope + variable + settings + + foreground + #E06C75 + + + + name + Functions + scope + entity.name.function, meta.require, support.function.any-method + settings + + foreground + #61AFEF + + + + name + Classes + scope + support.class, entity.name.class, entity.name.type.class + settings + + foreground + #E5C07B + + + + name + Classes + scope + meta.class + settings + + foreground + #ABB2BF + + + + name + Methods + scope + keyword.other.special-method + settings + + foreground + #61AFEF + + + + name + Storage + scope + storage + settings + + foreground + #C678DD + + + + name + Support + scope + support.function + settings + + foreground + #56B6C2 + + + + name + Strings, Inherited Class + scope + string, constant.other.symbol, entity.other.inherited-class + settings + + foreground + #98C379 + + + + name + Integers + scope + constant.numeric + settings + + foreground + #D19A66 + + + + name + Floats + scope + none + settings + + foreground + #D19A66 + + + + name + Boolean + scope + none + settings + + foreground + #D19A66 + + + + name + Constants + scope + constant + settings + + foreground + #D19A66 + + + + name + Tags + scope + entity.name.tag + settings + + foreground + #E06C75 + + + + name + Attributes + scope + entity.other.attribute-name + settings + + foreground + #D19A66 + + + + name + Attribute IDs + scope + entity.other.attribute-name.id, punctuation.definition.entity + settings + + foreground + #D19A66 + + + + name + Selector + scope + meta.selector + settings + + foreground + #C678DD + + + + name + Values + scope + none + settings + + foreground + #D19A66 + + + + name + Headings + scope + markup.heading punctuation.definition.heading, entity.name.section + settings + + fontStyle + + foreground + #61AFEF + + + + name + Units + scope + keyword.other.unit + settings + + foreground + #D19A66 + + + + name + Bold + scope + markup.bold, punctuation.definition.bold + settings + + foreground + #E5C07B + + + + name + Italic + scope + markup.italic, punctuation.definition.italic + settings + + foreground + #C678DD + + + + name + Code + scope + markup.raw.inline + settings + + foreground + #98C379 + + + + name + Link Text + scope + string.other.link, punctuation.definition.string.end.markdown + settings + + foreground + #E06C75 + + + + name + Link Url + scope + meta.link + settings + + foreground + #D19A66 + + + + name + Lists + scope + markup.list + settings + + foreground + #E06C75 + + + + name + Quotes + scope + markup.quote + settings + + foreground + #D19A66 + + + + name + Separator + scope + meta.separator + settings + + background + #515151 + foreground + #ABB2BF + + + + name + Inserted + scope + markup.inserted + settings + + foreground + #98C379 + + + + name + Deleted + scope + markup.deleted + settings + + foreground + #E06C75 + + + + name + Changed + scope + markup.changed + settings + + foreground + #C678DD + + + + name + Colors + scope + constant.other.color + settings + + foreground + #56B6C2 + + + + name + Regular Expressions + scope + string.regexp + settings + + foreground + #56B6C2 + + + + name + Escape Characters + scope + constant.character.escape + settings + + foreground + #56B6C2 + + + + name + Embedded + scope + punctuation.section.embedded, variable.interpolation + settings + + foreground + #BE5046 + + + + name + Illegal + scope + invalid.illegal + settings + + background + #f2777a + foreground + #272B33 + + + + name + Broken + scope + invalid.broken + settings + + background + #f99157 + foreground + #2d2d2d + + + + name + Deprecated + scope + invalid.deprecated + settings + + background + #d27b53 + foreground + #272B33 + + + + name + Unimplemented + scope + invalid.unimplemented + settings + + background + #747369 + foreground + #272B33 + + + + name + Json key + scope + source.json meta.structure.dictionary.json string.quoted.double.json + settings + + foreground + #E06C75 + + + + name + Json value + scope + source.json meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json + settings + + foreground + #98C379 + + + + name + json sub key + scope + source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json string.quoted.double.json + settings + + foreground + #E06C75 + + + + name + Json sub value + scope + source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json + settings + + foreground + #98C379 + + + + name + laravel blade tag + scope + text.html.laravel-blade source.php.embedded.line.html entity.name.tag.laravel-blade + settings + + foreground + #C678DD + + + + name + laravel blade @ + scope + text.html.laravel-blade source.php.embedded.line.html support.constant.laravel-blade + settings + + foreground + #C678DD + + + + name + python function parameter + scope + source.python meta.function.python meta.function.parameters.python variable.parameter.function.python + settings + + foreground + #D19A66 + + + + name + python meta function + scope + source.python meta.function-call.python support.type.python + settings + + foreground + #56B6C2 + + + + name + python logical keyword + scope + source.python keyword.operator.logical.python + settings + + foreground + #C678DD + + + + name + python class ( begin + scope + source.python meta.class.python punctuation.definition.inheritance.begin.python + settings + + foreground + #E5C07B + + + + name + python class ) end + scope + source.python meta.class.python punctuation.definition.inheritance.end.python + settings + + foreground + #E5C07B + + + + name + python function call parameter name + scope + source.python meta.function-call.python meta.function-call.arguments.python variable.parameter.function.python + settings + + foreground + #D19A66 + + + + name + php fcuntion constants + scope + text.html.basic source.php.embedded.block.html support.constant.std.php + settings + + foreground + #D19A66 + + + + name + php namespace name + scope + text.html.basic source.php.embedded.block.html meta.namespace.php entity.name.type.namespace.php + settings + + foreground + #E5C07B + + + + name + javascript meta constant + scope + source.js meta.function.js support.constant.js + settings + + foreground + #D19A66 + + + + name + php namespace in top + scope + text.html.basic` source.php.embedded.block.html constant.other.php + settings + + foreground + #C678DD + + + + name + php namespace name in top + scope + text.html.basic source.php.embedded.block.html support.other.namespace.php + settings + + foreground + #D19A66 + + + + name + latex label names + scope + text.tex.latex meta.function.environment.math.latex string.other.math.block.environment.latex meta.definition.label.latex variable.parameter.definition.label.latex + settings + + foreground + #ABB2BF + + + + name + latex italic emph + scope + text.tex.latex meta.function.emph.latex markup.italic.emph.latex + settings + + fontStyle + italic + foreground + #C678DD + + + + name + subl_new js vars + scope + source.js variable.other.readwrite.js + settings + + foreground + ABB2BF + + + + name + new_subl js $ + scope + source.js meta.function-call.with-arguments.js variable.function.js + settings + + foreground + #ABB2BF + + + + name + new_subl js call method + scope + source.js meta.group.braces.round meta.group.braces.curly meta.function-call.method.without-arguments.js variable.function.js + settings + + foreground + #ABB2BF + + + + name + new_subl e js + scope + source.js meta.group.braces.round meta.group.braces.curly variable.other.object.js + settings + + foreground + #ABB2BF + + + + name + new_subl js key + scope + source.js meta.group.braces.round meta.group.braces.curly constant.other.object.key.js string.unquoted.label.js + settings + + foreground + #ABB2BF + + + + name + new_subl obejct key + scope + source.js meta.group.braces.round meta.group.braces.curly constant.other.object.key.js punctuation.separator.key-value.js + settings + + foreground + #ABB2BF + + + + name + new_subl js method with args + scope + source.js meta.group.braces.round meta.group.braces.curly meta.function-call.method.with-arguments.js variable.function.js + settings + + foreground + #ABB2BF + + + + name + new_subl js variable function + scope + source.js meta.function-call.method.with-arguments.js variable.function.js + settings + + foreground + #ABB2BF + + + + name + new_subl variabel function method + scope + source.js meta.function-call.method.without-arguments.js variable.function.js + settings + + foreground + #ABB2BF + + + + name + SublimeLinter Error + scope + sublimelinter.mark.error + settings + + foreground + #D02000 + + + name + SublimeLinter Gutter Mark + scope + sublimelinter.gutter-mark + settings + + foreground + #FFFFFF + + + name + SublimeLinter Warning + scope + sublimelinter.mark.warning + settings + + foreground + #DDB700 + + + uuid + 32bd64fa-d60a-4858-a5fc-5164cc49a2b8 + comment + Work in progress + + \ No newline at end of file diff --git a/sublime_themes/visual-studio-dark.tmTheme b/sublime/themes/visual-studio-dark.tmTheme similarity index 100% rename from sublime_themes/visual-studio-dark.tmTheme rename to sublime/themes/visual-studio-dark.tmTheme diff --git a/sublime_themes/zenburn.tmTheme b/sublime/themes/zenburn.tmTheme similarity index 100% rename from sublime_themes/zenburn.tmTheme rename to sublime/themes/zenburn.tmTheme diff --git a/sublime_syntaxes/Elixir.sublime-syntax b/sublime_syntaxes/Elixir.sublime-syntax deleted file mode 100644 index 2a3437e2..00000000 --- a/sublime_syntaxes/Elixir.sublime-syntax +++ /dev/null @@ -1,521 +0,0 @@ -%YAML 1.2 ---- -# http://www.sublimetext.com/docs/3/syntax.html -name: Elixir -comment: Textmate bundle for Elixir Programming Language. -file_extensions: - - ex - - exs -first_line_match: ^#!/.*\belixir -scope: source.elixir -contexts: - main: - - match: \b(fn)\b(?!.*->) - captures: - 1: keyword.control.elixir - push: - - match: $ - pop: true - - include: core_syntax - - match: \b(fn)\b(?=.*->) - captures: - 1: keyword.control.elixir - push: - - match: (?>(->)|(when)|(\))) - captures: - 1: keyword.operator.other.elixir - 2: keyword.control.elixir - 3: punctuation.section.function.elixir - pop: true - - include: core_syntax - - include: core_syntax - - match: '^(?=.*->)((?![^"'']*("|'')[^"'']*->)|(?=.*->[^"'']*("|'')[^"'']*->))((?!.*\([^\)]*->)|(?=[^\(\)]*->)|(?=\s*\(.*\).*->))((?!.*\b(fn)\b)|(?=.*->.*\bfn\b))' - captures: - 1: keyword.control.elixir - push: - - match: (?>(->)|(when)|(\))) - captures: - 1: keyword.operator.other.elixir - 2: keyword.control.elixir - 3: punctuation.section.function.elixir - pop: true - - include: core_syntax - core_syntax: - - match: ^\s*(defmodule)\b - captures: - 1: keyword.control.module.elixir - push: - - meta_scope: meta.module.elixir - - match: \b(do)\b - captures: - 1: keyword.control.module.elixir - pop: true - - match: '\b[A-Z]\w*\b' - scope: entity.name.class.elixir - - match: ^\s*(defprotocol)\b - captures: - 1: keyword.control.protocol.elixir - push: - - meta_scope: meta.protocol_declaration.elixir - - match: \b(do)\b - captures: - 1: keyword.control.protocol.elixir - pop: true - - match: '\b[A-Z]\w*\b' - scope: entity.name.protocol.elixir - - match: ^\s*(defimpl)\b - captures: - 1: keyword.control.protocol.elixir - push: - - meta_scope: meta.protocol_implementation.elixir - - match: \b(do)\b - captures: - 1: keyword.control.protocol.elixir - pop: true - - match: '\b[A-Z]\w*\b' - scope: entity.name.protocol.elixir - - match: '^\s*(def|defmacro)\s+((?>[a-zA-Z_]\w*(?>\.|::))?(?>[a-zA-Z_]\w*(?>[?!]|=(?!>))?|===?|>[>=]?|<=>|<[<=]?|[%&`/\|]|\*\*?|=?~|[-+]@?|\[\]=?))((\()|\s*)' - captures: - 1: keyword.control.module.elixir - 2: entity.name.function.public.elixir - 4: punctuation.section.function.elixir - push: - - meta_scope: meta.function.public.elixir - - match: (\bdo:)|(\bdo\b)|(?=\s+(def|defmacro)\b) - captures: - 1: constant.other.keywords.elixir - 2: keyword.control.module.elixir - pop: true - - include: main - - match: \s(\\\\) - captures: - 1: keyword.operator.other.elixir - push: - - match: ',|\)|$' - pop: true - - include: main - - match: \b(is_atom|is_binary|is_bitstring|is_boolean|is_float|is_function|is_integer|is_list|is_map|is_nil|is_number|is_pid|is_port|is_record|is_reference|is_tuple|is_exception|abs|bit_size|byte_size|div|elem|hd|length|map_size|node|rem|round|tl|trunc|tuple_size)\b - scope: keyword.control.elixir - - match: '^\s*(defp|defmacrop)\s+((?>[a-zA-Z_]\w*(?>\.|::))?(?>[a-zA-Z_]\w*(?>[?!]|=(?!>))?|===?|>[>=]?|<=>|<[<=]?|[%&`/\|]|\*\*?|=?~|[-+]@?|\[\]=?))((\()|\s*)' - captures: - 1: keyword.control.module.elixir - 2: entity.name.function.private.elixir - 4: punctuation.section.function.elixir - push: - - meta_scope: meta.function.private.elixir - - match: (\bdo:)|(\bdo\b)|(?=\s+(defp|defmacrop)\b) - captures: - 1: constant.other.keywords.elixir - 2: keyword.control.module.elixir - pop: true - - include: main - - match: \s(\\\\) - captures: - 1: keyword.operator.other.elixir - push: - - match: ',|\)|$' - pop: true - - include: main - - match: \b(is_atom|is_binary|is_bitstring|is_boolean|is_float|is_function|is_integer|is_list|is_map|is_nil|is_number|is_pid|is_port|is_record|is_reference|is_tuple|is_exception|abs|bit_size|byte_size|div|elem|hd|length|map_size|node|rem|round|tl|trunc|tuple_size)\b - scope: keyword.control.elixir - - match: '@(module|type)?doc (~[a-z])?"""' - comment: "@doc with heredocs is treated as documentation" - push: - - meta_scope: comment.documentation.heredoc - - match: \s*""" - pop: true - - include: interpolated_elixir - - include: escaped_char - - match: '@(module|type)?doc ~[A-Z]"""' - comment: "@doc with heredocs is treated as documentation" - push: - - meta_scope: comment.documentation.heredoc - - match: \s*""" - pop: true - - match: "@(module|type)?doc (~[a-z])?'''" - comment: "@doc with heredocs is treated as documentation" - push: - - meta_scope: comment.documentation.heredoc - - match: \s*''' - pop: true - - include: interpolated_elixir - - include: escaped_char - - match: "@(module|type)?doc ~[A-Z]'''" - comment: "@doc with heredocs is treated as documentation" - push: - - meta_scope: comment.documentation.heredoc - - match: \s*''' - pop: true - - match: "@(module|type)?doc false" - comment: "@doc false is treated as documentation" - scope: comment.documentation.false - - match: '@(module|type)?doc "' - comment: "@doc with string is treated as documentation" - push: - - meta_scope: comment.documentation.string - - match: '"' - pop: true - - include: interpolated_elixir - - include: escaped_char - - match: '(?_?[0-9A-Fa-f])*|\d(?>_?\d)*(\.(?![^[:space:][:digit:]])(?>_?\d)*)?([eE][-+]?\d(?>_?\d)*)?|0b[01]+|0o[0-7]+)\b' - scope: constant.numeric.elixir - - match: ":'" - captures: - 0: punctuation.definition.constant.elixir - push: - - meta_scope: constant.other.symbol.single-quoted.elixir - - match: "'" - captures: - 0: punctuation.definition.constant.elixir - pop: true - - include: interpolated_elixir - - include: escaped_char - - match: ':"' - captures: - 0: punctuation.definition.constant.elixir - push: - - meta_scope: constant.other.symbol.double-quoted.elixir - - match: '"' - captures: - 0: punctuation.definition.constant.elixir - pop: true - - include: interpolated_elixir - - include: escaped_char - - match: (?>''') - comment: Single-quoted heredocs - captures: - 0: punctuation.definition.string.begin.elixir - push: - - meta_scope: string.quoted.single.heredoc.elixir - - match: ^\s*''' - captures: - 0: punctuation.definition.string.end.elixir - pop: true - - include: interpolated_elixir - - include: escaped_char - - match: "'" - comment: single quoted string (allows for interpolation) - captures: - 0: punctuation.definition.string.begin.elixir - push: - - meta_scope: string.quoted.single.elixir - - match: "'" - captures: - 0: punctuation.definition.string.end.elixir - pop: true - - include: interpolated_elixir - - include: escaped_char - - match: (?>""") - comment: Double-quoted heredocs - captures: - 0: punctuation.definition.string.begin.elixir - push: - - meta_scope: string.quoted.double.heredoc.elixir - - match: ^\s*""" - captures: - 0: punctuation.definition.string.end.elixir - pop: true - - include: interpolated_elixir - - include: escaped_char - - match: '"' - comment: double quoted string (allows for interpolation) - captures: - 0: punctuation.definition.string.begin.elixir - push: - - meta_scope: string.quoted.double.elixir - - match: '"' - captures: - 0: punctuation.definition.string.end.elixir - pop: true - - include: interpolated_elixir - - include: escaped_char - - match: '~[a-z](?>""")' - comment: Double-quoted heredocs sigils - captures: - 0: punctuation.definition.string.begin.elixir - push: - - meta_scope: string.quoted.double.heredoc.elixir - - match: ^\s*""" - captures: - 0: punctuation.definition.string.end.elixir - pop: true - - include: interpolated_elixir - - include: escaped_char - - match: '~[a-z]\{' - comment: sigil (allow for interpolation) - captures: - 0: punctuation.definition.string.begin.elixir - push: - - meta_scope: string.interpolated.elixir - - match: '\}[a-z]*' - captures: - 0: punctuation.definition.string.end.elixir - pop: true - - include: interpolated_elixir - - include: escaped_char - - match: '~[a-z]\[' - comment: sigil (allow for interpolation) - captures: - 0: punctuation.definition.string.begin.elixir - push: - - meta_scope: string.interpolated.elixir - - match: '\][a-z]*' - captures: - 0: punctuation.definition.string.end.elixir - pop: true - - include: interpolated_elixir - - include: escaped_char - - match: '~[a-z]\<' - comment: sigil (allow for interpolation) - captures: - 0: punctuation.definition.string.begin.elixir - push: - - meta_scope: string.interpolated.elixir - - match: '\>[a-z]*' - captures: - 0: punctuation.definition.string.end.elixir - pop: true - - include: interpolated_elixir - - include: escaped_char - - match: '~[a-z]\(' - comment: sigil (allow for interpolation) - captures: - 0: punctuation.definition.string.begin.elixir - push: - - meta_scope: string.interpolated.elixir - - match: '\)[a-z]*' - captures: - 0: punctuation.definition.string.end.elixir - pop: true - - include: interpolated_elixir - - include: escaped_char - - match: '~[a-z]([^\w])' - comment: sigil (allow for interpolation) - captures: - 0: punctuation.definition.string.begin.elixir - push: - - meta_scope: string.interpolated.elixir - - match: '\1[a-z]*' - captures: - 0: punctuation.definition.string.end.elixir - pop: true - - include: interpolated_elixir - - include: escaped_char - - include: escaped_char - - match: '~[A-Z](?>""")' - comment: Double-quoted heredocs sigils - captures: - 0: punctuation.definition.string.begin.elixir - push: - - meta_scope: string.quoted.other.literal.upper.elixir - - match: ^\s*""" - captures: - 0: punctuation.definition.string.end.elixir - pop: true - - match: '~[A-Z]\{' - comment: sigil (without interpolation) - captures: - 0: punctuation.definition.string.begin.elixir - push: - - meta_scope: string.quoted.other.literal.upper.elixir - - match: '\}[a-z]*' - captures: - 0: punctuation.definition.string.end.elixir - pop: true - - match: '~[A-Z]\[' - comment: sigil (without interpolation) - captures: - 0: punctuation.definition.string.begin.elixir - push: - - meta_scope: string.quoted.other.literal.upper.elixir - - match: '\][a-z]*' - captures: - 0: punctuation.definition.string.end.elixir - pop: true - - match: '~[A-Z]\<' - comment: sigil (without interpolation) - captures: - 0: punctuation.definition.string.begin.elixir - push: - - meta_scope: string.quoted.other.literal.upper.elixir - - match: '\>[a-z]*' - captures: - 0: punctuation.definition.string.end.elixir - pop: true - - match: '~[A-Z]\(' - comment: sigil (without interpolation) - captures: - 0: punctuation.definition.string.begin.elixir - push: - - meta_scope: string.quoted.other.literal.upper.elixir - - match: '\)[a-z]*' - captures: - 0: punctuation.definition.string.end.elixir - pop: true - - match: '~[A-Z]([^\w])' - comment: sigil (without interpolation) - captures: - 0: punctuation.definition.string.begin.elixir - push: - - meta_scope: string.quoted.other.literal.upper.elixir - - match: '\1[a-z]*' - captures: - 0: punctuation.definition.string.end.elixir - pop: true - - match: '(?[a-zA-Z_][\w@]*(?>[?!]|=(?![>=]))?|\<\>|===?|!==?|<<>>|<<<|>>>|~~~|::|<\-|\|>|=>|=~|=|/|\\\\|\*\*?|\.\.?\.?|>=?|<=?|&&?&?|\+\+?|\-\-?|\|\|?\|?|\!|@|\%?\{\}|%|\[\]|\^(\^\^)?)' - comment: symbols - scope: constant.other.symbol.elixir - captures: - 1: punctuation.definition.constant.elixir - - match: '(?>[a-zA-Z_][\w@]*(?>[?!])?)(:)(?!:)' - comment: symbols - scope: constant.other.keywords.elixir - captures: - 1: punctuation.definition.constant.elixir - - match: ^\s*(##).*$\n? - scope: comment.line.section.elixir - captures: - 1: punctuation.definition.comment.elixir - - match: '(?:^[ \t]+)?(#).*$\n?' - scope: comment.line.number-sign.elixir - captures: - 1: punctuation.definition.comment.elixir - - match: '(? - scope: keyword.operator.concatenation.elixir - - match: \|\>|<~>|<>|<<<|>>>|~>>|<<~|~>|<~|<\|> - scope: keyword.operator.sigils_1.elixir - - match: "&&&|&&" - scope: keyword.operator.sigils_2.elixir - - match: <\-|\\\\ - scope: keyword.operator.sigils_3.elixir - - match: "===?|!==?|<=?|>=?" - scope: keyword.operator.comparison.elixir - - match: (\|\|\||&&&|^^^|<<<|>>>|~~~) - scope: keyword.operator.bitwise.elixir - - match: '(?<=[ \t])!+|\bnot\b|&&|\band\b|\|\||\bor\b|\bxor\b' - scope: keyword.operator.logical.elixir - - match: (\*|\+|\-|/) - scope: keyword.operator.arithmetic.elixir - - match: \||\+\+|\-\-|\*\*|\\\\|\<\-|\<\>|\<\<|\>\>|\:\:|\.\.|\|>|~|=>|& - scope: keyword.operator.other.elixir - - match: "=" - scope: keyword.operator.assignment.elixir - - match: ":" - scope: punctuation.separator.other.elixir - - match: \; - scope: punctuation.separator.statement.elixir - - match: "," - scope: punctuation.separator.object.elixir - - match: \. - scope: punctuation.separator.method.elixir - - match: '\{|\}' - scope: punctuation.section.scope.elixir - - match: '\[|\]' - scope: punctuation.section.array.elixir - - match: \(|\) - scope: punctuation.section.function.elixir - escaped_char: - - match: '\\(x[\da-fA-F]{1,2}|.)' - scope: constant.character.escaped.elixir - interpolated_elixir: - - match: '#\{(\})' - scope: source.elixir.embedded.source - captures: - 0: punctuation.section.embedded.elixir - 1: source.elixir.embedded.source.empty - - match: '#\{' - captures: - 0: punctuation.section.embedded.elixir - push: - - meta_scope: source.elixir.embedded.source - - match: '\}' - captures: - 0: punctuation.section.embedded.elixir - pop: true - - include: nest_curly_and_self - - include: main - nest_curly_and_self: - - match: '\{' - captures: - 0: punctuation.section.scope.elixir - push: - - match: '\}' - captures: - 0: punctuation.section.scope.elixir - pop: true - - include: nest_curly_and_self - - include: main - regex_sub: - - include: interpolated_elixir - - include: escaped_char - - match: '(\{)\d+(,\d+)?(\})' - scope: string.regexp.arbitrary-repitition.elixir - captures: - 1: punctuation.definition.arbitrary-repitition.elixir - 3: punctuation.definition.arbitrary-repitition.elixir - - match: '\[(?:\^?\])?' - captures: - 0: punctuation.definition.character-class.elixir - push: - - meta_scope: string.regexp.character-class.elixir - - match: '\]' - captures: - 0: punctuation.definition.character-class.elixir - pop: true - - include: escaped_char - - match: \( - captures: - 0: punctuation.definition.group.elixir - push: - - meta_scope: string.regexp.group.elixir - - match: \) - captures: - 0: punctuation.definition.group.elixir - pop: true - - include: regex_sub - - match: '(?<=^|\s)(#)\s[[a-zA-Z0-9,. \t?!-][^\x{00}-\x{7F}]]*$' - comment: We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags. - scope: comment.line.number-sign.elixir - captures: - 1: punctuation.definition.comment.elixir diff --git a/sublime_syntaxes/FSharp.sublime-syntax b/sublime_syntaxes/FSharp.sublime-syntax deleted file mode 100644 index ebc83745..00000000 --- a/sublime_syntaxes/FSharp.sublime-syntax +++ /dev/null @@ -1,499 +0,0 @@ -%YAML 1.2 ---- -# http://www.sublimetext.com/docs/3/syntax.html -name: fsharp -file_extensions: - - fs -scope: source.fsharp -contexts: - main: - - include: compiler_directives - - include: comments - - include: constants - - include: strings - - include: chars - - include: double_tick - - include: definition - - include: abstract_definition - - include: attributes - - include: modules - - include: anonymous_functions - - include: du_declaration - - include: record_declaration - - include: keywords - - include: records - - include: cexprs - - include: text - abstract_definition: - - match: '\b(abstract)\s+(member)?(\s+\[\<.*\>\])?\s*([_[:alpha:]0-9,\._`\s]+)(:)' - captures: - 1: keyword.fsharp - 2: keyword.fsharp - 3: support.function.attribute.fsharp - 5: keyword.fsharp - push: - - meta_scope: abstract.definition.fsharp - - match: \s*(with)\b|=|$ - captures: - 1: keyword.fsharp - pop: true - - include: comments - - include: common_declaration - - match: '\?{0,1}([[:alpha:]0-9''`^._ ]+)\s*(:)(\s*([?[:alpha:]0-9''`^._ ]+)){0,1}' - captures: - 1: variable.parameter.fsharp - 2: keyword.symbol.fsharp - 3: entity.name.type.fsharp - - match: '(?!with|get|set\b)\b([\w0-9''`^._]+)' - captures: - 1: entity.name.type.fsharp - - include: keywords - anonymous_functions: - - match: \b(fun)\b - captures: - 1: keyword.fsharp - push: - - meta_scope: function.anonymous - - match: (->) - captures: - 1: keyword.fsharp - pop: true - - include: comments - - include: member_declaration - - match: '(:)(\s*([?[:alpha:]0-9''`<>^._ ]+))*' - captures: - 1: keyword.symbol.fsharp - 2: entity.name.type.fsharp - - include: variables - attributes: - - match: '\[\<' - push: - - meta_scope: support.function.attribute.fsharp - - match: '\>\]|\]' - pop: true - - include: main - cexprs: - - match: '\b(async|seq|promise|task|maybe|asyncMaybe|controller|scope|application|pipeline)\s*\{' - scope: cexpr.fsharp - captures: - 0: keyword.fsharp - chars: - - match: ('\\?.') - scope: char.fsharp - captures: - 1: string.quoted.single.fsharp - comments: - - match: ^\s*(\(\*\*(?!\)))(?!\*\))$ - captures: - 1: comment.block.fsharp - push: - - meta_scope: comment.block.markdown.fsharp - - match: \*\) - captures: - 1: comment.block.fsharp - pop: true - - include: scope:text.html.markdown - - match: ^(\s*\*\)$) - scope: comment.block.markdown.fsharp.end - captures: - 1: comment.block.fsharp - - match: (\(\*(?!\))) - captures: - 1: comment.block.fsharp - push: - - meta_scope: comment.block.fsharp - - match: (\*\)) - captures: - 1: comment.block.fsharp - pop: true - - match: /// - push: - - meta_scope: comment.line.markdown.fsharp - - match: (\r)?\n - pop: true - - include: scope:text.html.markdown - - match: //.*$ - scope: comment.line.double-slash.fsharp - common_declaration: - - match: '\s*(->)\s*([[:alpha:]0-9''`^._ ]+)(<)' - captures: - 1: keyword.symbol.fsharp - 2: entity.name.type.fsharp - 3: keyword.symbol.fsharp - push: - - match: (>) - captures: - 1: keyword.symbol.fsharp - pop: true - - match: "([[:alpha:]0-9'`^._ ]+)" - captures: - 1: entity.name.type.fsharp - - include: keywords - - match: '\s*(->)\s*(?!with|get|set\b)\b([\w0-9''`^._]+)' - captures: - 1: keyword.symbol.fsharp - 2: entity.name.type.fsharp - - match: '\?{0,1}([[:alpha:]0-9''`^._ ]+)\s*(:)(\s*([?[:alpha:]0-9''`^._ ]+)(<))' - captures: - 1: variable.parameter.fsharp - 2: keyword.symbol.fsharp - 3: keyword.symbol.fsharp - 4: entity.name.type.fsharp - push: - - match: (>) - captures: - 1: keyword.symbol.fsharp - pop: true - - match: "([[:alpha:]0-9'`^._ ]+)" - captures: - 1: entity.name.type.fsharp - - include: keywords - compiler_directives: - - match: \s?(#if|#elif|#else|#elseif|#endif|#light|#nowarn) - scope: compiler_directive.fsharp - captures: - constants: - - match: \(\) - scope: constant.language.unit.fsharp - - match: '\b-?[0-9][0-9_]*((\.([0-9][0-9_]*([eE][+-]??[0-9][0-9_]*)?)?)|([eE][+-]??[0-9][0-9_]*))' - scope: constant.numeric.floating-point.fsharp - - match: '\b(-?((0(x|X)[0-9a-fA-F][0-9a-fA-F_]*)|(0(o|O)[0-7][0-7_]*)|(0(b|B)[01][01_]*)|([0-9][0-9_]*)))' - scope: constant.numeric.integer.nativeint.fsharp - - match: \b(true|false|null|unit)\b - scope: constant.others.fsharp - definition: - - match: '\b(val mutable|val|let mutable|let inline|let|member val|member|static member|override|let!)(\s+rec|mutable)?(\s+\[\<.*\>\])?\s*(private|internal|public)?\s+(\[[^-=]*\]|[_[:alpha:]]([_[:alpha:]0-9,\._]+)*|``[_[:alpha:]]([_[:alpha:]0-9,\._`\s]+|(?<=,)\s)*)?' - captures: - 1: keyword.fsharp - 2: keyword.fsharp - 3: support.function.attribute.fsharp - 4: keyword.fsharp - 5: variable.fsharp - push: - - meta_scope: binding.fsharp - - match: \s*(with\b|=|\n+=|(?<=\=)) - captures: - 1: keyword.fsharp - pop: true - - include: comments - - include: attributes - - match: (:)\s*(\() - captures: - 1: keyword.symbol.fsharp - 2: keyword.symbol.fsharp - push: - - match: '(\)\s*(([?[:alpha:]0-9''`^._ ]+))+)' - captures: - 1: keyword.symbol.fsharp - 2: entity.name.type.fsharp - pop: true - - include: tuple_signature - - match: '(:)\s*([?[:alpha:]0-9''`^._ ]+)*' - captures: - 1: keyword.symbol.fsharp - 2: entity.name.type.fsharp - - match: '(->)\s*(\()?\s*([?[:alpha:]0-9''`^._ ]+)*' - captures: - 1: keyword.symbol.fsharp - 2: keyword.symbol.fsharp - 3: entity.name.type.fsharp - - match: (\*)\s*(\() - captures: - 1: keyword.symbol.fsharp - 2: keyword.symbol.fsharp - push: - - match: '(\)\s*(([?[:alpha:]0-9''`^._ ]+))+)' - captures: - 1: keyword.symbol.fsharp - 2: entity.name.type.fsharp - pop: true - - include: tuple_signature - - match: '(\*)(\s*([?[:alpha:]0-9''`^._ ]+))*' - captures: - 1: keyword.symbol.fsharp - 2: entity.name.type.fsharp - - match: '(<(?![[:space:]]*\)))' - captures: - 1: keyword.symbol.fsharp - push: - - match: (>) - captures: - 1: keyword.symbol.fsharp - pop: true - - include: generic_declaration - - match: "({)" - captures: - 1: keyword.symbol.fsharp - push: - - match: "(})" - captures: - 1: keyword.symbol.fsharp - pop: true - - include: record_signature - - include: variables - - include: keywords - double_tick: - - match: (``)(.*)(``) - scope: variable.other.binding.fsharp - captures: - 1: string.quoted.single.fsharp - 2: variable.other.binding.fsharp - 3: string.quoted.single.fsharp - du_declaration: - - match: \b(of)\b - captures: - 1: keyword.fsharp - push: - - meta_scope: du_declaration.fsharp - - match: $|(\|) - captures: - 1: keyword.symbol.fsharp - pop: true - - include: comments - - match: '([[:alpha:]0-9''`<>^._]+|``[[:alpha:]0-9'' <>^._]+``)\s*(:)\s*([[:alpha:]0-9''`<>^._]+|``[[:alpha:]0-9'' <>^._]+``)' - captures: - 1: variable.parameter.fsharp - 2: keyword.symbol.fsharp - 3: entity.name.type.fsharp - - match: "([[:alpha:]0-9'`^._]+)|``([[:alpha:]0-9'^._ ]+)``" - captures: - 1: entity.name.type.fsharp - - include: keywords - generic_declaration: - - match: "([^<>,*()-])" - captures: - 1: entity.name.type.fsharp - - match: (<) - captures: - 1: keyword.symbol.fsharp - push: - - match: (>) - captures: - 1: keyword.symbol.fsharp - pop: true - - match: "([^<>,*()-])" - captures: - 1: entity.name.type.fsharp - - include: tuple_signature - - include: generic_declaration - - include: keywords - keywords: - - match: \b(private|to|public|internal|function|yield!|yield|class|exception|match|delegate|of|new|in|as|if|then|else|elif|for|begin|end|inherit|do|let\!|return\!|return|interface|with|abstract|property|union|enum|member|try|finally|and|when|use|use\!|struct|while|mutable)(?!')\b - scope: keyword.fsharp - - match: '(&&&|\|\|\||\^\^\^|~~~|<<<|>>>|\|>|\->|\<\-|:>|:\?>|:|\[|\]|\;|<>|=|@|\|\||&&|{|}|\||_|\.\.|\,|\+|\-|\*|\/|\^|\!|\>|\>\=|\>\>|\<|\<\=|\(|\)|\<\<)' - scope: keyword.symbol.fsharp - member_declaration: - - match: (\() - captures: - 1: keyword.symbol.fsharp - push: - - match: (\)) - captures: - 1: keyword.symbol.fsharp - pop: true - - include: comments - - include: common_declaration - - match: '\?{0,1}([[:alpha:]0-9''`^._ ]+)\s*(:{0,1})(\s*([?[:alpha:]0-9''`<>^._ ]+)){0,1}' - captures: - 1: variable.parameter.fsharp - 2: keyword.symbol.fsharp - 3: entity.name.type.fsharp - - include: keywords - modules: - - match: '\b(namespace|module)\s*(public|internal|private)?\s+([[:alpha:]][[:alpha:]0-9''_. ]*)' - captures: - 1: keyword.fsharp - 2: keyword.fsharp - 3: entity.name.section.fsharp - push: - - meta_scope: entity.name.section.fsharp - - match: (\s?=|\s|$) - captures: - 1: keyword.symbol.fsharp - pop: true - - match: '(\.)([A-Z][[:alpha:]0-9''_]*)' - scope: entity.name.section.fsharp - captures: - 1: punctuation.separator.namespace-reference.fsharp - 2: entity.name.section.fsharp - - match: '\b(open)\s+([[:alpha:]][[:alpha:]0-9''_]*)(?=(\.[A-Z][[:alpha:]0-9_]*)*)' - captures: - 1: keyword.fsharp - 2: entity.name.section.fsharp - push: - - meta_scope: namespace.open.fsharp - - match: (\s|$) - pop: true - - match: '(\.)([[:alpha:]][[:alpha:]0-9''_]*)' - scope: entity.name.section.fsharp - captures: - 1: punctuation.separator.namespace-reference.fsharp - 2: entity.name.section.fsharp - - match: '^\s*(module)\s+([A-Z][[:alpha:]0-9''_]*)\s*(=)\s*([A-Z][[:alpha:]0-9''_]*)' - captures: - 1: keyword.fsharp - 2: entity.name.type.namespace.fsharp - 3: punctuation.separator.namespace-definition.fsharp - 4: entity.name.section.fsharp - push: - - meta_scope: namespace.alias.fsharp - - match: (\s|$) - pop: true - - match: '(\.)([A-Z][[:alpha:]0-9''_]*)' - scope: entity.name.section.fsharp - captures: - 1: punctuation.separator.namespace-reference.fsharp - 2: entity.name.section.fsharp - record_declaration: - - match: '(\{)' - captures: - 1: keyword.symbol.fsharp - push: - - match: '(?<=\})' - pop: true - - include: comments - - match: '(((mutable)\s[[:alpha:]]+)|[[:alpha:]0-9''`<>^._]*)\s*((?)\s*(private|internal|public)? - captures: - 1: keyword.symbol.fsharp - 2: keyword.fsharp - - match: "([[:alpha:]0-9'`^._ ]+)" - captures: - 1: entity.name.type.fsharp - - include: member_declaration - - include: keywords - string_formatter: - - match: (%0?-?(\d+)?((a|t)|(\.\d+)?(f|F|e|E|g|G|M)|(b|c|s|d|i|x|X|o|u)|(s|b|O)|(\+?A))) - scope: entity.name.type.format.specifier.fsharp - captures: - 1: keyword.format.specifier.fsharp - strings: - - match: '(?=[^\\])(@")' - captures: - 1: punctuation.definition.string.begin.fsharp - push: - - meta_scope: string.quoted.literal.fsharp - - match: (")(?!") - captures: - 1: punctuation.definition.string.end.fsharp - pop: true - - match: '"(")' - scope: constant.character.string.escape.fsharp - - match: '(?=[^\\])(""")' - captures: - 1: punctuation.definition.string.begin.fsharp - push: - - meta_scope: string.quoted.triple.fsharp - - match: (""") - captures: - 1: punctuation.definition.string.end.fsharp - pop: true - - include: string_formatter - - match: '(?=[^\\])(")' - captures: - 1: punctuation.definition.string.begin.fsharp - push: - - meta_scope: string.quoted.double.fsharp - - match: (") - captures: - 1: punctuation.definition.string.end.fsharp - pop: true - - match: '\\$[ \t]*' - scope: punctuation.separator.string.ignore-eol.fsharp - - match: '\\([\\''''ntbr]|u[a-fA-F0-9]{4}|u[a-fA-F0-9]{8})' - scope: constant.character.string.escape.fsharp - - match: '\\(?![\\''''ntbr]|u[a-fA-F0-9]{4}|u[a-fA-F0-9]{8}).' - scope: invalid.illeagal.character.string.fsharp - - include: string_formatter - text: - - match: \\ - scope: text.fsharp - tuple_signature: - - match: "(([?[:alpha:]0-9'`^._ ]+))+" - captures: - 1: entity.name.type.fsharp - - match: (\() - captures: - 1: keyword.symbol.fsharp - push: - - match: (\)) - captures: - 1: keyword.symbol.fsharp - pop: true - - match: "(([?[:alpha:]0-9'`^._ ]+))+" - captures: - 1: entity.name.type.fsharp - - include: tuple_signature - - include: keywords - variables: - - match: \(\) - scope: constant.language.unit.fsharp - - match: '``[[:alpha:]0-9''`^:,._ ]+``|[[:alpha:]0-9''`<>^._ ]\w*' - scope: variable.parameter.fsharp diff --git a/sublime_syntaxes/Handlebars b/sublime_syntaxes/Handlebars deleted file mode 160000 index fa350d39..00000000 --- a/sublime_syntaxes/Handlebars +++ /dev/null @@ -1 +0,0 @@ -Subproject commit fa350d393dc04cf67e238258be154625f7388bc6 diff --git a/sublime_syntaxes/Jinja2.sublime-syntax b/sublime_syntaxes/Jinja2.sublime-syntax deleted file mode 100644 index 70776665..00000000 --- a/sublime_syntaxes/Jinja2.sublime-syntax +++ /dev/null @@ -1,181 +0,0 @@ -%YAML 1.2 ---- -# http://www.sublimetext.com/docs/3/syntax.html -name: Jinja2 -file_extensions: - - j2 - - jinja2 -scope: text.html.jinja2 -contexts: - main: - - include: scope:text.html.basic - - match: '({%)\s*(raw)\s*(%})' - captures: - 1: entity.other.jinja2.delimiter.tag - 2: keyword.control.jinja2 - 3: entity.other.jinja2.delimiter.tag - push: - - meta_scope: comment.block.jinja2.raw - - match: '({%)\s*(endraw)\s*(%})' - captures: - 1: entity.other.jinja2.delimiter.tag - 2: keyword.control.jinja2 - 3: entity.other.jinja2.delimiter.tag - pop: true - - match: "{#-?" - captures: - 0: entity.other.jinja2.delimiter.comment - push: - - meta_scope: comment.block.jinja2 - - match: "-?#}" - captures: - 0: entity.other.jinja2.delimiter.comment - pop: true - - match: "{{-?" - captures: - 0: entity.other.jinja2.delimiter.variable - push: - - meta_scope: meta.scope.jinja2.variable - - match: "-?}}" - captures: - 0: entity.other.jinja2.delimiter.variable - pop: true - - include: expression - - match: "{%-?" - captures: - 0: entity.other.jinja2.delimiter.tag - push: - - meta_scope: meta.scope.jinja2.tag - - match: "-?%}" - captures: - 0: entity.other.jinja2.delimiter.tag - pop: true - - include: expression - escaped_char: - - match: '\\x[0-9A-F]{2}' - scope: constant.character.escape.hex.jinja2 - escaped_unicode_char: - - match: '(\\U[0-9A-Fa-f]{8})|(\\u[0-9A-Fa-f]{4})|(\\N\{[a-zA-Z ]+\})' - captures: - 1: constant.character.escape.unicode.16-bit-hex.jinja2 - 2: constant.character.escape.unicode.32-bit-hex.jinja2 - 3: constant.character.escape.unicode.name.jinja2 - expression: - - match: '\s*\b(macro)\s+([a-zA-Z_][a-zA-Z0-9_]*)\b' - captures: - 1: keyword.control.jinja2 - 2: variable.other.jinja2.macro - - match: '\s*\b(block)\s+([a-zA-Z_][a-zA-Z0-9_]*)\b' - captures: - 1: keyword.control.jinja2 - 2: variable.other.jinja2.block - - match: '\s*\b(filter)\s+([a-zA-Z_][a-zA-Z0-9_]*)\b' - captures: - 1: keyword.control.jinja2 - 2: variable.other.jinja2.filter - - match: '\s*\b(is)\s+([a-zA-Z_][a-zA-Z0-9_]*)\b' - captures: - 1: keyword.control.jinja2 - 2: variable.other.jinja2.test - - match: '(?<=\{\%-|\{\%)\s*\b([a-zA-Z_][a-zA-Z0-9_]*)\b(?!\s*[,=])' - captures: - 1: keyword.control.jinja2 - - match: \b(and|else|if|in|import|not|or|recursive|with(out)?\s+context)\b - scope: keyword.control.jinja2 - - match: '\b([Tt]rue|[Ff]alse|[Nn]one)\b' - scope: constant.language.jinja2 - - match: \b(loop|super|self|varargs|kwargs)\b - scope: variable.language.jinja2 - - match: "[a-zA-Z_][a-zA-Z0-9_]*" - scope: variable.other.jinja2 - - match: (\+|\-|\*\*|\*|//|/|%) - scope: keyword.operator.arithmetic.jinja2 - - match: '(\|)([a-zA-Z_][a-zA-Z0-9_]*)' - captures: - 1: punctuation.other.jinja2 - 2: variable.other.jinja2.filter - - match: '(\.)([a-zA-Z_][a-zA-Z0-9_]*)' - captures: - 1: punctuation.other.jinja2 - 2: variable.other.jinja2.attribute - - match: '\[' - captures: - 0: punctuation.other.jinja2 - push: - - match: '\]' - captures: - 0: punctuation.other.jinja2 - pop: true - - include: expression - - match: \( - captures: - 0: punctuation.other.jinja2 - push: - - match: \) - captures: - 0: punctuation.other.jinja2 - pop: true - - include: expression - - match: '\{' - captures: - 0: punctuation.other.jinja2 - push: - - match: '\}' - captures: - 0: punctuation.other.jinja2 - pop: true - - include: expression - - match: (\.|:|\||,) - scope: punctuation.other.jinja2 - - match: (==|<=|=>|<|>|!=) - scope: keyword.operator.comparison.jinja2 - - match: "=" - scope: keyword.operator.assignment.jinja2 - - match: '"' - captures: - 0: punctuation.definition.string.begin.jinja2 - push: - - meta_scope: string.quoted.double.jinja2 - - match: '"' - captures: - 0: punctuation.definition.string.end.jinja2 - pop: true - - include: string - - match: "'" - captures: - 0: punctuation.definition.string.begin.jinja2 - push: - - meta_scope: string.quoted.single.jinja2 - - match: "'" - captures: - 0: punctuation.definition.string.end.jinja2 - pop: true - - include: string - - match: "@/" - captures: - 0: punctuation.definition.regexp.begin.jinja2 - push: - - meta_scope: string.regexp.jinja2 - - match: / - captures: - 0: punctuation.definition.regexp.end.jinja2 - pop: true - - include: simple_escapes - simple_escapes: - - match: (\\\n)|(\\\\)|(\\\")|(\\')|(\\a)|(\\b)|(\\f)|(\\n)|(\\r)|(\\t)|(\\v) - captures: - 1: constant.character.escape.newline.jinja2 - 2: constant.character.escape.backlash.jinja2 - 3: constant.character.escape.double-quote.jinja2 - 4: constant.character.escape.single-quote.jinja2 - 5: constant.character.escape.bell.jinja2 - 6: constant.character.escape.backspace.jinja2 - 7: constant.character.escape.formfeed.jinja2 - 8: constant.character.escape.linefeed.jinja2 - 9: constant.character.escape.return.jinja2 - 10: constant.character.escape.tab.jinja2 - 11: constant.character.escape.vertical-tab.jinja2 - string: - - include: simple_escapes - - include: escaped_char - - include: escaped_unicode_char diff --git a/sublime_syntaxes/Julia-sublime b/sublime_syntaxes/Julia-sublime deleted file mode 160000 index 0ca4cc29..00000000 --- a/sublime_syntaxes/Julia-sublime +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0ca4cc29907e9476cb603fed00d1d5fd9dc13c9c diff --git a/sublime_syntaxes/LESS-sublime b/sublime_syntaxes/LESS-sublime deleted file mode 160000 index 0174335f..00000000 --- a/sublime_syntaxes/LESS-sublime +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0174335f91284f5ffab96f599ab2ab7e316658e2 diff --git a/sublime_syntaxes/Packages b/sublime_syntaxes/Packages deleted file mode 160000 index 289782ff..00000000 --- a/sublime_syntaxes/Packages +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 289782ff2e4cb58de171579c7fc86fe00d280619 diff --git a/sublime_syntaxes/Sublime-GenericConfig b/sublime_syntaxes/Sublime-GenericConfig deleted file mode 160000 index 04ec6d71..00000000 --- a/sublime_syntaxes/Sublime-GenericConfig +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 04ec6d7165e971db1fefd604942b04ccf86fb920 diff --git a/sublime_syntaxes/Sublime-VimL b/sublime_syntaxes/Sublime-VimL deleted file mode 160000 index ed40c3bc..00000000 --- a/sublime_syntaxes/Sublime-VimL +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ed40c3bc814cd0c8107dbbb8fcd95946b33217f0 diff --git a/sublime_syntaxes/SublimeElmLanguageSupport b/sublime_syntaxes/SublimeElmLanguageSupport deleted file mode 160000 index dfbb8bdc..00000000 --- a/sublime_syntaxes/SublimeElmLanguageSupport +++ /dev/null @@ -1 +0,0 @@ -Subproject commit dfbb8bdc9a8403092c884d3eb893a270538cfa72 diff --git a/sublime_syntaxes/SublimeTextLinkerSyntax b/sublime_syntaxes/SublimeTextLinkerSyntax deleted file mode 160000 index cc840ca9..00000000 --- a/sublime_syntaxes/SublimeTextLinkerSyntax +++ /dev/null @@ -1 +0,0 @@ -Subproject commit cc840ca97baf783ee3e260ea05f4e164abf665d1 diff --git a/sublime_syntaxes/Swift-for-f-ing-sublime b/sublime_syntaxes/Swift-for-f-ing-sublime deleted file mode 160000 index 2273beda..00000000 --- a/sublime_syntaxes/Swift-for-f-ing-sublime +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2273beda750aec3ef0fa53e389d366432db9c779 diff --git a/sublime_syntaxes/TOML.sublime-syntax b/sublime_syntaxes/TOML.sublime-syntax deleted file mode 100644 index 4e8e22e7..00000000 --- a/sublime_syntaxes/TOML.sublime-syntax +++ /dev/null @@ -1,153 +0,0 @@ -%YAML 1.2 ---- -# http://www.sublimetext.com/docs/3/syntax.html -name: TOML -file_extensions: - - toml - - tml -scope: source.toml -contexts: - main: - - include: comments - - include: tables - - include: keys - - include: illegal - array: - - match: '(? everything unmatched - captures: - 1: invalid.illegal.toml - inlinetable: - - match: '(?)' - scope: meta.arrow.ts - captures: - 1: storage.modifier.async.ts - 2: variable.parameter.ts - - match: |- - (?x) (?: - (? is on new line - ( - [(]\s* - ( - ([)]\s*:) | # (): - ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: - ) - ) | - ( - [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends - ) | - # arrow function possible to detect only with => on same line - ( - (<\s*([_$[:alpha:]]|(\{[^\{\}]*\})|(\([^\(\)]*\))|(\[[^\[\]]*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{[^\{\}]*\})|(\([^\(\)]*\))|(\[[^\[\]]*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters - \(\s*([_$[:alpha:]\{\[]([^()]|\((\s*[^()]*)?\))*)?\) # parameteres - (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type - \s*=> # arrow operator - ) - ) - ) - captures: - 1: storage.modifier.async.ts - push: - - meta_scope: meta.arrow.ts - - match: '(?==>|\{|(^\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\s+))' - pop: true - - include: comment - - include: type-parameters - - include: function-parameters - - include: arrow-return-type - - match: "=>" - captures: - 0: storage.type.function.arrow.ts - push: - - meta_scope: meta.arrow.ts - - match: '(?<=\}|\S)(?)|((?!\{)(?=\S))' - pop: true - - include: decl-block - - include: expression - arrow-return-type: - - match: (?<=\))\s*(:) - captures: - 1: keyword.operator.type.annotation.ts - push: - - meta_scope: meta.return.type.arrow.ts - - match: '(?==>|\{|(^\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\s+))' - pop: true - - match: '(?<=[:])(?=\s*\{)' - push: - - match: '(?<=\})' - pop: true - - include: type-object - - include: type-predicate-operator - - include: type - binding-element: - - include: comment - - include: object-binding-pattern - - include: array-binding-pattern - - include: destructuring-variable-rest - - include: variable-initializer - boolean-literal: - - match: '(?*?\&\|\^]|[^_$[:alnum:]](?:\+\+|\-\-)|[^\+]\+|[^\-]\-))\s*(<)(?!)\s* - captures: - 1: meta.brace.angle.ts - pop: true - - include: type - - match: '(?:(?<=^))\s*(<)(?=[_$[:alpha:]][_$[:alnum:]]*\s*>)' - captures: - 1: meta.brace.angle.ts - push: - - meta_scope: cast.expr.ts - - match: (\>)\s* - captures: - 1: meta.brace.angle.ts - pop: true - - include: type - class-declaration: - - match: '(?\s*$)' - captures: - 1: punctuation.definition.comment.ts - push: - - meta_scope: comment.line.triple-slash.directive.ts - - match: (?=^) - pop: true - - match: (<)(reference|amd-dependency|amd-module) - captures: - 1: punctuation.definition.tag.directive.ts - 2: entity.name.tag.directive.ts - push: - - meta_scope: meta.tag.ts - - match: /> - captures: - 0: punctuation.definition.tag.directive.ts - pop: true - - match: path|types|no-default-lib|name - scope: entity.other.attribute-name.directive.ts - - match: "=" - scope: keyword.operator.assignment.ts - - include: string - docblock: - - match: |- - (?x) - ((@)(?:access|api)) - \s+ - (private|protected|public) - \b - captures: - 1: storage.type.class.jsdoc - 2: punctuation.definition.block.tag.jsdoc - 3: constant.language.access-type.jsdoc - - match: |- - (?x) - ((@)author) - \s+ - ( - [^@\s<>*/] - (?:[^@<>*/]|\*[^/])* - ) - (?: - \s* - (<) - ([^>\s]+) - (>) - )? - captures: - 1: storage.type.class.jsdoc - 2: punctuation.definition.block.tag.jsdoc - 3: entity.name.type.instance.jsdoc - 4: punctuation.definition.bracket.angle.begin.jsdoc - 5: constant.other.email.link.underline.jsdoc - 6: punctuation.definition.bracket.angle.end.jsdoc - - match: |- - (?x) - ((@)borrows) \s+ - ((?:[^@\s*/]|\*[^/])+) # - \s+ (as) \s+ # as - ((?:[^@\s*/]|\*[^/])+) # - captures: - 1: storage.type.class.jsdoc - 2: punctuation.definition.block.tag.jsdoc - 3: entity.name.type.instance.jsdoc - 4: keyword.operator.control.jsdoc - 5: entity.name.type.instance.jsdoc - - match: ((@)example)\s+ - captures: - 1: storage.type.class.jsdoc - 2: punctuation.definition.block.tag.jsdoc - push: - - meta_scope: meta.example.jsdoc - - match: (?=@|\*/) - pop: true - - match: ^\s\*\s+ - - match: \G(<)caption(>) - captures: - 0: entity.name.tag.inline.jsdoc - 1: punctuation.definition.bracket.angle.begin.jsdoc - 2: punctuation.definition.bracket.angle.end.jsdoc - push: - - meta_content_scope: constant.other.description.jsdoc - - match: ()|(?=\*/) - captures: - 0: entity.name.tag.inline.jsdoc - 1: punctuation.definition.bracket.angle.begin.jsdoc - 2: punctuation.definition.bracket.angle.end.jsdoc - pop: true - - match: '[^\s@*](?:[^*]|\*[^/])*' - captures: - 0: source.embedded.ts - - match: (?x) ((@)kind) \s+ (class|constant|event|external|file|function|member|mixin|module|namespace|typedef) \b - captures: - 1: storage.type.class.jsdoc - 2: punctuation.definition.block.tag.jsdoc - 3: constant.language.symbol-type.jsdoc - - match: |- - (?x) - ((@)see) - \s+ - (?: - # URL - ( - (?=https?://) - (?:[^\s*]|\*[^/])+ - ) - | - # JSDoc namepath - ( - (?! - # Avoid matching bare URIs (also acceptable as links) - https?:// - | - # Avoid matching {@inline tags}; we match those below - (?:\[[^\[\]]*\])? # Possible description [preceding]{@tag} - {@(?:link|linkcode|linkplain|tutorial)\b - ) - # Matched namepath - (?:[^@\s*/]|\*[^/])+ - ) - ) - captures: - 1: storage.type.class.jsdoc - 2: punctuation.definition.block.tag.jsdoc - 3: variable.other.link.underline.jsdoc - 4: entity.name.type.instance.jsdoc - - match: |- - (?x) - ((@)template) - \s+ - # One or more valid identifiers - ( - [A-Za-z_$] # First character: non-numeric word character - [\w$.\[\]]* # Rest of identifier - (?: # Possible list of additional identifiers - \s* , \s* - [A-Za-z_$] - [\w$.\[\]]* - )* - ) - captures: - 1: storage.type.class.jsdoc - 2: punctuation.definition.block.tag.jsdoc - 3: variable.other.jsdoc - - match: |- - (?x) - ( - (@) - (?:arg|argument|const|constant|member|namespace|param|var) - ) - \s+ - ( - [A-Za-z_$] - [\w$.\[\]]* - ) - captures: - 1: storage.type.class.jsdoc - 2: punctuation.definition.block.tag.jsdoc - 3: variable.other.jsdoc - - match: '((@)typedef)\s+(?={)' - captures: - 1: storage.type.class.jsdoc - 2: punctuation.definition.block.tag.jsdoc - push: - - match: '(?=\s|\*/|[^{}\[\]A-Za-z_$])' - pop: true - - include: jsdoctype - - match: '(?:[^@\s*/]|\*[^/])+' - scope: entity.name.type.instance.jsdoc - - match: '((@)(?:arg|argument|const|constant|member|namespace|param|prop|property|var))\s+(?={)' - captures: - 1: storage.type.class.jsdoc - 2: punctuation.definition.block.tag.jsdoc - push: - - match: '(?=\s|\*/|[^{}\[\]A-Za-z_$])' - pop: true - - include: jsdoctype - - match: '([A-Za-z_$][\w$.\[\]]*)' - scope: variable.other.jsdoc - - match: |- - (?x) - (\[)\s* - [\w$]+ - (?: - (?:\[\])? # Foo[ ].bar properties within an array - \. # Foo.Bar namespaced parameter - [\w$]+ - )* - (?: - \s* - (=) # [foo=bar] Default parameter value - \s* - ( - # The inner regexes are to stop the match early at */ and to not stop at escaped quotes - (?> - "(?:(?:\*(?!/))|(?:\\(?!"))|[^*\\])*?" | # [foo="bar"] Double-quoted - '(?:(?:\*(?!/))|(?:\\(?!'))|[^*\\])*?' | # [foo='bar'] Single-quoted - \[ (?:(?:\*(?!/))|[^*])*? \] | # [foo=[1,2]] Array literal - (?:(?:\*(?!/))|\s(?!\s*\])|\[.*?(?:\]|(?=\*/))|[^*\s\[\]])* # Everything else - )* - ) - )? - \s*(?:(\])((?:[^*\s]|\*[^\s/])+)?|(?=\*/)) - scope: variable.other.jsdoc - captures: - 1: punctuation.definition.optional-value.begin.bracket.square.jsdoc - 2: keyword.operator.assignment.jsdoc - 3: source.embedded.ts - 4: punctuation.definition.optional-value.end.bracket.square.jsdoc - 5: invalid.illegal.syntax.jsdoc - - match: |- - (?x) - ( - (@) - (?:define|enum|exception|export|extends|lends|implements|modifies - |namespace|private|protected|returns?|suppress|this|throws|type - |yields?) - ) - \s+(?={) - captures: - 1: storage.type.class.jsdoc - 2: punctuation.definition.block.tag.jsdoc - push: - - match: '(?=\s|\*/|[^{}\[\]A-Za-z_$])' - pop: true - - include: jsdoctype - - match: |- - (?x) - ( - (@) - (?:alias|augments|callback|constructs|emits|event|fires|exports? - |extends|external|function|func|host|lends|listens|interface|memberof!? - |method|module|mixes|mixin|name|requires|see|this|typedef|uses) - ) - \s+ - ( - (?: - [^{}@\s*] | \*[^/] - )+ - ) - captures: - 1: storage.type.class.jsdoc - 2: punctuation.definition.block.tag.jsdoc - 3: entity.name.type.instance.jsdoc - - match: '((@)(?:default(?:value)?|license|version))\s+(([''''"]))' - captures: - 1: storage.type.class.jsdoc - 2: punctuation.definition.block.tag.jsdoc - 3: variable.other.jsdoc - 4: punctuation.definition.string.begin.jsdoc - push: - - meta_content_scope: variable.other.jsdoc - - match: (\3)|(?=$|\*/) - captures: - 0: variable.other.jsdoc - 1: punctuation.definition.string.end.jsdoc - pop: true - - match: '((@)(?:default(?:value)?|license|tutorial|variation|version))\s+([^\s*]+)' - captures: - 1: storage.type.class.jsdoc - 2: punctuation.definition.block.tag.jsdoc - 3: variable.other.jsdoc - - match: '(?x) (@) (?:abstract|access|alias|api|arg|argument|async|attribute|augments|author|beta|borrows|bubbles |callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright |default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exception |exports?|extends|extension(?:_?for)?|external|externs|file|fileoverview|final|fires|for|func |function|generator|global|hideconstructor|host|ignore|implements|implicitCast|inherit[Dd]oc |inner|instance|interface|internal|kind|lends|license|listens|main|member|memberof!?|method |mixes|mixins?|modifies|module|name|namespace|noalias|nocollapse|nocompile|nosideeffects |override|overview|package|param|polymer(?:Behavior)?|preserve|private|prop|property|protected |public|read[Oo]nly|record|require[ds]|returns?|see|since|static|struct|submodule|summary |suppress|template|this|throws|todo|tutorial|type|typedef|unrestricted|uses|var|variation |version|virtual|writeOnce|yields?) \b' - scope: storage.type.class.jsdoc - captures: - 1: punctuation.definition.block.tag.jsdoc - - include: inline-tags - enum-declaration: - - match: '(?>=|>>>=|\|= - scope: keyword.operator.assignment.compound.bitwise.ts - - match: "<<|>>>|>>" - scope: keyword.operator.bitwise.shift.ts - - match: "===|!==|==|!=" - scope: keyword.operator.comparison.ts - - match: <=|>=|<>|<|> - scope: keyword.operator.relational.ts - - match: \!|&&|\|\| - scope: keyword.operator.logical.ts - - match: \&|~|\^|\| - scope: keyword.operator.bitwise.ts - - match: \= - scope: keyword.operator.assignment.ts - - match: "--" - scope: keyword.operator.decrement.ts - - match: \+\+ - scope: keyword.operator.increment.ts - - match: '%|\*|/|-|\+' - scope: keyword.operator.arithmetic.ts - - match: '(?<=[_$[:alnum:])])\s*(/)(?![/*])' - captures: - 1: keyword.operator.arithmetic.ts - expressionPunctuations: - - include: punctuation-comma - - include: punctuation-accessor - expressionWithoutIdentifiers: - - include: string - - include: regex - - include: template - - include: comment - - include: function-expression - - include: class-expression - - include: arrow-function - - include: cast - - include: ternary-expression - - include: new-expr - - include: object-literal - - include: expression-operators - - include: function-call - - include: literal - - include: support-objects - - include: paren-expression - field-declaration: - - match: '(?) - )) | - ((async\s*)?( - # sure shot arrow functions even if => is on new line - ( - [(]\s* - ( - ([)]\s*:) | # (): - ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: - ) - ) | - ( - [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends - ) | - # arrow function possible to detect only with => on same line - ( - (<\s*([_$[:alpha:]]|(\{[^\{\}]*\})|(\([^\(\)]*\))|(\[[^\[\]]*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{[^\{\}]*\})|(\([^\(\)]*\))|(\[[^\[\]]*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters - \(\s*([_$[:alpha:]\{\[]([^()]|\((\s*[^()]*)?\))*)?\) # parameteres - (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type - \s*=> # arrow operator - ) - )) - )) | - # typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) => - (:\s*( - (<) | - ([(]\s*( - ([)]) | - (\.\.\.) | - ([_$[:alnum:]]+\s*( - ([:,?=])| - ([)]\s*=>) - )) - )) - ))) - scope: meta.definition.property.ts entity.name.function.ts - - match: "[_$[:alpha:]][_$[:alnum:]]*" - scope: meta.definition.property.ts variable.object.property.ts - - match: \? - scope: keyword.operator.optional.ts - for-loop: - - match: '(?\(]|(\([^\(\)]*\))|\<\s*(([_$[:alpha:]]|(\{[^\{\}]*\})|(\([^\(\)]*\))|(\[[^\[\]]*\]))|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))([^<>\(]|(\([^\(\)]*\)))*\>)*>\s*)?\()' - push: - - match: '(?<=\))(?!(([_$[:alpha:]][_$[:alnum:]]*\s*\??\.\s*)*|(\??\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\s*(\?\.\s*)?(<\s*(([_$[:alpha:]]|(\{[^\{\}]*\})|(\([^\(\)]*\))|(\[[^\[\]]*\]))|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))([^<>\(]|(\([^\(\)]*\))|\<\s*(([_$[:alpha:]]|(\{[^\{\}]*\})|(\([^\(\)]*\))|(\[[^\[\]]*\]))|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))([^<>\(]|(\([^\(\)]*\)))*\>)*>\s*)?\()' - pop: true - - match: '(?=(([_$[:alpha:]][_$[:alnum:]]*\s*\??\.\s*)*|(\??\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*))' - push: - - meta_scope: meta.function-call.ts - - match: '(?=\s*(\?\.\s*)?(<\s*(([_$[:alpha:]]|(\{[^\{\}]*\})|(\([^\(\)]*\))|(\[[^\[\]]*\]))|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))([^<>\(]|(\([^\(\)]*\))|\<\s*(([_$[:alpha:]]|(\{[^\{\}]*\})|(\([^\(\)]*\))|(\[[^\[\]]*\]))|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))([^<>\(]|(\([^\(\)]*\)))*\>)*>\s*)?\()' - pop: true - - include: literal - - include: support-objects - - include: object-identifiers - - include: punctuation-accessor - - match: '(?:(? - captures: - 0: punctuation.definition.typeparameters.end.ts - pop: true - - include: type - - include: punctuation-comma - - include: paren-expression - function-declaration: - - match: '(?) - )) | - ((async\s*)?( - # sure shot arrow functions even if => is on new line - ( - [(]\s* - ( - ([)]\s*:) | # (): - ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: - ) - ) | - ( - [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends - ) | - # arrow function possible to detect only with => on same line - ( - (<\s*([_$[:alpha:]]|(\{[^\{\}]*\})|(\([^\(\)]*\))|(\[[^\[\]]*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{[^\{\}]*\})|(\([^\(\)]*\))|(\[[^\[\]]*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters - \(\s*([_$[:alpha:]\{\[]([^()]|\((\s*[^()]*)?\))*)?\) # parameteres - (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type - \s*=> # arrow operator - ) - )) - )) - captures: - 1: punctuation.accessor.ts - 2: punctuation.accessor.optional.ts - 3: entity.name.function.ts - - match: '(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])' - captures: - 1: punctuation.accessor.ts - 2: punctuation.accessor.optional.ts - 3: variable.other.constant.property.ts - - match: '(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*([_$[:alpha:]][_$[:alnum:]]*)' - captures: - 1: punctuation.accessor.ts - 2: punctuation.accessor.optional.ts - 3: variable.other.property.ts - - match: "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])" - scope: variable.other.constant.ts - - match: "[_$[:alpha:]][_$[:alnum:]]*" - scope: variable.other.readwrite.ts - import-declaration: - - match: '(?) - )) | - ((async\s*)?( - # sure shot arrow functions even if => is on new line - ( - [(]\s* - ( - ([)]\s*:) | # (): - ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: - ) - ) | - ( - [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends - ) | - # arrow function possible to detect only with => on same line - ( - (<\s*([_$[:alpha:]]|(\{[^\{\}]*\})|(\([^\(\)]*\))|(\[[^\[\]]*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{[^\{\}]*\})|(\([^\(\)]*\))|(\[[^\[\]]*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters - \(\s*([_$[:alpha:]\{\[]([^()]|\((\s*[^()]*)?\))*)?\) # parameteres - (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type - \s*=> # arrow operator - ) - )) - ))) - scope: meta.object.member.ts - captures: - 0: meta.object-literal.key.ts - 1: entity.name.function.ts - - match: '(?:[_$[:alpha:]][_$[:alnum:]]*)\s*(?=:)' - scope: meta.object.member.ts - captures: - 0: meta.object-literal.key.ts - - match: \.\.\. - captures: - 0: keyword.operator.spread.ts - push: - - meta_scope: meta.object.member.ts - - match: '(?=,|\})' - pop: true - - include: expression - - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?=,|\}|$)' - scope: meta.object.member.ts - captures: - 1: variable.other.readwrite.ts - - match: '(?=[_$[:alpha:]][_$[:alnum:]]*\s*=)' - push: - - meta_scope: meta.object.member.ts - - match: '(?=,|\}|$)' - pop: true - - include: expression - - match: ":" - captures: - 0: meta.object-literal.key.ts punctuation.separator.key-value.ts - push: - - meta_scope: meta.object.member.ts - - match: '(?=,|\})' - pop: true - - include: expression - - include: punctuation-comma - parameter-array-binding-pattern: - - match: '(?:(\.\.\.)\s*)?(\[)' - captures: - 1: keyword.operator.rest.ts - 2: punctuation.definition.binding-pattern.array.ts - push: - - match: '\]' - captures: - 0: punctuation.definition.binding-pattern.array.ts - pop: true - - include: parameter-binding-element - - include: punctuation-comma - parameter-binding-element: - - include: comment - - include: parameter-object-binding-pattern - - include: parameter-array-binding-pattern - - include: destructuring-parameter-rest - - include: variable-initializer - parameter-name: - - match: \s*\b(public|protected|private|readonly)(?=\s+(public|protected|private|readonly)\s+) - captures: - 1: storage.modifier.ts - - match: |- - (?x)(?:\s*\b(public|private|protected|readonly)\s+)?(\.\.\.)?\s*(?) - )) | - ((async\s*)?( - # sure shot arrow functions even if => is on new line - ( - [(]\s* - ( - ([)]\s*:) | # (): - ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: - ) - ) | - ( - [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends - ) | - # arrow function possible to detect only with => on same line - ( - (<\s*([_$[:alpha:]]|(\{[^\{\}]*\})|(\([^\(\)]*\))|(\[[^\[\]]*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{[^\{\}]*\})|(\([^\(\)]*\))|(\[[^\[\]]*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters - \(\s*([_$[:alpha:]\{\[]([^()]|\((\s*[^()]*)?\))*)?\) # parameteres - (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type - \s*=> # arrow operator - ) - )) - )) | - # typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) => - (:\s*( - (<) | - ([(]\s*( - ([)]) | - (\.\.\.) | - ([_$[:alnum:]]+\s*( - ([:,?=])| - ([)]\s*=>) - )) - )) - ))) - captures: - 1: storage.modifier.ts - 2: keyword.operator.rest.ts - 3: entity.name.function.ts variable.language.this.ts - 4: entity.name.function.ts - 5: keyword.operator.optional.ts - - match: '(?x)(?:\s*\b(public|private|protected|readonly)\s+)?(\.\.\.)?\s*(?|&&|\|\||\*\/)\s*(\/)(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)+\])+\/(?![\/*])[gimuy]*(?!\s*[a-zA-Z0-9_$]))' - captures: - 1: punctuation.definition.string.begin.ts - push: - - meta_scope: string.regexp.ts - - match: "(/)([gimuy]*)" - captures: - 1: punctuation.definition.string.end.ts - 2: keyword.other.ts - pop: true - - include: regexp - - match: '(?]|=[^<]|\<\s*([_$[:alpha:]]|(\{[^\{\}]*\})|(\([^\(\)]*\))|(\[[^\[\]]*\]))([^=<>]|=[^<])*\>)*>\s*)?\() - captures: - 1: punctuation.accessor.ts - 2: punctuation.accessor.optional.ts - 3: support.constant.dom.ts - 4: support.variable.property.dom.ts - - match: |- - (?x)(?])|((?<=[\}>\]\)]|[_$[:alpha:]])\s*(?=\{)))' - pop: true - - include: type - - match: (:) - captures: - 1: keyword.operator.type.annotation.ts - push: - - meta_scope: meta.type.annotation.ts - - match: '(?])|(?=^\s*$)|((?<=\S)(?=\s*$))|((?<=[\}>\]\)]|[_$[:alpha:]])\s*(?=\{)))' - pop: true - - include: type - type-builtin-literals: - - match: '(?) - )) - ) - ) - ) - push: - - meta_scope: meta.type.function.ts - - match: (?<=\)) - pop: true - - include: function-parameters - type-function-return-type: - - match: (=>)(?=\s*\S) - captures: - 1: storage.type.function.arrow.ts - push: - - meta_scope: meta.type.function.return.ts - - match: '(?)(?]|//|$)' - pop: true - - include: type-function-return-type-core - - match: "=>" - captures: - 0: storage.type.function.arrow.ts - push: - - meta_scope: meta.type.function.return.ts - - match: '(?)(?]|//|^\s*$)|((?<=\S)(?=\s*$)))' - pop: true - - include: type-function-return-type-core - type-function-return-type-core: - - include: comment - - match: '(?<==>)(?=\s*\{)' - push: - - match: '(?<=\})' - pop: true - - include: type-object - - include: type-predicate-operator - - include: type - type-name: - - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))' - captures: - 1: entity.name.type.module.ts - 2: punctuation.accessor.ts - 3: punctuation.accessor.optional.ts - - match: "[_$[:alpha:]][_$[:alnum:]]*" - scope: entity.name.type.ts - type-object: - - match: '\{' - captures: - 0: punctuation.definition.block.ts - push: - - meta_scope: meta.object.type.ts - - match: '\}' - captures: - 0: punctuation.definition.block.ts - pop: true - - include: comment - - include: method-declaration - - include: indexer-declaration - - include: indexer-mapped-type-declaration - - include: field-declaration - - include: type-annotation - - match: \.\.\. - captures: - 0: keyword.operator.spread.ts - push: - - match: '(?=\}|;|,|$)|(?<=\})' - pop: true - - include: type - - include: punctuation-comma - - include: punctuation-semicolon - - include: type - type-operators: - - include: typeof-operator - - match: '([&|])(?=\s*\{)' - captures: - 0: keyword.operator.type.ts - push: - - match: '(?<=\})' - pop: true - - include: type-object - - match: "[&|]" - captures: - 0: keyword.operator.type.ts - push: - - match: (?=\S) - pop: true - - match: '(?) - captures: - 1: punctuation.definition.typeparameters.end.ts - pop: true - - include: comment - - match: '(?) - scope: keyword.operator.assignment.ts - - include: type - - include: punctuation-comma - type-paren-or-function-parameters: - - match: \( - captures: - 0: meta.brace.round.ts - push: - - meta_scope: meta.type.paren.cover.ts - - match: \) - captures: - 0: meta.brace.round.ts - pop: true - - include: type - - include: function-parameters - type-predicate-operator: - - match: '(?) - )) | - ((async\s*)?( - # sure shot arrow functions even if => is on new line - ( - [(]\s* - ( - ([)]\s*:) | # (): - ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param: - ) - ) | - ( - [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends - ) | - # arrow function possible to detect only with => on same line - ( - (<\s*([_$[:alpha:]]|(\{[^\{\}]*\})|(\([^\(\)]*\))|(\[[^\[\]]*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{[^\{\}]*\})|(\([^\(\)]*\))|(\[[^\[\]]*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters - \(\s*([_$[:alpha:]\{\[]([^()]|\((\s*[^()]*)?\))*)?\) # parameteres - (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type - \s*=> # arrow operator - ) - )) - )) | - # typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) => - (:\s*( - (<) | - ([(]\s*( - ([)]) | - (\.\.\.) | - ([_$[:alnum:]]+\s*( - ([:,?=])| - ([)]\s*=>) - )) - )) - ))) - captures: - 1: meta.definition.variable.ts entity.name.function.ts - push: - - meta_scope: meta.var-single-variable.expr.ts - - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))' - pop: true - - include: var-single-variable-type-annotation - - match: "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])" - captures: - 1: meta.definition.variable.ts variable.other.constant.ts - push: - - meta_scope: meta.var-single-variable.expr.ts - - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))' - pop: true - - include: var-single-variable-type-annotation - - match: "([_$[:alpha:]][_$[:alnum:]]*)" - captures: - 1: meta.definition.variable.ts variable.other.readwrite.ts - push: - - meta_scope: meta.var-single-variable.expr.ts - - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))' - pop: true - - include: var-single-variable-type-annotation - var-single-variable-type-annotation: - - include: type-annotation - - include: string - - include: comment - variable-initializer: - - match: (?