Compare commits

...

13 Commits

Author SHA1 Message Date
Michael Davis
feaf58bcb3
Merge 9c108b5486 into 239262e094 2024-11-20 15:59:11 -06:00
Mark Stosberg
239262e094
docs: Document what directory file_picker opens from (#10816) 2024-11-20 15:58:50 -06:00
Eduardo Rittner Coelho
23600e3ecb
Add correct source file for TypableCommandList (#11839)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2024-11-20 15:58:24 -06:00
Sam Kagan
287e412780
docs(keymap): add select_all_children (#11972)
Co-authored-by: Sam Kagan <skagan@nrao.edu>
2024-11-20 15:58:00 -06:00
stefanvi
bc18dc2c0c
Pluralize 'parenthesis' in the tutorial (#12015) 2024-11-20 15:57:42 -06:00
Sebastian Dörner
3fd7ca334e
Add support for textproto language. (#11874) 2024-11-20 15:57:30 -06:00
Oren Mittman
6373027c9e
chore: add "ui.virtual.jump-label" to serika-dark theme (#11911) 2024-11-20 15:57:15 -06:00
dependabot[bot]
f06f481ad9
build(deps): bump the rust-dependencies group with 5 updates (#12088)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-20 15:56:56 -06:00
dependabot[bot]
a219d5aabb
build(deps): bump unicode-general-category from 0.6.0 to 1.0.0 (#12089)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-20 11:41:07 -06:00
Michael Davis
d489c03c4f helix-term: Use workspace thiserror dep 2024-11-20 11:40:45 -06:00
dependabot[bot]
f621423e7d build(deps): bump thiserror from 1.0.64 to 2.0.3
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.64 to 2.0.3.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.64...2.0.3)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-20 11:40:45 -06:00
dependabot[bot]
35802cb025
build(deps): bump which from 6.0.3 to 7.0.0 (#12090)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-20 11:40:00 -06:00
Michael Davis
9c108b5486
Support bindings with the Super (Cmd/Win/Meta) modifier
Terminals which support the enhanced keyboard protocol send events for
keys pressed with the Super modifier (Windows/Linux key or the Command
key). The only changes that are needed to support this in Helix are:

* Mapping the modifier from crossterm's KeyModifiers to Helix's
  KeyModifiers.
* Representing and parsing the modifier from the KeyEvent text
  representation.
* Documenting the ability to remap it.

When writing keybindings, use 'Meta-', 'Cmd-' or 'Win-' which are all
synonymous. For example:

    [keys.normal]
    Cmd-s = ":write"

will trigger for the Windows or Linux keys and the Command key plus 's'.
2024-07-06 10:49:27 -04:00
17 changed files with 250 additions and 115 deletions

134
Cargo.lock generated
View File

@ -136,9 +136,9 @@ checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53"
[[package]] [[package]]
name = "cc" name = "cc"
version = "1.1.37" version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40545c26d092346d8a8dab71ee48e7685a7a9cba76e634790c215b41a4a7b4cf" checksum = "fd9de9f2205d5ef3fd67e685b0df337994ddd4495e2a28d185500d0e1edfea47"
dependencies = [ dependencies = [
"shlex", "shlex",
] ]
@ -383,7 +383,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7199d965852c3bac31f779ef99cbb4537f80e952e2d6aa0ffeb30cce00f4f46e" checksum = "7199d965852c3bac31f779ef99cbb4537f80e952e2d6aa0ffeb30cce00f4f46e"
dependencies = [ dependencies = [
"libc", "libc",
"thiserror", "thiserror 1.0.69",
"winapi", "winapi",
] ]
@ -522,7 +522,7 @@ dependencies = [
"gix-worktree", "gix-worktree",
"once_cell", "once_cell",
"smallvec", "smallvec",
"thiserror", "thiserror 1.0.69",
] ]
[[package]] [[package]]
@ -535,7 +535,7 @@ dependencies = [
"gix-date", "gix-date",
"gix-utils", "gix-utils",
"itoa", "itoa",
"thiserror", "thiserror 1.0.69",
"winnow", "winnow",
] ]
@ -552,7 +552,7 @@ dependencies = [
"gix-trace", "gix-trace",
"kstring", "kstring",
"smallvec", "smallvec",
"thiserror", "thiserror 1.0.69",
"unicode-bom", "unicode-bom",
] ]
@ -562,7 +562,7 @@ version = "0.2.12"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "10f78312288bd02052be5dbc2ecbc342c9f4eb791986d86c0a5c06b92dc72efa" checksum = "10f78312288bd02052be5dbc2ecbc342c9f4eb791986d86c0a5c06b92dc72efa"
dependencies = [ dependencies = [
"thiserror", "thiserror 1.0.69",
] ]
[[package]] [[package]]
@ -571,7 +571,7 @@ version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c28b58ba04f0c004722344390af9dbc85888fbb84be1981afb934da4114d4cf" checksum = "6c28b58ba04f0c004722344390af9dbc85888fbb84be1981afb934da4114d4cf"
dependencies = [ dependencies = [
"thiserror", "thiserror 1.0.69",
] ]
[[package]] [[package]]
@ -597,7 +597,7 @@ dependencies = [
"gix-features", "gix-features",
"gix-hash", "gix-hash",
"memmap2", "memmap2",
"thiserror", "thiserror 1.0.69",
] ]
[[package]] [[package]]
@ -616,7 +616,7 @@ dependencies = [
"memchr", "memchr",
"once_cell", "once_cell",
"smallvec", "smallvec",
"thiserror", "thiserror 1.0.69",
"unicode-bom", "unicode-bom",
"winnow", "winnow",
] ]
@ -631,7 +631,7 @@ dependencies = [
"bstr", "bstr",
"gix-path", "gix-path",
"libc", "libc",
"thiserror", "thiserror 1.0.69",
] ]
[[package]] [[package]]
@ -643,7 +643,7 @@ dependencies = [
"bstr", "bstr",
"itoa", "itoa",
"jiff", "jiff",
"thiserror", "thiserror 1.0.69",
] ]
[[package]] [[package]]
@ -664,7 +664,7 @@ dependencies = [
"gix-traverse", "gix-traverse",
"gix-worktree", "gix-worktree",
"imara-diff", "imara-diff",
"thiserror", "thiserror 1.0.69",
] ]
[[package]] [[package]]
@ -684,7 +684,7 @@ dependencies = [
"gix-trace", "gix-trace",
"gix-utils", "gix-utils",
"gix-worktree", "gix-worktree",
"thiserror", "thiserror 1.0.69",
] ]
[[package]] [[package]]
@ -700,7 +700,7 @@ dependencies = [
"gix-path", "gix-path",
"gix-ref", "gix-ref",
"gix-sec", "gix-sec",
"thiserror", "thiserror 1.0.69",
] ]
[[package]] [[package]]
@ -718,7 +718,7 @@ dependencies = [
"once_cell", "once_cell",
"prodash", "prodash",
"sha1_smol", "sha1_smol",
"thiserror", "thiserror 1.0.69",
"walkdir", "walkdir",
] ]
@ -740,7 +740,7 @@ dependencies = [
"gix-trace", "gix-trace",
"gix-utils", "gix-utils",
"smallvec", "smallvec",
"thiserror", "thiserror 1.0.69",
] ]
[[package]] [[package]]
@ -773,7 +773,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "952c3a29f1bc1007cc901abce7479943abfa42016db089de33d0a4fa3c85bfe8" checksum = "952c3a29f1bc1007cc901abce7479943abfa42016db089de33d0a4fa3c85bfe8"
dependencies = [ dependencies = [
"faster-hex", "faster-hex",
"thiserror", "thiserror 1.0.69",
] ]
[[package]] [[package]]
@ -825,7 +825,7 @@ dependencies = [
"memmap2", "memmap2",
"rustix", "rustix",
"smallvec", "smallvec",
"thiserror", "thiserror 1.0.69",
] ]
[[package]] [[package]]
@ -836,7 +836,7 @@ checksum = "5102acdf4acae2644e38dbbd18cdfba9597a218f7d85f810fe5430207e03c2de"
dependencies = [ dependencies = [
"gix-tempfile", "gix-tempfile",
"gix-utils", "gix-utils",
"thiserror", "thiserror 1.0.69",
] ]
[[package]] [[package]]
@ -855,7 +855,7 @@ dependencies = [
"gix-validate", "gix-validate",
"itoa", "itoa",
"smallvec", "smallvec",
"thiserror", "thiserror 1.0.69",
"winnow", "winnow",
] ]
@ -877,7 +877,7 @@ dependencies = [
"gix-quote", "gix-quote",
"parking_lot", "parking_lot",
"tempfile", "tempfile",
"thiserror", "thiserror 1.0.69",
] ]
[[package]] [[package]]
@ -895,7 +895,7 @@ dependencies = [
"gix-path", "gix-path",
"memmap2", "memmap2",
"smallvec", "smallvec",
"thiserror", "thiserror 1.0.69",
] ]
[[package]] [[package]]
@ -907,7 +907,7 @@ dependencies = [
"bstr", "bstr",
"faster-hex", "faster-hex",
"gix-trace", "gix-trace",
"thiserror", "thiserror 1.0.69",
] ]
[[package]] [[package]]
@ -920,7 +920,7 @@ dependencies = [
"gix-trace", "gix-trace",
"home", "home",
"once_cell", "once_cell",
"thiserror", "thiserror 1.0.69",
] ]
[[package]] [[package]]
@ -935,7 +935,7 @@ dependencies = [
"gix-config-value", "gix-config-value",
"gix-glob", "gix-glob",
"gix-path", "gix-path",
"thiserror", "thiserror 1.0.69",
] ]
[[package]] [[package]]
@ -946,7 +946,7 @@ checksum = "f89f9a1525dcfd9639e282ea939f5ab0d09d93cf2b90c1fc6104f1b9582a8e49"
dependencies = [ dependencies = [
"bstr", "bstr",
"gix-utils", "gix-utils",
"thiserror", "thiserror 1.0.69",
] ]
[[package]] [[package]]
@ -966,7 +966,7 @@ dependencies = [
"gix-utils", "gix-utils",
"gix-validate", "gix-validate",
"memmap2", "memmap2",
"thiserror", "thiserror 1.0.69",
"winnow", "winnow",
] ]
@ -981,7 +981,7 @@ dependencies = [
"gix-revision", "gix-revision",
"gix-validate", "gix-validate",
"smallvec", "smallvec",
"thiserror", "thiserror 1.0.69",
] ]
[[package]] [[package]]
@ -996,7 +996,7 @@ dependencies = [
"gix-hash", "gix-hash",
"gix-object", "gix-object",
"gix-revwalk", "gix-revwalk",
"thiserror", "thiserror 1.0.69",
] ]
[[package]] [[package]]
@ -1011,7 +1011,7 @@ dependencies = [
"gix-hashtable", "gix-hashtable",
"gix-object", "gix-object",
"smallvec", "smallvec",
"thiserror", "thiserror 1.0.69",
] ]
[[package]] [[package]]
@ -1046,7 +1046,7 @@ dependencies = [
"gix-pathspec", "gix-pathspec",
"gix-worktree", "gix-worktree",
"portable-atomic", "portable-atomic",
"thiserror", "thiserror 1.0.69",
] ]
[[package]] [[package]]
@ -1061,7 +1061,7 @@ dependencies = [
"gix-pathspec", "gix-pathspec",
"gix-refspec", "gix-refspec",
"gix-url", "gix-url",
"thiserror", "thiserror 1.0.69",
] ]
[[package]] [[package]]
@ -1098,7 +1098,7 @@ dependencies = [
"gix-object", "gix-object",
"gix-revwalk", "gix-revwalk",
"smallvec", "smallvec",
"thiserror", "thiserror 1.0.69",
] ]
[[package]] [[package]]
@ -1110,7 +1110,7 @@ dependencies = [
"bstr", "bstr",
"gix-features", "gix-features",
"gix-path", "gix-path",
"thiserror", "thiserror 1.0.69",
"url", "url",
] ]
@ -1132,7 +1132,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e187b263461bc36cea17650141567753bc6207d036cedd1de6e81a52f277ff68" checksum = "e187b263461bc36cea17650141567753bc6207d036cedd1de6e81a52f277ff68"
dependencies = [ dependencies = [
"bstr", "bstr",
"thiserror", "thiserror 1.0.69",
] ]
[[package]] [[package]]
@ -1263,7 +1263,7 @@ dependencies = [
"log", "log",
"serde", "serde",
"serde_json", "serde_json",
"thiserror", "thiserror 2.0.3",
"tokio", "tokio",
] ]
@ -1319,7 +1319,7 @@ dependencies = [
"serde", "serde",
"serde_json", "serde_json",
"slotmap", "slotmap",
"thiserror", "thiserror 2.0.3",
"tokio", "tokio",
"tokio-stream", "tokio-stream",
] ]
@ -1392,7 +1392,7 @@ dependencies = [
"smallvec", "smallvec",
"tempfile", "tempfile",
"termini", "termini",
"thiserror", "thiserror 2.0.3",
"tokio", "tokio",
"tokio-stream", "tokio-stream",
"toml", "toml",
@ -1459,7 +1459,7 @@ dependencies = [
"serde_json", "serde_json",
"slotmap", "slotmap",
"tempfile", "tempfile",
"thiserror", "thiserror 2.0.3",
"tokio", "tokio",
"tokio-stream", "tokio-stream",
"toml", "toml",
@ -1755,9 +1755,9 @@ dependencies = [
[[package]] [[package]]
name = "libc" name = "libc"
version = "0.2.162" version = "0.2.164"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "18d287de67fe55fd7e1581fe933d965a5a9477b38e949cfa9f8574ef01506398" checksum = "433bfe06b8c75da9b2e3fbea6e5329ff87748f0b144ef75306e674c3f6f7c13f"
[[package]] [[package]]
name = "libloading" name = "libloading"
@ -1911,9 +1911,9 @@ checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
[[package]] [[package]]
name = "open" name = "open"
version = "5.3.0" version = "5.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "61a877bf6abd716642a53ef1b89fb498923a4afca5c754f9050b4d081c05c4b3" checksum = "3ecd52f0b8d15c40ce4820aa251ed5de032e5d91fab27f7db2f40d42a8bdf69c"
dependencies = [ dependencies = [
"is-wsl", "is-wsl",
"libc", "libc",
@ -2128,9 +2128,9 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
[[package]] [[package]]
name = "rustix" name = "rustix"
version = "0.38.40" version = "0.38.41"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "99e4ea3e1cdc4b559b8e5650f9c8e5998e3e5c1343b4eaf034565f32318d63c0" checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"errno", "errno",
@ -2182,9 +2182,9 @@ dependencies = [
[[package]] [[package]]
name = "serde_json" name = "serde_json"
version = "1.0.132" version = "1.0.133"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377"
dependencies = [ dependencies = [
"itoa", "itoa",
"memchr", "memchr",
@ -2398,18 +2398,38 @@ dependencies = [
[[package]] [[package]]
name = "thiserror" name = "thiserror"
version = "1.0.64" version = "1.0.69"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
dependencies = [ dependencies = [
"thiserror-impl", "thiserror-impl 1.0.69",
]
[[package]]
name = "thiserror"
version = "2.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c006c85c7651b3cf2ada4584faa36773bd07bac24acfb39f3c431b36d7e667aa"
dependencies = [
"thiserror-impl 2.0.3",
] ]
[[package]] [[package]]
name = "thiserror-impl" name = "thiserror-impl"
version = "1.0.64" version = "1.0.69"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "thiserror-impl"
version = "2.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f077553d607adc1caf65430528a576c757a71ed73944b66ebb58ef2bbd243568"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -2551,9 +2571,9 @@ checksum = "7eec5d1121208364f6793f7d2e222bf75a915c19557537745b195b253dd64217"
[[package]] [[package]]
name = "unicode-general-category" name = "unicode-general-category"
version = "0.6.0" version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2281c8c1d221438e373249e065ca4989c4c36952c211ff21a0ee91c44a3869e7" checksum = "24adfe8311434967077a6adff125729161e6e4934d76f6b7c55318ac5c9246d3"
[[package]] [[package]]
name = "unicode-ident" name = "unicode-ident"
@ -2691,9 +2711,9 @@ checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484"
[[package]] [[package]]
name = "which" name = "which"
version = "6.0.3" version = "7.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4ee928febd44d98f2f459a4a79bd4d928591333a494a10a868418ac1b39cf1f" checksum = "c9cad3279ade7346b96e38731a641d7343dd6a53d55083dd54eadfa5a1b38c6b"
dependencies = [ dependencies = [
"either", "either",
"home", "home",

View File

@ -41,7 +41,7 @@ package.helix-term.opt-level = 2
tree-sitter = { version = "0.22" } tree-sitter = { version = "0.22" }
nucleo = "0.5.0" nucleo = "0.5.0"
slotmap = "1.0.7" slotmap = "1.0.7"
thiserror = "1.0" thiserror = "2.0"
[workspace.package] [workspace.package]
version = "24.7.0" version = "24.7.0"

View File

@ -204,6 +204,7 @@
| task | ✓ | | | | | task | ✓ | | | |
| tcl | ✓ | | ✓ | | | tcl | ✓ | | ✓ | |
| templ | ✓ | | | `templ` | | templ | ✓ | | | `templ` |
| textproto | ✓ | ✓ | ✓ | |
| tfvars | ✓ | | ✓ | `terraform-ls` | | tfvars | ✓ | | ✓ | `terraform-ls` |
| thrift | ✓ | | | | | thrift | ✓ | | | |
| todotxt | ✓ | | | | | todotxt | ✓ | | | |

View File

@ -112,42 +112,43 @@ #### Shell
### Selection manipulation ### Selection manipulation
| Key | Description | Command | | Key | Description | Command |
| ----- | ----------- | ------- | | ----- | ----------- | ------- |
| `s` | Select all regex matches inside selections | `select_regex` | | `s` | Select all regex matches inside selections | `select_regex` |
| `S` | Split selection into sub selections on regex matches | `split_selection` | | `S` | Split selection into sub selections on regex matches | `split_selection` |
| `Alt-s` | Split selection on newlines | `split_selection_on_newline` | | `Alt-s` | Split selection on newlines | `split_selection_on_newline` |
| `Alt-minus` | Merge selections | `merge_selections` | | `Alt-minus` | Merge selections | `merge_selections` |
| `Alt-_` | Merge consecutive selections | `merge_consecutive_selections` | | `Alt-_` | Merge consecutive selections | `merge_consecutive_selections` |
| `&` | Align selection in columns | `align_selections` | | `&` | Align selection in columns | `align_selections` |
| `_` | Trim whitespace from the selection | `trim_selections` | | `_` | Trim whitespace from the selection | `trim_selections` |
| `;` | Collapse selection onto a single cursor | `collapse_selection` | | `;` | Collapse selection onto a single cursor | `collapse_selection` |
| `Alt-;` | Flip selection cursor and anchor | `flip_selections` | | `Alt-;` | Flip selection cursor and anchor | `flip_selections` |
| `Alt-:` | Ensures the selection is in forward direction | `ensure_selections_forward` | | `Alt-:` | Ensures the selection is in forward direction | `ensure_selections_forward` |
| `,` | Keep only the primary selection | `keep_primary_selection` | | `,` | Keep only the primary selection | `keep_primary_selection` |
| `Alt-,` | Remove the primary selection | `remove_primary_selection` | | `Alt-,` | Remove the primary selection | `remove_primary_selection` |
| `C` | Copy selection onto the next line (Add cursor below) | `copy_selection_on_next_line` | | `C` | Copy selection onto the next line (Add cursor below) | `copy_selection_on_next_line` |
| `Alt-C` | Copy selection onto the previous line (Add cursor above) | `copy_selection_on_prev_line` | | `Alt-C` | Copy selection onto the previous line (Add cursor above) | `copy_selection_on_prev_line` |
| `(` | Rotate main selection backward | `rotate_selections_backward` | | `(` | Rotate main selection backward | `rotate_selections_backward` |
| `)` | Rotate main selection forward | `rotate_selections_forward` | | `)` | Rotate main selection forward | `rotate_selections_forward` |
| `Alt-(` | Rotate selection contents backward | `rotate_selection_contents_backward` | | `Alt-(` | Rotate selection contents backward | `rotate_selection_contents_backward` |
| `Alt-)` | Rotate selection contents forward | `rotate_selection_contents_forward` | | `Alt-)` | Rotate selection contents forward | `rotate_selection_contents_forward` |
| `%` | Select entire file | `select_all` | | `%` | Select entire file | `select_all` |
| `x` | Select current line, if already selected, extend to next line | `extend_line_below` | | `x` | Select current line, if already selected, extend to next line | `extend_line_below` |
| `X` | Extend selection to line bounds (line-wise selection) | `extend_to_line_bounds` | | `X` | Extend selection to line bounds (line-wise selection) | `extend_to_line_bounds` |
| `Alt-x` | Shrink selection to line bounds (line-wise selection) | `shrink_to_line_bounds` | | `Alt-x` | Shrink selection to line bounds (line-wise selection) | `shrink_to_line_bounds` |
| `J` | Join lines inside selection | `join_selections` | | `J` | Join lines inside selection | `join_selections` |
| `Alt-J` | Join lines inside selection and select the inserted space | `join_selections_space` | | `Alt-J` | Join lines inside selection and select the inserted space | `join_selections_space` |
| `K` | Keep selections matching the regex | `keep_selections` | | `K` | Keep selections matching the regex | `keep_selections` |
| `Alt-K` | Remove selections matching the regex | `remove_selections` | | `Alt-K` | Remove selections matching the regex | `remove_selections` |
| `Ctrl-c` | Comment/uncomment the selections | `toggle_comments` | | `Ctrl-c` | Comment/uncomment the selections | `toggle_comments` |
| `Alt-o`, `Alt-up` | Expand selection to parent syntax node (**TS**) | `expand_selection` | | `Alt-o`, `Alt-up` | Expand selection to parent syntax node (**TS**) | `expand_selection` |
| `Alt-i`, `Alt-down` | Shrink syntax tree object selection (**TS**) | `shrink_selection` | | `Alt-i`, `Alt-down` | Shrink syntax tree object selection (**TS**) | `shrink_selection` |
| `Alt-p`, `Alt-left` | Select previous sibling node in syntax tree (**TS**) | `select_prev_sibling` | | `Alt-p`, `Alt-left` | Select previous sibling node in syntax tree (**TS**) | `select_prev_sibling` |
| `Alt-n`, `Alt-right` | Select next sibling node in syntax tree (**TS**) | `select_next_sibling` | | `Alt-n`, `Alt-right` | Select next sibling node in syntax tree (**TS**) | `select_next_sibling` |
| `Alt-a` | Select all sibling nodes in syntax tree (**TS**) | `select_all_siblings` | | `Alt-a` | Select all sibling nodes in syntax tree (**TS**) | `select_all_siblings` |
| `Alt-e` | Move to end of parent node in syntax tree (**TS**) | `move_parent_node_end` | | `Alt-I`, `Alt-Shift-down`| Select all children nodes in syntax tree (**TS**) | `select_all_children` |
| `Alt-b` | Move to start of parent node in syntax tree (**TS**) | `move_parent_node_start` | | `Alt-e` | Move to end of parent node in syntax tree (**TS**) | `move_parent_node_end` |
| `Alt-b` | Move to start of parent node in syntax tree (**TS**) | `move_parent_node_start` |
### Search ### Search
@ -281,7 +282,7 @@ #### Space mode
| Key | Description | Command | | Key | Description | Command |
| ----- | ----------- | ------- | | ----- | ----------- | ------- |
| `f` | Open file picker | `file_picker` | | `f` | Open file picker at LSP workspace root | `file_picker` |
| `F` | Open file picker at current working directory | `file_picker_in_current_directory` | | `F` | Open file picker at current working directory | `file_picker_in_current_directory` |
| `b` | Open buffer picker | `buffer_picker` | | `b` | Open buffer picker | `buffer_picker` |
| `j` | Open jumplist picker | `jumplist_picker` | | `j` | Open jumplist picker | `jumplist_picker` |

View File

@ -50,8 +50,22 @@ # create a new minor mode bound to `+`
## Special keys and modifiers ## Special keys and modifiers
Ctrl, Shift and Alt modifiers are encoded respectively with the prefixes Ctrl, Shift and Alt modifiers are encoded respectively with the prefixes `C-`, `S-` and `A-`.
`C-`, `S-` and `A-`. Special keys are encoded as follows:
The [Super key](https://en.wikipedia.org/wiki/Super_key_(keyboard_button)) - the Windows/Linux
key or the Command key on Mac keyboards - is also supported when using a terminal emulator that
supports the [enhanced keyboard protocol](https://github.com/helix-editor/helix/wiki/Terminal-Support#enhanced-keyboard-protocol).
The super key is encoded with prefixes `Meta-`, `Cmd-` or `Win-`. These are all synonyms for the
super modifier - binding a key with a `Win-` modifier will mean it can be used with the
Windows/Linux key or the Command key.
```toml
[keys.normal]
C-s = ":write" # Ctrl and 's' to write
Cmd-s = ":write" # Cmd or Win or Meta and 's' to write
```
Special keys are encoded as follows:
| Key name | Representation | | Key name | Representation |
| --- | --- | | --- | --- |
@ -83,10 +97,11 @@ ## Commands
keys and used for movement and editing. A list of static commands is keys and used for movement and editing. A list of static commands is
available in the [Keymap](./keymap.html) documentation and in the source code available in the [Keymap](./keymap.html) documentation and in the source code
in [`helix-term/src/commands.rs`](https://github.com/helix-editor/helix/blob/master/helix-term/src/commands.rs) in [`helix-term/src/commands.rs`](https://github.com/helix-editor/helix/blob/master/helix-term/src/commands.rs)
at the invocation of `static_commands!` macro and the `TypableCommandList`. at the invocation of `static_commands!` macro.
* Typable commands: commands that can be executed from command mode (`:`), for * Typable commands: commands that can be executed from command mode (`:`), for
example `:write!`. See the [Commands](./commands.html) documentation for a example `:write!`. See the [Commands](./commands.html) documentation for a
list of available typeable commands. list of available typeable commands or the `TypableCommandList` declaration in
the source code at [`helix-term/src/commands/typed.rs`](https://github.com/helix-editor/helix/blob/master/helix-term/src/commands/typed.rs).
* Macros: sequences of keys that are executed in order. These keybindings * Macros: sequences of keys that are executed in order. These keybindings
start with `@` and then list any number of keys to be executed. For example start with `@` and then list any number of keys to be executed. For example
`@miw` can be used to select the surrounding word. For now, macro keybindings `@miw` can be used to select the surrounding word. For now, macro keybindings

View File

@ -29,7 +29,7 @@ unicode-segmentation = "1.12"
# For now lets lock the version to avoid rendering glitches # For now lets lock the version to avoid rendering glitches
# when installing without `--locked` # when installing without `--locked`
unicode-width = "=0.1.12" unicode-width = "=0.1.12"
unicode-general-category = "0.6" unicode-general-category = "1.0"
slotmap.workspace = true slotmap.workspace = true
tree-sitter.workspace = true tree-sitter.workspace = true
once_cell = "1.20" once_cell = "1.20"

View File

@ -23,7 +23,7 @@ license = "MIT"
[dependencies] [dependencies]
bitflags = "2.6.0" bitflags = "2.6.0"
serde = { version = "1.0.215", features = ["derive"] } serde = { version = "1.0.215", features = ["derive"] }
serde_json = "1.0.132" serde_json = "1.0.133"
serde_repr = "0.1" serde_repr = "0.1"
url = {version = "2.5.3", features = ["serde"]} url = {version = "2.5.3", features = ["serde"]}

View File

@ -15,7 +15,7 @@ homepage.workspace = true
dunce = "1.0" dunce = "1.0"
etcetera = "0.8" etcetera = "0.8"
ropey = { version = "1.6.1", default-features = false } ropey = { version = "1.6.1", default-features = false }
which = "6.0" which = "7.0"
regex-cursor = "0.1.4" regex-cursor = "0.1.4"
bitflags = "2.6" bitflags = "2.6"

View File

@ -56,10 +56,10 @@ ignore = "0.4"
pulldown-cmark = { version = "0.12", default-features = false } pulldown-cmark = { version = "0.12", default-features = false }
# file type detection # file type detection
content_inspector = "0.2.4" content_inspector = "0.2.4"
thiserror = "1.0" thiserror.workspace = true
# opening URLs # opening URLs
open = "5.3.0" open = "5.3.1"
url = "2.5.3" url = "2.5.3"
# config # config
@ -74,7 +74,7 @@ grep-searcher = "0.1.14"
[target.'cfg(not(windows))'.dependencies] # https://github.com/vorner/signal-hook/issues/100 [target.'cfg(not(windows))'.dependencies] # https://github.com/vorner/signal-hook/issues/100
signal-hook-tokio = { version = "0.3", features = ["futures-v0_3"] } signal-hook-tokio = { version = "0.3", features = ["futures-v0_3"] }
libc = "0.2.162" libc = "0.2.164"
[target.'cfg(target_os = "macos")'.dependencies] [target.'cfg(target_os = "macos")'.dependencies]
crossterm = { version = "0.28", features = ["event-stream", "use-dev-tty", "libc"] } crossterm = { version = "0.28", features = ["event-stream", "use-dev-tty", "libc"] }

View File

@ -162,7 +162,12 @@ pub(crate) mod keys {
impl fmt::Display for KeyEvent { impl fmt::Display for KeyEvent {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> std::fmt::Result { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> std::fmt::Result {
f.write_fmt(format_args!( f.write_fmt(format_args!(
"{}{}{}", "{}{}{}{}",
if self.modifiers.contains(KeyModifiers::SUPER) {
"Meta-"
} else {
""
},
if self.modifiers.contains(KeyModifiers::SHIFT) { if self.modifiers.contains(KeyModifiers::SHIFT) {
"S-" "S-"
} else { } else {
@ -312,6 +317,10 @@ fn width(&self) -> usize {
if self.modifiers.contains(KeyModifiers::CONTROL) { if self.modifiers.contains(KeyModifiers::CONTROL) {
width += 2; width += 2;
} }
if self.modifiers.contains(KeyModifiers::SUPER) {
// "-Meta"
width += 5;
}
width width
} }
@ -396,6 +405,7 @@ fn from_str(s: &str) -> Result<Self, Self::Err> {
"S" => KeyModifiers::SHIFT, "S" => KeyModifiers::SHIFT,
"A" => KeyModifiers::ALT, "A" => KeyModifiers::ALT,
"C" => KeyModifiers::CONTROL, "C" => KeyModifiers::CONTROL,
"Meta" | "Cmd" | "Win" => KeyModifiers::SUPER,
_ => return Err(anyhow!("Invalid key modifier '{}-'", token)), _ => return Err(anyhow!("Invalid key modifier '{}-'", token)),
}; };
@ -709,6 +719,28 @@ fn parsing_modified_keys() {
modifiers: KeyModifiers::NONE modifiers: KeyModifiers::NONE
} }
); );
assert_eq!(
str::parse::<KeyEvent>("Meta-c").unwrap(),
KeyEvent {
code: KeyCode::Char('c'),
modifiers: KeyModifiers::SUPER
}
);
assert_eq!(
str::parse::<KeyEvent>("Win-s").unwrap(),
KeyEvent {
code: KeyCode::Char('s'),
modifiers: KeyModifiers::SUPER
}
);
assert_eq!(
str::parse::<KeyEvent>("Cmd-d").unwrap(),
KeyEvent {
code: KeyCode::Char('d'),
modifiers: KeyModifiers::SUPER
}
);
} }
#[test] #[test]

View File

@ -7,6 +7,7 @@ pub struct KeyModifiers: u8 {
const SHIFT = 0b0000_0001; const SHIFT = 0b0000_0001;
const CONTROL = 0b0000_0010; const CONTROL = 0b0000_0010;
const ALT = 0b0000_0100; const ALT = 0b0000_0100;
const SUPER = 0b0000_1000;
const NONE = 0b0000_0000; const NONE = 0b0000_0000;
} }
} }
@ -27,6 +28,9 @@ fn from(key_modifiers: KeyModifiers) -> Self {
if key_modifiers.contains(KeyModifiers::ALT) { if key_modifiers.contains(KeyModifiers::ALT) {
result.insert(CKeyModifiers::ALT); result.insert(CKeyModifiers::ALT);
} }
if key_modifiers.contains(KeyModifiers::SUPER) {
result.insert(CKeyModifiers::SUPER);
}
result result
} }
@ -48,6 +52,9 @@ fn from(val: crossterm::event::KeyModifiers) -> Self {
if val.contains(CKeyModifiers::ALT) { if val.contains(CKeyModifiers::ALT) {
result.insert(KeyModifiers::ALT); result.insert(KeyModifiers::ALT);
} }
if val.contains(CKeyModifiers::SUPER) {
result.insert(KeyModifiers::SUPER);
}
result result
} }

View File

@ -344,6 +344,19 @@ indent = { tab-width = 2, unit = " " }
name = "protobuf" name = "protobuf"
source = { git = "https://github.com/yusdacra/tree-sitter-protobuf", rev = "19c211a01434d9f03efff99f85e19f967591b175"} source = { git = "https://github.com/yusdacra/tree-sitter-protobuf", rev = "19c211a01434d9f03efff99f85e19f967591b175"}
[[language]]
name = "textproto"
file-types = ["txtpb", "textpb", "textproto"]
comment-token = "#"
scope = "source.textproto"
indent = { tab-width = 2, unit = " " }
formatter = { command = "txtpbfmt" }
auto-format = true
[[grammar]]
name = "textproto"
source = { git = "https://github.com/PorterAtGoogle/tree-sitter-textproto", rev = "568471b80fd8793d37ed01865d8c2208a9fefd1b"}
[[language]] [[language]]
name = "elixir" name = "elixir"
scope = "source.elixir" scope = "source.elixir"

View File

@ -0,0 +1,22 @@
(string) @string
(field_name) @variable.other.member
(comment) @comment
(number) @constant.numeric
; covers e.g. booleans and "inf"
(scalar_value (identifier)) @constant
; Covers "-inf"
(scalar_value (signed_identifier)) @constant.numeric
[
(open_squiggly)
(close_squiggly)
(open_square)
(close_square)
(open_arrow)
(close_arrow)
] @punctuation.bracket
"," @punctuation.delimiter

View File

@ -0,0 +1,11 @@
[
(message_value)
(message_list)
(scalar_list)
] @indent
[
(close_arrow)
(close_square)
(close_squiggly)
] @outdent

View File

@ -0,0 +1,12 @@
(message_field
(_) @entry.inside) @entry.around
(scalar_field
(_) @entry.inside) @entry.around
(message_list
(_) @entry.around)
(scalar_list
(_) @entry.around)

View File

@ -53,6 +53,7 @@
"ui.virtual.whitespace" = "bg2" "ui.virtual.whitespace" = "bg2"
"ui.virtual.ruler" = { bg = "grey2" } "ui.virtual.ruler" = { bg = "grey2" }
"ui.virtual.inlay-hint" = { fg = "grey2", modifiers = ["italic"] } "ui.virtual.inlay-hint" = { fg = "grey2", modifiers = ["italic"] }
"ui.virtual.jump-label" = { fg = "nasty-red", modifiers = ["bold"] }
"hint" = "blue" "hint" = "blue"
"info" = "aqua" "info" = "aqua"

View File

@ -1223,7 +1223,7 @@ letters! that is not good grammar. you can fix this.
to the matching ). You can do the same on the line below: for example to the matching ). You can do the same on the line below: for example
move to ], and press mm to jump to [ . move to ], and press mm to jump to [ .
--> you can (jump between matching parenthesis) --> you can (jump between matching parentheses)
--> or between matching [ square brackets ] --> or between matching [ square brackets ]
--> now { you know the drill: this works with brackets too } --> now { you know the drill: this works with brackets too }
@ -1238,19 +1238,19 @@ letters! that is not good grammar. you can fix this.
pair of brackets or other delimiters. In the lines below: pair of brackets or other delimiters. In the lines below:
- move to the --> line, put your cursor in normal mode at any - move to the --> line, put your cursor in normal mode at any
location between the parenthesis, for example at 'x', and press location between the parentheses, for example at 'x', and press
mi( or mi) to select the whole content inside the parenthesis mi( or mi) to select the whole content inside the parentheses
(parenthesis excluded). As usual, you can then do anything you want (parentheses excluded). As usual, you can then do anything you want
with the selection (for example, press c to change it) with the selection (for example, press c to change it)
--> outside and (inside x parenthesis) - and outside again --> outside and (inside x parentheses) - and outside again
Test below that you can do the same with [], or {}, or with Test below that you can do the same with [], or {}, or with
nested combinations of these (this will act on the immediately nested combinations of these (this will act on the immediately
surrounding matching pair). This also works with "" and similar surrounding matching pair). This also works with "" and similar
--> test [ with square brackets ] ! --> test [ with square brackets ] !
--> try ( with nested [ pairs of ( parenthesis) and "brackets" ]) --> try ( with nested [ pairs of ( parentheses) and "brackets" ])
================================================================= =================================================================
= 12.3 USING MATCH MODE SELECT AROUND = = 12.3 USING MATCH MODE SELECT AROUND =
@ -1284,7 +1284,7 @@ letters! that is not good grammar. you can fix this.
move in normal mode the cursor to the start of select, then enter move in normal mode the cursor to the start of select, then enter
selection mode with v , then select the 4 next words with 4e ), selection mode with v , then select the 4 next words with 4e ),
* ii) press ms( or ms) to surround the selection with a pair of * ii) press ms( or ms) to surround the selection with a pair of
parenthesis. parentheses.
--> so, select all of this, and surround it with () --> so, select all of this, and surround it with ()
@ -1304,9 +1304,9 @@ letters! that is not good grammar. you can fix this.
command. On the line below, move the cursor anywhere command. On the line below, move the cursor anywhere
within the pair of (), for example to the 'x', then from there, within the pair of (), for example to the 'x', then from there,
in normal mode, press md( or md) to delete the surrounding in normal mode, press md( or md) to delete the surrounding
pair of parenthesis. pair of parentheses.
--> delete (the x pair of parenthesis) from within! --> delete (the x pair of parentheses) from within!
You can naturally delete other kinds of surroundings: You can naturally delete other kinds of surroundings: