diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 92dec93b..2f9deeb9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,7 +20,7 @@ jobs: if: github.repository == 'helix-editor/helix' || github.event_name != 'schedule' steps: - name: Checkout sources - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install MSRV toolchain uses: dtolnay/rust-toolchain@master @@ -51,7 +51,7 @@ jobs: HELIX_LOG_LEVEL: info steps: - name: Checkout sources - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install MSRV toolchain uses: dtolnay/rust-toolchain@master @@ -85,7 +85,7 @@ jobs: if: github.repository == 'helix-editor/helix' || github.event_name != 'schedule' steps: - name: Checkout sources - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install MSRV toolchain uses: dtolnay/rust-toolchain@master @@ -121,7 +121,7 @@ jobs: if: github.repository == 'helix-editor/helix' || github.event_name != 'schedule' steps: - name: Checkout sources - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install MSRV toolchain uses: dtolnay/rust-toolchain@master diff --git a/.github/workflows/cachix.yml b/.github/workflows/cachix.yml index 1fed41ed..c7d945f5 100644 --- a/.github/workflows/cachix.yml +++ b/.github/workflows/cachix.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout sources - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install nix uses: cachix/install-nix-action@v31 diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index d42ab1c8..8f086fd6 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -11,7 +11,7 @@ jobs: deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup mdBook uses: peaceiris/actions-mdbook@v2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 97cc2b04..4020e505 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout sources - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install stable toolchain uses: dtolnay/rust-toolchain@stable @@ -104,16 +104,16 @@ jobs: steps: - name: Checkout sources - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Download grammars - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v5 - name: Move grammars under runtime if: "!startsWith(matrix.os, 'windows')" run: | mkdir -p runtime/grammars/sources - tar xJf grammars/grammars.tar.xz -C runtime/grammars/sources + tar xJf grammars.tar.xz -C runtime/grammars/sources # The rust-toolchain action ignores rust-toolchain.toml files. # Removing this before building with cargo ensures that the rust-toolchain @@ -235,9 +235,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout sources - uses: actions/checkout@v4 + uses: actions/checkout@v5 - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v5 - name: Build archive shell: bash diff --git a/Cargo.lock b/Cargo.lock index 78d3cc61..89583507 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -92,12 +92,6 @@ version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - [[package]] name = "android_system_properties" version = "0.1.5" @@ -109,9 +103,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.98" +version = "1.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" +checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" [[package]] name = "anymap3" @@ -206,9 +200,9 @@ dependencies = [ [[package]] name = "bitflags" -version = "2.9.1" +version = "2.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" +checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" [[package]] name = "bitmaps" @@ -280,18 +274,19 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.31" +version = "1.2.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3a42d84bb6b69d3a8b3eaacf0d88f179e1929695e1ad012b6cf64d9caaa5fd2" +checksum = "80f41ae168f955c12fb8960b057d70d0ca153fb83182b57d86380443527be7e9" dependencies = [ + "find-msvc-tools", "shlex", ] [[package]] name = "cfg-if" -version = "1.0.1" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" +checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9" [[package]] name = "chardetng" @@ -306,14 +301,13 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.41" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" +checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" dependencies = [ - "android-tzdata", "iana-time-zone", "num-traits", - "windows-link", + "windows-link 0.2.0", ] [[package]] @@ -376,9 +370,12 @@ dependencies = [ [[package]] name = "const_panic" -version = "0.2.13" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98d1483e98c9d67f341ab4b3915cfdc54740bd6f5cccc9226ee0535d86aa8fb" +checksum = "e262cdaac42494e3ae34c43969f9cdeb7da178bdb4b66fa6a1ea2edb4c8ae652" +dependencies = [ + "typewit", +] [[package]] name = "content_inspector" @@ -404,7 +401,7 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "980c2afde4af43d6a05c5be738f9eae595cff86dce1f38f88b95058a98c027f3" dependencies = [ - "crossterm 0.29.0", + "crossterm", ] [[package]] @@ -415,18 +412,18 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "core_extensions" -version = "1.5.3" +version = "1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92c71dc07c9721607e7a16108336048ee978c3a8b129294534272e8bac96c0ee" +checksum = "42bb5e5d0269fd4f739ea6cedaf29c16d81c27a7ce7582008e90eb50dcd57003" dependencies = [ "core_extensions_proc_macros", ] [[package]] name = "core_extensions_proc_macros" -version = "1.5.3" +version = "1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69f3b219d28b6e3b4ac87bc1fc522e0803ab22e055da177bff0068c4150c61a6" +checksum = "533d38ecd2709b7608fb8e18e4504deb99e9a72879e6aa66373a76d8dc4259ea" [[package]] name = "cpufeatures" @@ -448,12 +445,12 @@ dependencies = [ [[package]] name = "crokey" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5282b45c96c5978c8723ea83385cb9a488b64b7d175733f48d07bf9da514a863" +checksum = "51360853ebbeb3df20c76c82aecf43d387a62860f1a59ba65ab51f00eea85aad" dependencies = [ "crokey-proc_macros", - "crossterm 0.29.0", + "crossterm", "once_cell", "serde", "strict", @@ -461,15 +458,15 @@ dependencies = [ [[package]] name = "crokey-proc_macros" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ea0218d3fedf0797fa55676f1964ef5d27103d41ed0281b4bbd2a6e6c3d8d28" +checksum = "3bf1a727caeb5ee5e0a0826a97f205a9cf84ee964b0b48239fef5214a00ae439" dependencies = [ - "crossterm 0.29.0", + "crossterm", "proc-macro2", "quote", "strict", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -528,25 +525,6 @@ version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" -[[package]] -name = "crossterm" -version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6" -dependencies = [ - "bitflags", - "crossterm_winapi", - "filedescriptor", - "futures-core", - "libc", - "mio", - "parking_lot", - "rustix 0.38.44", - "signal-hook", - "signal-hook-mio", - "winapi", -] - [[package]] name = "crossterm" version = "0.29.0" @@ -559,7 +537,7 @@ dependencies = [ "document-features", "mio", "parking_lot", - "rustix 1.0.8", + "rustix", "signal-hook", "signal-hook-mio", "winapi", @@ -616,7 +594,7 @@ dependencies = [ "convert_case", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -637,7 +615,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -693,12 +671,12 @@ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "errno" -version = "0.3.13" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.60.2", + "windows-sys 0.61.0", ] [[package]] @@ -743,29 +721,24 @@ dependencies = [ "log", ] -[[package]] -name = "filedescriptor" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e40758ed24c9b2eeb76c35fb0aebc66c626084edd827e07e1552279814c6682d" -dependencies = [ - "libc", - "thiserror 1.0.69", - "winapi", -] - [[package]] name = "filetime" -version = "0.2.25" +version = "0.2.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" +checksum = "bc0505cd1b6fa6580283f6bdf70a73fcf4aba1184038c90902b92b3dd0df63ed" dependencies = [ "cfg-if", "libc", "libredox", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] +[[package]] +name = "find-msvc-tools" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ced73b1dacfc750a6db6c0a0c3a3853c8b41997e2e2c563dc90804ae6867959" + [[package]] name = "flate2" version = "1.1.2" @@ -789,11 +762,17 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + [[package]] name = "form_urlencoded" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" dependencies = [ "percent-encoding", ] @@ -823,7 +802,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -906,7 +885,7 @@ dependencies = [ "js-sys", "libc", "r-efi", - "wasi 0.14.2+wasi-0.2.4", + "wasi 0.14.7+wasi-0.2.4", "wasm-bindgen", ] @@ -963,20 +942,20 @@ dependencies = [ "gix-worktree", "once_cell", "smallvec", - "thiserror 2.0.12", + "thiserror", ] [[package]] name = "gix-actor" -version = "0.35.2" +version = "0.35.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58ebbb8f41071c7cf318a0b1db667c34e1df49db7bf387d282a4e61a3b97882c" +checksum = "2d36dcf9efe32b51b12dfa33cedff8414926124e760a32f9e7a6b5580d280967" dependencies = [ "bstr", "gix-date", "gix-utils", "itoa", - "thiserror 2.0.12", + "thiserror", "winnow", ] @@ -993,7 +972,7 @@ dependencies = [ "gix-trace", "kstring", "smallvec", - "thiserror 2.0.12", + "thiserror", "unicode-bom", ] @@ -1003,7 +982,7 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1db9765c69502650da68f0804e3dc2b5f8ccc6a2d104ca6c85bc40700d37540" dependencies = [ - "thiserror 2.0.12", + "thiserror", ] [[package]] @@ -1012,7 +991,7 @@ version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b1f1d8764958699dc764e3f727cef280ff4d1bd92c107bbf8acd85b30c1bd6f" dependencies = [ - "thiserror 2.0.12", + "thiserror", ] [[package]] @@ -1038,7 +1017,7 @@ dependencies = [ "gix-chunk", "gix-hash", "memmap2", - "thiserror 2.0.12", + "thiserror", ] [[package]] @@ -1057,7 +1036,7 @@ dependencies = [ "memchr", "once_cell", "smallvec", - "thiserror 2.0.12", + "thiserror", "unicode-bom", "winnow", ] @@ -1072,20 +1051,20 @@ dependencies = [ "bstr", "gix-path", "libc", - "thiserror 2.0.12", + "thiserror", ] [[package]] name = "gix-date" -version = "0.10.3" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7235bdf4d9d54a6901928e3a37f91c16f419e6957f520ed929c3d292b84226e" +checksum = "996b6b90bafb287330af92b274c3e64309dc78359221d8612d11cd10c8b9fe1c" dependencies = [ "bstr", "itoa", "jiff", "smallvec", - "thiserror 2.0.12", + "thiserror", ] [[package]] @@ -1109,7 +1088,7 @@ dependencies = [ "gix-traverse", "gix-worktree", "imara-diff 0.1.8", - "thiserror 2.0.12", + "thiserror", ] [[package]] @@ -1129,7 +1108,7 @@ dependencies = [ "gix-trace", "gix-utils", "gix-worktree", - "thiserror 2.0.12", + "thiserror", ] [[package]] @@ -1145,14 +1124,14 @@ dependencies = [ "gix-path", "gix-ref", "gix-sec", - "thiserror 2.0.12", + "thiserror", ] [[package]] name = "gix-features" -version = "0.43.0" +version = "0.43.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a92748623c201568785ee69a561f4eec06f745b4fac67dab1d44ca9891a57ee" +checksum = "cd1543cd9b8abcbcebaa1a666a5c168ee2cda4dea50d3961ee0e6d1c42f81e5b" dependencies = [ "crc32fast", "flate2", @@ -1162,7 +1141,7 @@ dependencies = [ "libc", "once_cell", "prodash", - "thiserror 2.0.12", + "thiserror", "walkdir", ] @@ -1184,21 +1163,21 @@ dependencies = [ "gix-trace", "gix-utils", "smallvec", - "thiserror 2.0.12", + "thiserror", ] [[package]] name = "gix-fs" -version = "0.16.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d793f71e955d18f228d20ec433dcce6d0e8577efcdfd11d72d09d7cc2758dfd1" +checksum = "9a4d90307d064fa7230e0f87b03231be28f8ba63b913fc15346f489519d0c304" dependencies = [ "bstr", "fastrand", "gix-features", "gix-path", "gix-utils", - "thiserror 2.0.12", + "thiserror", ] [[package]] @@ -1222,7 +1201,7 @@ dependencies = [ "faster-hex", "gix-features", "sha1-checked", - "thiserror 2.0.12", + "thiserror", ] [[package]] @@ -1232,7 +1211,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c35300b54896153e55d53f4180460931ccd69b7e8d2f6b9d6401122cdedc4f07" dependencies = [ "gix-hash", - "hashbrown 0.15.4", + "hashbrown 0.15.5", "parking_lot", ] @@ -1268,13 +1247,13 @@ dependencies = [ "gix-traverse", "gix-utils", "gix-validate", - "hashbrown 0.15.4", + "hashbrown 0.15.5", "itoa", "libc", "memmap2", - "rustix 1.0.8", + "rustix", "smallvec", - "thiserror 2.0.12", + "thiserror", ] [[package]] @@ -1285,14 +1264,14 @@ checksum = "b9fa71da90365668a621e184eb5b979904471af1b3b09b943a84bc50e8ad42ed" dependencies = [ "gix-tempfile", "gix-utils", - "thiserror 2.0.12", + "thiserror", ] [[package]] name = "gix-object" -version = "0.50.0" +version = "0.50.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49664e3e212bc34f7060f5738ce7022247e4afd959b68a4f666b1fd29c00b23c" +checksum = "d69ce108ab67b65fbd4fb7e1331502429d78baeb2eee10008bdef55765397c07" dependencies = [ "bstr", "gix-actor", @@ -1305,7 +1284,7 @@ dependencies = [ "gix-validate", "itoa", "smallvec", - "thiserror 2.0.12", + "thiserror", "winnow", ] @@ -1327,7 +1306,7 @@ dependencies = [ "gix-quote", "parking_lot", "tempfile", - "thiserror 2.0.12", + "thiserror", ] [[package]] @@ -1345,7 +1324,7 @@ dependencies = [ "gix-path", "memmap2", "smallvec", - "thiserror 2.0.12", + "thiserror", ] [[package]] @@ -1357,7 +1336,7 @@ dependencies = [ "bstr", "faster-hex", "gix-trace", - "thiserror 2.0.12", + "thiserror", ] [[package]] @@ -1369,21 +1348,21 @@ dependencies = [ "bstr", "faster-hex", "gix-trace", - "thiserror 2.0.12", + "thiserror", ] [[package]] name = "gix-path" -version = "0.10.19" +version = "0.10.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6279d323d925ad4790602105ae27df4b915e7a7d81e4cdba2603121c03ad111" +checksum = "06d37034a4c67bbdda76f7bcd037b2f7bc0fba0c09a6662b19697a5716e7b2fd" dependencies = [ "bstr", "gix-trace", "gix-validate", "home", "once_cell", - "thiserror 2.0.12", + "thiserror", ] [[package]] @@ -1398,7 +1377,7 @@ dependencies = [ "gix-config-value", "gix-glob", "gix-path", - "thiserror 2.0.12", + "thiserror", ] [[package]] @@ -1416,7 +1395,7 @@ dependencies = [ "gix-transport", "gix-utils", "maybe-async", - "thiserror 2.0.12", + "thiserror", "winnow", ] @@ -1428,14 +1407,14 @@ checksum = "4a375a75b4d663e8bafe3bf4940a18a23755644c13582fa326e99f8f987d83fd" dependencies = [ "bstr", "gix-utils", - "thiserror 2.0.12", + "thiserror", ] [[package]] name = "gix-ref" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b7a23209d4e4cbdc2086d294f5f3f8707ac6286768847024d952d8cd3278c5b" +checksum = "b966f578079a42f4a51413b17bce476544cca1cf605753466669082f94721758" dependencies = [ "gix-actor", "gix-features", @@ -1448,7 +1427,7 @@ dependencies = [ "gix-utils", "gix-validate", "memmap2", - "thiserror 2.0.12", + "thiserror", "winnow", ] @@ -1463,7 +1442,7 @@ dependencies = [ "gix-revision", "gix-validate", "smallvec", - "thiserror 2.0.12", + "thiserror", ] [[package]] @@ -1478,7 +1457,7 @@ dependencies = [ "gix-hash", "gix-object", "gix-revwalk", - "thiserror 2.0.12", + "thiserror", ] [[package]] @@ -1493,7 +1472,7 @@ dependencies = [ "gix-hashtable", "gix-object", "smallvec", - "thiserror 2.0.12", + "thiserror", ] [[package]] @@ -1517,7 +1496,7 @@ dependencies = [ "bstr", "gix-hash", "gix-lock", - "thiserror 2.0.12", + "thiserror", ] [[package]] @@ -1540,7 +1519,7 @@ dependencies = [ "gix-pathspec", "gix-worktree", "portable-atomic", - "thiserror 2.0.12", + "thiserror", ] [[package]] @@ -1555,7 +1534,7 @@ dependencies = [ "gix-pathspec", "gix-refspec", "gix-url", - "thiserror 2.0.12", + "thiserror", ] [[package]] @@ -1591,7 +1570,7 @@ dependencies = [ "gix-quote", "gix-sec", "gix-url", - "thiserror 2.0.12", + "thiserror", ] [[package]] @@ -1608,7 +1587,7 @@ dependencies = [ "gix-object", "gix-revwalk", "smallvec", - "thiserror 2.0.12", + "thiserror", ] [[package]] @@ -1621,7 +1600,7 @@ dependencies = [ "gix-features", "gix-path", "percent-encoding", - "thiserror 2.0.12", + "thiserror", "url", ] @@ -1643,7 +1622,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77b9e00cacde5b51388d28ed746c493b18a6add1f19b5e01d686b3b9ece66d4d" dependencies = [ "bstr", - "thiserror 2.0.12", + "thiserror", ] [[package]] @@ -1667,9 +1646,9 @@ dependencies = [ [[package]] name = "glob" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" [[package]] name = "globset" @@ -1749,13 +1728,24 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.4" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash 0.1.5", +] + +[[package]] +name = "hashbrown" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" +checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" dependencies = [ "allocator-api2", "equivalent", - "foldhash", + "foldhash 0.2.0", ] [[package]] @@ -1777,7 +1767,7 @@ dependencies = [ "bitflags", "chrono", "encoding_rs", - "foldhash", + "foldhash 0.2.0", "globset", "helix-loader", "helix-parsec", @@ -1821,7 +1811,7 @@ dependencies = [ "serde", "serde_json", "slotmap", - "thiserror 2.0.12", + "thiserror", "tokio", "tokio-stream", ] @@ -1831,9 +1821,9 @@ name = "helix-event" version = "25.7.1" dependencies = [ "anyhow", - "foldhash", + "foldhash 0.2.0", "futures-executor", - "hashbrown 0.15.4", + "hashbrown 0.16.0", "log", "once_cell", "parking_lot", @@ -1875,7 +1865,7 @@ dependencies = [ "serde", "serde_json", "slotmap", - "thiserror 2.0.12", + "thiserror", "tokio", "tokio-stream", ] @@ -1905,11 +1895,11 @@ dependencies = [ "regex-automata", "regex-cursor", "ropey", - "rustix 1.0.8", + "rustix", "tempfile", "unicode-segmentation", "which", - "windows-sys 0.60.2", + "windows-sys 0.61.0", ] [[package]] @@ -1920,7 +1910,6 @@ dependencies = [ "arc-swap", "chrono", "content_inspector", - "crossterm 0.28.1", "dashmap", "fern", "futures-util", @@ -1937,7 +1926,7 @@ dependencies = [ "helix-vcs", "helix-view", "ignore", - "indexmap 2.10.0", + "indexmap 2.11.4", "indoc", "libc", "log", @@ -1954,8 +1943,9 @@ dependencies = [ "steel-core", "steel-doc", "tempfile", + "termina", "termini", - "thiserror 2.0.12", + "thiserror", "tokio", "tokio-stream", "toml", @@ -1968,12 +1958,12 @@ version = "25.7.1" dependencies = [ "bitflags", "cassowary", - "crossterm 0.28.1", "helix-core", "helix-view", "log", "once_cell", "steel-core", + "termina", "termini", "unicode-segmentation", ] @@ -2003,7 +1993,6 @@ dependencies = [ "bitflags", "chardetng", "clipboard-win", - "crossterm 0.28.1", "futures-util", "helix-core", "helix-dap", @@ -2018,13 +2007,14 @@ dependencies = [ "log", "once_cell", "parking_lot", - "rustix 1.0.8", + "rustix", "serde", "serde_json", "slotmap", "steel-core", "tempfile", - "thiserror 2.0.12", + "termina", + "thiserror", "tokio", "tokio-stream", "toml", @@ -2054,9 +2044,9 @@ checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" [[package]] name = "iana-time-zone" -version = "0.1.63" +version = "0.1.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" +checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -2076,6 +2066,29 @@ dependencies = [ "cc", ] +[[package]] +name = "icu_casemap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dc5e74b3c9d7b63e0d7c5fd54ee8c135705df2ea2aa558082dd555dc9747a97" +dependencies = [ + "displaydoc", + "icu_casemap_data", + "icu_collections", + "icu_locale_core", + "icu_properties", + "icu_provider", + "potential_utf", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_casemap_data" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7584067558ab4c60c95d1ac2abd1588689cb4bcd4e099507f62dae86ae8d2c0" + [[package]] name = "icu_collections" version = "2.0.0" @@ -2164,9 +2177,9 @@ dependencies = [ [[package]] name = "idna" -version = "1.0.3" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" dependencies = [ "idna_adapter", "smallvec", @@ -2245,7 +2258,7 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17d34b7d42178945f775e84bc4c36dde7c1c6cdfea656d3354d009056f2bb3d2" dependencies = [ - "hashbrown 0.15.4", + "hashbrown 0.15.5", ] [[package]] @@ -2254,15 +2267,15 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f01d462f766df78ab820dd06f5eb700233c51f0f4c2e846520eaf4ba6aa5c5c" dependencies = [ - "hashbrown 0.15.4", + "hashbrown 0.15.5", "memchr", ] [[package]] name = "imbl" -version = "6.0.0" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33afdc5d333c1a43f1f640bfc6ad3788729e5b2f18472e5d33a9187315257f8e" +checksum = "0fade8ae6828627ad1fa094a891eccfb25150b383047190a3648d66d06186501" dependencies = [ "archery", "bitmaps 3.2.1", @@ -2294,12 +2307,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.10.0" +version = "2.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" +checksum = "4b0f83760fb341a774ed326568e19f5a863af4a952def8c39f9ab92fd95b88e5" dependencies = [ "equivalent", - "hashbrown 0.15.4", + "hashbrown 0.16.0", ] [[package]] @@ -2310,9 +2323,9 @@ checksum = "f4c7245a08504955605670dbf141fceab975f15ca21570696aebe9d2e71576bd" [[package]] name = "io-uring" -version = "0.7.9" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4" +checksum = "046fa2d4d00aea763528b4950358d0ead425372445dc8ff86312b3c69ff7727b" dependencies = [ "bitflags", "cfg-if", @@ -2367,7 +2380,7 @@ checksum = "03343451ff899767262ec32146f6d559dd759fdadf42ff0e227c7c48f72594b4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -2387,9 +2400,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.77" +version = "0.3.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" +checksum = "852f13bec5eba4ba9afbeb93fd7c13fe56147f055939ae21c43a29a0ecb2702e" dependencies = [ "once_cell", "wasm-bindgen", @@ -2436,7 +2449,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -2447,9 +2460,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.174" +version = "0.2.175" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" +checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" [[package]] name = "libloading" @@ -2479,9 +2492,9 @@ checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" [[package]] name = "libredox" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "391290121bad3d37fbddad76d8f5d1c1c314cfc646d143d7e07a3086ddff0ce3" +checksum = "416f7e718bdb06000964960ffa43b4335ad4012ae8b99060261aa4a8088d5ccb" dependencies = [ "bitflags", "libc", @@ -2490,24 +2503,18 @@ dependencies = [ [[package]] name = "libz-rs-sys" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "172a788537a2221661b480fee8dc5f96c580eb34fa88764d3205dc356c7e4221" +checksum = "840db8cf39d9ec4dd794376f38acc40d0fc65eec2a8f484f7fd375b84602becd" dependencies = [ "zlib-rs", ] [[package]] name = "linux-raw-sys" -version = "0.4.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" - -[[package]] -name = "linux-raw-sys" -version = "0.9.4" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" +checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" [[package]] name = "litemap" @@ -2533,9 +2540,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.27" +version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" +checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" [[package]] name = "maybe-async" @@ -2545,7 +2552,7 @@ checksum = "5cf92c10c7e361d6b99666ec1c6f9805b0bea2c3bd8c78dc6fe98ac5bd78db11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -2566,9 +2573,9 @@ checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" [[package]] name = "memmap2" -version = "0.9.7" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "483758ad303d734cec05e5c12b41d7e93e6a6390c5e9dae6bdeb7c1259012d28" +checksum = "843a98750cd611cc2965a8213b53b43e715f13c37a9e096c6408e69990961db7" dependencies = [ "libc", ] @@ -2737,9 +2744,9 @@ checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" [[package]] name = "percent-encoding" -version = "2.3.1" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "pin-project-lite" @@ -2755,16 +2762,16 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "polling" -version = "3.10.0" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5bd19146350fe804f7cb2669c851c03d69da628803dab0d98018142aaa5d829" +checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" dependencies = [ "cfg-if", "concurrent-queue", "hermit-abi", "pin-project-lite", - "rustix 1.0.8", - "windows-sys 0.60.2", + "rustix", + "windows-sys 0.61.0", ] [[package]] @@ -2784,10 +2791,11 @@ dependencies = [ [[package]] name = "potential_utf" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5a7c30837279ca13e7c867e9e40053bc68740f988cb07f7ca6df43cc734b585" +checksum = "84df19adbe5b5a0782edcab45899906947ab039ccf4573713735ee7de1e6b08a" dependencies = [ + "serde", "zerovec", ] @@ -2813,9 +2821,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.95" +version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" +checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" dependencies = [ "unicode-ident", ] @@ -2950,9 +2958,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f" dependencies = [ "either", "rayon-core", @@ -2960,9 +2968,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.12.1" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" dependencies = [ "crossbeam-deque", "crossbeam-utils", @@ -2979,9 +2987,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.11.1" +version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +checksum = "23d7fd106d8c02486a8d64e778353d1cffe08ce79ac2e82f540c86d0facf6912" dependencies = [ "aho-corasick", "memchr", @@ -2991,9 +2999,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +checksum = "6b9458fa0bfeeac22b5ca447c63aaf45f28439a709ccd244698632f9aa6394d6" dependencies = [ "aho-corasick", "memchr", @@ -3015,9 +3023,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001" [[package]] name = "repr_offset" @@ -3055,35 +3063,22 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" -dependencies = [ - "bitflags", - "errno", - "libc", - "linux-raw-sys 0.4.15", - "windows-sys 0.59.0", -] - -[[package]] -name = "rustix" -version = "1.0.8" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" +checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" dependencies = [ "bitflags", "errno", "libc", - "linux-raw-sys 0.9.4", - "windows-sys 0.60.2", + "linux-raw-sys", + "windows-sys 0.61.0", ] [[package]] name = "rustversion" -version = "1.0.21" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "ryu" @@ -3108,49 +3103,60 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "semver" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" [[package]] name = "serde" -version = "1.0.219" +version = "1.0.225" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd6c24dee235d0da097043389623fb913daddf92c76e9f5a1db88607a0bcbd1d" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.225" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +checksum = "659356f9a0cb1e529b24c01e43ad2bdf520ec4ceaf83047b83ddcc2251f96383" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.219" +version = "1.0.225" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +checksum = "0ea936adf78b1f766949a4977b91d2f5595825bd6ec079aa9543ad2685fc4516" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] name = "serde_json" -version = "1.0.142" +version = "1.0.145" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "030fedb782600dcbd6f02d479bf0d817ac3bb40d644745b769d6a96bc3afc5a7" +checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" dependencies = [ "itoa", "memchr", "ryu", "serde", + "serde_core", ] [[package]] name = "serde_spanned" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40734c41988f7306bb04f0ecf60ec0f3f1caa34290e4e8ea471dcd3346483b83" +checksum = "5417783452c2be558477e104686f7de5dae53dba813c28435e0e70f82d9b04ee" dependencies = [ - "serde", + "serde_core", ] [[package]] @@ -3218,9 +3224,9 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.5" +version = "1.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9203b8055f63a2a00e2f593bb0510367fe707d7ff1e5c872de2f537b339e5410" +checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b" dependencies = [ "libc", ] @@ -3249,9 +3255,9 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04dc19736151f35336d325007ac991178d504a119863a2fcb3758cdb5e52c50d" +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" [[package]] name = "slotmap" @@ -3323,7 +3329,7 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "steel-core" version = "0.7.0" -source = "git+https://github.com/mattwparas/steel.git#385ef2af9284cc5762317b4c8beccffde27326a2" +source = "git+https://github.com/mattwparas/steel.git#413c3672ad9ec5f70abc369c11a6cef69d159c7b" dependencies = [ "abi_stable", "anyhow", @@ -3345,6 +3351,7 @@ dependencies = [ "getrandom 0.3.3", "glob", "httparse", + "icu_casemap", "im", "im-lists", "im-rc", @@ -3380,17 +3387,17 @@ dependencies = [ [[package]] name = "steel-derive" version = "0.6.0" -source = "git+https://github.com/mattwparas/steel.git#385ef2af9284cc5762317b4c8beccffde27326a2" +source = "git+https://github.com/mattwparas/steel.git#413c3672ad9ec5f70abc369c11a6cef69d159c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] name = "steel-doc" version = "0.7.0" -source = "git+https://github.com/mattwparas/steel.git#385ef2af9284cc5762317b4c8beccffde27326a2" +source = "git+https://github.com/mattwparas/steel.git#413c3672ad9ec5f70abc369c11a6cef69d159c7b" dependencies = [ "steel-core", ] @@ -3398,7 +3405,7 @@ dependencies = [ [[package]] name = "steel-gen" version = "0.3.0" -source = "git+https://github.com/mattwparas/steel.git#385ef2af9284cc5762317b4c8beccffde27326a2" +source = "git+https://github.com/mattwparas/steel.git#413c3672ad9ec5f70abc369c11a6cef69d159c7b" dependencies = [ "codegen", "serde", @@ -3407,7 +3414,7 @@ dependencies = [ [[package]] name = "steel-parser" version = "0.7.0" -source = "git+https://github.com/mattwparas/steel.git#385ef2af9284cc5762317b4c8beccffde27326a2" +source = "git+https://github.com/mattwparas/steel.git#413c3672ad9ec5f70abc369c11a6cef69d159c7b" dependencies = [ "compact_str", "fxhash", @@ -3452,9 +3459,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.104" +version = "2.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" +checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" dependencies = [ "proc-macro2", "quote", @@ -3469,20 +3476,20 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] name = "tempfile" -version = "3.20.0" +version = "3.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" +checksum = "84fa4d11fadde498443cca10fd3ac23c951f0dc59e080e9f4b93d4df4e4eea53" dependencies = [ "fastrand", "getrandom 0.3.3", "once_cell", - "rustix 1.0.8", - "windows-sys 0.59.0", + "rustix", + "windows-sys 0.61.0", ] [[package]] @@ -3506,10 +3513,24 @@ dependencies = [ "lazy-regex", "minimad", "serde", - "thiserror 2.0.12", + "thiserror", "unicode-width 0.1.12", ] +[[package]] +name = "termina" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b9a48a479fe84f486d932a2e0c549b4d48ed3d57a20f18a3e61199c75a05ecf" +dependencies = [ + "bitflags", + "futures-core", + "parking_lot", + "rustix", + "signal-hook", + "windows-sys 0.61.0", +] + [[package]] name = "termini" version = "1.0.0" @@ -3532,42 +3553,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" -dependencies = [ - "thiserror-impl 1.0.69", -] - -[[package]] -name = "thiserror" -version = "2.0.12" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +checksum = "3467d614147380f2e4e374161426ff399c91084acd2363eaf549172b3d5e60c0" dependencies = [ - "thiserror-impl 2.0.12", + "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.69" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +checksum = "6c5e1be1c48b9172ee610da68fd9cd2770e7a4056cb3fc98710ee6906f0c7960" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", -] - -[[package]] -name = "thiserror-impl" -version = "2.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -3591,9 +3592,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71" +checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa" dependencies = [ "tinyvec_macros", ] @@ -3632,7 +3633,7 @@ checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -3648,12 +3649,12 @@ dependencies = [ [[package]] name = "toml" -version = "0.9.4" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41ae868b5a0f67631c14589f7e250c1ea2c574ee5ba21c6c8dd4b1485705a5a1" +checksum = "00e5e5d9bf2475ac9d4f0d9edab68cc573dc2fd644b0dba36b0c30a92dd9eaa0" dependencies = [ - "indexmap 2.10.0", - "serde", + "indexmap 2.11.4", + "serde_core", "serde_spanned", "toml_datetime", "toml_parser", @@ -3663,27 +3664,27 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bade1c3e902f58d73d3f294cd7f20391c1cb2fbcb643b73566bc773971df91e3" +checksum = "32f1085dec27c2b6632b04c80b3bb1b4300d6495d1e129693bdda7d91e72eec1" dependencies = [ - "serde", + "serde_core", ] [[package]] name = "toml_parser" -version = "1.0.1" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97200572db069e74c512a14117b296ba0a80a30123fbbb5aa1f4a348f639ca30" +checksum = "4cf893c33be71572e0e9aa6dd15e6677937abd686b066eac3f8cd3531688a627" dependencies = [ "winnow", ] [[package]] name = "toml_writer" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc842091f2def52017664b53082ecbbeb5c7731092bad69d2c63050401dfd64" +checksum = "d163a63c116ce562a22cda521fcc4d79152e7aba014456fb5eb442f6d6a10109" [[package]] name = "tree-house" @@ -3692,7 +3693,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d00ea55222392f171ae004dd13b62edd09d995633abf0c13406a8df3547fb999" dependencies = [ "arc-swap", - "hashbrown 0.15.4", + "hashbrown 0.15.5", "kstring", "once_cell", "regex", @@ -3704,15 +3705,15 @@ dependencies = [ [[package]] name = "tree-house-bindings" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f1646788fe0afdbf8e191b5d0f558df7333d8857665a67053c532ec811e6086" +checksum = "f24f037be888a6ea5521046288c126aa700ade79e9fe7c74cdef79207281c20b" dependencies = [ "cc", "libloading 0.8.8", "regex-cursor", "ropey", - "thiserror 2.0.12", + "thiserror", ] [[package]] @@ -3752,6 +3753,12 @@ version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" +[[package]] +name = "typewit" +version = "1.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8c1ae7cc0fdb8b842d65d127cb981574b0d2b249b74d1c7a2986863dc134f71" + [[package]] name = "unicase" version = "2.8.1" @@ -3766,15 +3773,15 @@ checksum = "7eec5d1121208364f6793f7d2e222bf75a915c19557537745b195b253dd64217" [[package]] name = "unicode-general-category" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24adfe8311434967077a6adff125729161e6e4934d76f6b7c55318ac5c9246d3" +checksum = "0b993bddc193ae5bd0d623b49ec06ac3e9312875fdae725a975c51db1cc1677f" [[package]] name = "unicode-ident" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" +checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d" [[package]] name = "unicode-linebreak" @@ -3811,9 +3818,9 @@ checksum = "4a1a07cc7db3810833284e8d372ccdc6da29741639ecc70c9ec107df0fa6154c" [[package]] name = "url" -version = "2.5.4" +version = "2.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" +checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" dependencies = [ "form_urlencoded", "idna", @@ -3851,44 +3858,54 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasi" -version = "0.14.2+wasi-0.2.4" +version = "0.14.7+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +checksum = "883478de20367e224c0090af9cf5f9fa85bed63a95c1abf3afc5c083ebc06e8c" dependencies = [ - "wit-bindgen-rt", + "wasip2", +] + +[[package]] +name = "wasip2" +version = "1.0.1+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" +dependencies = [ + "wit-bindgen", ] [[package]] name = "wasm-bindgen" -version = "0.2.100" +version = "0.2.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" +checksum = "ab10a69fbd0a177f5f649ad4d8d3305499c42bab9aef2f7ff592d0ec8f833819" dependencies = [ "cfg-if", "once_cell", "rustversion", "wasm-bindgen-macro", + "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.100" +version = "0.2.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" +checksum = "0bb702423545a6007bbc368fde243ba47ca275e549c8a28617f56f6ba53b1d1c" dependencies = [ "bumpalo", "log", "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.100" +version = "0.2.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" +checksum = "fc65f4f411d91494355917b605e1480033152658d71f722a90647f56a70c88a0" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3896,22 +3913,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.100" +version = "0.2.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" +checksum = "ffc003a991398a8ee604a401e194b6b3a39677b3173d6e74495eb51b82e99a32" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.100" +version = "0.2.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +checksum = "293c37f4efa430ca14db3721dfbe48d8c33308096bd44d80ebaa775ab71ba1cf" dependencies = [ "unicode-ident", ] @@ -3929,7 +3946,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3fabb953106c3c8eea8306e4393700d7657561cb43122571b172bbfb7c7ba1d" dependencies = [ "env_home", - "rustix 1.0.8", + "rustix", "winsafe", ] @@ -3951,11 +3968,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.9" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.0", ] [[package]] @@ -3966,13 +3983,13 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-core" -version = "0.61.2" +version = "0.62.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" +checksum = "57fe7168f7de578d2d8a05b07fd61870d2e73b4020e9f49aa00da8471723497c" dependencies = [ "windows-implement", "windows-interface", - "windows-link", + "windows-link 0.2.0", "windows-result", "windows-strings", ] @@ -3985,7 +4002,7 @@ checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -3996,7 +4013,7 @@ checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -4005,22 +4022,28 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" +[[package]] +name = "windows-link" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45e46c0661abb7180e7b9c281db115305d49ca1709ab8242adf09666d2173c65" + [[package]] name = "windows-result" -version = "0.3.4" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +checksum = "7084dcc306f89883455a206237404d3eaf961e5bd7e0f312f7c91f57eb44167f" dependencies = [ - "windows-link", + "windows-link 0.2.0", ] [[package]] name = "windows-strings" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +checksum = "7218c655a553b0bed4426cf54b20d7ba363ef543b52d515b3e48d7fd55318dda" dependencies = [ - "windows-link", + "windows-link 0.2.0", ] [[package]] @@ -4041,6 +4064,15 @@ dependencies = [ "windows-targets 0.53.3", ] +[[package]] +name = "windows-sys" +version = "0.61.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e201184e40b2ede64bc2ea34968b28e33622acdbbf37104f0e4a33f7abe657aa" +dependencies = [ + "windows-link 0.2.0", +] + [[package]] name = "windows-targets" version = "0.52.6" @@ -4063,7 +4095,7 @@ version = "0.53.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" dependencies = [ - "windows-link", + "windows-link 0.1.3", "windows_aarch64_gnullvm 0.53.0", "windows_aarch64_msvc 0.53.0", "windows_i686_gnu 0.53.0", @@ -4172,9 +4204,9 @@ checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" [[package]] name = "winnow" -version = "0.7.12" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3edebf492c8125044983378ecb5766203ad3b4c2f7a922bd7dd207f6d443e95" +checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" dependencies = [ "memchr", ] @@ -4186,13 +4218,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" [[package]] -name = "wit-bindgen-rt" -version = "0.39.0" +name = "wit-bindgen" +version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" -dependencies = [ - "bitflags", -] +checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" [[package]] name = "writeable" @@ -4237,28 +4266,28 @@ checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", "synstructure", ] [[package]] name = "zerocopy" -version = "0.8.26" +version = "0.8.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1039dd0d3c310cf05de012d8a39ff557cb0d23087fd44cad61df08fc31907a2f" +checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.26" +version = "0.8.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" +checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] @@ -4278,7 +4307,7 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", "synstructure", ] @@ -4295,9 +4324,9 @@ dependencies = [ [[package]] name = "zerovec" -version = "0.11.2" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a05eb080e015ba39cc9e23bbe5e7fb04d5fb040350f99f34e338d5fdd294428" +checksum = "e7aa2bd55086f1ab526693ecbe444205da57e25f4489879da80635a46d90e73b" dependencies = [ "yoke", "zerofrom", @@ -4312,11 +4341,11 @@ checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.104", + "syn 2.0.106", ] [[package]] name = "zlib-rs" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "626bd9fa9734751fc50d6060752170984d7053f5a39061f524cda68023d4db8a" +checksum = "2f06ae92f42f5e5c42443fd094f245eb656abf56dd7cce9b8b263236565e00f2" diff --git a/Cargo.toml b/Cargo.toml index 5af96996..c760e8ea 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,16 +42,17 @@ nucleo = "0.5.0" slotmap = "1.0.7" steel-core = { git = "https://github.com/mattwparas/steel.git", version = "0.7.0", features = ["anyhow", "dylibs", "sync", "triomphe", "imbl"] } thiserror = "2.0" -tempfile = "3.20.0" +tempfile = "3.22.0" bitflags = "2.9" unicode-segmentation = "1.2" ropey = { version = "1.6.1", default-features = false, features = ["simd"] } -foldhash = "0.1" +foldhash = "0.2" parking_lot = "0.12" futures-executor = "0.3" futures-util = { version = "0.3", features = ["std", "async-await"], default-features = false } tokio-stream = "0.1.17" toml = "0.9" +termina = "0.1" [workspace.package] version = "25.7.1" diff --git a/book/src/building-from-source.md b/book/src/building-from-source.md index eb6df6d6..33038098 100644 --- a/book/src/building-from-source.md +++ b/book/src/building-from-source.md @@ -42,7 +42,7 @@ RUSTFLAGS="-C target-feature=-crt-static" # Optimized cargo install \ --profile opt \ - --config 'build.rustflags="-C target-cpu=native"' \ + --config 'build.rustflags=["-C", "target-cpu=native"]' \ --path helix-term \ --locked ``` diff --git a/book/src/editor.md b/book/src/editor.md index b5544a06..a9ea219b 100644 --- a/book/src/editor.md +++ b/book/src/editor.md @@ -61,9 +61,10 @@ | `indent-heuristic` | How the indentation for a newly inserted line is computed: `simple` just copies the indentation level from the previous line, `tree-sitter` computes the indentation based on the syntax tree and `hybrid` combines both approaches. If the chosen heuristic is not available, a different one will be used as a fallback (the fallback order being `hybrid` -> `tree-sitter` -> `simple`). | `hybrid` | `jump-label-alphabet` | The characters that are used to generate two character jump labels. Characters at the start of the alphabet are used first. | `"abcdefghijklmnopqrstuvwxyz"` | `end-of-line-diagnostics` | Minimum severity of diagnostics to render at the end of the line. Set to `disable` to disable entirely. Refer to the setting about `inline-diagnostics` for more details | `"hint"` -| `clipboard-provider` | Which API to use for clipboard interaction. One of `pasteboard` (MacOS), `wayland`, `x-clip`, `x-sel`, `win-32-yank`, `termux`, `tmux`, `windows`, `termcode`, `none`, or a custom command set. | Platform and environment specific. | +| `clipboard-provider` | Which API to use for clipboard interaction. One of `pasteboard` (MacOS), `wayland`, `x-clip`, `x-sel`, `win32-yank`, `termux`, `tmux`, `windows`, `termcode`, `none`, or a custom command set. | Platform and environment specific. | | `editor-config` | Whether to read settings from [EditorConfig](https://editorconfig.org) files | `true` | | `rainbow-brackets` | Whether to render rainbow colors for matching brackets. Requires tree-sitter `rainbows.scm` queries for the language. | `false` | +| `kitty-keyboard-protocol` | Whether to enable Kitty Keyboard Protocol. Can be `enabled`, `disabled` or `auto` | `auto` | ### `[editor.clipboard-provider]` Section diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md index 3c9e503a..068507fc 100644 --- a/book/src/generated/lang-support.md +++ b/book/src/generated/lang-support.md @@ -7,7 +7,7 @@ | amber | ✓ | | | | | `amber-lsp` | | astro | ✓ | | | | | `astro-ls` | | awk | ✓ | ✓ | | | | `awk-language-server` | -| bash | ✓ | ✓ | ✓ | | ✓ | `bash-language-server` | +| bash | ✓ | ✓ | ✓ | ✓ | ✓ | `bash-language-server` | | bass | ✓ | | | | | `bass` | | beancount | ✓ | | | | | `beancount-language-server` | | bibtex | ✓ | | | | | `texlab` | @@ -31,11 +31,13 @@ | common-lisp | ✓ | | ✓ | | ✓ | `cl-lsp` | | cpon | ✓ | | ✓ | | | | | cpp | ✓ | ✓ | ✓ | ✓ | ✓ | `clangd` | +| cross-config | ✓ | ✓ | | | ✓ | `taplo`, `tombi` | | crystal | ✓ | ✓ | ✓ | ✓ | | `crystalline`, `ameba-ls` | | css | ✓ | | ✓ | | ✓ | `vscode-css-language-server` | | csv | ✓ | | | | | | | cue | ✓ | | | | | `cuelsp` | | cylc | ✓ | ✓ | ✓ | | | | +| cython | ✓ | | ✓ | ✓ | | | | d | ✓ | ✓ | ✓ | | | `serve-d` | | dart | ✓ | ✓ | ✓ | | | `dart` | | dbml | ✓ | | | | | | @@ -44,9 +46,11 @@ | dhall | ✓ | ✓ | | | | `dhall-lsp-server` | | diff | ✓ | | | | | | | djot | ✓ | | | | | | -| docker-compose | ✓ | ✓ | ✓ | | | `docker-compose-langserver`, `yaml-language-server` | -| dockerfile | ✓ | ✓ | | | | `docker-langserver` | +| docker-bake | ✓ | ✓ | ✓ | ✓ | ✓ | `docker-language-server` | +| docker-compose | ✓ | ✓ | ✓ | | | `docker-compose-langserver`, `yaml-language-server`, `docker-language-server` | +| dockerfile | ✓ | ✓ | | | | `docker-langserver`, `docker-language-server` | | dot | ✓ | | | | | `dot-language-server` | +| doxyfile | ✓ | ✓ | ✓ | ✓ | | | | dtd | ✓ | | | | | | | dune | ✓ | | | | | | | dunstrc | ✓ | | | | | | @@ -55,7 +59,7 @@ | eex | ✓ | | | | | | | ejs | ✓ | | | | | | | elisp | ✓ | | | ✓ | | | -| elixir | ✓ | ✓ | ✓ | ✓ | ✓ | `elixir-ls` | +| elixir | ✓ | ✓ | ✓ | ✓ | ✓ | `elixir-ls`, `expert` | | elm | ✓ | ✓ | | ✓ | | `elm-language-server` | | elvish | ✓ | | | | | `elvish` | | env | ✓ | ✓ | | | | | @@ -66,6 +70,7 @@ | fga | ✓ | ✓ | ✓ | | | | | fidl | ✓ | | | | | | | fish | ✓ | ✓ | ✓ | | | `fish-lsp` | +| flatbuffers | ✓ | | | | | | | forth | ✓ | | | | | `forth-lsp` | | fortran | ✓ | | ✓ | | | `fortls` | | fsharp | ✓ | | | | | `fsautocomplete` | @@ -75,18 +80,20 @@ | gherkin | ✓ | | | | | | | ghostty | ✓ | | | | | | | git-attributes | ✓ | | | | | | +| git-cliff-config | ✓ | ✓ | | | ✓ | `taplo`, `tombi` | | git-commit | ✓ | ✓ | | | | | | git-config | ✓ | ✓ | | | | | | git-ignore | ✓ | | | | | | | git-notes | ✓ | | | | | | | git-rebase | ✓ | | | | | | +| gitlab-ci | ✓ | ✓ | ✓ | ✓ | ✓ | `yaml-language-server`, `gitlab-ci-ls` | | gjs | ✓ | ✓ | ✓ | ✓ | | `typescript-language-server`, `vscode-eslint-language-server`, `ember-language-server` | | gleam | ✓ | ✓ | | | ✓ | `gleam` | | glimmer | ✓ | | | | | `ember-language-server` | | glsl | ✓ | ✓ | ✓ | | | `glsl_analyzer` | | gn | ✓ | | | | | | | go | ✓ | ✓ | ✓ | ✓ | ✓ | `gopls`, `golangci-lint-langserver` | -| go-format-string | ✓ | | | | | | +| go-format-string | ✓ | | | | ✓ | | | godot-resource | ✓ | ✓ | | | | | | gomod | ✓ | | | | | `gopls` | | gotmpl | ✓ | | | | | `gopls` | @@ -100,7 +107,8 @@ | haskell | ✓ | ✓ | | | | `haskell-language-server-wrapper` | | haskell-persistent | ✓ | | | | | | | hcl | ✓ | ✓ | ✓ | | | `terraform-ls` | -| heex | ✓ | ✓ | | | | `elixir-ls` | +| hdl | ✓ | | | | | `hdls` | +| heex | ✓ | ✓ | | | | `elixir-ls`, `expert` | | helm | ✓ | | | | | `helm_ls` | | hocon | ✓ | ✓ | ✓ | | | | | hoon | ✓ | | | | | | @@ -114,8 +122,8 @@ | ini | ✓ | | | | | | | ink | ✓ | | | | | | | inko | ✓ | ✓ | ✓ | ✓ | | | -| janet | ✓ | | ✓ | | | | -| java | ✓ | ✓ | ✓ | | ✓ | `jdtls` | +| janet | ✓ | | ✓ | | ✓ | | +| java | ✓ | ✓ | ✓ | ✓ | ✓ | `jdtls` | | javascript | ✓ | ✓ | ✓ | ✓ | ✓ | `typescript-language-server` | | jinja | ✓ | | | | | | | jjconfig | ✓ | ✓ | ✓ | | | `taplo`, `tombi` | @@ -131,22 +139,23 @@ | jsonnet | ✓ | | | | | `jsonnet-language-server` | | jsx | ✓ | ✓ | ✓ | ✓ | ✓ | `typescript-language-server` | | julia | ✓ | ✓ | ✓ | | | `julia` | -| just | ✓ | ✓ | ✓ | | | `just-lsp` | -| kdl | ✓ | ✓ | ✓ | | | | +| just | ✓ | ✓ | ✓ | ✓ | | `just-lsp` | +| kconfig | ✓ | | ✓ | | | | +| kdl | ✓ | ✓ | ✓ | ✓ | | | | koka | ✓ | | ✓ | | | `koka` | -| kotlin | ✓ | ✓ | ✓ | | | `kotlin-language-server` | -| koto | ✓ | ✓ | ✓ | | | `koto-ls` | +| kotlin | ✓ | ✓ | ✓ | ✓ | | `kotlin-language-server` | +| koto | ✓ | ✓ | ✓ | | ✓ | `koto-ls` | | latex | ✓ | ✓ | | | | `texlab` | | ld | ✓ | | ✓ | | | | | ldif | ✓ | | | | | | -| lean | ✓ | | | | | `lean` | +| lean | ✓ | | | | | `lake` | | ledger | ✓ | | | | | | | llvm | ✓ | ✓ | ✓ | | | | | llvm-mir | ✓ | ✓ | ✓ | | | | | llvm-mir-yaml | ✓ | | ✓ | | | | | log | ✓ | | | | | | | lpf | ✓ | | | | | | -| lua | ✓ | ✓ | ✓ | | | `lua-language-server` | +| lua | ✓ | ✓ | ✓ | | ✓ | `lua-language-server` | | luap | ✓ | | | | | | | luau | ✓ | ✓ | ✓ | | | `luau-lsp` | | mail | ✓ | ✓ | | | | | @@ -182,8 +191,9 @@ | pem | ✓ | | | | | | | perl | ✓ | ✓ | ✓ | | | `perlnavigator` | | pest | ✓ | ✓ | ✓ | | | `pest-language-server` | -| php | ✓ | ✓ | ✓ | ✓ | | `intelephense` | +| php | ✓ | ✓ | ✓ | ✓ | ✓ | `intelephense` | | php-only | ✓ | | | ✓ | | | +| pip-requirements | ✓ | | | | | | | pkgbuild | ✓ | ✓ | ✓ | | | `termux-language-server`, `bash-language-server` | | pkl | ✓ | | ✓ | | | `pkl-lsp` | | po | ✓ | ✓ | | | | | @@ -193,7 +203,7 @@ | prisma | ✓ | ✓ | | | | `prisma-language-server` | | prolog | ✓ | | ✓ | | | `swipl` | | properties | ✓ | ✓ | | | | | -| protobuf | ✓ | ✓ | ✓ | | | `buf`, `pb`, `protols` | +| protobuf | ✓ | ✓ | ✓ | ✓ | | `buf`, `pb`, `protols` | | prql | ✓ | | | | | | | pug | ✓ | | | | | | | purescript | ✓ | ✓ | | | | `purescript-language-server` | @@ -208,7 +218,8 @@ | rescript | ✓ | ✓ | | | | `rescript-language-server` | | rmarkdown | ✓ | | ✓ | | | `R` | | robot | ✓ | | | | | `robotframework_ls` | -| ron | ✓ | | ✓ | | | | +| robots.txt | ✓ | ✓ | | ✓ | | | +| ron | ✓ | | ✓ | ✓ | ✓ | | | rst | ✓ | | | | | | | ruby | ✓ | ✓ | ✓ | ✓ | ✓ | `ruby-lsp`, `solargraph` | | rust | ✓ | ✓ | ✓ | ✓ | ✓ | `rust-analyzer` | @@ -216,10 +227,12 @@ | rust-format-args-macro | ✓ | ✓ | ✓ | | ✓ | | | sage | ✓ | ✓ | | | | | | scala | ✓ | ✓ | ✓ | | | `metals` | -| scheme | ✓ | | ✓ | | ✓ | | +| scheme | ✓ | ✓ | ✓ | | ✓ | | | scss | ✓ | | | | ✓ | `vscode-css-language-server` | +| shellcheckrc | ✓ | ✓ | | | | | | slang | ✓ | ✓ | ✓ | | | `slangd` | | slint | ✓ | ✓ | ✓ | | | `slint-lsp` | +| slisp | ✓ | | | ✓ | | | | smali | ✓ | | ✓ | | | | | smithy | ✓ | | | | | `cs` | | sml | ✓ | | | | | | @@ -232,11 +245,13 @@ | sshclientconfig | ✓ | | | | | | | starlark | ✓ | ✓ | ✓ | | ✓ | `starpls` | | strace | ✓ | | | | | | +| strictdoc | ✓ | | | ✓ | | | | supercollider | ✓ | | | | | | | svelte | ✓ | | ✓ | | | `svelteserver` | | sway | ✓ | ✓ | ✓ | | | `forc` | -| swift | ✓ | ✓ | | | | `sourcekit-lsp` | +| swift | ✓ | ✓ | | | ✓ | `sourcekit-lsp` | | systemd | ✓ | | | | | `systemd-lsp` | +| systemverilog | ✓ | | | | | | | t32 | ✓ | | | | | | | tablegen | ✓ | ✓ | ✓ | | | | | tact | ✓ | ✓ | ✓ | | | | @@ -251,7 +266,7 @@ | tlaplus | ✓ | | | | | | | todotxt | ✓ | | | | | | | toml | ✓ | ✓ | | | ✓ | `taplo`, `tombi` | -| tsq | ✓ | | | | | `ts_query_ls` | +| tsq | ✓ | | | | ✓ | `ts_query_ls` | | tsx | ✓ | ✓ | ✓ | ✓ | ✓ | `typescript-language-server` | | twig | ✓ | | | | | | | typescript | ✓ | ✓ | ✓ | ✓ | ✓ | `typescript-language-server` | @@ -273,7 +288,8 @@ | webc | ✓ | | | | | | | werk | ✓ | | | | | | | wesl | ✓ | ✓ | | | | | -| wgsl | ✓ | | | | | `wgsl-analyzer` | +| wgsl | ✓ | ✓ | ✓ | ✓ | ✓ | `wgsl-analyzer` | +| wikitext | ✓ | | | | | `wikitext-lsp` | | wit | ✓ | | ✓ | | | | | wren | ✓ | ✓ | ✓ | | | | | xit | ✓ | | | | | | diff --git a/book/src/other-software.md b/book/src/other-software.md index a8a06259..941feada 100644 --- a/book/src/other-software.md +++ b/book/src/other-software.md @@ -15,6 +15,8 @@ Helix' keymap and interaction model ([Using Helix](#usage.md)) is easier to adop | [Visual Studio Code](https://code.visualstudio.com/) | [Helix for VS Code](https://marketplace.visualstudio.com/items?itemName=jasew.vscode-helix-emulation) extension| | [Zed](https://zed.dev/) | native via keybindings ([Bug](https://github.com/zed-industries/zed/issues/4642)) | | [CodeMirror](https://codemirror.net/) | [codemirror-helix](https://gitlab.com/_rvidal/codemirror-helix) | +| [Lite XL](https://lite-xl.com/) | [lite-modal-hx](https://codeberg.org/Mandarancio/lite-modal-hx) | +| [Lapce](https://lap.dev/lapce/) | | Requested: https://github.com/lapce/lapce/issues/281 | ## Shells diff --git a/book/src/package-managers.md b/book/src/package-managers.md index c3b1f4e7..c235d2e0 100644 --- a/book/src/package-managers.md +++ b/book/src/package-managers.md @@ -2,7 +2,6 @@ - [Linux](#linux) - [Ubuntu/Debian](#ubuntudebian) - - [Ubuntu (PPA)](#ubuntu-ppa) - [Fedora/RHEL](#fedorarhel) - [Arch Linux extra](#arch-linux-extra) - [NixOS](#nixos) @@ -26,21 +25,11 @@ The following third party repositories are available: ### Ubuntu/Debian -Install the Debian package from the release page. +Install the Debian package [from the release page](https://github.com/helix-editor/helix/releases/latest). If you are running a system older than Ubuntu 22.04, Mint 21, or Debian 12, you can build the `.deb` file locally [from source](./building-from-source.md#building-the-debian-package). -### Ubuntu (PPA) - -Add the `PPA` for Helix: - -```sh -sudo add-apt-repository ppa:maveonair/helix-editor -sudo apt update -sudo apt install helix -``` - ### Fedora/RHEL ```sh diff --git a/book/src/remapping.md b/book/src/remapping.md index 23bb80c5..9a9a611a 100644 --- a/book/src/remapping.md +++ b/book/src/remapping.md @@ -89,24 +89,26 @@ Cmd-s = ":write" # Cmd or Win or Meta and 's' to write Special keys are encoded as follows: -| Key name | Representation | -| --- | --- | -| Backspace | `"backspace"` | -| Space | `"space"` | -| Return/Enter | `"ret"` | -| Left | `"left"` | -| Right | `"right"` | -| Up | `"up"` | -| Down | `"down"` | -| Home | `"home"` | -| End | `"end"` | -| Page Up | `"pageup"` | -| Page Down | `"pagedown"` | -| Tab | `"tab"` | -| Delete | `"del"` | -| Insert | `"ins"` | -| Null | `"null"` | -| Escape | `"esc"` | +| Key name | Representation | +| --- | --- | +| Backspace | `"backspace"` | +| Space | `"space"` | +| Return/Enter | `"ret"` | +| Left | `"left"` | +| Right | `"right"` | +| Up | `"up"` | +| Down | `"down"` | +| Home | `"home"` | +| End | `"end"` | +| Page Up | `"pageup"` | +| Page Down | `"pagedown"` | +| Tab | `"tab"` | +| Delete | `"del"` | +| Insert | `"ins"` | +| Null | `"null"` | +| Escape | `"esc"` | +| Less Than (<) | `"lt"` | +| Greater Than (>) | `"gt"` | Keys can be disabled by binding them to the `no_op` command. diff --git a/default.nix b/default.nix index 8e501bbc..137dee5a 100644 --- a/default.nix +++ b/default.nix @@ -46,6 +46,8 @@ in allowBuiltinFetchGit = true; }; + propagatedBuildInputs = [ runtimeDir ]; + nativeBuildInputs = [ installShellFiles git diff --git a/grammars.nix b/grammars.nix index 371cafb0..1b4da224 100644 --- a/grammars.nix +++ b/grammars.nix @@ -87,8 +87,6 @@ $CC -c src/parser.c -o parser.o $FLAGS $CXX -shared -o $NAME.so *.o - ls -al - runHook postBuild ''; diff --git a/helix-core/src/syntax/config.rs b/helix-core/src/syntax/config.rs index 65cb656c..22b1f292 100644 --- a/helix-core/src/syntax/config.rs +++ b/helix-core/src/syntax/config.rs @@ -446,6 +446,7 @@ pub enum DebugArgumentValue { String(String), Array(Vec), Boolean(bool), + Table(HashMap), } #[derive(Debug, PartialEq, Eq, Clone, Deserialize, Serialize)] diff --git a/helix-event/Cargo.toml b/helix-event/Cargo.toml index d9a21f3a..22b83397 100644 --- a/helix-event/Cargo.toml +++ b/helix-event/Cargo.toml @@ -13,7 +13,7 @@ homepage.workspace = true [dependencies] foldhash.workspace = true -hashbrown = "0.15" +hashbrown = "0.16" tokio = { version = "1", features = ["rt", "rt-multi-thread", "time", "sync", "parking_lot", "macros"] } # the event registry is essentially read only but must be an rwlock so we can # setup new events on initialization, hardware-lock-elision hugely benefits this case diff --git a/helix-lsp-types/Cargo.toml b/helix-lsp-types/Cargo.toml index 57a05cdb..d3a81736 100644 --- a/helix-lsp-types/Cargo.toml +++ b/helix-lsp-types/Cargo.toml @@ -22,8 +22,8 @@ license = "MIT" [dependencies] bitflags.workspace = true -serde = { version = "1.0.219", features = ["derive"] } -serde_json = "1.0.141" +serde = { version = "1.0.224", features = ["derive"] } +serde_json = "1.0.145" url = {version = "2.5.4", features = ["serde"]} [features] diff --git a/helix-stdx/Cargo.toml b/helix-stdx/Cargo.toml index cf0dc03f..66d02925 100644 --- a/helix-stdx/Cargo.toml +++ b/helix-stdx/Cargo.toml @@ -19,14 +19,14 @@ which = "8.0" regex-cursor = "0.1.5" bitflags.workspace = true once_cell = "1.21" -regex-automata = "0.4.9" +regex-automata = "0.4.10" unicode-segmentation.workspace = true [target.'cfg(windows)'.dependencies] -windows-sys = { version = "0.60", features = ["Win32_Foundation", "Win32_Security", "Win32_Security_Authorization", "Win32_Storage_FileSystem", "Win32_System_Threading"] } +windows-sys = { version = "0.61", features = ["Win32_Foundation", "Win32_Security", "Win32_Security_Authorization", "Win32_Storage_FileSystem", "Win32_System_Threading"] } [target.'cfg(unix)'.dependencies] -rustix = { version = "1.0", features = ["fs"] } +rustix = { version = "1.1", features = ["fs"] } [dev-dependencies] tempfile.workspace = true diff --git a/helix-term/Cargo.toml b/helix-term/Cargo.toml index b9534c49..acf8d423 100644 --- a/helix-term/Cargo.toml +++ b/helix-term/Cargo.toml @@ -31,7 +31,7 @@ assets = [ ] [features] -default = ["git"] # Add steel here for development +default = ["git", "steel"] # Add steel here for development unicode-lines = ["helix-core/unicode-lines", "helix-view/unicode-lines"] integration = ["helix-event/integration_test"] git = ["helix-vcs/git"] @@ -55,14 +55,14 @@ anyhow = "1" once_cell = "1.21" tokio = { version = "1", features = ["rt", "rt-multi-thread", "io-util", "io-std", "time", "process", "macros", "fs", "parking_lot"] } -tui = { path = "../helix-tui", package = "helix-tui", default-features = false, features = ["crossterm"] } -crossterm = { version = "0.28", features = ["event-stream"] } +tui = { path = "../helix-tui", package = "helix-tui", default-features = false, features = ["termina"] } +termina = { workspace = true, features = ["event-stream"] } signal-hook = "0.3" tokio-stream = "0.1" futures-util = { version = "0.3", features = ["std", "async-await"], default-features = false } arc-swap = { version = "1.7.1" } termini = "1" -indexmap = "2.10" +indexmap = "2.11" # Logging fern = "0.7" @@ -101,10 +101,7 @@ dashmap = "6.0" [target.'cfg(not(windows))'.dependencies] # https://github.com/vorner/signal-hook/issues/100 signal-hook-tokio = { version = "0.3", features = ["futures-v0_3"] } -libc = "0.2.174" - -[target.'cfg(target_os = "macos")'.dependencies] -crossterm = { version = "0.28", features = ["event-stream", "use-dev-tty", "libc"] } +libc = "0.2.175" [build-dependencies] helix-loader = { path = "../helix-loader" } diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs index fc443110..4bfb2c0c 100644 --- a/helix-term/src/application.rs +++ b/helix-term/src/application.rs @@ -18,6 +18,7 @@ use helix_view::{ Align, Editor, }; use serde_json::json; +use termina::Terminal as _; use tui::backend::Backend; use crate::{ @@ -32,28 +33,27 @@ use crate::{ }; use log::{debug, error, info, warn}; -#[cfg(not(feature = "integration"))] -use std::io::stdout; -use std::{io::stdin, path::Path, sync::Arc}; +use std::{ + io::{stdin, IsTerminal}, + path::Path, + sync::Arc, +}; -#[cfg(not(windows))] -use anyhow::Context; -use anyhow::Error; +use anyhow::{Context, Error}; -use crossterm::{event::Event as CrosstermEvent, tty::IsTty}; #[cfg(not(windows))] use {signal_hook::consts::signal, signal_hook_tokio::Signals}; #[cfg(windows)] type Signals = futures_util::stream::Empty<()>; #[cfg(not(feature = "integration"))] -use tui::backend::CrosstermBackend; +use tui::backend::TerminaBackend; #[cfg(feature = "integration")] use tui::backend::TestBackend; #[cfg(not(feature = "integration"))] -type TerminalBackend = CrosstermBackend; +type TerminalBackend = TerminaBackend; #[cfg(feature = "integration")] type TerminalBackend = TestBackend; @@ -106,7 +106,8 @@ impl Application { let theme_loader = theme::Loader::new(&theme_parent_dirs); #[cfg(not(feature = "integration"))] - let backend = CrosstermBackend::new(stdout(), &config.editor); + let backend = TerminaBackend::new((&config.editor).into()) + .context("failed to create terminal backend")?; #[cfg(feature = "integration")] let backend = TestBackend::new(120, 150); @@ -125,7 +126,11 @@ impl Application { })), handlers, ); - Self::load_configured_theme(&mut editor, &config.load()); + Self::load_configured_theme( + &mut editor, + &config.load(), + terminal.backend().supports_true_color(), + ); let keys = Box::new(Map::new(Arc::clone(&config), |config: &Config| { &config.keys @@ -216,7 +221,7 @@ impl Application { } else { editor.new_file(Action::VerticalSplit); } - } else if stdin().is_tty() || cfg!(feature = "integration") { + } else if stdin().is_terminal() || cfg!(feature = "integration") { editor.new_file(Action::VerticalSplit); } else { editor @@ -247,7 +252,6 @@ impl Application { }; { - // TODO: Revisit this! let syn_loader = app.editor.syn_loader.clone(); let mut cx = crate::commands::Context { @@ -263,6 +267,7 @@ impl Application { &mut cx, app.config.clone(), syn_loader, + app.terminal.backend().terminal().event_reader(), ); } @@ -304,7 +309,7 @@ impl Application { pub async fn event_loop(&mut self, input_stream: &mut S) where - S: Stream> + Unpin, + S: Stream> + Unpin, { self.render().await; @@ -317,7 +322,7 @@ impl Application { pub async fn event_loop_until_idle(&mut self, input_stream: &mut S) -> bool where - S: Stream> + Unpin, + S: Stream> + Unpin, { loop { if self.editor.should_close() { @@ -393,7 +398,7 @@ impl Application { ConfigEvent::Update(editor_config) => { let mut app_config = (*self.config.load().clone()).clone(); app_config.editor = *editor_config; - if let Err(err) = self.terminal.reconfigure(app_config.editor.clone().into()) { + if let Err(err) = self.terminal.reconfigure((&app_config.editor).into()) { self.editor.set_error(err.to_string()); }; self.config.store(Arc::new(app_config)); @@ -423,7 +428,11 @@ impl Application { // the sake of locals highlighting. let lang_loader = helix_core::config::user_lang_loader()?; self.editor.syn_loader.store(Arc::new(lang_loader)); - Self::load_configured_theme(&mut self.editor, &default_config); + Self::load_configured_theme( + &mut self.editor, + &default_config, + self.terminal.backend().supports_true_color(), + ); // Re-parse any open documents with the new language config. let lang_loader = self.editor.syn_loader.load(); @@ -439,8 +448,7 @@ impl Application { document.replace_diagnostics(diagnostics, &[], None); } - self.terminal - .reconfigure(default_config.editor.clone().into())?; + self.terminal.reconfigure((&default_config.editor).into())?; // Store new config self.config.store(Arc::new(default_config)); Ok(()) @@ -457,8 +465,8 @@ impl Application { } /// Load the theme set in configuration - fn load_configured_theme(editor: &mut Editor, config: &Config) { - let true_color = config.editor.true_color || crate::true_color(); + fn load_configured_theme(editor: &mut Editor, config: &Config, terminal_true_color: bool) { + let true_color = terminal_true_color || config.editor.true_color || crate::true_color(); let theme = config .theme .as_ref() @@ -530,7 +538,7 @@ impl Application { // https://github.com/neovim/neovim/issues/12322 // https://github.com/neovim/neovim/pull/13084 for retries in 1..=10 { - match self.claim_term().await { + match self.terminal.claim() { Ok(()) => break, Err(err) if retries == 10 => panic!("Failed to claim terminal: {}", err), Err(_) => continue, @@ -600,24 +608,41 @@ impl Application { doc.set_last_saved_revision(doc_save_event.revision, doc_save_event.save_time); let lines = doc_save_event.text.len_lines(); - let mut sz = doc_save_event.text.len_bytes() as f32; + let size = doc_save_event.text.len_bytes(); + + enum Size { + Bytes(u16), + HumanReadable(f32, &'static str), + } - const SUFFIX: [&str; 4] = ["B", "KiB", "MiB", "GiB"]; - let mut i = 0; - while i < SUFFIX.len() - 1 && sz >= 1024.0 { - sz /= 1024.0; - i += 1; + impl std::fmt::Display for Size { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Bytes(bytes) => write!(f, "{bytes}B"), + Self::HumanReadable(size, suffix) => write!(f, "{size:.1}{suffix}"), + } + } } + let size = if size < 1024 { + Size::Bytes(size as u16) + } else { + const SUFFIX: [&str; 4] = ["B", "KiB", "MiB", "GiB"]; + let mut size = size as f32; + let mut i = 0; + while i < SUFFIX.len() - 1 && size >= 1024.0 { + size /= 1024.0; + i += 1; + } + Size::HumanReadable(size, SUFFIX[i]) + }; + self.editor .set_doc_path(doc_save_event.doc_id, &doc_save_event.path); // TODO: fix being overwritten by lsp self.editor.set_status(format!( - "'{}' written, {}L {:.1}{}", + "'{}' written, {lines}L {size}", get_relative_path(&doc_save_event.path).to_string_lossy(), - lines, - sz, - SUFFIX[i], )); } @@ -662,7 +687,7 @@ impl Application { false } - pub async fn handle_terminal_events(&mut self, event: std::io::Result) { + pub async fn handle_terminal_events(&mut self, event: std::io::Result) { let mut cx = crate::compositor::Context { editor: &mut self.editor, jobs: &mut self.jobs, @@ -670,9 +695,9 @@ impl Application { }; // Handle key events let should_redraw = match event.unwrap() { - CrosstermEvent::Resize(width, height) => { + termina::Event::WindowResized(termina::WindowSize { rows, cols, .. }) => { self.terminal - .resize(Rect::new(0, 0, width, height)) + .resize(Rect::new(0, 0, cols, rows)) .expect("Unable to resize terminal"); let area = self.terminal.size().expect("couldn't get terminal size"); @@ -680,11 +705,11 @@ impl Application { self.compositor.resize(area); self.compositor - .handle_event(&Event::Resize(width, height), &mut cx) + .handle_event(&Event::Resize(cols, rows), &mut cx) } // Ignore keyboard release events. - CrosstermEvent::Key(crossterm::event::KeyEvent { - kind: crossterm::event::KeyEventKind::Release, + termina::Event::Key(termina::event::KeyEvent { + kind: termina::event::KeyEventKind::Release, .. }) => false, event => self.compositor.handle_event(&event.into(), &mut cx), @@ -1168,36 +1193,48 @@ impl Application { lsp::ShowDocumentResult { success: true } } - async fn claim_term(&mut self) -> std::io::Result<()> { - let terminal_config = self.config.load().editor.clone().into(); - self.terminal.claim(terminal_config) - } - fn restore_term(&mut self) -> std::io::Result<()> { - let terminal_config = self.config.load().editor.clone().into(); use helix_view::graphics::CursorKind; self.terminal .backend_mut() .show_cursor(CursorKind::Block) .ok(); - self.terminal.restore(terminal_config) + self.terminal.restore() + } + + #[cfg(not(feature = "integration"))] + pub fn event_stream(&self) -> impl Stream> + Unpin { + use termina::Terminal as _; + let reader = self.terminal.backend().terminal().event_reader(); + termina::EventStream::new(reader, |event| !event.is_escape()) + } + + #[cfg(feature = "integration")] + pub fn event_stream(&self) -> impl Stream> + Unpin { + use std::{ + pin::Pin, + task::{Context, Poll}, + }; + + /// A dummy stream that never polls as ready. + pub struct DummyEventStream; + + impl Stream for DummyEventStream { + type Item = std::io::Result; + + fn poll_next(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll> { + Poll::Pending + } + } + + DummyEventStream } pub async fn run(&mut self, input_stream: &mut S) -> Result where - S: Stream> + Unpin, + S: Stream> + Unpin, { - self.claim_term().await?; - - // Exit the alternate screen and disable raw mode before panicking - let hook = std::panic::take_hook(); - std::panic::set_hook(Box::new(move |info| { - // We can't handle errors properly inside this closure. And it's - // probably not a good idea to `unwrap()` inside a panic handler. - // So we just ignore the `Result`. - let _ = TerminalBackend::force_restore(); - hook(info); - })); + self.terminal.claim()?; self.event_loop(input_stream).await; diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index a960edf7..488146cb 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -26,7 +26,7 @@ pub use typed::*; use helix_core::{ char_idx_at_visual_offset, chars::char_is_word, - command_line::{self}, + command_line::{self, Args}, comment, doc_formatter::TextFormat, encoding, find_workspace, @@ -51,6 +51,7 @@ use helix_core::{ use helix_view::{ document::{FormatterError, Mode, SCRATCH_BUFFER_NAME}, editor::Action, + expansion, info::Info, input::KeyEvent, keyboard::KeyCode, @@ -3214,9 +3215,11 @@ fn buffer_picker(cx: &mut Context) { .into() }), ]; + let initial_cursor = if items.len() <= 1 { 0 } else { 1 }; let picker = Picker::new(columns, 2, items, (), |cx, meta, action| { cx.editor.switch(meta.id, action); }) + .with_initial_cursor(initial_cursor) .with_preview(|editor, meta| { let doc = &editor.documents.get(&meta.id)?; let lines = doc.selections().values().next().map(|selection| { @@ -5383,6 +5386,7 @@ fn rotate_selections_last(cx: &mut Context) { doc.set_selection(view.id, selection); } +#[derive(Debug)] enum ReorderStrategy { RotateForward, RotateBackward, @@ -5395,34 +5399,50 @@ fn reorder_selection_contents(cx: &mut Context, strategy: ReorderStrategy) { let text = doc.text().slice(..); let selection = doc.selection(view.id); - let mut fragments: Vec<_> = selection + + let mut ranges: Vec<_> = selection .slices(text) .map(|fragment| fragment.chunks().collect()) .collect(); - let group = count - .map(|count| count.get()) - .unwrap_or(fragments.len()) // default to rotating everything as one group - .min(fragments.len()); - - for chunk in fragments.chunks_mut(group) { - // TODO: also modify main index - match strategy { - ReorderStrategy::RotateForward => chunk.rotate_right(1), - ReorderStrategy::RotateBackward => chunk.rotate_left(1), - ReorderStrategy::Reverse => chunk.reverse(), - }; - } + let rotate_by = count.map_or(1, |count| count.get().min(ranges.len())); + + let primary_index = match strategy { + ReorderStrategy::RotateForward => { + ranges.rotate_right(rotate_by); + // Like `usize::wrapping_add`, but provide a custom range from `0` to `ranges.len()` + (selection.primary_index() + ranges.len() + rotate_by) % ranges.len() + } + ReorderStrategy::RotateBackward => { + ranges.rotate_left(rotate_by); + // Like `usize::wrapping_sub`, but provide a custom range from `0` to `ranges.len()` + (selection.primary_index() + ranges.len() - rotate_by) % ranges.len() + } + ReorderStrategy::Reverse => { + if rotate_by % 2 == 0 { + // nothing changed, if we reverse something an even + // amount of times, the output will be the same + return; + } + ranges.reverse(); + // -1 to turn 1-based len into 0-based index + (ranges.len() - 1) - selection.primary_index() + } + }; let transaction = Transaction::change( doc.text(), selection .ranges() .iter() - .zip(fragments) + .zip(ranges) .map(|(range, fragment)| (range.from(), range.to(), Some(fragment))), ); + doc.set_selection( + view.id, + Selection::new(selection.ranges().into(), primary_index), + ); doc.apply(&transaction, view.id); } @@ -6074,7 +6094,7 @@ fn select_textobject(cx: &mut Context, objtype: textobject::TextObject) { ("e", "Data structure entry (tree-sitter)"), ("m", "Closest surrounding pair (tree-sitter)"), ("g", "Change"), - ("x", "X(HTML) element (tree-sitter)"), + ("x", "(X)HTML element (tree-sitter)"), (" ", "... or any character acting as a pair"), ]; @@ -6252,64 +6272,52 @@ enum ShellBehavior { } fn shell_pipe(cx: &mut Context) { - shell_prompt(cx, "pipe:".into(), ShellBehavior::Replace); + shell_prompt_for_behavior(cx, "pipe:".into(), ShellBehavior::Replace); } fn shell_pipe_to(cx: &mut Context) { - shell_prompt(cx, "pipe-to:".into(), ShellBehavior::Ignore); + shell_prompt_for_behavior(cx, "pipe-to:".into(), ShellBehavior::Ignore); } fn shell_insert_output(cx: &mut Context) { - shell_prompt(cx, "insert-output:".into(), ShellBehavior::Insert); + shell_prompt_for_behavior(cx, "insert-output:".into(), ShellBehavior::Insert); } fn shell_append_output(cx: &mut Context) { - shell_prompt(cx, "append-output:".into(), ShellBehavior::Append); + shell_prompt_for_behavior(cx, "append-output:".into(), ShellBehavior::Append); } fn shell_keep_pipe(cx: &mut Context) { - ui::prompt( - cx, - "keep-pipe:".into(), - Some('|'), - ui::completers::none, - move |cx, input: &str, event: PromptEvent| { - let shell = &cx.editor.config().shell; - if event != PromptEvent::Validate { - return; - } - if input.is_empty() { - return; - } - let (view, doc) = current!(cx.editor); - let selection = doc.selection(view.id); + shell_prompt(cx, "keep-pipe:".into(), |cx, args| { + let shell = &cx.editor.config().shell; + let (view, doc) = current!(cx.editor); + let selection = doc.selection(view.id); - let mut ranges = SmallVec::with_capacity(selection.len()); - let old_index = selection.primary_index(); - let mut index: Option = None; - let text = doc.text().slice(..); + let mut ranges = SmallVec::with_capacity(selection.len()); + let old_index = selection.primary_index(); + let mut index: Option = None; + let text = doc.text().slice(..); - for (i, range) in selection.ranges().iter().enumerate() { - let fragment = range.slice(text); - if let Err(err) = shell_impl(shell, input, Some(fragment.into())) { - log::debug!("Shell command failed: {}", err); - } else { - ranges.push(*range); - if i >= old_index && index.is_none() { - index = Some(ranges.len() - 1); - } + for (i, range) in selection.ranges().iter().enumerate() { + let fragment = range.slice(text); + if let Err(err) = shell_impl(shell, args.join(" ").as_str(), Some(fragment.into())) { + log::debug!("Shell command failed: {}", err); + } else { + ranges.push(*range); + if i >= old_index && index.is_none() { + index = Some(ranges.len() - 1); } } + } - if ranges.is_empty() { - cx.editor.set_error("No selections remaining"); - return; - } + if ranges.is_empty() { + cx.editor.set_error("No selections remaining"); + return; + } - let index = index.unwrap_or_else(|| ranges.len() - 1); - doc.set_selection(view.id, Selection::new(ranges, index)); - }, - ); + let index = index.unwrap_or_else(|| ranges.len() - 1); + doc.set_selection(view.id, Selection::new(ranges, index)); + }); } fn shell_impl(shell: &[String], cmd: &str, input: Option) -> anyhow::Result { @@ -6464,25 +6472,35 @@ fn shell(cx: &mut compositor::Context, cmd: &str, behavior: &ShellBehavior) { view.ensure_cursor_in_view(doc, config.scrolloff); } -fn shell_prompt(cx: &mut Context, prompt: Cow<'static, str>, behavior: ShellBehavior) { +fn shell_prompt(cx: &mut Context, prompt: Cow<'static, str>, mut callback_fn: F) +where + F: FnMut(&mut compositor::Context, Args) + 'static, +{ ui::prompt( cx, prompt, Some('|'), - ui::completers::shell, - move |cx, input: &str, event: PromptEvent| { - if event != PromptEvent::Validate { + |editor, input| complete_command_args(editor, SHELL_SIGNATURE, &SHELL_COMPLETER, input, 0), + move |cx, input, event| { + if event != PromptEvent::Validate || input.is_empty() { return; } - if input.is_empty() { - return; + match Args::parse(input, SHELL_SIGNATURE, true, |token| { + expansion::expand(cx.editor, token).map_err(|err| err.into()) + }) { + Ok(args) => callback_fn(cx, args), + Err(err) => cx.editor.set_error(err.to_string()), } - - shell(cx, input, &behavior); }, ); } +fn shell_prompt_for_behavior(cx: &mut Context, prompt: Cow<'static, str>, behavior: ShellBehavior) { + shell_prompt(cx, prompt, move |cx, args| { + shell(cx, args.join(" ").as_str(), &behavior) + }) +} + fn suspend(_cx: &mut Context) { #[cfg(not(windows))] { diff --git a/helix-term/src/commands/dap.rs b/helix-term/src/commands/dap.rs index f6f11d12..074bef6d 100644 --- a/helix-term/src/commands/dap.rs +++ b/helix-term/src/commands/dap.rs @@ -164,6 +164,13 @@ pub fn dap_start_impl( arr.iter().map(|v| v.replace(&pattern, ¶m)).collect(), ), DebugArgumentValue::Boolean(_) => value, + DebugArgumentValue::Table(map) => DebugArgumentValue::Table( + map.into_iter() + .map(|(mk, mv)| { + (mk.replace(&pattern, ¶m), mv.replace(&pattern, ¶m)) + }) + .collect(), + ), }; } } @@ -182,6 +189,9 @@ pub fn dap_start_impl( DebugArgumentValue::Boolean(bool) => { args.insert(k, to_value(bool).unwrap()); } + DebugArgumentValue::Table(map) => { + args.insert(k, to_value(map).unwrap()); + } } } diff --git a/helix-term/src/commands/engine.rs b/helix-term/src/commands/engine.rs index 33792c5e..b8ebadb4 100644 --- a/helix-term/src/commands/engine.rs +++ b/helix-term/src/commands/engine.rs @@ -2,6 +2,7 @@ use arc_swap::{ArcSwap, ArcSwapAny}; use helix_core::syntax; use helix_lsp::{jsonrpc, LanguageServerId}; use helix_view::{document::Mode, input::KeyEvent}; +use termina::EventReader; use std::{borrow::Cow, sync::Arc}; @@ -64,6 +65,7 @@ impl ScriptingEngine { cx: &mut Context, configuration: Arc>>, language_configuration: Arc>, + event_reader: EventReader, ) { for kind in PLUGIN_PRECEDENCE { manual_dispatch!( @@ -71,7 +73,8 @@ impl ScriptingEngine { run_initialization_script( cx, configuration.clone(), - language_configuration.clone() + language_configuration.clone(), + event_reader.clone() ) ) } @@ -193,6 +196,7 @@ pub trait PluginSystem { _cx: &mut Context, _configuration: Arc>>, _language_configuration: Arc>, + _event_reader: EventReader, ) { } diff --git a/helix-term/src/commands/engine/steel/mod.rs b/helix-term/src/commands/engine/steel/mod.rs index bf1ca187..d7de2193 100644 --- a/helix-term/src/commands/engine/steel/mod.rs +++ b/helix-term/src/commands/engine/steel/mod.rs @@ -1,7 +1,6 @@ mod components; use arc_swap::{ArcSwap, ArcSwapAny}; -use crossterm::event::{Event, KeyCode, KeyModifiers}; use helix_core::{ command_line::Args, diagnostic::Severity, @@ -46,6 +45,7 @@ use steel::{ }, steelerr, RootedSteelVal, SteelErr, SteelVal, }; +use termina::EventReader; use std::{ borrow::Cow, @@ -81,11 +81,14 @@ use insert::insert_char; static INTERRUPT_HANDLER: OnceCell = OnceCell::new(); static SAFEPOINT_HANDLER: OnceCell = OnceCell::new(); -// TODO: Use this for the available commands. -// We just have to look at functions that have been defined at -// the top level, _after_ they static GLOBAL_OFFSET: OnceCell = OnceCell::new(); +static EVENT_READER: OnceCell = OnceCell::new(); + +fn install_event_reader(event_reader: EventReader) { + EVENT_READER.set(event_reader).unwrap() +} + fn setup() -> Engine { let engine = steel::steel_vm::engine::Engine::new(); @@ -93,7 +96,10 @@ fn setup() -> Engine { let running = Arc::new(AtomicBool::new(false)); fn is_event_available() -> std::io::Result { - crossterm::event::poll(Duration::from_millis(10)) + EVENT_READER + .get() + .unwrap() + .poll(Some(Duration::from_millis(10)), |_| true) } let controller_clone = controller.clone(); @@ -111,11 +117,11 @@ fn setup() -> Engine { while running.load(std::sync::atomic::Ordering::Relaxed) { if is_event_available().unwrap_or(false) { - let event = crossterm::event::read(); + let event = EVENT_READER.get().unwrap().read(|_| true); - if let Ok(Event::Key(crossterm::event::KeyEvent { - code: KeyCode::Char('c'), - modifiers: KeyModifiers::CONTROL, + if let Ok(termina::Event::Key(termina::event::KeyEvent { + code: termina::event::KeyCode::Char('c'), + modifiers: termina::event::Modifiers::CONTROL, .. })) = event { @@ -2358,10 +2364,10 @@ impl super::PluginSystem for SteelScriptingEngine { &self, cx: &mut Context, configuration: Arc>>, - // Just apply... all the configurations at once? language_configuration: Arc>, + event_reader: EventReader, ) { - run_initialization_script(cx, configuration, language_configuration); + run_initialization_script(cx, configuration, language_configuration, event_reader); } fn handle_keymap_event( @@ -3527,7 +3533,10 @@ fn run_initialization_script( cx: &mut Context, configuration: Arc>>, language_configuration: Arc>, + event_reader: EventReader, ) { + install_event_reader(event_reader); + log::info!("Loading init.scm..."); let helix_module_path = helix_module_file(); diff --git a/helix-term/src/commands/lsp.rs b/helix-term/src/commands/lsp.rs index a85aef7f..929774c7 100644 --- a/helix-term/src/commands/lsp.rs +++ b/helix-term/src/commands/lsp.rs @@ -935,7 +935,13 @@ where } let call = move |editor: &mut Editor, compositor: &mut Compositor| { if locations.is_empty() { - editor.set_error("No definition found."); + editor.set_error(match feature { + LanguageServerFeature::GotoDeclaration => "No declaration found.", + LanguageServerFeature::GotoDefinition => "No definition found.", + LanguageServerFeature::GotoTypeDefinition => "No type definition found.", + LanguageServerFeature::GotoImplementation => "No implementation found.", + _ => "No location found.", + }); } else { goto_impl(editor, compositor, locations); } diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs index fbbbf546..b4881224 100644 --- a/helix-term/src/commands/typed.rs +++ b/helix-term/src/commands/typed.rs @@ -30,15 +30,6 @@ pub struct TypableCommand { pub signature: Signature, } -impl TypableCommand { - fn completer_for_argument_number(&self, n: usize) -> &Completer { - match self.completer.positional_args.get(n) { - Some(completer) => completer, - _ => &self.completer.var_args, - } - } -} - #[derive(Clone)] pub struct CommandCompleter { // Arguments with specific completion methods based on their position. @@ -69,6 +60,13 @@ impl CommandCompleter { var_args: completer, } } + + fn for_argument_number(&self, n: usize) -> &Completer { + match self.positional_args.get(n) { + Some(completer) => completer, + _ => &self.var_args, + } + } } fn quit(cx: &mut compositor::Context, _args: Args, event: PromptEvent) -> anyhow::Result<()> { @@ -105,6 +103,10 @@ fn open(cx: &mut compositor::Context, args: Args, event: PromptEvent) -> anyhow: return Ok(()); } + open_impl(cx, args, Action::Replace) +} + +fn open_impl(cx: &mut compositor::Context, args: Args, action: Action) -> anyhow::Result<()> { for arg in args { let (path, pos) = crate::args::parse_file(&arg); let path = helix_stdx::path::expand_tilde(path); @@ -114,7 +116,8 @@ fn open(cx: &mut compositor::Context, args: Args, event: PromptEvent) -> anyhow: let callback = async move { let call: job::Callback = job::Callback::EditorCompositor(Box::new( move |editor: &mut Editor, compositor: &mut Compositor| { - let picker = ui::file_picker(editor, path.into_owned()); + let picker = + ui::file_picker(editor, path.into_owned()).with_default_action(action); compositor.push(Box::new(overlaid(picker))); }, )); @@ -123,7 +126,7 @@ fn open(cx: &mut compositor::Context, args: Args, event: PromptEvent) -> anyhow: cx.jobs.callback(callback); } else { // Otherwise, just open the file - let _ = cx.editor.open(&path, Action::Replace)?; + let _ = cx.editor.open(&path, action)?; let (view, doc) = current!(cx.editor); let pos = Selection::point(pos_at_coords(doc.text().slice(..), pos, true)); doc.set_selection(view.id, pos); @@ -1479,7 +1482,14 @@ fn update(cx: &mut compositor::Context, args: Args, event: PromptEvent) -> anyho let (_view, doc) = current!(cx.editor); if doc.is_modified() { - write(cx, args, event) + write_impl( + cx, + None, + WriteOptions { + force: false, + auto_format: !args.has_flag(WRITE_NO_FORMAT_FLAG.name), + }, + ) } else { Ok(()) } @@ -1818,10 +1828,7 @@ fn vsplit(cx: &mut compositor::Context, args: Args, event: PromptEvent) -> anyho if args.is_empty() { split(cx.editor, Action::VerticalSplit); } else { - for arg in args { - cx.editor - .open(&PathBuf::from(arg.as_ref()), Action::VerticalSplit)?; - } + open_impl(cx, args, Action::VerticalSplit)?; } Ok(()) @@ -1835,10 +1842,7 @@ fn hsplit(cx: &mut compositor::Context, args: Args, event: PromptEvent) -> anyho if args.is_empty() { split(cx.editor, Action::HorizontalSplit); } else { - for arg in args { - cx.editor - .open(&PathBuf::from(arg.as_ref()), Action::HorizontalSplit)?; - } + open_impl(cx, args, Action::HorizontalSplit)?; } Ok(()) @@ -2662,13 +2666,13 @@ const BUFFER_CLOSE_OTHERS_SIGNATURE: Signature = Signature { // but Signature does not yet allow for var args. /// This command handles all of its input as-is with no quoting or flags. -const SHELL_SIGNATURE: Signature = Signature { +pub const SHELL_SIGNATURE: Signature = Signature { positionals: (1, Some(2)), raw_after: Some(1), ..Signature::DEFAULT }; -const SHELL_COMPLETER: CommandCompleter = CommandCompleter::positional(&[ +pub const SHELL_COMPLETER: CommandCompleter = CommandCompleter::positional(&[ // Command name completers::program, // Shell argument(s) @@ -3247,6 +3251,7 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[ completer: CommandCompleter::none(), signature: Signature { positionals: (0, Some(0)), + flags: &[WRITE_NO_FORMAT_FLAG], ..Signature::DEFAULT }, }, @@ -3899,14 +3904,15 @@ fn complete_command_line(editor: &Editor, input: &str) -> Vec Vec { @@ -3918,7 +3924,7 @@ fn complete_command_args( let cursor = input.len(); let prefix = &input[..cursor]; let mut tokenizer = Tokenizer::new(prefix, false); - let mut args = Args::new(command.signature, false); + let mut args = Args::new(signature, false); let mut final_token = None; let mut is_last_token = true; @@ -3962,7 +3968,7 @@ fn complete_command_args( .len() .checked_sub(1) .expect("completion state to be positional"); - let completer = command.completer_for_argument_number(n); + let completer = completer.for_argument_number(n); completer(editor, &token.content) .into_iter() @@ -3971,7 +3977,7 @@ fn complete_command_args( } CompletionState::Flag(_) => fuzzy_match( token.content.trim_start_matches('-'), - command.signature.flags.iter().map(|flag| flag.name), + signature.flags.iter().map(|flag| flag.name), false, ) .into_iter() @@ -3996,7 +4002,7 @@ fn complete_command_args( .len() .checked_sub(1) .expect("completion state to be positional"); - command.completer_for_argument_number(n) + completer.for_argument_number(n) }); complete_expand(editor, &token, arg_completer, offset + token.content_start) } diff --git a/helix-term/src/compositor.rs b/helix-term/src/compositor.rs index 8da301e8..e5899748 100644 --- a/helix-term/src/compositor.rs +++ b/helix-term/src/compositor.rs @@ -149,6 +149,12 @@ impl Compositor { Some(self.layers.remove(idx)) } + pub fn remove_type(&mut self) { + let type_name = std::any::type_name::(); + self.layers + .retain(|component| component.type_name() != type_name); + } + pub fn handle_event(&mut self, event: &Event, cx: &mut Context) -> bool { // If it is a key event, a macro is being recorded, and a macro isn't being replayed, // push the key event to the recording. diff --git a/helix-term/src/handlers.rs b/helix-term/src/handlers.rs index 9c46a650..25cab6a3 100644 --- a/helix-term/src/handlers.rs +++ b/helix-term/src/handlers.rs @@ -16,6 +16,7 @@ mod auto_save; pub mod completion; mod diagnostics; mod document_colors; +mod prompt; mod signature_help; mod snippet; @@ -43,5 +44,6 @@ pub fn setup(config: Arc>) -> Handlers { diagnostics::register_hooks(&handlers); snippet::register_hooks(&handlers); document_colors::register_hooks(&handlers); + prompt::register_hooks(&handlers); handlers } diff --git a/helix-term/src/health.rs b/helix-term/src/health.rs index 78b51939..dbf25e60 100644 --- a/helix-term/src/health.rs +++ b/helix-term/src/health.rs @@ -1,11 +1,14 @@ use crate::config::{Config, ConfigLoadError}; -use crossterm::{ - style::{Color, StyledContent, Stylize}, - tty::IsTty, -}; use helix_core::config::{default_lang_config, user_lang_config}; use helix_loader::grammar::load_runtime_file; -use std::{collections::HashSet, io::Write}; +use std::{ + collections::HashSet, + io::{IsTerminal, Write}, +}; +use termina::{ + style::{ColorSpec, StyleExt as _, Stylized}, + Terminal as _, +}; #[derive(Copy, Clone)] pub enum TsFeature { @@ -183,21 +186,24 @@ fn languages(selection: Option>) -> std::io::Result<()> { headings.push(feat.short_title()) } - let terminal_cols = crossterm::terminal::size().map(|(c, _)| c).unwrap_or(80); + let terminal_cols = termina::PlatformTerminal::new() + .and_then(|terminal| terminal.get_dimensions()) + .map(|size| size.cols) + .unwrap_or(80); let column_width = terminal_cols as usize / headings.len(); - let is_terminal = std::io::stdout().is_tty(); + let is_terminal = std::io::stdout().is_terminal(); - let fit = |s: &str| -> StyledContent { + let fit = |s: &str| -> Stylized<'static> { format!( "{:column_width$}", s.get(..column_width - 2) .map(|s| format!("{}…", s)) .unwrap_or_else(|| s.to_string()) ) - .stylize() + .stylized() }; - let color = |s: StyledContent, c: Color| if is_terminal { s.with(c) } else { s }; - let bold = |s: StyledContent| if is_terminal { s.bold() } else { s }; + let color = |s: Stylized<'static>, c: ColorSpec| if is_terminal { s.foreground(c) } else { s }; + let bold = |s: Stylized<'static>| if is_terminal { s.bold() } else { s }; for heading in headings { write!(stdout, "{}", bold(fit(heading)))?; @@ -210,10 +216,10 @@ fn languages(selection: Option>) -> std::io::Result<()> { let check_binary_with_name = |cmd: Option<(&str, &str)>| match cmd { Some((name, cmd)) => match helix_stdx::env::which(cmd) { - Ok(_) => color(fit(&format!("✓ {}", name)), Color::Green), - Err(_) => color(fit(&format!("✘ {}", name)), Color::Red), + Ok(_) => color(fit(&format!("✓ {}", name)), ColorSpec::BRIGHT_GREEN), + Err(_) => color(fit(&format!("✘ {}", name)), ColorSpec::BRIGHT_RED), }, - None => color(fit("None"), Color::Yellow), + None => color(fit("None"), ColorSpec::BRIGHT_YELLOW), }; let check_binary = |cmd: Option<&str>| check_binary_with_name(cmd.map(|cmd| (cmd, cmd))); @@ -247,8 +253,8 @@ fn languages(selection: Option>) -> std::io::Result<()> { for ts_feat in TsFeature::all() { match load_runtime_file(&lang.language_id, ts_feat.runtime_filename()).is_ok() { - true => write!(stdout, "{}", color(fit("✓"), Color::Green))?, - false => write!(stdout, "{}", color(fit("✘"), Color::Red))?, + true => write!(stdout, "{}", color(fit("✓"), ColorSpec::BRIGHT_GREEN))?, + false => write!(stdout, "{}", color(fit("✘"), ColorSpec::BRIGHT_RED))?, } } diff --git a/helix-term/src/main.rs b/helix-term/src/main.rs index 0cf4f787..597be8d3 100644 --- a/helix-term/src/main.rs +++ b/helix-term/src/main.rs @@ -1,5 +1,4 @@ use anyhow::{Context, Error, Result}; -use crossterm::event::EventStream; use helix_loader::VERSION_AND_GIT_HASH; use helix_term::application::Application; use helix_term::args::Args; @@ -117,8 +116,8 @@ FLAGS: setup_logging(args.verbosity).context("failed to initialize logging")?; - // Initialize the engine before we boot up! - helix_term::commands::ScriptingEngine::initialize(); + // // Initialize the engine before we boot up! + // helix_term::commands::ScriptingEngine::initialize(); // Before setting the working directory, resolve all the paths in args.files for (path, _) in args.files.iter_mut2() { @@ -160,8 +159,9 @@ FLAGS: // TODO: use the thread local executor to spawn the application task separately from the work pool let mut app = Application::new(args, config, lang_loader).context("unable to start Helix")?; + let mut events = app.event_stream(); - let exit_code = app.run(&mut EventStream::new()).await?; + let exit_code = app.run(&mut events).await?; Ok(exit_code) } diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs index ec1f9cfc..afc88efc 100644 --- a/helix-term/src/ui/editor.rs +++ b/helix-term/src/ui/editor.rs @@ -538,7 +538,7 @@ impl EditorView { }; spans.push((selection_scope, range.anchor..selection_end)); // add block cursors - // skip primary cursor if terminal is unfocused - crossterm cursor is used in that case + // skip primary cursor if terminal is unfocused - terminal cursor is used in that case if !selection_is_primary || (cursor_is_block && is_terminal_focused) { spans.push((cursor_scope, cursor_start..range.head)); } @@ -546,7 +546,7 @@ impl EditorView { // Reverse case. let cursor_end = next_grapheme_boundary(text, range.head); // add block cursors - // skip primary cursor if terminal is unfocused - crossterm cursor is used in that case + // skip primary cursor if terminal is unfocused - terminal cursor is used in that case if !selection_is_primary || (cursor_is_block && is_terminal_focused) { spans.push((cursor_scope, range.head..cursor_end)); } @@ -1163,6 +1163,8 @@ impl EditorView { let editor = &mut cxt.editor; if let Some((pos, view_id)) = pos_and_view(editor, row, column, true) { + editor.focus(view_id); + let prev_view_id = view!(editor).id; let doc = doc_mut!(editor, &view!(editor, view_id).doc); @@ -1186,7 +1188,6 @@ impl EditorView { self.clear_completion(editor); } - editor.focus(view_id); editor.ensure_cursor_in_view(view_id); return EventResult::Consumed(None); @@ -1650,7 +1651,7 @@ impl Component for EditorView { if self.terminal_focused { (pos, CursorKind::Hidden) } else { - // use crossterm cursor when terminal loses focus + // use terminal cursor when terminal loses focus (pos, CursorKind::Underline) } } diff --git a/helix-term/src/ui/picker.rs b/helix-term/src/ui/picker.rs index 3f3aaba2..11d3c04c 100644 --- a/helix-term/src/ui/picker.rs +++ b/helix-term/src/ui/picker.rs @@ -258,6 +258,7 @@ pub struct Picker { widths: Vec, callback_fn: PickerCallback, + default_action: Action, pub truncate_start: bool, /// Caches paths to documents @@ -308,7 +309,10 @@ impl Picker { F: Fn(&mut Context, &T, Action) + 'static, { let columns: Arc<[_]> = columns.into_iter().collect(); - let matcher_columns = columns.iter().filter(|col| col.filter).count() as u32; + let matcher_columns = columns + .iter() + .filter(|col: &&Column| col.filter) + .count() as u32; assert!(matcher_columns > 0); let matcher = Nucleo::new( Config::DEFAULT, @@ -382,6 +386,7 @@ impl Picker { truncate_start: true, show_preview: true, callback_fn: Box::new(callback_fn), + default_action: Action::Replace, completion_height: 0, widths, preview_cache: HashMap::new(), @@ -424,6 +429,11 @@ impl Picker { self } + pub fn with_initial_cursor(mut self, cursor: u32) -> Self { + self.cursor = cursor; + self + } + pub fn with_dynamic_query( mut self, callback: DynQueryCallback, @@ -440,6 +450,11 @@ impl Picker { self } + pub fn with_default_action(mut self, action: Action) -> Self { + self.default_action = action; + self + } + /// Move the cursor by a number of lines, either down (`Forward`) or up (`Backward`) pub fn move_by(&mut self, amount: u32, direction: Direction) { let len = self.matcher.snapshot().matched_item_count(); @@ -1071,7 +1086,7 @@ impl Component for Picker return close_fn(self), alt!(Enter) => { if let Some(option) = self.selection() { - (self.callback_fn)(ctx, option, Action::Replace); + (self.callback_fn)(ctx, option, self.default_action); } } key!(Enter) => { @@ -1095,7 +1110,7 @@ impl Component for Picker &modenames.insert, + Mode::Select => &modenames.select, + Mode::Normal => &modenames.normal, + }; let content = if visible { - Cow::Owned(format!( - " {} ", - match context.editor.mode() { - Mode::Insert => &modenames.insert, - Mode::Select => &modenames.select, - Mode::Normal => &modenames.normal, - } - )) + format!(" {mode_str} ") } else { // If not focused, explicitly leave an empty space instead of returning None. - Cow::Borrowed(" ") + " ".repeat(mode_str.width() + 2) }; let style = if visible && config.color_modes { match context.editor.mode() { diff --git a/helix-term/tests/test/commands.rs b/helix-term/tests/test/commands.rs index 20e8ac9a..90ff4cf0 100644 --- a/helix-term/tests/test/commands.rs +++ b/helix-term/tests/test/commands.rs @@ -4,6 +4,8 @@ use super::*; mod insert; mod movement; +mod reverse_selection_contents; +mod rotate_selection_contents; mod write; #[tokio::test(flavor = "multi_thread")] diff --git a/helix-term/tests/test/helpers.rs b/helix-term/tests/test/helpers.rs index ef910852..60143aaa 100644 --- a/helix-term/tests/test/helpers.rs +++ b/helix-term/tests/test/helpers.rs @@ -6,11 +6,11 @@ use std::{ }; use anyhow::bail; -use crossterm::event::{Event, KeyEvent}; use helix_core::{diagnostic::Severity, test, Selection, Transaction}; use helix_term::{application::Application, args::Args, config::Config, keymap::merge_keys}; use helix_view::{current_ref, doc, editor::LspConfig, input::parse_macro, Editor}; use tempfile::NamedTempFile; +use termina::event::{Event, KeyEvent}; use tokio_stream::wrappers::UnboundedReceiverStream; /// Specify how to set up the input text with line feeds diff --git a/helix-tui/Cargo.toml b/helix-tui/Cargo.toml index d4db46ca..90f038a2 100644 --- a/helix-tui/Cargo.toml +++ b/helix-tui/Cargo.toml @@ -12,7 +12,7 @@ repository.workspace = true homepage.workspace = true [features] -default = ["crossterm"] +default = ["termina"] steel = ["dep:steel-core", "helix-view/steel", "helix-core/steel"] [dependencies] @@ -22,7 +22,7 @@ helix-core = { path = "../helix-core" } bitflags.workspace = true cassowary = "0.3" unicode-segmentation.workspace = true -crossterm = { version = "0.28", optional = true } +termina = { workspace = true, optional = true } termini = "1.0" once_cell = "1.21" log = "~0.4" diff --git a/helix-tui/src/backend/crossterm.rs b/helix-tui/src/backend/crossterm.rs deleted file mode 100644 index 28e20419..00000000 --- a/helix-tui/src/backend/crossterm.rs +++ /dev/null @@ -1,465 +0,0 @@ -use crate::{backend::Backend, buffer::Cell, terminal::Config}; -use crossterm::{ - cursor::{Hide, MoveTo, SetCursorStyle, Show}, - event::{ - DisableBracketedPaste, DisableFocusChange, DisableMouseCapture, EnableBracketedPaste, - EnableFocusChange, EnableMouseCapture, KeyboardEnhancementFlags, - PopKeyboardEnhancementFlags, PushKeyboardEnhancementFlags, - }, - execute, queue, - style::{ - Attribute as CAttribute, Color as CColor, Colors, Print, SetAttribute, SetBackgroundColor, - SetColors, SetForegroundColor, - }, - terminal::{self, Clear, ClearType}, - Command, -}; -use helix_view::{ - editor::Config as EditorConfig, - graphics::{Color, CursorKind, Modifier, Rect, UnderlineStyle}, -}; -use once_cell::sync::OnceCell; -use std::{ - fmt, - io::{self, Write}, -}; -use termini::TermInfo; - -fn term_program() -> Option { - // Some terminals don't set $TERM_PROGRAM - match std::env::var("TERM_PROGRAM") { - Err(_) => std::env::var("TERM").ok(), - Ok(term_program) => Some(term_program), - } -} -fn vte_version() -> Option { - std::env::var("VTE_VERSION").ok()?.parse().ok() -} -fn reset_cursor_approach(terminfo: TermInfo) -> String { - let mut reset_str = "\x1B[0 q".to_string(); - - if let Some(termini::Value::Utf8String(se_str)) = terminfo.extended_cap("Se") { - reset_str.push_str(se_str); - }; - - reset_str.push_str( - terminfo - .utf8_string_cap(termini::StringCapability::CursorNormal) - .unwrap_or(""), - ); - - reset_str -} - -/// Describes terminal capabilities like extended underline, truecolor, etc. -#[derive(Clone, Debug)] -struct Capabilities { - /// Support for undercurled, underdashed, etc. - has_extended_underlines: bool, - /// Support for resetting the cursor style back to normal. - reset_cursor_command: String, -} - -impl Default for Capabilities { - fn default() -> Self { - Self { - has_extended_underlines: false, - reset_cursor_command: "\x1B[0 q".to_string(), - } - } -} - -impl Capabilities { - /// Detect capabilities from the terminfo database located based - /// on the $TERM environment variable. If detection fails, returns - /// a default value where no capability is supported, or just undercurl - /// if config.undercurl is set. - pub fn from_env_or_default(config: &EditorConfig) -> Self { - match termini::TermInfo::from_env() { - Err(_) => Capabilities { - has_extended_underlines: config.undercurl, - ..Capabilities::default() - }, - Ok(t) => Capabilities { - // Smulx, VTE: https://unix.stackexchange.com/a/696253/246284 - // Su (used by kitty): https://sw.kovidgoyal.net/kitty/underlines - // WezTerm supports underlines but a lot of distros don't properly install its terminfo - has_extended_underlines: config.undercurl - || t.extended_cap("Smulx").is_some() - || t.extended_cap("Su").is_some() - || vte_version() >= Some(5102) - || matches!(term_program().as_deref(), Some("WezTerm")), - reset_cursor_command: reset_cursor_approach(t), - }, - } - } -} - -/// Terminal backend supporting a wide variety of terminals -pub struct CrosstermBackend { - buffer: W, - capabilities: Capabilities, - supports_keyboard_enhancement_protocol: OnceCell, - mouse_capture_enabled: bool, - supports_bracketed_paste: bool, -} - -impl CrosstermBackend -where - W: Write, -{ - pub fn new(buffer: W, config: &EditorConfig) -> CrosstermBackend { - // helix is not usable without colors, but crossterm will disable - // them by default if NO_COLOR is set in the environment. Override - // this behaviour. - crossterm::style::force_color_output(true); - CrosstermBackend { - buffer, - capabilities: Capabilities::from_env_or_default(config), - supports_keyboard_enhancement_protocol: OnceCell::new(), - mouse_capture_enabled: false, - supports_bracketed_paste: true, - } - } - - #[inline] - fn supports_keyboard_enhancement_protocol(&self) -> bool { - *self.supports_keyboard_enhancement_protocol - .get_or_init(|| { - use std::time::Instant; - - let now = Instant::now(); - let supported = matches!(terminal::supports_keyboard_enhancement(), Ok(true)); - log::debug!( - "The keyboard enhancement protocol is {}supported in this terminal (checked in {:?})", - if supported { "" } else { "not " }, - Instant::now().duration_since(now) - ); - supported - }) - } -} - -impl Write for CrosstermBackend -where - W: Write, -{ - fn write(&mut self, buf: &[u8]) -> io::Result { - self.buffer.write(buf) - } - - fn flush(&mut self) -> io::Result<()> { - self.buffer.flush() - } -} - -impl Backend for CrosstermBackend -where - W: Write, -{ - fn claim(&mut self, config: Config) -> io::Result<()> { - terminal::enable_raw_mode()?; - execute!( - self.buffer, - terminal::EnterAlternateScreen, - EnableFocusChange - )?; - match execute!(self.buffer, EnableBracketedPaste,) { - Err(err) if err.kind() == io::ErrorKind::Unsupported => { - log::warn!("Bracketed paste is not supported on this terminal."); - self.supports_bracketed_paste = false; - } - Err(err) => return Err(err), - Ok(_) => (), - }; - execute!(self.buffer, terminal::Clear(terminal::ClearType::All))?; - if config.enable_mouse_capture { - execute!(self.buffer, EnableMouseCapture)?; - self.mouse_capture_enabled = true; - } - if self.supports_keyboard_enhancement_protocol() { - execute!( - self.buffer, - PushKeyboardEnhancementFlags( - KeyboardEnhancementFlags::DISAMBIGUATE_ESCAPE_CODES - | KeyboardEnhancementFlags::REPORT_ALTERNATE_KEYS - ) - )?; - } - Ok(()) - } - - fn reconfigure(&mut self, config: Config) -> io::Result<()> { - if self.mouse_capture_enabled != config.enable_mouse_capture { - if config.enable_mouse_capture { - execute!(self.buffer, EnableMouseCapture)?; - } else { - execute!(self.buffer, DisableMouseCapture)?; - } - self.mouse_capture_enabled = config.enable_mouse_capture; - } - - Ok(()) - } - - fn restore(&mut self, config: Config) -> io::Result<()> { - // reset cursor shape - self.buffer - .write_all(self.capabilities.reset_cursor_command.as_bytes())?; - if config.enable_mouse_capture { - execute!(self.buffer, DisableMouseCapture)?; - } - if self.supports_keyboard_enhancement_protocol() { - execute!(self.buffer, PopKeyboardEnhancementFlags)?; - } - if self.supports_bracketed_paste { - execute!(self.buffer, DisableBracketedPaste,)?; - } - execute!( - self.buffer, - DisableFocusChange, - terminal::LeaveAlternateScreen - )?; - terminal::disable_raw_mode() - } - - fn force_restore() -> io::Result<()> { - let mut stdout = io::stdout(); - - // reset cursor shape - write!(stdout, "\x1B[0 q")?; - // Ignore errors on disabling, this might trigger on windows if we call - // disable without calling enable previously - let _ = execute!(stdout, DisableMouseCapture); - let _ = execute!(stdout, PopKeyboardEnhancementFlags); - let _ = execute!(stdout, DisableBracketedPaste); - execute!(stdout, DisableFocusChange, terminal::LeaveAlternateScreen)?; - terminal::disable_raw_mode() - } - - fn draw<'a, I>(&mut self, content: I) -> io::Result<()> - where - I: Iterator, - { - let mut fg = Color::Reset; - let mut bg = Color::Reset; - let mut underline_color = Color::Reset; - let mut underline_style = UnderlineStyle::Reset; - let mut modifier = Modifier::empty(); - let mut last_pos: Option<(u16, u16)> = None; - for (x, y, cell) in content { - // Move the cursor if the previous location was not (x - 1, y) - if !matches!(last_pos, Some(p) if x == p.0 + 1 && y == p.1) { - queue!(self.buffer, MoveTo(x, y))?; - } - last_pos = Some((x, y)); - if cell.modifier != modifier { - let diff = ModifierDiff { - from: modifier, - to: cell.modifier, - }; - diff.queue(&mut self.buffer)?; - modifier = cell.modifier; - } - if cell.fg != fg || cell.bg != bg { - queue!( - self.buffer, - SetColors(Colors::new(cell.fg.into(), cell.bg.into())) - )?; - fg = cell.fg; - bg = cell.bg; - } - - let mut new_underline_style = cell.underline_style; - if self.capabilities.has_extended_underlines { - if cell.underline_color != underline_color { - let color = CColor::from(cell.underline_color); - queue!(self.buffer, SetUnderlineColor(color))?; - underline_color = cell.underline_color; - } - } else { - match new_underline_style { - UnderlineStyle::Reset | UnderlineStyle::Line => (), - _ => new_underline_style = UnderlineStyle::Line, - } - } - - if new_underline_style != underline_style { - let attr = CAttribute::from(new_underline_style); - queue!(self.buffer, SetAttribute(attr))?; - underline_style = new_underline_style; - } - - queue!(self.buffer, Print(&cell.symbol))?; - } - - queue!( - self.buffer, - SetUnderlineColor(CColor::Reset), - SetForegroundColor(CColor::Reset), - SetBackgroundColor(CColor::Reset), - SetAttribute(CAttribute::Reset) - ) - } - - fn hide_cursor(&mut self) -> io::Result<()> { - execute!(self.buffer, Hide) - } - - fn show_cursor(&mut self, kind: CursorKind) -> io::Result<()> { - let shape = match kind { - CursorKind::Block => SetCursorStyle::SteadyBlock, - CursorKind::Bar => SetCursorStyle::SteadyBar, - CursorKind::Underline => SetCursorStyle::SteadyUnderScore, - CursorKind::Hidden => unreachable!(), - }; - execute!(self.buffer, Show, shape) - } - - fn get_cursor(&mut self) -> io::Result<(u16, u16)> { - crossterm::cursor::position() - .map_err(|e| io::Error::new(io::ErrorKind::Other, e.to_string())) - } - - fn set_cursor(&mut self, x: u16, y: u16) -> io::Result<()> { - execute!(self.buffer, MoveTo(x, y)) - } - - fn clear(&mut self) -> io::Result<()> { - execute!(self.buffer, Clear(ClearType::All)) - } - - fn size(&self) -> io::Result { - let (width, height) = - terminal::size().map_err(|e| io::Error::new(io::ErrorKind::Other, e.to_string()))?; - - Ok(Rect::new(0, 0, width, height)) - } - - fn flush(&mut self) -> io::Result<()> { - self.buffer.flush() - } -} - -#[derive(Debug)] -struct ModifierDiff { - pub from: Modifier, - pub to: Modifier, -} - -impl ModifierDiff { - fn queue(&self, mut w: W) -> io::Result<()> - where - W: io::Write, - { - //use crossterm::Attribute; - let removed = self.from - self.to; - if removed.contains(Modifier::REVERSED) { - queue!(w, SetAttribute(CAttribute::NoReverse))?; - } - if removed.contains(Modifier::BOLD) { - queue!(w, SetAttribute(CAttribute::NormalIntensity))?; - if self.to.contains(Modifier::DIM) { - queue!(w, SetAttribute(CAttribute::Dim))?; - } - } - if removed.contains(Modifier::ITALIC) { - queue!(w, SetAttribute(CAttribute::NoItalic))?; - } - if removed.contains(Modifier::DIM) { - queue!(w, SetAttribute(CAttribute::NormalIntensity))?; - } - if removed.contains(Modifier::CROSSED_OUT) { - queue!(w, SetAttribute(CAttribute::NotCrossedOut))?; - } - if removed.contains(Modifier::SLOW_BLINK) || removed.contains(Modifier::RAPID_BLINK) { - queue!(w, SetAttribute(CAttribute::NoBlink))?; - } - if removed.contains(Modifier::HIDDEN) { - queue!(w, SetAttribute(CAttribute::NoHidden))?; - } - - let added = self.to - self.from; - if added.contains(Modifier::REVERSED) { - queue!(w, SetAttribute(CAttribute::Reverse))?; - } - if added.contains(Modifier::BOLD) { - queue!(w, SetAttribute(CAttribute::Bold))?; - } - if added.contains(Modifier::ITALIC) { - queue!(w, SetAttribute(CAttribute::Italic))?; - } - if added.contains(Modifier::DIM) { - queue!(w, SetAttribute(CAttribute::Dim))?; - } - if added.contains(Modifier::CROSSED_OUT) { - queue!(w, SetAttribute(CAttribute::CrossedOut))?; - } - if added.contains(Modifier::SLOW_BLINK) { - queue!(w, SetAttribute(CAttribute::SlowBlink))?; - } - if added.contains(Modifier::RAPID_BLINK) { - queue!(w, SetAttribute(CAttribute::RapidBlink))?; - } - if added.contains(Modifier::HIDDEN) { - queue!(w, SetAttribute(CAttribute::Hidden))?; - } - - Ok(()) - } -} - -/// Crossterm uses semicolon as a separator for colors -/// this is actually not spec compliant (although commonly supported) -/// However the correct approach is to use colons as a separator. -/// This usually doesn't make a difference for emulators that do support colored underlines. -/// However terminals that do not support colored underlines will ignore underlines colors with colons -/// while escape sequences with semicolons are always processed which leads to weird visual artifacts. -/// See [this nvim issue](https://github.com/neovim/neovim/issues/9270) for details -#[derive(Debug, Clone, Copy, PartialEq, Eq)] -pub struct SetUnderlineColor(pub CColor); - -impl Command for SetUnderlineColor { - fn write_ansi(&self, f: &mut impl fmt::Write) -> fmt::Result { - let color = self.0; - - if color == CColor::Reset { - write!(f, "\x1b[59m")?; - return Ok(()); - } - f.write_str("\x1b[58:")?; - - let res = match color { - CColor::Black => f.write_str("5:0"), - CColor::DarkGrey => f.write_str("5:8"), - CColor::Red => f.write_str("5:9"), - CColor::DarkRed => f.write_str("5:1"), - CColor::Green => f.write_str("5:10"), - CColor::DarkGreen => f.write_str("5:2"), - CColor::Yellow => f.write_str("5:11"), - CColor::DarkYellow => f.write_str("5:3"), - CColor::Blue => f.write_str("5:12"), - CColor::DarkBlue => f.write_str("5:4"), - CColor::Magenta => f.write_str("5:13"), - CColor::DarkMagenta => f.write_str("5:5"), - CColor::Cyan => f.write_str("5:14"), - CColor::DarkCyan => f.write_str("5:6"), - CColor::White => f.write_str("5:15"), - CColor::Grey => f.write_str("5:7"), - CColor::Rgb { r, g, b } => write!(f, "2::{}:{}:{}", r, g, b), - CColor::AnsiValue(val) => write!(f, "5:{}", val), - _ => Ok(()), - }; - res?; - write!(f, "m")?; - Ok(()) - } - - #[cfg(windows)] - fn execute_winapi(&self) -> io::Result<()> { - Err(std::io::Error::new( - std::io::ErrorKind::Other, - "SetUnderlineColor not supported by winapi.", - )) - } -} diff --git a/helix-tui/src/backend/mod.rs b/helix-tui/src/backend/mod.rs index d8b0555c..3f0ec355 100644 --- a/helix-tui/src/backend/mod.rs +++ b/helix-tui/src/backend/mod.rs @@ -6,10 +6,10 @@ use crate::{buffer::Cell, terminal::Config}; use helix_view::graphics::{CursorKind, Rect}; -#[cfg(feature = "crossterm")] -mod crossterm; -#[cfg(feature = "crossterm")] -pub use self::crossterm::CrosstermBackend; +#[cfg(feature = "termina")] +mod termina; +#[cfg(feature = "termina")] +pub use self::termina::TerminaBackend; mod test; pub use self::test::TestBackend; @@ -17,13 +17,11 @@ pub use self::test::TestBackend; /// Representation of a terminal backend. pub trait Backend { /// Claims the terminal for TUI use. - fn claim(&mut self, config: Config) -> Result<(), io::Error>; + fn claim(&mut self) -> Result<(), io::Error>; /// Update terminal configuration. fn reconfigure(&mut self, config: Config) -> Result<(), io::Error>; /// Restores the terminal to a normal state, undoes `claim` - fn restore(&mut self, config: Config) -> Result<(), io::Error>; - /// Forcibly resets the terminal, ignoring errors and configuration - fn force_restore() -> Result<(), io::Error>; + fn restore(&mut self) -> Result<(), io::Error>; /// Draws styled text to the terminal fn draw<'a, I>(&mut self, content: I) -> Result<(), io::Error> where @@ -32,8 +30,6 @@ pub trait Backend { fn hide_cursor(&mut self) -> Result<(), io::Error>; /// Sets the cursor to the given shape fn show_cursor(&mut self, kind: CursorKind) -> Result<(), io::Error>; - /// Gets the current position of the cursor - fn get_cursor(&mut self) -> Result<(u16, u16), io::Error>; /// Sets the cursor to the given position fn set_cursor(&mut self, x: u16, y: u16) -> Result<(), io::Error>; /// Clears the terminal @@ -42,4 +38,5 @@ pub trait Backend { fn size(&self) -> Result; /// Flushes the terminal buffer fn flush(&mut self) -> Result<(), io::Error>; + fn supports_true_color(&self) -> bool; } diff --git a/helix-tui/src/backend/test.rs b/helix-tui/src/backend/test.rs index 771cc309..37b5ff5c 100644 --- a/helix-tui/src/backend/test.rs +++ b/helix-tui/src/backend/test.rs @@ -107,7 +107,7 @@ impl TestBackend { } impl Backend for TestBackend { - fn claim(&mut self, _config: Config) -> Result<(), io::Error> { + fn claim(&mut self) -> Result<(), io::Error> { Ok(()) } @@ -115,11 +115,7 @@ impl Backend for TestBackend { Ok(()) } - fn restore(&mut self, _config: Config) -> Result<(), io::Error> { - Ok(()) - } - - fn force_restore() -> Result<(), io::Error> { + fn restore(&mut self) -> Result<(), io::Error> { Ok(()) } @@ -143,10 +139,6 @@ impl Backend for TestBackend { Ok(()) } - fn get_cursor(&mut self) -> Result<(u16, u16), io::Error> { - Ok(self.pos) - } - fn set_cursor(&mut self, x: u16, y: u16) -> Result<(), io::Error> { self.pos = (x, y); Ok(()) @@ -164,4 +156,8 @@ impl Backend for TestBackend { fn flush(&mut self) -> Result<(), io::Error> { Ok(()) } + + fn supports_true_color(&self) -> bool { + false + } } diff --git a/helix-tui/src/lib.rs b/helix-tui/src/lib.rs index a4ffc186..c3b4d783 100644 --- a/helix-tui/src/lib.rs +++ b/helix-tui/src/lib.rs @@ -1,133 +1,3 @@ -//! [tui](https://github.com/fdehau/tui-rs) is a library used to build rich -//! terminal users interfaces and dashboards. -//! -//! ![](https://raw.githubusercontent.com/fdehau/tui-rs/master/assets/demo.gif) -//! -//! # Get started -//! -//! ## Adding `tui` as a dependency -//! -//! ```toml -//! [dependencies] -//! tui = "0.15" -//! crossterm = "0.19" -//! ``` -//! -//! The same logic applies for all other available backends. -//! -//! ## Creating a `Terminal` -//! -//! Every application using `tui` should start by instantiating a `Terminal`. It is a light -//! abstraction over available backends that provides basic functionalities such as clearing the -//! screen, hiding the cursor, etc. -//! -//! ```rust,no_run -//! use std::io; -//! use helix_tui::Terminal; -//! use helix_tui::backend::CrosstermBackend; -//! use helix_view::editor::Config; -//! -//! fn main() -> Result<(), io::Error> { -//! let stdout = io::stdout(); -//! let config = Config::default(); -//! let backend = CrosstermBackend::new(stdout, &config); -//! let mut terminal = Terminal::new(backend)?; -//! Ok(()) -//! } -//! ``` -//! -//! You may also refer to the examples to find out how to create a `Terminal` for each available -//! backend. -//! -//! ## Building a User Interface (UI) -//! -//! Every component of your interface will be implementing the `Widget` trait. The library comes -//! with a predefined set of widgets that should meet most of your use cases. You are also free to -//! implement your own. -//! -//! Each widget follows a builder pattern API providing a default configuration along with methods -//! to customize them. The widget is then rendered using the `Frame::render_widget` which take -//! your widget instance an area to draw to. -//! -//! The following example renders a block of the size of the terminal: -//! -//! ```rust,no_run -//! use std::io; -//! use crossterm::terminal; -//! use helix_tui::Terminal; -//! use helix_tui::backend::CrosstermBackend; -//! use helix_tui::widgets::{Widget, Block, Borders}; -//! use helix_tui::layout::{Layout, Constraint, Direction}; -//! use helix_view::editor::Config; -//! -//! fn main() -> Result<(), io::Error> { -//! terminal::enable_raw_mode().unwrap(); -//! let stdout = io::stdout(); -//! let config = Config::default(); -//! let backend = CrosstermBackend::new(stdout, &config); -//! let mut terminal = Terminal::new(backend)?; -//! // terminal.draw(|f| { -//! // let size = f.size(); -//! // let block = Block::default() -//! // .title("Block") -//! // .borders(Borders::ALL); -//! // f.render_widget(block, size); -//! // })?; -//! Ok(()) -//! } -//! ``` -//! -//! ## Layout -//! -//! The library comes with a basic yet useful layout management object called `Layout`. As you may -//! see below and in the examples, the library makes heavy use of the builder pattern to provide -//! full customization. And `Layout` is no exception: -//! -//! ```rust,no_run -//! use std::io; -//! use crossterm::terminal; -//! use helix_tui::Terminal; -//! use helix_tui::backend::CrosstermBackend; -//! use helix_tui::widgets::{Widget, Block, Borders}; -//! use helix_tui::layout::{Layout, Constraint, Direction}; -//! use helix_view::editor::Config; -//! -//! fn main() -> Result<(), io::Error> { -//! terminal::enable_raw_mode().unwrap(); -//! let stdout = io::stdout(); -//! let config = Config::default(); -//! let backend = CrosstermBackend::new(stdout, &config); -//! let mut terminal = Terminal::new(backend)?; -//! // terminal.draw(|f| { -//! // let chunks = Layout::default() -//! // .direction(Direction::Vertical) -//! // .margin(1) -//! // .constraints( -//! // [ -//! // Constraint::Percentage(10), -//! // Constraint::Percentage(80), -//! // Constraint::Percentage(10) -//! // ].as_ref() -//! // ) -//! // .split(f.size()); -//! // let block = Block::default() -//! // .title("Block") -//! // .borders(Borders::ALL); -//! // f.render_widget(block, chunks[0]); -//! // let block = Block::default() -//! // .title("Block 2") -//! // .borders(Borders::ALL); -//! // f.render_widget(block, chunks[1]); -//! // })?; -//! Ok(()) -//! } -//! ``` -//! -//! This let you describe responsive terminal UI by nesting layouts. You should note that by -//! default the computed layout tries to fill the available space completely. So if for any reason -//! you might need a blank space somewhere, try to pass an additional constraint and don't use the -//! corresponding area. - pub mod backend; pub mod buffer; pub mod extension; diff --git a/helix-tui/src/terminal.rs b/helix-tui/src/terminal.rs index 969b285c..72f38d71 100644 --- a/helix-tui/src/terminal.rs +++ b/helix-tui/src/terminal.rs @@ -2,7 +2,7 @@ //! Frontend for [Backend] use crate::{backend::Backend, buffer::Buffer}; -use helix_view::editor::Config as EditorConfig; +use helix_view::editor::{Config as EditorConfig, KittyKeyboardProtocolConfig}; use helix_view::graphics::{CursorKind, Rect}; use std::io; @@ -24,12 +24,16 @@ pub struct Viewport { #[derive(Debug)] pub struct Config { pub enable_mouse_capture: bool, + pub force_enable_extended_underlines: bool, + pub kitty_keyboard_protocol: KittyKeyboardProtocolConfig, } -impl From for Config { - fn from(config: EditorConfig) -> Self { +impl From<&EditorConfig> for Config { + fn from(config: &EditorConfig) -> Self { Self { enable_mouse_capture: config.mouse, + force_enable_extended_underlines: config.undercurl, + kitty_keyboard_protocol: config.kitty_keyboard_protocol, } } } @@ -102,16 +106,16 @@ where }) } - pub fn claim(&mut self, config: Config) -> io::Result<()> { - self.backend.claim(config) + pub fn claim(&mut self) -> io::Result<()> { + self.backend.claim() } pub fn reconfigure(&mut self, config: Config) -> io::Result<()> { self.backend.reconfigure(config) } - pub fn restore(&mut self, config: Config) -> io::Result<()> { - self.backend.restore(config) + pub fn restore(&mut self) -> io::Result<()> { + self.backend.restore() } // /// Get a Frame object which provides a consistent view into the terminal state for rendering. @@ -218,10 +222,6 @@ where Ok(()) } - pub fn get_cursor(&mut self) -> io::Result<(u16, u16)> { - self.backend.get_cursor() - } - pub fn set_cursor(&mut self, x: u16, y: u16) -> io::Result<()> { self.backend.set_cursor(x, y) } diff --git a/helix-tui/src/text.rs b/helix-tui/src/text.rs index 1317a009..a9c36503 100644 --- a/helix-tui/src/text.rs +++ b/helix-tui/src/text.rs @@ -374,6 +374,30 @@ impl<'a> Text<'a> { self.lines.len() } + /// Patch text with a new style. Only updates fields that are in the new style. + /// + /// # Examples + /// + /// ```rust + /// # use helix_tui::text::Text; + /// # use helix_view::graphics::{Color, Style}; + /// let style1 = Style::default().fg(Color::Yellow); + /// let style2 = Style::default().fg(Color::Yellow).bg(Color::Black); + /// let mut half_styled_text = Text::styled(String::from("The first line\nThe second line"), style1); + /// let full_styled_text = Text::styled(String::from("The first line\nThe second line"), style2); + /// assert_ne!(half_styled_text, full_styled_text); + /// + /// half_styled_text.patch_style(Style::default().bg(Color::Black)); + /// assert_eq!(half_styled_text, full_styled_text); + /// ``` + pub fn patch_style(&mut self, style: Style) { + for line in &mut self.lines { + for span in &mut line.0 { + span.style = span.style.patch(style); + } + } + } + /// Apply a new style to existing text. /// /// # Examples @@ -386,13 +410,13 @@ impl<'a> Text<'a> { /// let styled_text = Text::styled(String::from("The first line\nThe second line"), style); /// assert_ne!(raw_text, styled_text); /// - /// raw_text.patch_style(style); + /// raw_text.set_style(style); /// assert_eq!(raw_text, styled_text); /// ``` - pub fn patch_style(&mut self, style: Style) { + pub fn set_style(&mut self, style: Style) { for line in &mut self.lines { for span in &mut line.0 { - span.style = span.style.patch(style); + span.style = style; } } } diff --git a/helix-tui/src/widgets/table.rs b/helix-tui/src/widgets/table.rs index 234df2e4..5f4667b7 100644 --- a/helix-tui/src/widgets/table.rs +++ b/helix-tui/src/widgets/table.rs @@ -37,9 +37,15 @@ pub struct Cell<'a> { impl Cell<'_> { /// Set the `Style` of this cell. pub fn style(mut self, style: Style) -> Self { - self.style = style; + self.set_style(style); self } + + /// Set the `Style` of this cell. + pub fn set_style(&mut self, style: Style) { + self.style = style; + self.content.patch_style(style); + } } impl<'a, T> From for Cell<'a> @@ -453,6 +459,9 @@ impl Table<'_> { }; if is_selected { buf.set_style(table_row_area, self.highlight_style); + for cell in &mut table_row.cells { + cell.set_style(self.highlight_style); + } } let mut col = table_row_start_col; for (width, cell) in columns_widths.iter().zip(table_row.cells.iter()) { diff --git a/helix-view/Cargo.toml b/helix-view/Cargo.toml index 3291ecc4..055c791c 100644 --- a/helix-view/Cargo.toml +++ b/helix-view/Cargo.toml @@ -11,7 +11,8 @@ repository.workspace = true homepage.workspace = true [features] -term = ["crossterm"] +default = [] +term = ["termina"] steel = ["dep:steel-core", "helix-core/steel"] unicode-lines = [] @@ -26,7 +27,7 @@ helix-vcs = { path = "../helix-vcs" } bitflags.workspace = true anyhow = "1" -crossterm = { version = "0.28", optional = true } +termina = { workspace = true, optional = true } tempfile.workspace = true @@ -62,7 +63,7 @@ clipboard-win = { version = "5.4", features = ["std"] } [target.'cfg(unix)'.dependencies] libc = "0.2" -rustix = { version = "1.0", features = ["fs"] } +rustix = { version = "1.1", features = ["fs"] } [dev-dependencies] helix-tui = { path = "../helix-tui" } diff --git a/helix-view/src/base64.rs b/helix-view/src/base64.rs deleted file mode 100644 index 13ee919d..00000000 --- a/helix-view/src/base64.rs +++ /dev/null @@ -1,163 +0,0 @@ -// A minimal base64 implementation to keep from pulling in a crate for just that. It's based on -// https://github.com/marshallpierce/rust-base64 but without all the customization options. -// The biggest portion comes from -// https://github.com/marshallpierce/rust-base64/blob/a675443d327e175f735a37f574de803d6a332591/src/engine/naive.rs#L42 -// Thanks, rust-base64! - -// The MIT License (MIT) - -// Copyright (c) 2015 Alice Maz - -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -use std::ops::{BitAnd, BitOr, Shl, Shr}; - -const PAD_BYTE: u8 = b'='; -const ENCODE_TABLE: &[u8] = - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".as_bytes(); -const LOW_SIX_BITS: u32 = 0x3F; - -pub fn encode(input: &[u8]) -> String { - let rem = input.len() % 3; - let complete_chunks = input.len() / 3; - let remainder_chunk = usize::from(rem != 0); - let encoded_size = (complete_chunks + remainder_chunk) * 4; - - let mut output = vec![0; encoded_size]; - - // complete chunks first - let complete_chunk_len = input.len() - rem; - - let mut input_index = 0_usize; - let mut output_index = 0_usize; - while input_index < complete_chunk_len { - let chunk = &input[input_index..input_index + 3]; - - // populate low 24 bits from 3 bytes - let chunk_int: u32 = - (chunk[0] as u32).shl(16) | (chunk[1] as u32).shl(8) | (chunk[2] as u32); - // encode 4x 6-bit output bytes - output[output_index] = ENCODE_TABLE[chunk_int.shr(18) as usize]; - output[output_index + 1] = ENCODE_TABLE[chunk_int.shr(12_u8).bitand(LOW_SIX_BITS) as usize]; - output[output_index + 2] = ENCODE_TABLE[chunk_int.shr(6_u8).bitand(LOW_SIX_BITS) as usize]; - output[output_index + 3] = ENCODE_TABLE[chunk_int.bitand(LOW_SIX_BITS) as usize]; - - input_index += 3; - output_index += 4; - } - - // then leftovers - if rem == 2 { - let chunk = &input[input_index..input_index + 2]; - - // high six bits of chunk[0] - output[output_index] = ENCODE_TABLE[chunk[0].shr(2) as usize]; - // bottom 2 bits of [0], high 4 bits of [1] - output[output_index + 1] = ENCODE_TABLE - [(chunk[0].shl(4_u8).bitor(chunk[1].shr(4_u8)) as u32).bitand(LOW_SIX_BITS) as usize]; - // bottom 4 bits of [1], with the 2 bottom bits as zero - output[output_index + 2] = - ENCODE_TABLE[(chunk[1].shl(2_u8) as u32).bitand(LOW_SIX_BITS) as usize]; - output[output_index + 3] = PAD_BYTE; - } else if rem == 1 { - let byte = input[input_index]; - output[output_index] = ENCODE_TABLE[byte.shr(2) as usize]; - output[output_index + 1] = - ENCODE_TABLE[(byte.shl(4_u8) as u32).bitand(LOW_SIX_BITS) as usize]; - output[output_index + 2] = PAD_BYTE; - output[output_index + 3] = PAD_BYTE; - } - String::from_utf8(output).expect("Invalid UTF8") -} - -#[cfg(test)] -mod tests { - fn compare_encode(expected: &str, target: &[u8]) { - assert_eq!(expected, super::encode(target)); - } - - #[test] - fn encode_rfc4648_0() { - compare_encode("", b""); - } - - #[test] - fn encode_rfc4648_1() { - compare_encode("Zg==", b"f"); - } - - #[test] - fn encode_rfc4648_2() { - compare_encode("Zm8=", b"fo"); - } - - #[test] - fn encode_rfc4648_3() { - compare_encode("Zm9v", b"foo"); - } - - #[test] - fn encode_rfc4648_4() { - compare_encode("Zm9vYg==", b"foob"); - } - - #[test] - fn encode_rfc4648_5() { - compare_encode("Zm9vYmE=", b"fooba"); - } - - #[test] - fn encode_rfc4648_6() { - compare_encode("Zm9vYmFy", b"foobar"); - } - - #[test] - fn encode_all_ascii() { - let mut ascii = Vec::::with_capacity(128); - - for i in 0..128 { - ascii.push(i); - } - - compare_encode( - "AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7P\ - D0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn8\ - =", - &ascii, - ); - } - - #[test] - fn encode_all_bytes() { - let mut bytes = Vec::::with_capacity(256); - - for i in 0..255 { - bytes.push(i); - } - bytes.push(255); //bug with "overflowing" ranges? - - compare_encode( - "AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7P\ - D0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn\ - +AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6\ - /wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/w==", - &bytes, - ); - } -} diff --git a/helix-view/src/clipboard.rs b/helix-view/src/clipboard.rs index 1cf63348..2641d98f 100644 --- a/helix-view/src/clipboard.rs +++ b/helix-view/src/clipboard.rs @@ -193,7 +193,7 @@ mod external { Self::Wayland => builtin_name("wayland", &WL_CLIPBOARD), Self::XClip => builtin_name("x-clip", &XCLIP), Self::XSel => builtin_name("x-sel", &XSEL), - Self::Win32Yank => builtin_name("win-32-yank", &WIN32), + Self::Win32Yank => builtin_name("win32-yank", &WIN32), Self::Tmux => builtin_name("tmux", &TMUX), Self::Termux => builtin_name("termux", &TERMUX), #[cfg(windows)] @@ -292,10 +292,17 @@ mod external { }, #[cfg(feature = "term")] Self::Termcode => { - crossterm::queue!( - std::io::stdout(), - osc52::SetClipboardCommand::new(content, clipboard_type) - )?; + use std::io::Write; + use termina::escape::osc::{self, Osc}; + let selection = match clipboard_type { + ClipboardType::Clipboard => osc::Selection::CLIPBOARD, + ClipboardType::Selection => osc::Selection::PRIMARY, + }; + // NOTE: it would be ideal to have the terminal execute this but it _should_ + // work to send this over stdout instead. + let mut stdout = std::io::stdout().lock(); + write!(stdout, "{}", Osc::SetSelection(selection, content))?; + stdout.flush()?; Ok(()) } Self::Custom(command_provider) => match clipboard_type { @@ -400,43 +407,6 @@ mod external { paste => "termux-clipboard-set"; } - #[cfg(feature = "term")] - mod osc52 { - use {super::ClipboardType, crate::base64}; - - pub struct SetClipboardCommand { - encoded_content: String, - clipboard_type: ClipboardType, - } - - impl SetClipboardCommand { - pub fn new(content: &str, clipboard_type: ClipboardType) -> Self { - Self { - encoded_content: base64::encode(content.as_bytes()), - clipboard_type, - } - } - } - - impl crossterm::Command for SetClipboardCommand { - fn write_ansi(&self, f: &mut impl std::fmt::Write) -> std::fmt::Result { - let kind = match &self.clipboard_type { - ClipboardType::Clipboard => "c", - ClipboardType::Selection => "p", - }; - // Send an OSC 52 set command: https://terminalguide.namepad.de/seq/osc-52/ - write!(f, "\x1b]52;{};{}\x1b\\", kind, &self.encoded_content) - } - #[cfg(windows)] - fn execute_winapi(&self) -> std::result::Result<(), std::io::Error> { - Err(std::io::Error::new( - std::io::ErrorKind::Other, - "OSC clipboard codes not supported by winapi.", - )) - } - } - } - fn execute_command( cmd: &Command, input: Option<&str>, diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index daa6dd98..2cd044fd 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -381,6 +381,17 @@ pub struct Config { pub editor_config: bool, /// Whether to render rainbow colors for matching brackets. Defaults to `false`. pub rainbow_brackets: bool, + /// Whether to enable Kitty Keyboard Protocol + pub kitty_keyboard_protocol: KittyKeyboardProtocolConfig, +} + +#[derive(Debug, Default, PartialEq, Eq, PartialOrd, Ord, Deserialize, Serialize, Clone, Copy)] +#[serde(rename_all = "kebab-case")] +pub enum KittyKeyboardProtocolConfig { + #[default] + Auto, + Disabled, + Enabled, } #[derive(Debug, Clone, PartialEq, Deserialize, Serialize, Eq, PartialOrd, Ord)] @@ -1065,6 +1076,7 @@ impl Default for Config { clipboard_provider: ClipboardProvider::default(), editor_config: true, rainbow_brackets: false, + kitty_keyboard_protocol: Default::default(), } } } @@ -2010,30 +2022,29 @@ impl Editor { } pub fn focus(&mut self, view_id: ViewId) { - let prev_id = std::mem::replace(&mut self.tree.focus, view_id); - - // if leaving the view: mode should reset and the cursor should be - // within view - if prev_id != view_id { - // TODO: Consult map for modes to change given file type? - - self.enter_normal_mode(); - self.ensure_cursor_in_view(view_id); + if self.tree.focus == view_id { + return; + } - // Update jumplist selections with new document changes. - for (view, _focused) in self.tree.views_mut() { - let doc = doc_mut!(self, &view.doc); - view.sync_changes(doc); - } - let view = view!(self, view_id); + // Reset mode to normal and ensure any pending changes are committed in the old document. + self.enter_normal_mode(); + let (view, doc) = current!(self); + doc.append_changes_to_history(view); + self.ensure_cursor_in_view(view_id); + // Update jumplist selections with new document changes. + for (view, _focused) in self.tree.views_mut() { let doc = doc_mut!(self, &view.doc); - doc.mark_as_focused(); - let focus_lost = self.tree.get(prev_id).doc; - dispatch(DocumentFocusLost { - editor: self, - doc: focus_lost, - }); + view.sync_changes(doc); } + + let prev_id = std::mem::replace(&mut self.tree.focus, view_id); + doc_mut!(self).mark_as_focused(); + + let focus_lost = self.tree.get(prev_id).doc; + dispatch(DocumentFocusLost { + editor: self, + doc: focus_lost, + }); } pub fn focus_next(&mut self) { diff --git a/helix-view/src/graphics.rs b/helix-view/src/graphics.rs index c22d873f..28b6e042 100644 --- a/helix-view/src/graphics.rs +++ b/helix-view/src/graphics.rs @@ -289,30 +289,28 @@ impl Color { } #[cfg(feature = "term")] -impl From for crossterm::style::Color { +impl From for termina::style::ColorSpec { fn from(color: Color) -> Self { - use crossterm::style::Color as CColor; - match color { - Color::Reset => CColor::Reset, - Color::Black => CColor::Black, - Color::Red => CColor::DarkRed, - Color::Green => CColor::DarkGreen, - Color::Yellow => CColor::DarkYellow, - Color::Blue => CColor::DarkBlue, - Color::Magenta => CColor::DarkMagenta, - Color::Cyan => CColor::DarkCyan, - Color::Gray => CColor::DarkGrey, - Color::LightRed => CColor::Red, - Color::LightGreen => CColor::Green, - Color::LightBlue => CColor::Blue, - Color::LightYellow => CColor::Yellow, - Color::LightMagenta => CColor::Magenta, - Color::LightCyan => CColor::Cyan, - Color::LightGray => CColor::Grey, - Color::White => CColor::White, - Color::Indexed(i) => CColor::AnsiValue(i), - Color::Rgb(r, g, b) => CColor::Rgb { r, g, b }, + Color::Reset => Self::Reset, + Color::Black => Self::BLACK, + Color::Red => Self::RED, + Color::Green => Self::GREEN, + Color::Yellow => Self::YELLOW, + Color::Blue => Self::BLUE, + Color::Magenta => Self::MAGENTA, + Color::Cyan => Self::CYAN, + Color::Gray => Self::BRIGHT_BLACK, + Color::White => Self::BRIGHT_WHITE, + Color::LightRed => Self::BRIGHT_RED, + Color::LightGreen => Self::BRIGHT_GREEN, + Color::LightBlue => Self::BRIGHT_BLUE, + Color::LightYellow => Self::BRIGHT_YELLOW, + Color::LightMagenta => Self::BRIGHT_MAGENTA, + Color::LightCyan => Self::BRIGHT_CYAN, + Color::LightGray => Self::WHITE, + Color::Indexed(i) => Self::PaletteIndex(i), + Color::Rgb(r, g, b) => termina::style::RgbColor::new(r, g, b).into(), } } } @@ -369,15 +367,15 @@ impl FromStr for UnderlineStyle { } #[cfg(feature = "term")] -impl From for crossterm::style::Attribute { +impl From for termina::style::Underline { fn from(style: UnderlineStyle) -> Self { match style { - UnderlineStyle::Line => crossterm::style::Attribute::Underlined, - UnderlineStyle::Curl => crossterm::style::Attribute::Undercurled, - UnderlineStyle::Dotted => crossterm::style::Attribute::Underdotted, - UnderlineStyle::Dashed => crossterm::style::Attribute::Underdashed, - UnderlineStyle::DoubleLine => crossterm::style::Attribute::DoubleUnderlined, - UnderlineStyle::Reset => crossterm::style::Attribute::NoUnderline, + UnderlineStyle::Reset => Self::None, + UnderlineStyle::Line => Self::Single, + UnderlineStyle::Curl => Self::Curly, + UnderlineStyle::Dotted => Self::Dotted, + UnderlineStyle::Dashed => Self::Dashed, + UnderlineStyle::DoubleLine => Self::Double, } } } diff --git a/helix-view/src/input.rs b/helix-view/src/input.rs index d359db70..6b3a9756 100644 --- a/helix-view/src/input.rs +++ b/helix-view/src/input.rs @@ -1,4 +1,4 @@ -//! Input event handling, currently backed by crossterm. +//! Input event handling, currently backed by termina. use anyhow::{anyhow, Error}; use helix_core::unicode::{segmentation::UnicodeSegmentation, width::UnicodeWidthStr}; use serde::de::{self, Deserialize, Deserializer}; @@ -65,7 +65,7 @@ pub enum MouseButton { pub struct KeyEvent { pub code: KeyCode, pub modifiers: KeyModifiers, - // TODO: crossterm now supports kind & state if terminal supports kitty's extended protocol + // TODO: termina now supports kind & state if terminal supports kitty's extended protocol } impl KeyEvent { @@ -459,28 +459,31 @@ impl<'de> Deserialize<'de> for KeyEvent { } #[cfg(feature = "term")] -impl From for Event { - fn from(event: crossterm::event::Event) -> Self { +impl From for Event { + fn from(event: termina::event::Event) -> Self { match event { - crossterm::event::Event::Key(key) => Self::Key(key.into()), - crossterm::event::Event::Mouse(mouse) => Self::Mouse(mouse.into()), - crossterm::event::Event::Resize(w, h) => Self::Resize(w, h), - crossterm::event::Event::FocusGained => Self::FocusGained, - crossterm::event::Event::FocusLost => Self::FocusLost, - crossterm::event::Event::Paste(s) => Self::Paste(s), + termina::event::Event::Key(key) => Self::Key(key.into()), + termina::event::Event::Mouse(mouse) => Self::Mouse(mouse.into()), + termina::event::Event::WindowResized(termina::WindowSize { rows, cols, .. }) => { + Self::Resize(cols, rows) + } + termina::event::Event::FocusIn => Self::FocusGained, + termina::event::Event::FocusOut => Self::FocusLost, + termina::event::Event::Paste(s) => Self::Paste(s), + _ => unreachable!(), } } } #[cfg(feature = "term")] -impl From for MouseEvent { +impl From for MouseEvent { fn from( - crossterm::event::MouseEvent { + termina::event::MouseEvent { kind, column, row, modifiers, - }: crossterm::event::MouseEvent, + }: termina::event::MouseEvent, ) -> Self { Self { kind: kind.into(), @@ -492,40 +495,40 @@ impl From for MouseEvent { } #[cfg(feature = "term")] -impl From for MouseEventKind { - fn from(kind: crossterm::event::MouseEventKind) -> Self { +impl From for MouseEventKind { + fn from(kind: termina::event::MouseEventKind) -> Self { match kind { - crossterm::event::MouseEventKind::Down(button) => Self::Down(button.into()), - crossterm::event::MouseEventKind::Up(button) => Self::Up(button.into()), - crossterm::event::MouseEventKind::Drag(button) => Self::Drag(button.into()), - crossterm::event::MouseEventKind::Moved => Self::Moved, - crossterm::event::MouseEventKind::ScrollDown => Self::ScrollDown, - crossterm::event::MouseEventKind::ScrollUp => Self::ScrollUp, - crossterm::event::MouseEventKind::ScrollLeft => Self::ScrollLeft, - crossterm::event::MouseEventKind::ScrollRight => Self::ScrollRight, + termina::event::MouseEventKind::Down(button) => Self::Down(button.into()), + termina::event::MouseEventKind::Up(button) => Self::Up(button.into()), + termina::event::MouseEventKind::Drag(button) => Self::Drag(button.into()), + termina::event::MouseEventKind::Moved => Self::Moved, + termina::event::MouseEventKind::ScrollDown => Self::ScrollDown, + termina::event::MouseEventKind::ScrollUp => Self::ScrollUp, + termina::event::MouseEventKind::ScrollLeft => Self::ScrollLeft, + termina::event::MouseEventKind::ScrollRight => Self::ScrollRight, } } } #[cfg(feature = "term")] -impl From for MouseButton { - fn from(button: crossterm::event::MouseButton) -> Self { +impl From for MouseButton { + fn from(button: termina::event::MouseButton) -> Self { match button { - crossterm::event::MouseButton::Left => MouseButton::Left, - crossterm::event::MouseButton::Right => MouseButton::Right, - crossterm::event::MouseButton::Middle => MouseButton::Middle, + termina::event::MouseButton::Left => MouseButton::Left, + termina::event::MouseButton::Right => MouseButton::Right, + termina::event::MouseButton::Middle => MouseButton::Middle, } } } #[cfg(feature = "term")] -impl From for KeyEvent { +impl From for KeyEvent { fn from( - crossterm::event::KeyEvent { + termina::event::KeyEvent { code, modifiers, .. - }: crossterm::event::KeyEvent, + }: termina::event::KeyEvent, ) -> Self { - if code == crossterm::event::KeyCode::BackTab { + if code == termina::event::KeyCode::BackTab { // special case for BackTab -> Shift-Tab let mut modifiers: KeyModifiers = modifiers.into(); modifiers.insert(KeyModifiers::SHIFT); @@ -543,24 +546,24 @@ impl From for KeyEvent { } #[cfg(feature = "term")] -impl From for crossterm::event::KeyEvent { +impl From for termina::event::KeyEvent { fn from(KeyEvent { code, modifiers }: KeyEvent) -> Self { if code == KeyCode::Tab && modifiers.contains(KeyModifiers::SHIFT) { // special case for Shift-Tab -> BackTab let mut modifiers = modifiers; modifiers.remove(KeyModifiers::SHIFT); - crossterm::event::KeyEvent { - code: crossterm::event::KeyCode::BackTab, + termina::event::KeyEvent { + code: termina::event::KeyCode::BackTab, modifiers: modifiers.into(), - kind: crossterm::event::KeyEventKind::Press, - state: crossterm::event::KeyEventState::NONE, + kind: termina::event::KeyEventKind::Press, + state: termina::event::KeyEventState::NONE, } } else { - crossterm::event::KeyEvent { + termina::event::KeyEvent { code: code.into(), modifiers: modifiers.into(), - kind: crossterm::event::KeyEventKind::Press, - state: crossterm::event::KeyEventState::NONE, + kind: termina::event::KeyEventKind::Press, + state: termina::event::KeyEventState::NONE, } } } diff --git a/helix-view/src/keyboard.rs b/helix-view/src/keyboard.rs index d816a52e..c3831143 100644 --- a/helix-view/src/keyboard.rs +++ b/helix-view/src/keyboard.rs @@ -13,9 +13,9 @@ bitflags! { } #[cfg(feature = "term")] -impl From for crossterm::event::KeyModifiers { +impl From for termina::event::Modifiers { fn from(key_modifiers: KeyModifiers) -> Self { - use crossterm::event::KeyModifiers as CKeyModifiers; + use termina::event::Modifiers as CKeyModifiers; let mut result = CKeyModifiers::NONE; @@ -37,9 +37,9 @@ impl From for crossterm::event::KeyModifiers { } #[cfg(feature = "term")] -impl From for KeyModifiers { - fn from(val: crossterm::event::KeyModifiers) -> Self { - use crossterm::event::KeyModifiers as CKeyModifiers; +impl From for KeyModifiers { + fn from(val: termina::event::Modifiers) -> Self { + use termina::event::Modifiers as CKeyModifiers; let mut result = KeyModifiers::NONE; @@ -92,9 +92,9 @@ pub enum MediaKeyCode { } #[cfg(feature = "term")] -impl From for crossterm::event::MediaKeyCode { +impl From for termina::event::MediaKeyCode { fn from(media_key_code: MediaKeyCode) -> Self { - use crossterm::event::MediaKeyCode as CMediaKeyCode; + use termina::event::MediaKeyCode as CMediaKeyCode; match media_key_code { MediaKeyCode::Play => CMediaKeyCode::Play, @@ -115,9 +115,9 @@ impl From for crossterm::event::MediaKeyCode { } #[cfg(feature = "term")] -impl From for MediaKeyCode { - fn from(val: crossterm::event::MediaKeyCode) -> Self { - use crossterm::event::MediaKeyCode as CMediaKeyCode; +impl From for MediaKeyCode { + fn from(val: termina::event::MediaKeyCode) -> Self { + use termina::event::MediaKeyCode as CMediaKeyCode; match val { CMediaKeyCode::Play => MediaKeyCode::Play, @@ -171,9 +171,9 @@ pub enum ModifierKeyCode { } #[cfg(feature = "term")] -impl From for crossterm::event::ModifierKeyCode { +impl From for termina::event::ModifierKeyCode { fn from(modifier_key_code: ModifierKeyCode) -> Self { - use crossterm::event::ModifierKeyCode as CModifierKeyCode; + use termina::event::ModifierKeyCode as CModifierKeyCode; match modifier_key_code { ModifierKeyCode::LeftShift => CModifierKeyCode::LeftShift, @@ -195,9 +195,9 @@ impl From for crossterm::event::ModifierKeyCode { } #[cfg(feature = "term")] -impl From for ModifierKeyCode { - fn from(val: crossterm::event::ModifierKeyCode) -> Self { - use crossterm::event::ModifierKeyCode as CModifierKeyCode; +impl From for ModifierKeyCode { + fn from(val: termina::event::ModifierKeyCode) -> Self { + use termina::event::ModifierKeyCode as CModifierKeyCode; match val { CModifierKeyCode::LeftShift => ModifierKeyCode::LeftShift, @@ -280,9 +280,9 @@ pub enum KeyCode { } #[cfg(feature = "term")] -impl From for crossterm::event::KeyCode { +impl From for termina::event::KeyCode { fn from(key_code: KeyCode) -> Self { - use crossterm::event::KeyCode as CKeyCode; + use termina::event::KeyCode as CKeyCode; match key_code { KeyCode::Backspace => CKeyCode::Backspace, @@ -298,10 +298,10 @@ impl From for crossterm::event::KeyCode { KeyCode::Tab => CKeyCode::Tab, KeyCode::Delete => CKeyCode::Delete, KeyCode::Insert => CKeyCode::Insert, - KeyCode::F(f_number) => CKeyCode::F(f_number), + KeyCode::F(f_number) => CKeyCode::Function(f_number), KeyCode::Char(character) => CKeyCode::Char(character), KeyCode::Null => CKeyCode::Null, - KeyCode::Esc => CKeyCode::Esc, + KeyCode::Esc => CKeyCode::Escape, KeyCode::CapsLock => CKeyCode::CapsLock, KeyCode::ScrollLock => CKeyCode::ScrollLock, KeyCode::NumLock => CKeyCode::NumLock, @@ -316,9 +316,9 @@ impl From for crossterm::event::KeyCode { } #[cfg(feature = "term")] -impl From for KeyCode { - fn from(val: crossterm::event::KeyCode) -> Self { - use crossterm::event::KeyCode as CKeyCode; +impl From for KeyCode { + fn from(val: termina::event::KeyCode) -> Self { + use termina::event::KeyCode as CKeyCode; match val { CKeyCode::Backspace => KeyCode::Backspace, @@ -335,10 +335,10 @@ impl From for KeyCode { CKeyCode::BackTab => unreachable!("BackTab should have been handled on KeyEvent level"), CKeyCode::Delete => KeyCode::Delete, CKeyCode::Insert => KeyCode::Insert, - CKeyCode::F(f_number) => KeyCode::F(f_number), + CKeyCode::Function(f_number) => KeyCode::F(f_number), CKeyCode::Char(character) => KeyCode::Char(character), CKeyCode::Null => KeyCode::Null, - CKeyCode::Esc => KeyCode::Esc, + CKeyCode::Escape => KeyCode::Esc, CKeyCode::CapsLock => KeyCode::CapsLock, CKeyCode::ScrollLock => KeyCode::ScrollLock, CKeyCode::NumLock => KeyCode::NumLock, diff --git a/helix-view/src/lib.rs b/helix-view/src/lib.rs index e7132647..a7108fa8 100644 --- a/helix-view/src/lib.rs +++ b/helix-view/src/lib.rs @@ -2,7 +2,6 @@ pub mod macros; pub mod annotations; -pub mod base64; pub mod clipboard; pub mod document; pub mod editor; diff --git a/languages.toml b/languages.toml index 19133a86..6094faa7 100644 --- a/languages.toml +++ b/languages.toml @@ -43,17 +43,20 @@ elm-language-server = { command = "elm-language-server" } elp = { command = "elp", args = ["server"] } elvish = { command = "elvish", args = ["-lsp"] } erlang-ls = { command = "erlang_ls" } +expert = { command = "expert" } fennel-ls = { command = "fennel-ls" } fish-lsp = { command = "fish-lsp", args = ["start"], environment = { fish_lsp_show_client_popups = "false" } } forc = { command = "forc", args = ["lsp"] } forth-lsp = { command = "forth-lsp" } fortls = { command = "fortls", args = ["--lowercase_intrinsics"] } fsharp-ls = { command = "fsautocomplete", config = { AutomaticWorkspaceInit = true } } +gitlab-ci-ls = { command = "gitlab-ci-ls" } gleam = { command = "gleam", args = ["lsp"] } glsl_analyzer = { command = "glsl_analyzer" } graphql-language-service = { command = "graphql-lsp", args = ["server", "-m", "stream"] } harper-ls = { command = "harper-ls", args = ["--stdio"] } haskell-language-server = { command = "haskell-language-server-wrapper", args = ["--lsp"] } +hdls = { command = "hdls" } hyprls = { command = "hyprls" } idris2-lsp = { command = "idris2-lsp" } intelephense = { command = "intelephense", args = ["--stdio"] } @@ -67,7 +70,7 @@ koka = { command = "koka", args = ["--language-server", "--lsstdio"] } koto-ls = { command = "koto-ls" } kotlin-lsp = { command = "kotlin-lsp", args = ["--stdio"] } kotlin-language-server = { command = "kotlin-language-server" } -lean = { command = "lean", args = ["--server"] } +lean = { command = "lake", args = ["serve"] } ltex-ls = { command = "ltex-ls" } ltex-ls-plus = { command = "ltex-ls-plus" } markdoc-ls = { command = "markdoc-ls", args = ["--stdio"] } @@ -139,6 +142,7 @@ vscode-html-language-server = { command = "vscode-html-language-server", args = vscode-json-language-server = { command = "vscode-json-language-server", args = ["--stdio"], config = { provideFormatter = true, json = { validate = { enable = true } } } } vuels = { command = "vue-language-server", args = ["--stdio"], config = { typescript = { tsdk = "node_modules/typescript/lib/" } } } wgsl-analyzer = { command = "wgsl-analyzer" } +wikitext-lsp = { command = "wikitext-lsp", args = ["--stdio"]} yaml-language-server = { command = "yaml-language-server", args = ["--stdio"] } yls = { command = "yls", args = ["-vv"] } zls = { command = "zls" } @@ -275,6 +279,10 @@ mode = "location" command = "clarinet" args = ["lsp"] +[language-server.docker-language-server] +command = "docker-language-server" +args = ["start", "--stdio"] + [[language]] name = "rust" scope = "source.rust" @@ -351,7 +359,20 @@ source = { git = "https://github.com/FuelLabs/tree-sitter-sway", rev = "e491a005 name = "toml" scope = "source.toml" injection-regex = "toml" -file-types = ["toml", { glob = "pdm.lock" }, { glob = "poetry.lock" }, { glob = "Cargo.lock" }, { glob = "uv.lock" }] +file-types = [ + "toml", + { glob = "pdm.lock" }, + { glob = "poetry.lock" }, + { glob = "Cargo.lock" }, + { glob = "uv.lock" }, + { glob = "containers.conf" }, + { glob = "containers.conf.d/*.conf" }, + { glob = "containers.conf.modules/*.conf" }, + { glob = "mounts.conf" }, + { glob = "policy.conf" }, + { glob = "registries.conf" }, + { glob = "storage.conf" }, +] comment-token = "#" language-servers = [ "taplo", "tombi" ] indent = { tab-width = 2, unit = " " } @@ -409,7 +430,7 @@ file-types = ["ex", "exs", { glob = "mix.lock" }] shebangs = ["elixir"] roots = ["mix.exs", "mix.lock"] comment-token = "#" -language-servers = [ "elixir-ls" ] +language-servers = [ "elixir-ls", "expert" ] indent = { tab-width = 2, unit = " " } [[grammar]] @@ -446,6 +467,18 @@ formatter = { command = "fish_indent" } name = "fish" source = { git = "https://github.com/ram02z/tree-sitter-fish", rev = "a78aef9abc395c600c38a037ac779afc7e3cc9e0" } +[[language]] +name = "flatbuffers" +scope = "source.flatbuffers" +injection-regex = "(flatbuffers?|fbs)" +file-types = ["fbs"] +comment-token = "//" +indent = { tab-width = 2, unit = " " } + +[[grammar]] +name = "flatbuffers" +source = { git = "https://github.com/yuanchenxi95/tree-sitter-flatbuffers", rev = "95e6f9ef101ea97e870bf6eebc0bd1fdfbaf5490" } + [[language]] name = "mint" scope = "source.mint" @@ -675,7 +708,7 @@ scope = "source.csharp" injection-regex = "c-?sharp" file-types = ["cs", "csx", "cake"] roots = ["sln", "csproj"] -comment-token = "//" +comment-tokens = ["//", "///"] block-comment-tokens = { start = "/*", end = "*/" } indent = { tab-width = 4, unit = "\t" } language-servers = [ "omnisharp" ] @@ -779,7 +812,7 @@ args = { mode = "core", program = "{0}", coreFilePath = "{1}" } [[grammar]] name = "go" -source = { git = "https://github.com/tree-sitter/tree-sitter-go", rev = "64457ea6b73ef5422ed1687178d4545c3e91334a" } +source = { git = "https://github.com/tree-sitter/tree-sitter-go", rev = "12fe553fdaaa7449f764bc876fd777704d4fb752" } [[language]] name = "gomod" @@ -831,7 +864,7 @@ injection-regex = "go-format-string" [[grammar]] name = "go-format-string" -source = { git = "https://codeberg.org/kpbaks/tree-sitter-go-format-string", rev = "45b559b74be97535abfc77ade4405343a43e5ca4" } +source = { git = "https://codeberg.org/kpbaks/tree-sitter-go-format-string", rev = "06587ea641155db638f46a32c959d68796cd36bb" } [[language]] name = "javascript" @@ -938,7 +971,7 @@ indent = { tab-width = 2, unit = " " } [[grammar]] name = "css" -source = { git = "https://github.com/tree-sitter/tree-sitter-css", rev = "769203d0f9abe1a9a691ac2b9fe4bb4397a73c51" } +source = { git = "https://github.com/tree-sitter/tree-sitter-css", rev = "6e327db434fec0ee90f006697782e43ec855adf5" } [[language]] name = "scss" @@ -974,6 +1007,7 @@ scope = "source.htmldjango" injection-regex = "htmldjango" language-servers = ["djlsp", "vscode-html-language-server", "superhtml"] file-types = [] +roots = ["manage.py"] [language.auto-pairs] '"' = '"' @@ -1078,6 +1112,7 @@ file-types = [ { glob = "Scanfile" }, { glob = "Snapfile" }, { glob = "Gymfile" }, + { glob = ".irbrc" }, ] shebangs = ["ruby"] comment-token = "#" @@ -1116,6 +1151,7 @@ file-types = [ "zshrc_Apple_Terminal", { glob = "i3/config" }, { glob = "sway/config" }, + { glob = ".tmux.conf" }, { glob = "tmux.conf" }, { glob = ".bash_history" }, { glob = ".bash_login" }, @@ -1138,6 +1174,10 @@ file-types = [ { glob = ".yashrc" }, { glob = ".yash_profile" }, { glob = ".hushlogin" }, + { glob = ".xinitrc" }, # ~/.xinitrc + { glob = "xinitrc" }, # /etc/X11/xinit/xinitrc + { glob = ".xserverrc" }, # ~/.xserverrc + { glob = "xserverrc" }, # /etc/X11/xinit/xserverrc ] shebangs = ["sh", "bash", "dash", "zsh"] comment-token = "#" @@ -1452,7 +1492,7 @@ language-servers = [ "svelteserver" ] [[grammar]] name = "svelte" -source = { git = "https://github.com/Himujjal/tree-sitter-svelte", rev = "60ea1d673a1a3eeeb597e098d9ada9ed0c79ef4b" } +source = { git = "https://github.com/tree-sitter-grammars/tree-sitter-svelte", rev = "ae5199db47757f785e43a14b332118a5474de1a2" } [[language]] name = "vue" @@ -1479,6 +1519,8 @@ file-types = [ { glob = ".clang-format" }, { glob = ".clang-tidy" }, { glob = ".gem/credentials" }, + { glob = ".kube/config" }, + { glob = ".kube/kuberc" }, "sublime-syntax" ] comment-token = "#" @@ -1507,6 +1549,7 @@ scope = "source.haskell" injection-regex = "hs|haskell" file-types = ["hs", "hs-boot", "hsc"] roots = ["Setup.hs", "stack.yaml", "cabal.project"] +shebangs = ["runhaskell", "stack"] comment-token = "--" block-comment-tokens = { start = "{-", end = "-}" } language-servers = [ "haskell-language-server" ] @@ -1581,7 +1624,7 @@ args = { console = "internalConsole", attachCommands = [ "platform select remote [[grammar]] name = "zig" -source = { git = "https://github.com/tree-sitter-grammars/tree-sitter-zig", rev = "eb7d58c2dc4fbeea4745019dee8df013034ae66b" } +source = { git = "https://github.com/tree-sitter-grammars/tree-sitter-zig", rev = "6479aa13f32f701c383083d8b28360ebd682fb7d" } [[language]] name = "prolog" @@ -1659,7 +1702,22 @@ source = { git = "https://github.com/theHamsta/tree-sitter-glsl", rev = "88408ff [[language]] name = "perl" scope = "source.perl" -file-types = ["pl", "pm", "t", "psgi", "raku", "rakumod", "rakutest", "rakudoc", "nqp", "p6", "pl6", "pm6"] +file-types =[ + "pl", + "pm", + "t", + "psgi", + "raku", + "rakumod", + "rakutest", + "rakudoc", + "nqp", + "p6", + "pl6", + "pm6", + {glob = "latexmkrc"}, + {glob = ".latexmkrc"}, +] shebangs = ["perl"] comment-token = "#" language-servers = [ "perlnavigator" ] @@ -1906,7 +1964,7 @@ file-types = [ ] comment-token = "#" indent = { tab-width = 4, unit = " " } -language-servers = [ "docker-langserver" ] +language-servers = [ "docker-langserver", "docker-language-server" ] [[grammar]] name = "dockerfile" @@ -1916,7 +1974,7 @@ source = { git = "https://github.com/camdencheek/tree-sitter-dockerfile", rev = name = "docker-compose" scope = "source.yaml.docker-compose" roots = ["docker-compose.yaml", "docker-compose.yml", "compose.yaml", "compose.yml"] -language-servers = [ "docker-compose-langserver", "yaml-language-server" ] +language-servers = [ "docker-compose-langserver", "yaml-language-server", "docker-language-server" ] file-types = [{ glob = "docker-compose.yaml" }, { glob = "docker-compose.yml" }, { glob = "compose.yaml" }, { glob = "compose.yml" }] comment-token = "#" indent = { tab-width = 2, unit = " " } @@ -2007,7 +2065,7 @@ source = { git = "https://github.com/mtoohey31/tree-sitter-gitattributes", rev = [[language]] name = "git-ignore" scope = "source.gitignore" -file-types = [{ glob = ".gitignore_global" }, { glob = "git/ignore" }, { glob = ".ignore" }, { glob = "CODEOWNERS" }, { glob = ".config/helix/ignore" }, { glob = ".helix/ignore" }, { glob = ".*ignore" }, { glob = ".git-blame-ignore-revs" }] +file-types = [{ glob = ".gitignore_global" }, { glob = "git/ignore" }, { glob = ".git/info/exclude" }, { glob = ".ignore" }, { glob = "CODEOWNERS" }, { glob = ".config/helix/ignore" }, { glob = ".helix/ignore" }, { glob = ".*ignore" }, { glob = ".git-blame-ignore-revs" }] injection-regex = "git-ignore" comment-token = "#" grammar = "gitignore" @@ -2171,7 +2229,7 @@ auto-format = true [[grammar]] name = "gleam" -source = { git = "https://github.com/gleam-lang/tree-sitter-gleam", rev = "ee93c639dc82148d716919df336ad612fd33538e" } +source = { git = "https://github.com/gleam-lang/tree-sitter-gleam", rev = "dae1551a9911b24f41d876c23f2ab05ece0a9d4c" } [[language]] name = "quarto" @@ -2292,7 +2350,7 @@ file-types = ["heex"] roots = ["mix.exs", "mix.lock"] block-comment-tokens = { start = "" } indent = { tab-width = 2, unit = " " } -language-servers = [ "elixir-ls" ] +language-servers = [ "elixir-ls", "expert" ] [[grammar]] name = "heex" @@ -2492,6 +2550,7 @@ injection-regex = "scheme" file-types = ["ss", "scm", "sld"] shebangs = ["scheme", "guile", "chicken"] comment-token = ";" +block-comment-tokens = { start = "#|", end = "|#" } indent = { tab-width = 2, unit = " " } [language.auto-pairs] @@ -2523,7 +2582,7 @@ source = {git = "https://github.com/vlang/v-analyzer", subpath = "tree_sitter_v" [[language]] name = "verilog" scope = "source.verilog" -file-types = ["v", "vh", "sv", "svh"] +file-types = ["v", "vh"] comment-token = "//" block-comment-tokens = { start = "/*", end = "*/" } language-servers = [ "svlangserver" ] @@ -2534,6 +2593,19 @@ injection-regex = "verilog" name = "verilog" source = { git = "https://github.com/tree-sitter/tree-sitter-verilog", rev = "4457145e795b363f072463e697dfe2f6973c9a52" } +[[language]] +name = "systemverilog" +scope = "source.systemverilog" +file-types = ["sv", "svh"] +comment-token = "//" +block-comment-tokens = { start = "/*", end = "*/" } +indent = { tab-width = 2, unit = " " } +language-servers = ["verible-verilog-ls"] + +[[grammar]] +name = "systemverilog" +source = { git = "https://github.com/gmlarumbe/tree-sitter-systemverilog", rev = "3bd2c5d2f60ed7b07c2177b34e2976ad9a87c659" } + [[language]] name = "edoc" scope = "source.edoc" @@ -2602,7 +2674,7 @@ source = { git = "https://github.com/sogaiu/tree-sitter-clojure", rev = "e57c569 name = "starlark" scope = "source.starlark" injection-regex = "(starlark|bzl|bazel|buck)" -file-types = ["bzl", "bazel", "star", { glob = "BUILD" }, { glob = "BUCK" }, { glob = "BUILD.*" }, { glob = "Tiltfile" }, { glob = "WORKSPACE" }, { glob = "WORKSPACE.bzlmod" }] +file-types = ["bzl", "bazel", "star", { glob = "BUILD" }, { glob = "BUCK" }, { glob = "BUILD.*" }, { glob = "Tiltfile" }, { glob = "WORKSPACE" }, { glob = "WORKSPACE.bzlmod" }, { glob = "PACKAGE" }] comment-token = "#" indent = { tab-width = 4, unit = " " } language-servers = [ "starpls" ] @@ -2637,7 +2709,7 @@ language-servers = [ "idris2-lsp" ] name = "fortran" scope = "source.fortran" injection-regex = "fortran" -file-types = ["f", "for", "f90", "f95", "f03"] +file-types = ["f", "for", "f90", "f95", "f03", "F", "F90", "F95", "F03"] roots = ["fpm.toml"] comment-token = "!" indent = { tab-width = 4, unit = " "} @@ -2645,7 +2717,7 @@ language-servers = [ "fortls" ] [[grammar]] name = "fortran" -source = { git = "https://github.com/stadelmanma/tree-sitter-fortran", rev = "f0f2f100952a353e64e26b0fa710b4c296d7af13" } +source = { git = "https://github.com/stadelmanma/tree-sitter-fortran", rev = "8334abca785db3a041292e3b3b818a82a55b238f" } [[language]] name = "ungrammar" @@ -2970,7 +3042,10 @@ file-types = [ "sublime-snippet", "xsl", "mpd", - "smil" + "smil", + "gpx", + "fodt", + "fods", ] block-comment-tokens = { start = "" } indent = { tab-width = 2, unit = " " } @@ -3078,9 +3153,11 @@ file-types = [ { glob = "hgrc" }, { glob = "npmrc" }, { glob = "rclone.conf" }, + { glob = ".aws/config" }, "properties", "cfg", - "directory" + "directory", + { glob = ".wslconfig" }, ] injection-regex = "ini" comment-token = "#" @@ -3155,7 +3232,7 @@ indent = { tab-width = 2, unit = " " } [[grammar]] name = "matlab" -source = { git = "https://github.com/acristoffers/tree-sitter-matlab", rev = "b0a0198b182574cd3ca0447264c83331901b9338" } +source = { git = "https://github.com/acristoffers/tree-sitter-matlab", rev = "585b52b9b16d8e626299a76360ef6ab4f9731aed" } [[language]] name = "ponylang" @@ -3350,6 +3427,18 @@ language-servers = [ "cs" ] name = "smithy" source = { git = "https://github.com/indoorvivants/tree-sitter-smithy", rev = "8327eb84d55639ffbe08c9dc82da7fff72a1ad07" } +[[language]] +name = "hdl" +scope = "source.hdl" +file-types = ["hdl"] +indent = { tab-width = 4, unit = " " } +injection-regex = "hdl" +language-servers = [ "hdls" ] + +[[grammar]] +name = "hdl" +source = { git = "https://github.com/quantonganh/tree-sitter-hdl", rev="293902330423b2cd36ab1ec4b6b967163a4ed57b" } + [[language]] name = "vhdl" scope = "source.vhdl" @@ -3419,7 +3508,7 @@ indent = { tab-width = 2, unit = " " } [[grammar]] name = "hurl" -source = { git = "https://github.com/pfeiferj/tree-sitter-hurl", rev = "cd1a0ada92cc73dd0f4d7eedc162be4ded758591" } +source = { git = "https://github.com/pfeiferj/tree-sitter-hurl", rev = "1124058cd192e80d80914652a5850a5b1887cc10" } [[language]] name = "markdoc" @@ -3457,7 +3546,7 @@ language-servers = ["just-lsp"] [[grammar]] name = "just" -source = { git = "https://github.com/poliorcetics/tree-sitter-just", rev = "0f84211c637813bcf1eb32c9e35847cdaea8760d" } +source = { git = "https://github.com/poliorcetics/tree-sitter-just", rev = "b75dace757e5d122d25c1a1a7772cb87b560f829" } [[language]] name = "gn" @@ -3595,7 +3684,7 @@ name = "jjdescription" scope = "jj.description" file-types = [{ glob = "*.jjdescription" }] comment-token = "JJ:" -indent = { tab-width = 2, unit = " " } +indent = { tab-width = 4, unit = " " } rulers = [51, 73] text-width = 72 @@ -3733,7 +3822,7 @@ language-servers = [ "templ" ] [[grammar]] name = "templ" -source = { git = "https://github.com/vrischmann/tree-sitter-templ", rev = "db662414ccd6f7c78b1e834e7abe11c224b04759" } +source = { git = "https://github.com/vrischmann/tree-sitter-templ", rev = "47594c5cbef941e6a3ccf4ddb934a68cf4c68075" } [[language]] name = "dbml" @@ -3806,7 +3895,7 @@ language-servers = ["koka"] [[grammar]] name = "koka" -source = { git = "https://github.com/mtoohey31/tree-sitter-koka", rev = "96d070c3700692858035f3524cc0ad944cef2594" } +source = { git = "https://github.com/koka-community/tree-sitter-koka", rev = "fd3b482274d6988349ba810ea5740e29153b1baf" } [[language]] name = "tact" @@ -4281,7 +4370,7 @@ formatter = {command = "koto", args = ["--format"]} [[grammar]] name = "koto" -source = { git = "https://github.com/koto-lang/tree-sitter-koto", rev = "2ffc77c14f0ac1674384ff629bfc207b9c57ed89" } +source = { git = "https://github.com/koto-lang/tree-sitter-koto", rev = "633744bca404ae4edb961a3c2d7bc947a987afa4" } [[language]] name = "gpr" @@ -4456,6 +4545,8 @@ indent = { tab-width = 4, unit = "\t" } file-types = [ "vim", { glob = ".vimrc" }, + { glob = ".nvimrc" }, + { glob = ".exrc" } ] [[language]] @@ -4605,3 +4696,150 @@ comment-tokens = ["#"] [[grammar]] name = "properties" source = { git = "https://github.com/tree-sitter-grammars/tree-sitter-properties", rev = "579b62f5ad8d96c2bb331f07d1408c92767531d9" } + +[[language]] +name = "robots.txt" +scope = "source.robots.txt" +file-types = [{ glob = "robots.txt" }] +injection-regex = "robots[\\.-]txt" +grammar = "robots" +comment-token = "#" + +[[grammar]] +name = "robots" +source = { git = "https://github.com/opa-oz/tree-sitter-robots-txt", rev = "8e3a4205b76236bb6dbebdbee5afc262ce38bb62" } + +[[language]] +name = "pip-requirements" +scope = "source.pip-requirements" +injection-regex = "(pip-)?requirements(\\.txt)?" +grammar = "requirements" +file-types = [{ glob = "requirements.txt" }, { glob = "constraints.txt" }] + +[[grammar]] +name = "requirements" +source = { git = "https://github.com/tree-sitter-grammars/tree-sitter-requirements", rev = "caeb2ba854dea55931f76034978de1fd79362939" } + +[[language]] +name = "kconfig" +file-types = ["kconfig", { glob = "kconfig.*" }] +scope = "source.kconfig" + +[[grammar]] +name = "kconfig" +source = { git = "https://github.com/tree-sitter-grammars/tree-sitter-kconfig" , rev = "9ac99fe4c0c27a35dc6f757cef534c646e944881" } + +[[language]] +name = "doxyfile" +scope = "source.doxyfile" +injection-regex = "[Dd]oxyfile" +file-types = [{ glob = "Doxyfile" }] +comment-token = "#" +indent = { tab-width = 4, unit = " " } + +[[grammar]] +name = "doxyfile" +source = { git = "https://github.com/tingerrr/tree-sitter-doxyfile/", rev = "18e44c6da639632a4e42264c7193df34be915f34" } + +[[language]] +name = "cross-config" +scope = "source.cross-config" +injection-regex = "cross(-config)" +grammar = "toml" +comment-token = "#" +file-types = [{glob = "Cross.toml"}] +language-servers = [ "taplo", "tombi" ] +indent = { tab-width = 2, unit = " " } + +[[language]] +name = "git-cliff-config" +scope = "source.git-cliff-config" +injection-regex = "git-cliff(-config)" +grammar = "toml" +comment-token = "#" +file-types = [{ glob = "cliff.toml" }] +language-servers = ["taplo", "tombi"] +indent = { tab-width = 2, unit = " " } + +[[language]] +name = "cython" +scope = "source.cython" +file-types = ["pxd", "pxi", "pyx"] +comment-token = "#" +roots = ["pyproject.toml", "setup.py", "poetry.lock"] +indent = { tab-width = 4, unit = " " } + +[[grammar]] +name = "cython" +source = { git = "https://github.com/b0o/tree-sitter-cython", rev = "62f44f5e7e41dde03c5f0a05f035e293bcf2bcf8" } + +[[language]] +name = "shellcheckrc" +scope = "source.shellcheckrc" +injection-regex = "shellcheck(rc)?" +file-types = [{glob = "shellcheckrc"}, {glob = ".shellcheckrc"}] +comment-token = "#" + +[[grammar]] +name = "shellcheckrc" +source = {git = "https://codeberg.org/kpbaks/tree-sitter-shellcheckrc", rev = "ad3da4e8f7fd72dcc5e93a6b89822c59a7cd10ff"} + +[[grammar]] +name = "strictdoc" +source = { git = "https://github.com/manueldiagostino/tree-sitter-strictdoc", rev = "070edcf23f7c85af355437706048f73833e0ea10" } + +[[language]] +name = "strictdoc" +scope = "source.strictdoc" +injection-regex = "strictdoc" +file-types = ["sdoc", "sgra"] +comment-token = ".." + +[[language]] +name = "docker-bake" +scope = "source.docker-bake" +injection-regex = "docker-bake" +grammar = "hcl" +file-types = [ + { glob = "docker-bake.hcl" }, + { glob = "docker-bake.override.hcl" }, +] +comment-token = "#" +block-comment-tokens = { start = "/*", end = "*/" } +indent = { tab-width = 2, unit = " " } +language-servers = ["docker-language-server"] + +[[language]] +name = "gitlab-ci" +scope = "source.gitlab-ci" +injection-regex = "^gitlab-ci$" +file-types = [{ glob = ".gitlab-ci.yml" }] +grammar = "yaml" +indent = { tab-width = 2, unit = " " } +language-servers = ["yaml-language-server", "gitlab-ci-ls"] +comment-token = "#" + +[[grammar]] +name = "wikitext" +source = { git = "https://github.com/santhoshtr/tree-sitter-wikitext", rev = "444214b31695e9dd4d32fb06247397fb8778a9d2"} + +[[language]] +name = "wikitext" +scope = "source.wikitext" +file-types = ["wikimedia", "mediawiki", "wikitext"] +language-servers = ["wikitext-lsp"] +indent = { tab-width = 2, unit = " " } +block-comment-tokens = { start = "" } +word-completion.trigger-length = 4 + +[[language]] +name = "slisp" +scope = "source.sl" +injection-regex = "sl" +file-types = ["sl"] +comment-token = ";" +indent = { tab-width = 2, unit = " " } + +[[grammar]] +name = "slisp" +source = { git = "https://github.com/xenogenics/tree-sitter-slisp", rev = "29f9c6707ce9dfc2fc915d175ec720b207f179f3" } diff --git a/runtime/queries/_typescript/highlights.scm b/runtime/queries/_typescript/highlights.scm index 8ce9cb65..0ec1f9a6 100644 --- a/runtime/queries/_typescript/highlights.scm +++ b/runtime/queries/_typescript/highlights.scm @@ -79,6 +79,7 @@ (property_signature "?" @punctuation.special) (conditional_type ["?" ":"] @operator) +(ternary_expression ["?" ":"] @operator) ; Keywords ; -------- diff --git a/runtime/queries/bash/injections.scm b/runtime/queries/bash/injections.scm index d6771e44..bf50c060 100644 --- a/runtime/queries/bash/injections.scm +++ b/runtime/queries/bash/injections.scm @@ -9,3 +9,30 @@ ((regex) @injection.content (#set! injection.language "regex")) + +(command + name: (command_name (word) @_command (#any-of? @_command "jq" "jaq")) + argument: [ + (raw_string) @injection.content + (string (string_content) @injection.content) + ] + (#set! injection.language "jq")) + +(command + name: (command_name (word) @_command (#eq? @_command "alias")) + argument: (concatenation + (word) + [ + (raw_string) @injection.content + (string (string_content) @injection.content) + ]) + (#set! injection.language "bash")) + +(command + name: (command_name (word) @_command (#any-of? @_command "eval" "trap")) + . + argument: [ + (raw_string) @injection.content + (string (string_content) @injection.content) + ] + (#set! injection.language "bash")) diff --git a/runtime/queries/css/highlights.scm b/runtime/queries/css/highlights.scm index e7f73219..6cf5e0e7 100644 --- a/runtime/queries/css/highlights.scm +++ b/runtime/queries/css/highlights.scm @@ -1,67 +1,78 @@ (comment) @comment [ - (tag_name) - (nesting_selector) - (universal_selector) + (tag_name) + (nesting_selector) + (universal_selector) ] @tag [ - "~" - ">" - "+" - "-" - "*" - "/" - "=" - "^=" - "|=" - "~=" - "$=" - "*=" + "~" + ">" + "+" + "-" + "*" + "/" + "=" + "^=" + "|=" + "~=" + "$=" + "*=" ] @operator [ - "and" - "not" - "only" - "or" + "and" + "not" + "only" + "or" ] @keyword.operator +(attribute_selector (plain_value) @string) + (property_name) @variable.other.member (plain_value) @constant ((property_name) @variable - (#match? @variable "^--")) + (#match? @variable "^--")) ((plain_value) @variable - (#match? @variable "^--")) + (#match? @variable "^--")) -(attribute_name) @attribute (class_name) @label (feature_name) @variable.other.member (function_name) @function (id_name) @label (namespace_name) @namespace +(attribute_name) @attribute +(pseudo_element_selector (tag_name) @attribute) +(pseudo_class_selector (class_name) @attribute) + [ - "@charset" - "@import" - "@keyframes" - "@media" - "@namespace" - "@supports" - (at_keyword) - (from) - (important) - (to) - (keyword_query) - (keyframes_name) - (unit) + "@charset" + "@import" + "@keyframes" + "@media" + "@namespace" + "@supports" + (at_keyword) + (from) + (important) + (to) + (keyword_query) + (keyframes_name) + (unit) ] @keyword +; @apply something; +(at_rule + . (at_keyword) @keyword + . (keyword_query) @constant + (#eq? @keyword "@apply")) + [ - "#" - "." + "#" + "." ] @punctuation (string_value) @string @@ -72,17 +83,17 @@ (float_value) @constant.numeric.float [ - ")" - "(" - "[" - "]" - "{" - "}" + ")" + "(" + "[" + "]" + "{" + "}" ] @punctuation.bracket [ - "," - ";" - ":" - "::" + "," + ";" + ":" + "::" ] @punctuation.delimiter diff --git a/runtime/queries/ecma/highlights.scm b/runtime/queries/ecma/highlights.scm index 4b23d66a..67052596 100644 --- a/runtime/queries/ecma/highlights.scm +++ b/runtime/queries/ecma/highlights.scm @@ -222,12 +222,15 @@ (super) @variable.builtin [ - (true) - (false) (null) (undefined) ] @constant.builtin +[ + (true) + (false) +] @constant.builtin.boolean + (comment) @comment [ diff --git a/runtime/queries/ecma/injections.scm b/runtime/queries/ecma/injections.scm index 72ad31da..8430994d 100644 --- a/runtime/queries/ecma/injections.scm +++ b/runtime/queries/ecma/injections.scm @@ -47,3 +47,18 @@ (#set! injection.language "comment") (#match? @injection.content "^//")) +; Match string literals passed to standard browser API methods that expects a +; css selector as argument. +; - https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector +; - https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll +; - https://developer.mozilla.org/en-US/docs/Web/API/Element/closest +; - https://developer.mozilla.org/en-US/docs/Web/API/Element/matches +; e.g. +; `const el = document.querySelector("div.user-panel.main input[name='login']");` +(call_expression + function: (member_expression + object: (identifier) @_object + property: (property_identifier) @_property (#any-of? @_property "querySelector" "querySelectorAll" "closest" "matches")) + arguments: (arguments + (string (string_fragment) @injection.content)) + (#set! injection.language "css")) diff --git a/runtime/queries/fish/injections.scm b/runtime/queries/fish/injections.scm index 321c90ad..81a067e2 100644 --- a/runtime/queries/fish/injections.scm +++ b/runtime/queries/fish/injections.scm @@ -1,2 +1,14 @@ ((comment) @injection.content (#set! injection.language "comment")) + +(command + name: (word) @_command (#any-of? @_command "jq" "jaq") + argument: [(double_quote_string) (single_quote_string)] @injection.content + (#set! injection.language "jq")) + +(command + name: (word) @_command (#eq? @_command "nu") + argument: (word) @_flag (#match? @_flag "^-.*c$") + argument: [(single_quote_string) (double_quote_string)] @injection.content + (#set! injection.language "nu") +) diff --git a/runtime/queries/fortran/folds.scm b/runtime/queries/fortran/folds.scm index f62d9dd7..01e24dd6 100644 --- a/runtime/queries/fortran/folds.scm +++ b/runtime/queries/fortran/folds.scm @@ -7,5 +7,6 @@ (derived_type_definition) (function) (subroutine) + (module_procedure) (interface) -] @fold \ No newline at end of file +] @fold diff --git a/runtime/queries/fortran/highlights.scm b/runtime/queries/fortran/highlights.scm index 0901a4aa..4b3c9b96 100644 --- a/runtime/queries/fortran/highlights.scm +++ b/runtime/queries/fortran/highlights.scm @@ -1,134 +1,167 @@ -[ - (intrinsic_type) - "dimension" - "intent" - "in" - "out" - "inout" - "type" - "endtype" - "attributes" - "global" - "device" - "host" - "grid_global" - "pointer" -] @keyword.storage.modifier +(identifier) @variable +(string_literal) @string +(number_literal) @constant.numeric +(boolean_literal) @constant.builtin.boolean +(comment) @comment [ - "contains" - "public" - "private" -] @keyword.directive + (intrinsic_type) + "allocatable" + "attributes" + "device" + "dimension" + "endtype" + "global" + "grid_global" + "host" + "import" + "in" + "inout" + "intent" + "optional" + "out" + "pointer" + "type" + "value" + ] @keyword.storage.modifier [ -"implicit" -(none) -] @attribute + "contains" + "private" + "public" + ] @keyword.directive [ - "function" - "endfunction" - "endprogram" - "subroutine" - "endsubroutine" -] @keyword.storage + (none) + "implicit" + ] @attribute [ - "module" - "endmodule" - "bind" - "call" - "class" - "continue" - "cycle" - "enumerator" - "equivalence" - "exit" - "format" - "goto" - "include" - "interface" - "endinterface" - "only" - "parameter" - "procedure" - "print" - "program" - "endprogram" - "read" - "return" - "result" - "stop" - "use" - "write" - "enum" - "endenum" - (default) - (procedure_qualifier) -] @keyword + "endfunction" + "endprogram" + "endsubroutine" + "function" + "procedure" + "subroutine" + ] @keyword.function [ - "if" - "then" - "else" - "elseif" - "endif" - "where" - "endwhere" -] @keyword.control.conditional + (default) + (procedure_qualifier) + "abstract" + "bind" + "call" + "class" + "continue" + "cycle" + "end" + "endenum" + "endinterface" + "endmodule" + "endprocedure" + "endprogram" + "endsubmodule" + "enum" + "enumerator" + "equivalence" + "exit" + "extends" + "format" + "goto" + "include" + "interface" + "intrinsic" + "non_intrinsic" + "module" + "namelist" + "only" + "parameter" + "print" + "procedure" + "program" + "read" + "stop" + "submodule" + "use" + "write" + ] @keyword + +"return" @keyword.control.return [ - "do" - "enddo" - "while" - "forall" -] @keyword.control.repeat + "else" + "elseif" + "elsewhere" + "endif" + "endwhere" + "if" + "then" + "where" + ] @keyword.control.conditional [ - "*" - "**" - "+" - "-" - "/" - "=" - "<" - ">" - "<=" - ">=" - "==" - "/=" -] @operator + "do" + "enddo" + "forall" + "while" + ] @keyword.control.repeat [ - "\\.and\\." - "\\.or\\." - "\\.lt\\." - "\\.gt\\." - "\\.ge\\." - "\\.le\\." - "\\.eq\\." - "\\.eqv\\." - "\\.neqv\\." -] @keyword.operator + "*" + "+" + "-" + "/" + "=" + "<" + ">" + "<=" + ">=" + "==" + "/=" + ] @operator -(identifier) @variable - - ;; Brackets - [ - "(" - ")" - "[" - "]" +[ + "\\.and\\." + "\\.or\\." + "\\.lt\\." + "\\.gt\\." + "\\.ge\\." + "\\.le\\." + "\\.eq\\." + "\\.eqv\\." + "\\.neqv\\." + ] @keyword.operator + +;; Brackets +[ + "(" + ")" + "[" + "]" + "<<<" + ">>>" ] @punctuation.bracket - ;; Delimiter - [ - "::" - "," - "%" +;; Delimiter +[ + "::" + "," + "%" ] @punctuation.delimiter +[ + "defined" + "#define" + "#elif" + "#else" + "#endif" + "#if" + "#ifdef" + "#ifndef" + "#include" + (preproc_directive) +] @keyword.directive + (parameters (identifier) @variable.parameter) @@ -138,26 +171,38 @@ (module_statement (name) @namespace) +(submodule_statement + (module_name) (name) @namespace) + (function_statement (name) @function) (subroutine_statement (name) @function) +(module_procedure_statement + (name) @function) + (end_program_statement (name) @namespace) (end_module_statement (name) @namespace) +(end_submodule_statement + (name) @namespace) + (end_function_statement (name) @function) (end_subroutine_statement (name) @function) +(end_module_procedure_statement + (name) @function) + (subroutine_call - (name) @function) + (identifier) @function) (keyword_argument name: (identifier) @keyword) @@ -165,8 +210,5 @@ (derived_type_member_expression (type_member) @variable.other.member) -(string_literal) @string -(number_literal) @constant.numeric -(boolean_literal) @constant.builtin.boolean -(comment) @comment - +(call_expression + (identifier) @function) diff --git a/runtime/queries/fortran/indents.scm b/runtime/queries/fortran/indents.scm index daa8bac1..2248b383 100644 --- a/runtime/queries/fortran/indents.scm +++ b/runtime/queries/fortran/indents.scm @@ -1,7 +1,9 @@ [ (module) + (submodule) (program) (subroutine) + (module_procedure) (function) ; (interface) (if_statement) @@ -13,8 +15,10 @@ [ (end_module_statement) + (end_submodule_statement) (end_program_statement) (end_subroutine_statement) + (end_module_procedure_statement) (end_function_statement) ; (end_interface_statement) (end_if_statement) @@ -24,4 +28,4 @@ (end_type_statement) (end_enum_statement) (end_where_statement) -] @outdent \ No newline at end of file +] @outdent diff --git a/runtime/queries/go/highlights.scm b/runtime/queries/go/highlights.scm index 0d65eb16..be9efeac 100644 --- a/runtime/queries/go/highlights.scm +++ b/runtime/queries/go/highlights.scm @@ -10,7 +10,7 @@ (const_spec name: (identifier) @constant) -(type_spec +(type_spec name: (type_identifier) @constructor) (keyed_element . (literal_element (identifier) @variable.other.member)) @@ -36,14 +36,14 @@ (call_expression function: (identifier) @function.builtin - (#match? @function.builtin "^(append|cap|close|complex|copy|delete|imag|len|make|new|panic|print|println|real|recover)$")) + (#match? @function.builtin "^(append|cap|close|complex|copy|delete|imag|len|make|new|panic|print|println|real|recover|min|max|clear)$")) ; Types (type_identifier) @type (type_parameter_list - (parameter_declaration + (type_parameter_declaration name: (identifier) @type.parameter)) ((type_identifier) @type.builtin @@ -57,9 +57,8 @@ (method_declaration name: (field_identifier) @function.method) -(method_spec - name: (field_identifier) @function.method) - +(method_elem + name: (field_identifier) @function.method) ; Operators @@ -100,6 +99,8 @@ "|" "|=" "||" + "&^" + "&^=" "~" ] @operator @@ -117,7 +118,7 @@ ] @keyword.control [ - "if" + "if" "else" "switch" "select" diff --git a/runtime/queries/go/injections.scm b/runtime/queries/go/injections.scm index 8dd5c3c8..b8a4d63e 100644 --- a/runtime/queries/go/injections.scm +++ b/runtime/queries/go/injections.scm @@ -13,6 +13,7 @@ (comment) @injection.content . (comment)* . [ (package_clause) ; `package` (type_declaration) ; `type` + (function_declaration) ; `func` (method_declaration) ; `func` (var_declaration) ; `var` (const_declaration) ; `const` @@ -43,6 +44,7 @@ ; https://pkg.go.dev/fmt#Printf ; https://pkg.go.dev/fmt#Sprintf ; https://pkg.go.dev/fmt#Scanf +; https://pkg.go.dev/fmt#Errorf ((call_expression function: (selector_expression operand: (identifier) @_module @@ -50,7 +52,7 @@ arguments: (argument_list . (interpreted_string_literal) @injection.content)) (#eq? @_module "fmt") - (#any-of? @_func "Printf" "Sprintf" "Scanf") + (#any-of? @_func "Printf" "Sprintf" "Scanf" "Errorf") (#set! injection.language "go-format-string")) ; https://pkg.go.dev/fmt#Fprintf diff --git a/runtime/queries/go/textobjects.scm b/runtime/queries/go/textobjects.scm index df1b0866..06c412ee 100644 --- a/runtime/queries/go/textobjects.scm +++ b/runtime/queries/go/textobjects.scm @@ -12,7 +12,7 @@ (type_spec (type_identifier) (struct_type (field_declaration_list (_)?) @class.inside))) @class.around (type_declaration - (type_spec (type_identifier) (interface_type (method_spec)+ @class.inside))) @class.around + (type_spec (type_identifier) (interface_type (method_elem)+ @class.inside))) @class.around (type_parameter_list ((_) @parameter.inside . ","? @parameter.around) @parameter.around) diff --git a/runtime/queries/hurl/highlights.scm b/runtime/queries/hurl/highlights.scm index a2037637..e591add2 100644 --- a/runtime/queries/hurl/highlights.scm +++ b/runtime/queries/hurl/highlights.scm @@ -1,7 +1,10 @@ [ "[QueryStringParams]" + "[Query]" "[FormParams]" + "[Form]" "[MultipartFormData]" + "[Multipart]" "[Cookies]" "[Captures]" "[Asserts]" @@ -116,6 +119,9 @@ "isBoolean" "isString" "isCollection" + "isNumber" + "isIsoDate" + "isEmpty" ] @keyword.operator (integer) @constant.numeric.integer diff --git a/runtime/queries/jjconfig/injections.scm b/runtime/queries/jjconfig/injections.scm index 7add1613..c553c3b4 100644 --- a/runtime/queries/jjconfig/injections.scm +++ b/runtime/queries/jjconfig/injections.scm @@ -3,8 +3,8 @@ (table (bare_key) @table-name (#any-of? @table-name "templates" "template-aliases") - [(pair (_) ((string) @injection.content (#set! injection.language "jjtemplate"))) (comment)]*) + [(pair (_) ((string) @injection.content (#set! injection.language "jjtemplate"))) (comment)]) (table (bare_key) @table-name (#any-of? @table-name "revsets" "revset-aliases") - [(pair (_) ((string) @injection.content (#set! injection.language "jjrevset"))) (comment)]*) + [(pair (_) ((string) @injection.content (#set! injection.language "jjrevset"))) (comment)]) diff --git a/runtime/queries/jjtemplate/highlights.scm b/runtime/queries/jjtemplate/highlights.scm index cb75a7f9..29ed75e6 100644 --- a/runtime/queries/jjtemplate/highlights.scm +++ b/runtime/queries/jjtemplate/highlights.scm @@ -12,3 +12,5 @@ [(infix_ops) "++"] @operator [(string_literal) (raw_string_literal)] @string + +(integer_literal) @constant.numeric.integer diff --git a/runtime/queries/just/highlights.scm b/runtime/queries/just/highlights.scm index 1f57859a..77ab454a 100644 --- a/runtime/queries/just/highlights.scm +++ b/runtime/queries/just/highlights.scm @@ -30,7 +30,7 @@ (identifier) @variable) (alias - name: (identifier) @variable) + alias_name: (identifier) @variable) (assignment name: (identifier) @variable) diff --git a/runtime/queries/just/locals.scm b/runtime/queries/just/locals.scm index 71e0218d..b0b40667 100644 --- a/runtime/queries/just/locals.scm +++ b/runtime/queries/just/locals.scm @@ -8,7 +8,7 @@ ; Definitions (alias - name: (identifier) @local.definition.variable) + alias_name: (identifier) @local.definition.variable) (assignment name: (identifier) @local.definition.variable) diff --git a/runtime/queries/koka/highlights.scm b/runtime/queries/koka/highlights.scm index cec2881f..65eb441d 100644 --- a/runtime/queries/koka/highlights.scm +++ b/runtime/queries/koka/highlights.scm @@ -1,122 +1,51 @@ -; Identifiers - -(qconid) @namespace - -(qidop) @namespace - -(varid) @variable - -(conid) @constructor - -(puredecl - (binder - (identifier - [(varid) (idop)] @constant))) - -; TODO: Highlight vars differently once helix has an appropriate highlight query -; for that purpose. - -(pparameter - (pattern - (identifier - (varid) @variable.parameter))) - -(paramid - (identifier - (varid) @variable.parameter)) +; Comment -(typedecl - "effect" - (varid) @type) +[ + (linecomment) + (blockcomment) +] @comment -(typeid - (varid) @type) +; Literals -(tbinder - (varid) @type) +(string) @string +(char) @constant.character -(typecon - (varid) @type) +(escape) @constant.character.escape -(qvarid - (qid) @namespace) +(float) @constant.numeric.float +(int) @constant.numeric.integer -(modulepath (varid) @namespace) +; Delimiters -; Function calls +(matchrule "|" @punctuation.delimiter) -(appexpr - function: (appexpr - (atom - (qidentifier - [ - (qvarid) @function - (qidop) @function - (identifier - [(varid) (idop)] @function) - ]))) - ["(" (block) (fnexpr)]) - -(appexpr - field: (atom - (qidentifier - [ - (qvarid) @function - (qidop) @function - (identifier - [(varid) (idop)] @function) - ]))) - -(appexpr - (appexpr - field: (atom - (qidentifier - [ - (qvarid) @variable - (qidop) @variable - (identifier - [(varid) (idop)] @variable) - ]))) - "[") +(tatomic "|" @punctuation.delimiter) [ - "initially" - "finally" -] @function.special - -; Function definitions - -(puredecl - (funid - (identifier - [(varid) (idop)] @function))) - -(fundecl - (funid - (identifier - [(varid) (idop)] @function))) - -(operation - (identifier - [(varid) (idop)] @function)) - -; Operators + "," + "->" + "." + ":" + "::" + "<-" + ";" +] @punctuation.delimiter [ - "!" - "~" - "=" - ":=" - (idop) - (op) - (qidop) -] @operator + "<" + ">" + "(" + ")" + "[" + "]" + "{" + "}" +] @punctuation.bracket ; Keywords [ "as" - "behind" (externtarget) "forall" "handle" @@ -125,22 +54,25 @@ "infix" "infixl" "infixr" - "inject" "mask" - "other" - "pub" - "public" + (behindmod) + (pub) "some" ] @keyword +; Lazy constructor +(constructor + "lazy" @keyword) + +; Lazy match +(matchexpr + "lazy" @keyword) + [ - "con" - "control" + (con) "ctl" "fn" "fun" - "rawctl" - "rcontrol" ] @keyword.function "with" @keyword.control @@ -155,7 +87,7 @@ [ "import" - "include" + ;"include" "module" ] @keyword.control.import @@ -170,69 +102,130 @@ [ "abstract" - "co" - "extend" "extern" - "fbip" "final" - "fip" - "inline" - "linear" + (inlinemod) + (externinline) + (typemod) + (structmod) + (effectmod) "named" - "noinline" - "open" - "override" - "raw" - "rec" - "ref" - "reference" - "scoped" - "tail" - "value" + (override) + (controlmod) + ;"scoped" ; scoped is actually an effect modifier, but it is not in the current parser. + (tailmod) ] @keyword.storage.modifier -"return" @keyword.control.return +(fipmod + ["fip" "fbip"] @keyword.storage.modifier) -; Delimiters +"return" @keyword.control.return -(matchrule "|" @punctuation.delimiter) +; Operators [ - "," - "->" - "." - ":" - "::" - "<-" - ";" -] @punctuation.delimiter + "!" + "~" + "=" + ":=" + (idop) + (op) + (qidop) +] @operator -[ - "<" - ">" - "(" - ")" - "[" - "]" - "{" - "}" -] @punctuation.bracket +(modulepath) @namespace -; Literals +; Variables -[ - (string) - (char) -] @string +(pattern + (identifier + (varid) @variable)) -(escape) @constant.character.escape +(paramid + (identifier + (varid) @variable.parameter)) -(float) @constant.numeric.float -(int) @constant.numeric.integer +(pparameter + (pattern + (identifier + (varid) @variable.parameter))) -; Comment +(pparameter + (qimplicit) @variable.parameter) + +(puredecl + (binder + (qidentifier) @constant)) + +; Named arguments +(argument + [(identifier) (qimplicit)] @variable.parameter + "=" + (expr)) + +; Types + +(typecon + [(varid) (qvarid)] @type) + +(tbinder + (varid) @type) + +(typeid + (varid) @type) + +(typedecl + "effect" + (varid) @type) + +; Function definitions + +(fundecl + (identifier) @function) + +(puredecl + (qidentifier) @function) + +(externdecl + (qidentifier) @function) + +; Effect definitions/usages + +(opclause + (qidentifier) @function) + +(operation + (identifier) @function) + + +; Function calls + +(opexpr + (atom + (name) @function) + . + [ + call: "(" (arguments)? ")" + trailing_lambda: [(block) (fnexpr)] + ]) + +(opexpr + (atom) + (name) @function) + +(ntlexpr + (atom + (name) @function) + . + ("(" (arguments)? ")")) + +(ntlexpr + (atom) + (name) @function) + +[(conid) (qconid)] @constructor [ - (linecomment) - (blockcomment) -] @comment + "initially" + "finally" +] @function.builtin diff --git a/runtime/queries/koka/indents.scm b/runtime/queries/koka/indents.scm index 6045373d..e496f30b 100644 --- a/runtime/queries/koka/indents.scm +++ b/runtime/queries/koka/indents.scm @@ -1,9 +1,9 @@ [ - (appexpr ["[" "("]) ; Applications. + (opexpr [index: (arguments) call: (arguments)]) ; Applications. (atom ["[" "("]) ; Lists and tuples. - (program (moduledecl "{")) ; Braced module declarations. (funbody) (block) + (constructor) (handlerexpr) (opclausex) ] @indent diff --git a/runtime/queries/koka/locals.scm b/runtime/queries/koka/locals.scm deleted file mode 100644 index e654f70c..00000000 --- a/runtime/queries/koka/locals.scm +++ /dev/null @@ -1,25 +0,0 @@ -(modulebody) @local.scope - -(block) @local.scope - -(pparameter - (pattern - (identifier - (varid) @local.definition.variable.parameter))) - -(puredecl - (funid - (identifier - (varid) @local.definition.function))) - -(puredecl - (binder - (identifier - (varid) @local.definition.function))) - -(decl - (binder - (identifier - (varid) @local.definition.function))) - -(identifier (varid) @local.reference) diff --git a/runtime/queries/koto/highlights.scm b/runtime/queries/koto/highlights.scm index b1dd990e..bdc01440 100644 --- a/runtime/queries/koto/highlights.scm +++ b/runtime/queries/koto/highlights.scm @@ -105,7 +105,7 @@ start: (identifier) @function) (chain - lookup: (identifier) @variable.other.member) + (lookup (identifier)) @variable.other.member) (call function: (identifier)) @function diff --git a/runtime/queries/nu/injections.scm b/runtime/queries/nu/injections.scm index 30804d65..690ff9a8 100644 --- a/runtime/queries/nu/injections.scm +++ b/runtime/queries/nu/injections.scm @@ -1,2 +1,7 @@ ((comment) @injection.content - (#set! injection.language "comment")) \ No newline at end of file + (#set! injection.language "comment")) + +(command + head: (cmd_identifier) @_command (#any-of? @_command "jq" "jaq") + arg: (val_string) @injection.content + (#set! injection.language "jq")) diff --git a/runtime/queries/python/injections.scm b/runtime/queries/python/injections.scm index 321c90ad..19a22c39 100644 --- a/runtime/queries/python/injections.scm +++ b/runtime/queries/python/injections.scm @@ -1,2 +1,14 @@ ((comment) @injection.content (#set! injection.language "comment")) + +; Match all 9 functions in the `re` module from the standard library that +; that takes a regex pattern as first argument. +; https://docs.python.org/3/library/re.html#functions +(call + function: (attribute + object: (identifier) @_module (#eq? @_module "re") + attribute: (identifier) @_function (#any-of? @_function "compile" "search" "match" "fullmatch" "sub" "subn" "findall" "finditer" "split")) + arguments: (argument_list + . (string + (string_content) @injection.content)) + (#set! injection.language "regex")) diff --git a/runtime/queries/ruby/injections.scm b/runtime/queries/ruby/injections.scm index 3e0d8bb8..b87ea8cb 100644 --- a/runtime/queries/ruby/injections.scm +++ b/runtime/queries/ruby/injections.scm @@ -21,3 +21,15 @@ (#set! injection.language "erb")) (#eq? @name "ERB")) +; `` +; %x{} +(subshell + (string_content) @injection.content + (#set! injection.language "bash")) + +(call + method: (identifier) @_method (#any-of? @_method "system" "spawn" "exec") + arguments: (argument_list + (string + (string_content) @injection.content)) + (#set! injection.language "bash")) diff --git a/runtime/queries/rust/highlights.scm b/runtime/queries/rust/highlights.scm index 981896f9..3a4448ba 100644 --- a/runtime/queries/rust/highlights.scm +++ b/runtime/queries/rust/highlights.scm @@ -88,9 +88,14 @@ ((type_arguments (type_identifier) @constant) (#match? @constant "^[A-Z_]+$")) (type_arguments (type_identifier) @type) +; `_` in `(_, _)` (tuple_struct_pattern "_" @comment.unused) +; `_` in `Vec<_>` ((type_arguments (type_identifier) @comment.unused) (#eq? @comment.unused "_")) +; `_` in `Rc<[_]>` +((array_type (type_identifier) @comment.unused) + (#eq? @comment.unused "_")) ; --- ; Primitives @@ -210,10 +215,6 @@ ; Keywords ; ------- -(for_expression - "for" @keyword.control.repeat) -(gen_block "gen" @keyword.control) - "in" @keyword.control [ @@ -263,6 +264,10 @@ "async" ] @keyword +(for_expression + "for" @keyword.control.repeat) +(gen_block "gen" @keyword.control) + [ "struct" "enum" @@ -305,6 +310,23 @@ ; Functions ; ------- +; highlight `baz` in `any_function(foo::bar::baz)` as function +; This generically works for an unlimited number of path segments: +; +; - `f(foo::bar)` +; - `f(foo::bar::baz)` +; - `f(foo::bar::baz::quux)` +; +; We know that in the above examples, the last component of each path is a function +; as the only other valid thing (following Rust naming conventions) would be a module at +; that position, however you cannot pass modules as arguments +(call_expression + function: _ + arguments: (arguments + (scoped_identifier + path: _ + name: (identifier) @function))) + (call_expression function: [ ((identifier) @function) diff --git a/runtime/queries/rust/injections.scm b/runtime/queries/rust/injections.scm index af1970a9..0c7cc350 100644 --- a/runtime/queries/rust/injections.scm +++ b/runtime/queries/rust/injections.scm @@ -55,14 +55,24 @@ function: (scoped_identifier path: (identifier) @_regex (#any-of? @_regex "Regex" "RegexBuilder") name: (identifier) @_new (#eq? @_new "new")) - arguments: (arguments (raw_string_literal (string_content) @injection.content)) + arguments: + (arguments + [ + (string_literal (string_content) @injection.content) + (raw_string_literal (string_content) @injection.content) + ]) (#set! injection.language "regex")) (call_expression function: (scoped_identifier path: (scoped_identifier (identifier) @_regex (#any-of? @_regex "Regex" "RegexBuilder") .) name: (identifier) @_new (#eq? @_new "new")) - arguments: (arguments (raw_string_literal (string_content) @injection.content)) + arguments: + (arguments + [ + (string_literal (string_content) @injection.content) + (raw_string_literal (string_content) @injection.content) + ]) (#set! injection.language "regex")) ; Highlight SQL in `sqlx::query!()`, `sqlx::query_scalar!()`, and `sqlx::query_scalar_unchecked!()` @@ -150,31 +160,11 @@ ; std "assert_eq" "debug_assert_eq" "assert_ne" "debug_assert_ne" - ) - (#set! injection.language "rust-format-args-macro") - (#set! injection.include-children) -) -; Dioxus' "rsx!" macro relies heavily on string interpolation as well. The strings can be nested very deeply -( - (macro_invocation - macro: [ - (scoped_identifier - name: (_) @_macro_name) - (identifier) @_macro_name - ] - ; TODO: This only captures 1 level of string literals. But in dioxus you can have - ; nested string literals. For instance: - ; - ; rsx! { "{hello} world" }: - ; -> (token_tree (string_literal)) - ; rsx! { div { "{hello} world" } } - ; -> (token_tree (token_tree (string_literal))) - ; rsx! { div { div { "{hello} world" } } } - ; -> (token_tree (token_tree (token_tree (string_literal)))) - (token_tree (string_literal) @injection.content) + ; Dioxus's rsx! macro accepts string interpolation in all + ; strings, across the entire token tree + "rsx" ) - (#eq? @_macro_name "rsx") - (#set! injection.language "rust-format-args") + (#set! injection.language "rust-format-args-macro") (#set! injection.include-children) ) diff --git a/runtime/queries/scheme/highlights.scm b/runtime/queries/scheme/highlights.scm index 71bad076..772dcbf5 100644 --- a/runtime/queries/scheme/highlights.scm +++ b/runtime/queries/scheme/highlights.scm @@ -13,10 +13,10 @@ ; variables ((symbol) @variable.builtin - (#eq? @variable.builtin "...")) + (#eq? @variable.builtin "...")) ((symbol) @variable.builtin - (#eq? @variable.builtin ".")) + (#eq? @variable.builtin ".")) (symbol) @variable @@ -36,49 +36,58 @@ ; special forms (list - "[" - (symbol)+ @variable - "]") + "[" + (symbol)+ @variable + "]") (list - . - (symbol) @_f - . - (list - (symbol) @variable) - (#any-of? @_f "lambda" "λ")) + . + (symbol) @_f + . + (list + (symbol) @variable) + (#any-of? @_f "lambda" "λ")) (list - . - (symbol) @_f - . - (list - (list - (symbol) @variable.parameter)) - (#match? @_f - "^(let|let\\*|let-syntax|let-values|let\\*-values|letrec|letrec\\*|letrec-syntax)$")) + . + (symbol) @_f + (list + . + (list + (symbol) @variable)) + (#eq? @_f "case-lambda")) + +(list + . + (symbol) @_f + . + (list + (list + (symbol) @variable.parameter)) + (#any-of? @_f + "let" "let*" "let-syntax" "let-values" "let*-values" "letrec" "letrec*" "letrec-syntax" "do")) ; operators ((symbol) @operator - (#match? @operator "^(\\+|-|\\*|/|=|>|<|>=|<=)$")) + (#match? @operator "^(\\+|-|\\*|/|=|>|<|>=|<=)$")) ; library (list - . - (symbol) @_lib - . - (symbol) @namespace + . + (symbol) @_lib + . + (symbol) @namespace - (#eq? @_lib "library")) + (#eq? @_lib "library")) ; quote (list - . - (symbol) @_f - (#eq? @_f "quote")) @string.symbol + . + (symbol) @_f + (#eq? @_f "quote")) @string.symbol ; keywords @@ -87,12 +96,12 @@ ((symbol) @keyword.conditional (#match? @keyword.conditional "^(if|cond|case|when|unless)$" ))) - + (list . (symbol) @keyword (#match? @keyword - "^(define-syntax|let\\*|lambda|λ|case|=>|quote-splicing|unquote-splicing|set!|let|letrec|letrec-syntax|let-values|let\\*-values|do|else|define|cond|syntax-rules|unquote|begin|quote|let-syntax|and|if|quasiquote|letrec|delay|or|when|unless|identifier-syntax|assert|library|export|import|rename|only|except|prefix)$" + "^(define-syntax|let\\*|lambda|λ|case-lambda|case|=>|quote-splicing|unquote-splicing|set!|let|letrec|letrec-syntax|let-values|let\\*-values|do|else|define|cond|syntax-rules|unquote|begin|quote|let-syntax|and|if|quasiquote|letrec|delay|or|when|unless|identifier-syntax|assert|library|export|import|rename|only|except|prefix)$" )) (list diff --git a/runtime/queries/svelte/highlights.scm b/runtime/queries/svelte/highlights.scm index 7ab72903..efd41406 100644 --- a/runtime/queries/svelte/highlights.scm +++ b/runtime/queries/svelte/highlights.scm @@ -1,68 +1,38 @@ -; Special identifiers -;-------------------- +; inherits: html -(tag_name) @tag -(attribute_name) @variable.other.member -(erroneous_end_tag_name) @error -(comment) @comment +(raw_text) @none -; TODO: -((element (start_tag (tag_name) @_tag) (text) @markup.heading) - (#match? @_tag "^(h[0-9]|title)$")) - -((element (start_tag (tag_name) @_tag) (text) @markup.bold) - (#match? @_tag "^(strong|b)$")) - -((element (start_tag (tag_name) @_tag) (text) @markup.italic) - (#match? @_tag "^(em|i)$")) - -; ((element (start_tag (tag_name) @_tag) (text) @markup.strike) -; (#match? @_tag "^(s|del)$")) - -((element (start_tag (tag_name) @_tag) (text) @markup.underline) - (#eq? @_tag "u")) - -((element (start_tag (tag_name) @_tag) (text) @markup.inline) - (#match? @_tag "^(code|kbd)$")) - -((element (start_tag (tag_name) @_tag) (text) @markup.link.url) - (#eq? @_tag "a")) +[ + "as" + "key" + "html" + "debug" + "snippet" + "render" +] @keyword -((attribute - (attribute_name) @_attr - (quoted_attribute_value (attribute_value) @markup.link.url)) - (#match? @_attr "^(href|src)$")) +"const" @keyword.storage.modifier [ - (attribute_value) - (quoted_attribute_value) -] @string + "if" + "else if" + "else" + "then" + "await" +] @keyword.control.conditional -[ - (text) - (raw_text_expr) -] @none +"each" @keyword.control.repeat -[ - (special_block_keyword) - (then) - (as) -] @keyword +"catch" @keyword.control.exception [ "{" "}" -] @punctuation.brackets - -"=" @operator +] @punctuation.bracket [ - "<" - ">" - "" "#" ":" "/" "@" -] @punctuation.definition.tag +] @punctuation.delimiter diff --git a/runtime/queries/svelte/indents.scm b/runtime/queries/svelte/indents.scm index d0408d61..4bb103d7 100644 --- a/runtime/queries/svelte/indents.scm +++ b/runtime/queries/svelte/indents.scm @@ -1,18 +1,24 @@ [ (element) + (start_tag) (if_statement) + (else_if_block) + (else_block) + (then_block) (each_statement) + (key_statement) + (snippet_statement) (await_statement) - (script_element) (style_element) + (script_element) + (expression) ] @indent [ (end_tag) - (else_statement) - (if_end_expr) - (each_end_expr) - (await_end_expr) - ">" - "/>" -] @outdent \ No newline at end of file + (if_end) + (each_end) + (await_end) + (key_end) + (snippet_end) +] @outdent diff --git a/runtime/queries/svelte/injections.scm b/runtime/queries/svelte/injections.scm index 52d430c3..c94373c1 100644 --- a/runtime/queries/svelte/injections.scm +++ b/runtime/queries/svelte/injections.scm @@ -1,40 +1,46 @@ -; injections.scm -; -------------- +; inherits html ((style_element + (start_tag + (attribute + (attribute_name) @_attr + (quoted_attribute_value + (attribute_value) @_lang))) (raw_text) @injection.content) - (#set! injection.language "css")) - -((style_element - (start_tag - (attribute - (attribute_name) @_attr - (quoted_attribute_value (attribute_value) @_lang))) - (raw_text) @injection.content) (#eq? @_attr "lang") - (#match? @_lang "scss") + (#any-of? @_lang "scss" "postcss" "less") (#set! injection.language "scss")) -((attribute - (attribute_name) @_attr - (quoted_attribute_value (attribute_value) @css)) - (#eq? @_attr "style")) +((svelte_raw_text) @injection.content + (#set! injection.language "typescript")) -( - (script_element - (start_tag - (attribute - (quoted_attribute_value (attribute_value) @_lang))) - (raw_text) @injection.content) - (#match? @_lang "(ts|typescript)") - (#set! injection.language "typescript") -) +((script_element + (start_tag + (attribute + (attribute_name) @_attr + (quoted_attribute_value + (attribute_value) @_lang))) + (raw_text) @injection.content) + (#eq? @_attr "lang") + (#any-of? @_lang "ts" "typescript") + (#set! injection.language "typescript")) ((script_element + (start_tag + (attribute + (attribute_name) @_attr + (quoted_attribute_value + (attribute_value) @_lang))) (raw_text) @injection.content) + (#eq? @_attr "lang") + (#any-of? @_lang "js" "javascript") (#set! injection.language "javascript")) -((raw_text_expr) @injection.content - (#set! injection.language "javascript")) - -((comment) @injection.content - (#set! injection.language "comment")) +((element + (start_tag + (attribute + (attribute_name) @_attr + (quoted_attribute_value + (attribute_value) @injection.language))) + (text) @injection.content) + (#eq? @_attr "lang") + (#eq? @injection.language "pug")) diff --git a/runtime/queries/yaml/injections.scm b/runtime/queries/yaml/injections.scm index a16a945a..e0e1094b 100644 --- a/runtime/queries/yaml/injections.scm +++ b/runtime/queries/yaml/injections.scm @@ -21,23 +21,22 @@ ; Modified for Helix from https://github.com/nvim-treesitter/nvim-treesitter/blob/master/queries/yaml/injections.scm ;; GitHub actions: run -;; Gitlab CI: scripts, before_script, after_script ;; Buildkite: command, commands (block_mapping_pair - key: (flow_node) @_run (#any-of? @_run "run" "script" "before_script" "after_script" "command" "commands") + key: (flow_node) @_run (#any-of? @_run "run" "command" "commands") value: (flow_node (plain_scalar (string_scalar) @injection.content) (#set! injection.language "bash"))) (block_mapping_pair - key: (flow_node) @_run (#any-of? @_run "run" "script" "before_script" "after_script" "command" "commands") + key: (flow_node) @_run (#any-of? @_run "run" "command" "commands") value: (block_node (block_scalar) @injection.content (#set! injection.language "bash"))) (block_mapping_pair - key: (flow_node) @_run (#any-of? @_run "run" "script" "before_script" "after_script" "command" "commands") + key: (flow_node) @_run (#any-of? @_run "run" "command" "commands") value: (block_node (block_sequence (block_sequence_item @@ -47,7 +46,7 @@ (#set! injection.language "bash"))))) (block_mapping_pair - key: (flow_node) @_run (#any-of? @_run "run" "script" "before_script" "after_script" "command" "commands") + key: (flow_node) @_run (#any-of? @_run "run" "command" "commands") value: (block_node (block_sequence (block_sequence_item diff --git a/runtime/queries/zig/textobjects.scm b/runtime/queries/zig/textobjects.scm index 243d1294..3d8d5e02 100644 --- a/runtime/queries/zig/textobjects.scm +++ b/runtime/queries/zig/textobjects.scm @@ -18,5 +18,8 @@ (parameters ((_) @parameter.inside . ","? @parameter.around) @parameter.around) +(arguments + ((_) @parameter.inside . ","? @parameter.around) @parameter.around) + (comment) @comment.inside (comment)+ @comment.around diff --git a/runtime/themes/adwaita-light.toml b/runtime/themes/adwaita-light.toml index 8f9d7a8d..f7801b83 100644 --- a/runtime/themes/adwaita-light.toml +++ b/runtime/themes/adwaita-light.toml @@ -81,7 +81,7 @@ inherits="adwaita-dark" "ui.window" = "split_and_borders" "ui.help" = { bg = "light_3" } "ui.text" = "dark_4" -"ui.virtual" = "light_1" +"ui.virtual" = "light_5" "ui.virtual.ruler" = { bg = "light_5"} "ui.virtual.jump-label" = { modifiers = ["reversed"] } "ui.menu" = { fg = "dark_4", bg = "light_3" } diff --git a/runtime/themes/cyan_light.toml b/runtime/themes/cyan_light.toml index fe3f743a..eeb671e1 100644 --- a/runtime/themes/cyan_light.toml +++ b/runtime/themes/cyan_light.toml @@ -1,168 +1,5 @@ -# Cyan Light -# Adapted from JetBrains' Cyan Light Theme https://plugins.jetbrains.com/plugin/12102-cyan-light-theme -# Author: Abderrahmane Tahri Jouti +# Deprecation notice +# +# This theme has moved to jetbrains_cyan_light, make sure to update your configuration accordingly. -# Original Author : Olga Berdnikova -# LICENSE : MIT -# Source: https://github.com/OlyaB/CyanTheme - -"attribute" = "blue" -"type" = "shade07" -"type.enum.variant" = "purple" -"constructor" = "shade07" - -"constant" = "darker_blue" -"constant.builtin.boolean" = "blue" -"constant.character" = "blue" -"constant.character.escape" = "dark_red" -"constant.numeric" = "blue" - -"string" = "green" -"string.regexp" = "blue" -"string.special" = { fg = "dark_red", modifiers = ["underlined"] } - -"comment" = "comment_gray" - -"variable" = "green_blue" -"variable.builtin" = { fg = "darker_blue" } -"variable.parameter" = "purple" -"variable.other.member" = "purple" - -"label" = { fg = "darker_blue", modifiers = ["underlined"] } -"punctuation" = "shade06" - -"keyword" = "darker_blue" -"keyword.control.exception" = "darker_blue" - -"operator" = "shade06" - -"function" = "shade07" -"function.macro" = "yellow" -"function.builtin" = { fg = "shade07", modifiers = ["italic"] } -"function.special" = "dark_red" -"function.method" = "dark_yellow" - -"tag" = "darker_blue" -"special" = "shade06" -"namespace" = "darker_blue" - -"markup.bold" = { fg = "shade06", modifiers = ["bold"] } -"markup.italic" = { fg = "shade06", modifiers = ["italic"] } -"markup.strikethrough" = { fg = "shade06", modifiers = ["crossed_out"] } -"markup.heading" = { fg = "purple" } -"markup.list" = "darker_blue" -"markup.list.numbered" = "darker_blue" -"markup.list.unnumbered" = "darker_blue" -"markup.link.url" = "shade06" -"markup.link.text" = { fg = "dark_blue", modifiers = ['underlined'] } -"markup.link.label" = "dark_blue" -"markup.quote" = "green" -"markup.raw" = "green" -"markup.raw.inline" = "green" -"markup.raw.block" = "green" - -"diff.plus" = "green" -"diff.plus.gutter" = "gutter_green" -"diff.minus" = "red" -"diff.minus.gutter" = "gutter_red" -"diff.delta" = "blue" -"diff.delta.gutter" = "gutter_blue" - -# ui specific -"ui.background" = { bg = "shade00" } -"ui.cursor" = { bg = "shade02" } -"ui.cursor.primary" = { bg = "cursor_blue" } -"ui.cursor.match" = { fg = "shade00", bg = "shade04" } -"ui.cursor.primary.select" = { bg = "light_purple" } -"ui.cursor.primary.insert" = { bg = "light_green" } - -"ui.selection" = { bg = "lighter_blue" } -"ui.selection.primary" = { bg = "lighter_blue" } - -"ui.highlight" = { bg = "faint_blue" } -"ui.cursorline.primary" = { bg = "faint_blue" } - -"ui.linenr" = { fg = "shade03" } -"ui.linenr.selected" = { fg = "shade04", bg = "faint_blue", modifiers = [ - "bold", -] } - -"ui.statusline" = { fg = "shade06", bg = "shade01" } -"ui.statusline.inactive" = { fg = "shade04", bg = "shade00" } -"ui.statusline.normal" = { fg = "shade00", bg = "blue" } -"ui.statusline.insert" = { fg = "shade00", bg = "green" } -"ui.statusline.select" = { fg = "shade00", bg = "purple" } - -"ui.popup" = { fg = "shade04", bg = "shade01_lighter" } -"ui.window" = { fg = "shade04", bg = "shade00" } -"ui.help" = { fg = "shade06", bg = "shade00" } -"ui.text" = "shade05" -"ui.text.focus" = { fg = "shade07", bg = "light_blue" } -"ui.text.directory" = "blue" - -"ui.virtual" = "shade03" -"ui.virtual.ruler" = { bg = "shade01" } -"ui.virtual.inlay-hint" = { fg = "shade03_darker" } -"ui.virtual.jump-label" = { fg = "shade07", bg = "shade01", modifiers = ["bold" ] } - -"ui.menu" = { fg = "shade05", bg = "shade01_lighter" } -"ui.menu.selected" = { fg = "shade07", bg = "light_blue" } - -"hint" = "shade04" -"info" = "light_blue" -"warning" = "orange" -"error" = "red" - -"diagnostic" = { modifiers = [] } -"diagnostic.hint" = { underline = { color = "shade04", style = "line" } } -"diagnostic.info" = { underline = { color = "light_blue", style = "line" } } -"diagnostic.warning" = { underline = { color = "orange", style = "curl" } } -"diagnostic.error" = { underline = { color = "red", style = "curl" } } -"diagnostic.unnecessary" = { modifiers = ["dim"] } -"diagnostic.deprecated" = { modifiers = ["crossed_out"] } - -[palette] -shade00 = "#f2f3f7" -shade01 = "#dadde8" -shade02 = "#c1c6d9" -shade03 = "#a9b0ca" -shade04 = "#525c85" -shade05 = "#434b6c" -shade06 = "#343a54" -shade07 = "#25293c" - -shade01_lighter = "#e6e8f0" -shade03_darker = "#9199bb" -shade04_lighter = "#616d9d" - -background = "#f2f3f7" -foreground = "#25293c" - -comment_gray = "#808080" - -gutter_blue = "#C3D6E8" -faint_blue = "#E8Eef1" -lighter_blue = "#d0eaff" -light_blue = "#99ccff" -cursor_blue = "#80bfff" -blue = "#0073E6" -dark_blue = "#185b93" -darker_blue = "#000080" - -purple = "#660E7A" -light_purple = "#ED9CFF" - -gutter_green = "#C9DEC1" -green = "#00733B" -light_green = "#5DCE87" -green_blue = "#458383" - -yellow = "#808000" -dark_yellow = "#7A7A43" - -light_orange = "#f9c881" -orange = "#F49810" - -gutter_red = "#EBBCBC" -red = "#d90016" -dark_red = "#7F0000" +inherits = "jetbrains_cyan_light" diff --git a/runtime/themes/flatwhite.toml b/runtime/themes/flatwhite.toml index 6864fb10..f58ee21c 100644 --- a/runtime/themes/flatwhite.toml +++ b/runtime/themes/flatwhite.toml @@ -2,11 +2,10 @@ # Adopted from https://github.com/biletskyy/flatwhite-syntax "attribute" = { fg = "blue_text", bg = "blue_bg" } -"comment" = { fg = "base3", modifiers = ["italic"] } -"comment.line" = {} -"comment.line.documentation" = { fg = "base2" } -"comment.block" = {} -"comment.block.documentation" = { fg = "base2" } +"comment" = { fg = "base2", bg = "base6" } +"comment.line" = { fg = "base2", bg = "base6" } +"comment.block" = { fg = "base2", bg = "base6" } +"comment.block.documentation" = { fg = "base2", bg = "base6" } "constant" = { fg = "blue_text", bg = "blue_bg" } "constructor" = { fg = "base1" } "function" = { fg = "base1", modifiers = ["bold"] } @@ -62,12 +61,10 @@ "ui.virtual" = { fg = "base5", bg = "base6" } "ui.virtual.whitespace" = { fg = "base5" } "ui.virtual.ruler" = { bg = "base6" } -# Invalid modifier: "normal". See 'https://github.com/helix-editor/helix/issues/5709' -# "ui.virtual.inlay-hint" = { fg = "base4", modifiers = ["normal"] } -# "ui.virtual.inlay-hint.parameter" = { fg = "base3", modifiers = ["normal"] } "ui.virtual.inlay-hint" = "base4" "ui.virtual.inlay-hint.parameter" = "base3" "ui.virtual.inlay-hint.type" = { fg = "base3", modifiers = ["italic"] } +"ui.virtual.jump-label" = { bg = "orange_bg", modifiers = ["bold"] } "ui.linenr" = { bg = "base6" } "ui.linenr.selected" = { bg = "base6", modifiers = ["reversed"] } diff --git a/runtime/themes/licenses/cyan_light.LICENSE b/runtime/themes/licenses/cyan_light.LICENSE deleted file mode 100644 index 3a4a2fb8..00000000 --- a/runtime/themes/licenses/cyan_light.LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 CloudCannon - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/runtime/themes/licenses/modus_vivendi.LICENSE b/runtime/themes/licenses/modus_vivendi.LICENSE index 7e224507..f9cc8194 100644 --- a/runtime/themes/licenses/modus_vivendi.LICENSE +++ b/runtime/themes/licenses/modus_vivendi.LICENSE @@ -1,5 +1,674 @@ -Copyright (C) 2020-2023 Free Software Foundation, Inc. + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 -Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being “A GNU Manual,” and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled “GNU Free Documentation License.” + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. -(a) The FSF’s Back-Cover Text is: “You have the freedom to copy and modify this GNU manual.” + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + modus-themes + Copyright (C) 2019-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + modus-themes Copyright (C) 2019-2023 Free Software Foundation, Inc. + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/runtime/themes/licenses/modus_vivendi_deuteranopia.LICENSE b/runtime/themes/licenses/modus_vivendi_deuteranopia.LICENSE index 7e224507..f9cc8194 100644 --- a/runtime/themes/licenses/modus_vivendi_deuteranopia.LICENSE +++ b/runtime/themes/licenses/modus_vivendi_deuteranopia.LICENSE @@ -1,5 +1,674 @@ -Copyright (C) 2020-2023 Free Software Foundation, Inc. + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 -Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being “A GNU Manual,” and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled “GNU Free Documentation License.” + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. -(a) The FSF’s Back-Cover Text is: “You have the freedom to copy and modify this GNU manual.” + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + modus-themes + Copyright (C) 2019-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + modus-themes Copyright (C) 2019-2023 Free Software Foundation, Inc. + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/runtime/themes/licenses/modus_vivendi_tinted.LICENSE b/runtime/themes/licenses/modus_vivendi_tinted.LICENSE index 7e224507..f9cc8194 100644 --- a/runtime/themes/licenses/modus_vivendi_tinted.LICENSE +++ b/runtime/themes/licenses/modus_vivendi_tinted.LICENSE @@ -1,5 +1,674 @@ -Copyright (C) 2020-2023 Free Software Foundation, Inc. + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 -Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being “A GNU Manual,” and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled “GNU Free Documentation License.” + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. -(a) The FSF’s Back-Cover Text is: “You have the freedom to copy and modify this GNU manual.” + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + modus-themes + Copyright (C) 2019-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + modus-themes Copyright (C) 2019-2023 Free Software Foundation, Inc. + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/runtime/themes/licenses/modus_vivendi_tritanopia.LICENSE b/runtime/themes/licenses/modus_vivendi_tritanopia.LICENSE index 7e224507..f9cc8194 100644 --- a/runtime/themes/licenses/modus_vivendi_tritanopia.LICENSE +++ b/runtime/themes/licenses/modus_vivendi_tritanopia.LICENSE @@ -1,5 +1,674 @@ -Copyright (C) 2020-2023 Free Software Foundation, Inc. + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 -Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being “A GNU Manual,” and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled “GNU Free Documentation License.” + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. -(a) The FSF’s Back-Cover Text is: “You have the freedom to copy and modify this GNU manual.” + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + modus-themes + Copyright (C) 2019-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + modus-themes Copyright (C) 2019-2023 Free Software Foundation, Inc. + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/runtime/themes/modus_operandi.toml b/runtime/themes/modus_operandi.toml index c0c76a3d..84fdde50 100644 --- a/runtime/themes/modus_operandi.toml +++ b/runtime/themes/modus_operandi.toml @@ -83,8 +83,8 @@ punctuation = "fg-dim" "ui.virtual.inlay-hint" = { fg = "fg-dim", modifiers = ["italic"] } "ui.virtual.jump-label" = { fg = "yellow-cooler", modifiers = ["bold"] } -"ui.selection" = { fg = "fg-main", bg = "bg-inactive" } -"ui.selection.primary" = { fg = "fg-main", bg = "bg-active" } +"ui.selection" = { bg = "bg-inactive" } +"ui.selection.primary" = { bg = "bg-active" } "ui.cursor" = { fg = "bg-main", bg = "fg-main" } "ui.cursor.primary" = { fg = "bg-main", bg = "fg-dim" } diff --git a/runtime/themes/modus_vivendi.toml b/runtime/themes/modus_vivendi.toml index bd3c8a4f..c1f13a8f 100644 --- a/runtime/themes/modus_vivendi.toml +++ b/runtime/themes/modus_vivendi.toml @@ -86,8 +86,8 @@ punctuation = "fg-dim" "ui.virtual.inlay-hint" = { fg = "fg-dim", modifiers = ["italic"] } "ui.virtual.jump-label" = { fg = "yellow-cooler", modifiers = ["bold"] } -"ui.selection" = { fg = "fg-main", bg = "bg-inactive" } -"ui.selection.primary" = { fg = "fg-main", bg = "bg-active" } +"ui.selection" = { bg = "bg-inactive" } +"ui.selection.primary" = { bg = "bg-active" } "ui.cursor" = { fg = "bg-main", bg = "fg-main" } "ui.cursor.primary" = { fg = "bg-main", bg = "fg-dim" } @@ -112,7 +112,7 @@ warning = "yellow-warmer" info = "cyan-cooler" hint = "blue-cooler" -rainbow = ["red", "yellow-warmer", "green-intense", "cyan-cooler", "blue", "magenta-intense"] +rainbow = ["red", "yellow-warmer", "green-intense", "cyan", "blue", "magenta-intense"] [palette] # Basic values diff --git a/runtime/themes/modus_vivendi_deuteranopia.toml b/runtime/themes/modus_vivendi_deuteranopia.toml index 5776fe21..75a7689a 100644 --- a/runtime/themes/modus_vivendi_deuteranopia.toml +++ b/runtime/themes/modus_vivendi_deuteranopia.toml @@ -23,7 +23,7 @@ warning = "magenta-faint" info = "cyan" hint = "blue" -rainbow = ["red", "yellow-intense", "green-intense", "cyan-cooler", "blue", "magenta-intense"] +rainbow = ["red", "yellow-intense", "green-intense", "cyan", "blue", "magenta-intense"] [palette] # Basic values diff --git a/runtime/themes/modus_vivendi_tritanopia.toml b/runtime/themes/modus_vivendi_tritanopia.toml index 1f83bd02..5e44d58e 100644 --- a/runtime/themes/modus_vivendi_tritanopia.toml +++ b/runtime/themes/modus_vivendi_tritanopia.toml @@ -37,7 +37,7 @@ warning = "magenta" info = "cyan" hint = "blue" -rainbow = ["red", "yellow-cooler", "green-intense", "cyan-cooler", "blue", "magenta-intense"] +rainbow = ["red", "magenta", "green-intense", "cyan", "blue", "magenta-intense"] [palette] # Basic values diff --git a/runtime/themes/molokai.toml b/runtime/themes/molokai.toml index bfca3677..0e48f775 100644 --- a/runtime/themes/molokai.toml +++ b/runtime/themes/molokai.toml @@ -36,6 +36,10 @@ inherits = "monokai" "ui.popup.info" = { fg = "light-blue", bg = "#000000" } "ui.text.info" = { fg = "light-blue", bg = "#000000" } +"ui.statusline.normal" = { fg = "#080808", bg = "#e6db74", modifiers = ["bold"] } +"ui.statusline.insert" = { fg = "#282828", bg = "#8787af", modifiers = ["bold"] } +"ui.statusline.select" = { fg = "#282828", bg = "#ffd700", modifiers = ["bold"] } + "warning" = { fg = "#ffffff", modifiers = ["bold"] } "error" = { fg = "#ffffff", modifiers = ["bold"] } "info" = { fg = "#ffffff", modifiers = ["bold"] } diff --git a/runtime/themes/nyxvamp-obsidian.toml b/runtime/themes/nyxvamp-obsidian.toml index 356b8535..62fd08dc 100644 --- a/runtime/themes/nyxvamp-obsidian.toml +++ b/runtime/themes/nyxvamp-obsidian.toml @@ -3,6 +3,9 @@ inherits = "nyxvamp-radiance" +# Rainbow parentheses colors +rainbow = ["keyword_fg", "function_fg", "string_fg", "type_fg"] + # Override specific styles for obsidian variant "function" = { fg = "function_fg", modifiers = ["bold"] } "function.builtin" = { fg = "function_builtin_fg", modifiers = ["bold"] } @@ -28,13 +31,13 @@ status_inactive_bg = "#0E0E10" # Menu colors menu_fg = "#C0C0CE" -menu_bg = "#0E0E10" -menu_sel_fg = "#0E0E10" -menu_sel_bg = "#F28FAD" +menu_bg = "#1E1E20" +menu_sel_fg = "#C0C0CE" +menu_sel_bg = "#2E2E30" menu_scroll_fg = "#5E5A76" -menu_scroll_bg = "#0E0E10" +menu_scroll_bg = "#1E1E20" popup_fg = "#C0C0CE" -popup_bg = "#0E0E10" +popup_bg = "#1E1E20" # UI virtual virtual_ruler_bg = "#191921" # Slightly lighter than background, close to comment color @@ -59,15 +62,15 @@ variable_builtin_fg = "#F28FAD" type_fg = "#A0A0D0" # Muted lavender types type_builtin_fg = "#A0A0D0" attribute_fg = "#F5C2E7" -namespace_fg = "#A090C0" # Muted purple namespaces +namespace_fg = "#A0A0D0" # Muted lavender namespaces (Base16 base0E) punctuation_fg = "#C0C0CE" symbol_fg = "#F28FAD" # Diagnostics -error_fg = "#D78284" # Muted red errors -warning_fg = "#D5B880" # Muted yellow warnings -info_fg = "#7A9CCC" # Muted blue info -hint_fg = "#7BB5A8" # Muted cyan hints +error_fg = "#F28FAD" # Base16 base08 - red errors +warning_fg = "#D8A080" # Base16 base09 - orange warnings +info_fg = "#7FAFD7" # Base16 base0B - blue info +hint_fg = "#7BB5A8" # Base16 base0C - cyan hints # Diff colors diff_add_fg = "#86BA75" # Muted green additions diff --git a/runtime/themes/nyxvamp-radiance.toml b/runtime/themes/nyxvamp-radiance.toml index e2d085f2..27f7d3f0 100644 --- a/runtime/themes/nyxvamp-radiance.toml +++ b/runtime/themes/nyxvamp-radiance.toml @@ -1,9 +1,15 @@ # nyxvamp - radiance variant # author: +# Rainbow parentheses colors +rainbow = ["keyword_fg", "function_fg", "constant_fg", "string_fg"] + # UI Elements "ui.background" = { bg = "background", fg = "foreground" } "ui.text" = { fg = "foreground" } +"ui.text.focus" = { fg = "menu_sel_fg", bg = "menu_sel_bg" } +"ui.text.inactive" = { fg = "comment_fg" } +"ui.text.info" = { fg = "menu_fg", bg = "menu_bg" } "ui.cursor" = { fg = "cursor_fg", bg = "cursor_bg" } "ui.cursorline.primary" = { bg = "cursorline" } "ui.selection" = { bg = "selection" } @@ -15,9 +21,18 @@ "ui.menu.selected" = { fg = "menu_sel_fg", bg = "menu_sel_bg" } "ui.menu.scroll" = { fg = "menu_scroll_fg", bg = "menu_scroll_bg" } "ui.popup" = { fg = "popup_fg", bg = "popup_bg" } +"ui.popup.info" = { fg = "menu_fg", bg = "menu_bg" } "ui.match_paren" = { fg = "match_paren_fg", bg = "match_paren_bg", modifiers = ["bold"] } "ui.virtual" = { fg = "comment_fg" } "ui.virtual.ruler" = { bg = "virtual_ruler_bg" } +"ui.highlight" = { fg = "menu_sel_fg", bg = "menu_sel_bg" } +"ui.picker.header" = { fg = "menu_fg", bg = "menu_bg" } +"ui.picker.header.column" = { fg = "menu_fg", bg = "menu_bg" } +"ui.picker.header.column.active" = { fg = "menu_sel_fg", bg = "menu_sel_bg" } +"ui.window" = { fg = "foreground" } +"ui.help" = { fg = "menu_fg", bg = "menu_bg" } +"ui.text.directory" = { fg = "function_fg", modifiers = ["bold"] } +"ui.selection.primary" = { bg = "selection" } # Syntax Highlighting "comment" = { fg = "comment_fg", modifiers = ["italic"] } @@ -42,6 +57,11 @@ "symbol" = { fg = "symbol_fg", modifiers = ["italic"] } # Diagnostics +"warning" = { fg = "warning_fg" } +"error" = { fg = "error_fg" } +"info" = { fg = "info_fg" } +"hint" = { fg = "hint_fg" } +"diagnostic" = { fg = "error_fg" } "diagnostic.error" = { fg = "error_fg", modifiers = ["bold"] } "diagnostic.warning" = { fg = "warning_fg", modifiers = ["bold"] } "diagnostic.info" = { fg = "info_fg", modifiers = ["bold"] } @@ -67,50 +87,50 @@ foreground = "#1E1E2E" # Deep navy foreground (from your vis cursor_fg = "#F7F7FF" # Off-white cursor text cursor_bg = "#9655FF" # Deep purple cursor (from your visual identity) cursorline = "#E8E8F0" # Slightly darker than background -selection = "#FEF5BC" # Soft yellow selection (from your visual identity) -line_nr = "#6E6A86" # Medium gray for line numbers +selection = "#E8D5FF" # Light purple selection that matches theme palette +line_nr = "#5A5570" # Darker gray for line numbers line_nr_selected = "#1E1E2E" # Deep navy for selected line number status_fg = "#1E1E2E" # Deep navy status_bg = "#E8E8F0" # Light gray -status_inactive_fg = "#6E6A86" # Medium gray +status_inactive_fg = "#5A5570" # Darker gray status_inactive_bg = "#F7F7FF" # Off-white menu_fg = "#1E1E2E" # Deep navy menu_bg = "#E8E8F0" # Light gray -menu_sel_fg = "#F7F7FF" # Off-white -menu_sel_bg = "#FEF5BC" # Soft yellow selection -menu_scroll_fg = "#6E6A86" # Medium gray +menu_sel_fg = "#1E1E2E" # Dark navy text for better contrast +menu_sel_bg = "#E8D5FF" # Light purple selection +menu_scroll_fg = "#5A5570" # Darker gray menu_scroll_bg = "#E8E8F0" # Light gray popup_fg = "#1E1E2E" # Deep navy popup_bg = "#E8E8F0" # Light gray match_paren_fg = "#1E1E2E" # Deep navy -match_paren_bg = "#FEF5BC" # Soft yellow +match_paren_bg = "#E8D5FF" # Light purple matching selection virtual_ruler_bg = "#EAEAF0" # Slightly lighter than comment color background -comment_fg = "#6E6A86" # Medium gray comments -string_fg = "#FEF5BC" # Soft yellow strings (from your visual identity) -string_special_fg = "#F28FAD" # Pink special strings -constant_fg = "#F28FAD" # Pink constants -constant_builtin_fg = "#F28FAD" # Pink built-in constants -number_fg = "#F8BD96" # Peach numbers -boolean_fg = "#F28FAD" # Pink booleans +comment_fg = "#5A5570" # Darker gray comments for better contrast +string_fg = "#B8860B" # Dark golden rod - much better contrast on light background +string_special_fg = "#9F1239" # Even darker pink special strings +constant_fg = "#9F1239" # Even darker pink constants for maximum contrast +constant_builtin_fg = "#9F1239" # Even darker pink built-in constants +number_fg = "#C2410C" # Darker orange numbers for better contrast +boolean_fg = "#9F1239" # Even darker pink booleans function_fg = "#005F87" # Dark blue functions (more distinguishable) function_builtin_fg = "#005F87" # Dark blue built-in functions keyword_fg = "#9655FF" # Deep purple keywords keyword_control_fg = "#9655FF" # Deep purple control keywords -operator_fg = "#6E6A86" # Medium gray operators (adjusted for better contrast) +operator_fg = "#4A4560" # Darker purple-gray operators for better contrast variable_fg = "#1E1E2E" # Deep navy variables -variable_builtin_fg = "#F28FAD" # Pink built-in variables -type_fg = "#C9CBFF" # Lavender types -type_builtin_fg = "#C9CBFF" # Lavender built-in types +variable_builtin_fg = "#9F1239" # Even darker pink built-in variables +type_fg = "#6B46C1" # Darker purple types for better contrast +type_builtin_fg = "#6B46C1" # Darker purple built-in types for better contrast attribute_fg = "#9655FF" # Deep purple attributes -namespace_fg = "#9655FF" # Deep purple namespaces +namespace_fg = "#6B46C1" # Darker purple namespaces (Base16 base0E) punctuation_fg = "#1E1E2E" # Deep navy punctuation -symbol_fg = "#F28FAD" # Pink symbols (e.g., Elixir atoms) +symbol_fg = "#9F1239" # Even darker pink symbols (atoms) for maximum contrast -error_fg = "#E78284" # Soft red errors -warning_fg = "#E5C890" # Soft yellow warnings -info_fg = "#8CAAEE" # Soft blue info -hint_fg = "#8BD5CA" # Soft cyan hints +error_fg = "#9F1239" # Base16 base08 - red errors +warning_fg = "#C2410C" # Base16 base09 - orange warnings +info_fg = "#005F87" # Base16 base0B - blue info +hint_fg = "#8BD5CA" # Base16 base0C - cyan hints diff_add_fg = "#A6DA95" # Soft green additions diff_delete_fg = "#E78284" # Soft red deletions @@ -121,4 +141,4 @@ markup_bold_fg = "#1E1E2E" # Deep navy bold text markup_italic_fg = "#1E1E2E" # Deep navy italic text markup_link_url_fg = "#005F87" # Dark blue links markup_link_text_fg = "#9655FF" # Deep purple link text -markup_quote_fg = "#6E6A86" # Gray quotes +markup_quote_fg = "#5A5570" # Darker gray quotes diff --git a/runtime/themes/nyxvamp-veil.toml b/runtime/themes/nyxvamp-veil.toml index 60d5d7d6..1d385ba0 100644 --- a/runtime/themes/nyxvamp-veil.toml +++ b/runtime/themes/nyxvamp-veil.toml @@ -3,6 +3,9 @@ inherits = "nyxvamp-radiance" +# Rainbow parentheses colors +rainbow = ["keyword_fg", "function_fg", "string_fg", "number_fg"] + # Override specific styles for veil variant "function" = { fg = "function_fg", modifiers = ["bold"] } "function.builtin" = { fg = "function_builtin_fg", modifiers = ["bold"] } @@ -22,15 +25,15 @@ line_nr_selected = "#D9E0EE" # Foreground color for selected line number # Status line colors status_fg = "#D9E0EE" -status_bg = "#302D41" +status_bg = "#2E2E3E" status_inactive_fg = "#6E6A86" status_inactive_bg = "#1E1E2E" # Menu colors menu_fg = "#D9E0EE" menu_bg = "#1E1E2E" -menu_sel_fg = "#1E1E2E" -menu_sel_bg = "#F5C2E7" +menu_sel_fg = "#D9E0EE" +menu_sel_bg = "#494D64" menu_scroll_fg = "#6E6A86" menu_scroll_bg = "#1E1E2E" popup_fg = "#D9E0EE" @@ -59,15 +62,15 @@ variable_builtin_fg = "#F28FAD" # Pink built-in variables type_fg = "#C9CBFF" # Lavender types type_builtin_fg = "#C9CBFF" # Lavender built-in types attribute_fg = "#F5C2E7" # Pink attributes -namespace_fg = "#DDB6F2" # Purple namespaces +namespace_fg = "#C9CBFF" # Lavender namespaces (Base16 base0E) punctuation_fg = "#D9E0EE" # Foreground color for punctuation symbol_fg = "#F28FAD" # Pink symbols (e.g., Elixir atoms) # Diagnostics -error_fg = "#E78284" # Red errors -warning_fg = "#E5C890" # Yellow warnings -info_fg = "#8CAAEE" # Blue info -hint_fg = "#8BD5CA" # Cyan hints +error_fg = "#F28FAD" # Base16 base08 - red errors +warning_fg = "#F8BD96" # Base16 base09 - orange warnings +info_fg = "#96CDFB" # Base16 base0B - blue info +hint_fg = "#8BD5CA" # Base16 base0C - cyan hints # Diff colors diff_add_fg = "#A6DA95" # Green additions diff --git a/runtime/themes/onedarker.toml b/runtime/themes/onedarker.toml index 365cee49..b65bd86b 100644 --- a/runtime/themes/onedarker.toml +++ b/runtime/themes/onedarker.toml @@ -20,6 +20,7 @@ "keyword.operator" = { fg = "white" } "special" = { fg = "blue" } "string" = { fg = "green" } +"tag" = { fg = "purple" } "type" = { fg = "yellow" } "variable" = { fg = "white" } "variable.builtin" = { fg = "red" } @@ -60,6 +61,7 @@ "ui.virtual.whitespace" = { fg = "light-gray" } "ui.virtual.ruler" = { bg = "gray" } "ui.virtual.inlay-hint" = { fg = "light-gray" } +"ui.virtual.jump-label" = { fg = "gold", modifiers = ["bold", "underlined"] } "ui.cursor" = { fg = "white", modifiers = ["reversed"] } "ui.cursor.primary" = { fg = "white", modifiers = ["reversed"] } diff --git a/rust-toolchain.toml b/rust-toolchain.toml index f0c6c4d3..bab90ad3 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.84.0" +channel = "1.85.0" components = ["rustfmt", "rust-src", "clippy"]