Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
a0ca976c99
36 changed files with 1591 additions and 1158 deletions
6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
|
@ -61,17 +61,17 @@ jobs:
|
||||||
build: [x86_64-linux, x86_64-macos, x86_64-windows] #, x86_64-win-gnu, win32-msvc
|
build: [x86_64-linux, x86_64-macos, x86_64-windows] #, x86_64-win-gnu, win32-msvc
|
||||||
include:
|
include:
|
||||||
- build: x86_64-linux
|
- build: x86_64-linux
|
||||||
os: ubuntu-latest
|
os: ubuntu-22.04
|
||||||
rust: stable
|
rust: stable
|
||||||
target: x86_64-unknown-linux-gnu
|
target: x86_64-unknown-linux-gnu
|
||||||
cross: false
|
cross: false
|
||||||
- build: aarch64-linux
|
- build: aarch64-linux
|
||||||
os: ubuntu-latest
|
os: ubuntu-22.04
|
||||||
rust: stable
|
rust: stable
|
||||||
target: aarch64-unknown-linux-gnu
|
target: aarch64-unknown-linux-gnu
|
||||||
cross: true
|
cross: true
|
||||||
# - build: riscv64-linux
|
# - build: riscv64-linux
|
||||||
# os: ubuntu-latest
|
# os: ubuntu-22.04
|
||||||
# rust: stable
|
# rust: stable
|
||||||
# target: riscv64gc-unknown-linux-gnu
|
# target: riscv64gc-unknown-linux-gnu
|
||||||
# cross: true
|
# cross: true
|
||||||
|
|
|
@ -24,6 +24,10 @@ Packaging:
|
||||||
|
|
||||||
As always, a big thank you to all of the contributors! This release saw changes from 171 contributors.
|
As always, a big thank you to all of the contributors! This release saw changes from 171 contributors.
|
||||||
|
|
||||||
|
Breaking changes:
|
||||||
|
|
||||||
|
* The `editor.lsp.display-messages` key now controls messages sent with the LSP `window/showMessage` notification rather than progress messages. If you want to enable progress messages you should now enable the `editor.lsp.display-progress-messages` key instead. ([#5535](https://github.com/helix-editor/helix/pull/5535))
|
||||||
|
|
||||||
Features:
|
Features:
|
||||||
|
|
||||||
* Big refactor for `Picker`s ([#9647](https://github.com/helix-editor/helix/pull/9647), [#11209](https://github.com/helix-editor/helix/pull/11209), [#11216](https://github.com/helix-editor/helix/pull/11216), [#11211](https://github.com/helix-editor/helix/pull/11211), [#11343](https://github.com/helix-editor/helix/pull/11343), [#11406](https://github.com/helix-editor/helix/pull/11406))
|
* Big refactor for `Picker`s ([#9647](https://github.com/helix-editor/helix/pull/9647), [#11209](https://github.com/helix-editor/helix/pull/11209), [#11216](https://github.com/helix-editor/helix/pull/11216), [#11211](https://github.com/helix-editor/helix/pull/11211), [#11343](https://github.com/helix-editor/helix/pull/11343), [#11406](https://github.com/helix-editor/helix/pull/11406))
|
||||||
|
|
123
Cargo.lock
generated
123
Cargo.lock
generated
|
@ -101,9 +101,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bitflags"
|
name = "bitflags"
|
||||||
version = "2.6.0"
|
version = "2.7.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
|
checksum = "1be3f42a67d6d345ecd59f675f3f012d6974981560836e938c22b424b85ce1be"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bstr"
|
name = "bstr"
|
||||||
|
@ -136,9 +136,9 @@ checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cc"
|
name = "cc"
|
||||||
version = "1.2.6"
|
version = "1.2.9"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8d6dbb628b8f8555f86d0323c2eb39e3ec81901f4b83e091db8a6a76d316a333"
|
checksum = "c8293772165d9345bdaaa39b45b2109591e63fe5e6fbc23c6ff930a048aa310b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"shlex",
|
"shlex",
|
||||||
]
|
]
|
||||||
|
@ -530,7 +530,7 @@ dependencies = [
|
||||||
"gix-worktree",
|
"gix-worktree",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"smallvec",
|
"smallvec",
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -543,7 +543,7 @@ dependencies = [
|
||||||
"gix-date",
|
"gix-date",
|
||||||
"gix-utils",
|
"gix-utils",
|
||||||
"itoa",
|
"itoa",
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
"winnow",
|
"winnow",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -560,7 +560,7 @@ dependencies = [
|
||||||
"gix-trace",
|
"gix-trace",
|
||||||
"kstring",
|
"kstring",
|
||||||
"smallvec",
|
"smallvec",
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
"unicode-bom",
|
"unicode-bom",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -570,7 +570,7 @@ version = "0.2.13"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d48b897b4bbc881aea994b4a5bbb340a04979d7be9089791304e04a9fbc66b53"
|
checksum = "d48b897b4bbc881aea994b4a5bbb340a04979d7be9089791304e04a9fbc66b53"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -579,7 +579,7 @@ version = "0.4.10"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c6ffbeb3a5c0b8b84c3fe4133a6f8c82fa962f4caefe8d0762eced025d3eb4f7"
|
checksum = "c6ffbeb3a5c0b8b84c3fe4133a6f8c82fa962f4caefe8d0762eced025d3eb4f7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -605,7 +605,7 @@ dependencies = [
|
||||||
"gix-features",
|
"gix-features",
|
||||||
"gix-hash",
|
"gix-hash",
|
||||||
"memmap2",
|
"memmap2",
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -624,7 +624,7 @@ dependencies = [
|
||||||
"memchr",
|
"memchr",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"smallvec",
|
"smallvec",
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
"unicode-bom",
|
"unicode-bom",
|
||||||
"winnow",
|
"winnow",
|
||||||
]
|
]
|
||||||
|
@ -639,7 +639,7 @@ dependencies = [
|
||||||
"bstr",
|
"bstr",
|
||||||
"gix-path",
|
"gix-path",
|
||||||
"libc",
|
"libc",
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -651,7 +651,7 @@ dependencies = [
|
||||||
"bstr",
|
"bstr",
|
||||||
"itoa",
|
"itoa",
|
||||||
"jiff",
|
"jiff",
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -672,7 +672,7 @@ dependencies = [
|
||||||
"gix-traverse",
|
"gix-traverse",
|
||||||
"gix-worktree",
|
"gix-worktree",
|
||||||
"imara-diff",
|
"imara-diff",
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -692,7 +692,7 @@ dependencies = [
|
||||||
"gix-trace",
|
"gix-trace",
|
||||||
"gix-utils",
|
"gix-utils",
|
||||||
"gix-worktree",
|
"gix-worktree",
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -708,7 +708,7 @@ dependencies = [
|
||||||
"gix-path",
|
"gix-path",
|
||||||
"gix-ref",
|
"gix-ref",
|
||||||
"gix-sec",
|
"gix-sec",
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -726,7 +726,7 @@ dependencies = [
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"prodash",
|
"prodash",
|
||||||
"sha1_smol",
|
"sha1_smol",
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
"walkdir",
|
"walkdir",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -748,7 +748,7 @@ dependencies = [
|
||||||
"gix-trace",
|
"gix-trace",
|
||||||
"gix-utils",
|
"gix-utils",
|
||||||
"smallvec",
|
"smallvec",
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -781,7 +781,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0b5eccc17194ed0e67d49285e4853307e4147e95407f91c1c3e4a13ba9f4e4ce"
|
checksum = "0b5eccc17194ed0e67d49285e4853307e4147e95407f91c1c3e4a13ba9f4e4ce"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"faster-hex",
|
"faster-hex",
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -833,7 +833,7 @@ dependencies = [
|
||||||
"memmap2",
|
"memmap2",
|
||||||
"rustix",
|
"rustix",
|
||||||
"smallvec",
|
"smallvec",
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -864,7 +864,7 @@ dependencies = [
|
||||||
"gix-validate",
|
"gix-validate",
|
||||||
"itoa",
|
"itoa",
|
||||||
"smallvec",
|
"smallvec",
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
"winnow",
|
"winnow",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -886,7 +886,7 @@ dependencies = [
|
||||||
"gix-quote",
|
"gix-quote",
|
||||||
"parking_lot",
|
"parking_lot",
|
||||||
"tempfile",
|
"tempfile",
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -904,7 +904,7 @@ dependencies = [
|
||||||
"gix-path",
|
"gix-path",
|
||||||
"memmap2",
|
"memmap2",
|
||||||
"smallvec",
|
"smallvec",
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -916,7 +916,7 @@ dependencies = [
|
||||||
"bstr",
|
"bstr",
|
||||||
"faster-hex",
|
"faster-hex",
|
||||||
"gix-trace",
|
"gix-trace",
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -928,7 +928,7 @@ dependencies = [
|
||||||
"bstr",
|
"bstr",
|
||||||
"faster-hex",
|
"faster-hex",
|
||||||
"gix-trace",
|
"gix-trace",
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -941,7 +941,7 @@ dependencies = [
|
||||||
"gix-trace",
|
"gix-trace",
|
||||||
"home",
|
"home",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -956,7 +956,7 @@ dependencies = [
|
||||||
"gix-config-value",
|
"gix-config-value",
|
||||||
"gix-glob",
|
"gix-glob",
|
||||||
"gix-path",
|
"gix-path",
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -974,7 +974,7 @@ dependencies = [
|
||||||
"gix-transport",
|
"gix-transport",
|
||||||
"gix-utils",
|
"gix-utils",
|
||||||
"maybe-async",
|
"maybe-async",
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
"winnow",
|
"winnow",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -986,7 +986,7 @@ checksum = "64a1e282216ec2ab2816cd57e6ed88f8009e634aec47562883c05ac8a7009a63"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bstr",
|
"bstr",
|
||||||
"gix-utils",
|
"gix-utils",
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1006,7 +1006,7 @@ dependencies = [
|
||||||
"gix-utils",
|
"gix-utils",
|
||||||
"gix-validate",
|
"gix-validate",
|
||||||
"memmap2",
|
"memmap2",
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
"winnow",
|
"winnow",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -1021,7 +1021,7 @@ dependencies = [
|
||||||
"gix-revision",
|
"gix-revision",
|
||||||
"gix-validate",
|
"gix-validate",
|
||||||
"smallvec",
|
"smallvec",
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1036,7 +1036,7 @@ dependencies = [
|
||||||
"gix-hash",
|
"gix-hash",
|
||||||
"gix-object",
|
"gix-object",
|
||||||
"gix-revwalk",
|
"gix-revwalk",
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1051,7 +1051,7 @@ dependencies = [
|
||||||
"gix-hashtable",
|
"gix-hashtable",
|
||||||
"gix-object",
|
"gix-object",
|
||||||
"smallvec",
|
"smallvec",
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1075,7 +1075,7 @@ dependencies = [
|
||||||
"bstr",
|
"bstr",
|
||||||
"gix-hash",
|
"gix-hash",
|
||||||
"gix-lock",
|
"gix-lock",
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1098,7 +1098,7 @@ dependencies = [
|
||||||
"gix-pathspec",
|
"gix-pathspec",
|
||||||
"gix-worktree",
|
"gix-worktree",
|
||||||
"portable-atomic",
|
"portable-atomic",
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1113,7 +1113,7 @@ dependencies = [
|
||||||
"gix-pathspec",
|
"gix-pathspec",
|
||||||
"gix-refspec",
|
"gix-refspec",
|
||||||
"gix-url",
|
"gix-url",
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1149,7 +1149,7 @@ dependencies = [
|
||||||
"gix-quote",
|
"gix-quote",
|
||||||
"gix-sec",
|
"gix-sec",
|
||||||
"gix-url",
|
"gix-url",
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1166,7 +1166,7 @@ dependencies = [
|
||||||
"gix-object",
|
"gix-object",
|
||||||
"gix-revwalk",
|
"gix-revwalk",
|
||||||
"smallvec",
|
"smallvec",
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1179,7 +1179,7 @@ dependencies = [
|
||||||
"gix-features",
|
"gix-features",
|
||||||
"gix-path",
|
"gix-path",
|
||||||
"percent-encoding",
|
"percent-encoding",
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
"url",
|
"url",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -1201,7 +1201,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "cd520d09f9f585b34b32aba1d0b36ada89ab7fefb54a8ca3fe37fc482a750937"
|
checksum = "cd520d09f9f585b34b32aba1d0b36ada89ab7fefb54a8ca3fe37fc482a750937"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bstr",
|
"bstr",
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1335,7 +1335,7 @@ dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
"tokio",
|
"tokio",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -1391,7 +1391,7 @@ dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"slotmap",
|
"slotmap",
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tokio-stream",
|
"tokio-stream",
|
||||||
]
|
]
|
||||||
|
@ -1466,7 +1466,7 @@ dependencies = [
|
||||||
"smallvec",
|
"smallvec",
|
||||||
"tempfile",
|
"tempfile",
|
||||||
"termini",
|
"termini",
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tokio-stream",
|
"tokio-stream",
|
||||||
"toml",
|
"toml",
|
||||||
|
@ -1536,7 +1536,7 @@ dependencies = [
|
||||||
"slotmap",
|
"slotmap",
|
||||||
"smartstring",
|
"smartstring",
|
||||||
"tempfile",
|
"tempfile",
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.11",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tokio-stream",
|
"tokio-stream",
|
||||||
"toml",
|
"toml",
|
||||||
|
@ -1999,9 +1999,9 @@ checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "open"
|
name = "open"
|
||||||
version = "5.3.1"
|
version = "5.3.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3ecd52f0b8d15c40ce4820aa251ed5de032e5d91fab27f7db2f40d42a8bdf69c"
|
checksum = "e2483562e62ea94312f3576a7aca397306df7990b8d89033e18766744377ef95"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"is-wsl",
|
"is-wsl",
|
||||||
"libc",
|
"libc",
|
||||||
|
@ -2216,9 +2216,9 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustix"
|
name = "rustix"
|
||||||
version = "0.38.42"
|
version = "0.38.43"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85"
|
checksum = "a78891ee6bf2340288408954ac787aa063d8e8817e9f53abb37c695c6d834ef6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"errno",
|
"errno",
|
||||||
|
@ -2270,9 +2270,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_json"
|
name = "serde_json"
|
||||||
version = "1.0.134"
|
version = "1.0.135"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d00f4175c42ee48b15416f6193a959ba3a0d67fc699a0db9ad12df9f83991c7d"
|
checksum = "2b0d7ba2887406110130a978386c4e1befb98c674b4fba677954e4db976630d9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"itoa",
|
"itoa",
|
||||||
"memchr",
|
"memchr",
|
||||||
|
@ -2454,12 +2454,13 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tempfile"
|
name = "tempfile"
|
||||||
version = "3.14.0"
|
version = "3.15.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c"
|
checksum = "9a8a559c81686f576e8cd0290cd2a24a2a9ad80c98b3478856500fcbd7acd704"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"fastrand",
|
"fastrand",
|
||||||
|
"getrandom",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"rustix",
|
"rustix",
|
||||||
"windows-sys 0.59.0",
|
"windows-sys 0.59.0",
|
||||||
|
@ -2496,11 +2497,11 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "thiserror"
|
name = "thiserror"
|
||||||
version = "2.0.9"
|
version = "2.0.11"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f072643fd0190df67a8bab670c20ef5d8737177d6ac6b2e9a236cb096206b2cc"
|
checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"thiserror-impl 2.0.9",
|
"thiserror-impl 2.0.11",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -2516,9 +2517,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "thiserror-impl"
|
name = "thiserror-impl"
|
||||||
version = "2.0.9"
|
version = "2.0.11"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7b50fa271071aae2e6ee85f842e2e28ba8cd2c5fb67f11fcb1fd70b276f9e7d4"
|
checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
@ -2561,9 +2562,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tokio"
|
name = "tokio"
|
||||||
version = "1.42.0"
|
version = "1.43.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551"
|
checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"backtrace",
|
"backtrace",
|
||||||
"bytes",
|
"bytes",
|
||||||
|
@ -2579,9 +2580,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tokio-macros"
|
name = "tokio-macros"
|
||||||
version = "2.4.0"
|
version = "2.5.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752"
|
checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
|
|
@ -42,6 +42,8 @@ tree-sitter = { version = "0.22" }
|
||||||
nucleo = "0.5.0"
|
nucleo = "0.5.0"
|
||||||
slotmap = "1.0.7"
|
slotmap = "1.0.7"
|
||||||
thiserror = "2.0"
|
thiserror = "2.0"
|
||||||
|
tempfile = "3.15.0"
|
||||||
|
bitflags = "2.7"
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
version = "25.1.0"
|
version = "25.1.0"
|
||||||
|
|
|
@ -145,7 +145,8 @@ The following statusline elements can be configured:
|
||||||
| Key | Description | Default |
|
| Key | Description | Default |
|
||||||
| --- | ----------- | ------- |
|
| --- | ----------- | ------- |
|
||||||
| `enable` | Enables LSP integration. Setting to false will completely disable language servers regardless of language settings.| `true` |
|
| `enable` | Enables LSP integration. Setting to false will completely disable language servers regardless of language settings.| `true` |
|
||||||
| `display-messages` | Display LSP progress messages below statusline[^1] | `false` |
|
| `display-messages` | Display LSP `window/showMessage` messages below statusline[^1] | `true` |
|
||||||
|
| `display-progress-messages` | Display LSP progress messages below statusline[^1] | `false` |
|
||||||
| `auto-signature-help` | Enable automatic popup of signature help (parameter hints) | `true` |
|
| `auto-signature-help` | Enable automatic popup of signature help (parameter hints) | `true` |
|
||||||
| `display-inlay-hints` | Display inlay hints[^2] | `false` |
|
| `display-inlay-hints` | Display inlay hints[^2] | `false` |
|
||||||
| `display-color-swatches` | Shows color swatches next to colors | `true` |
|
| `display-color-swatches` | Shows color swatches next to colors | `true` |
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
| circom | ✓ | | | `circom-lsp` |
|
| circom | ✓ | | | `circom-lsp` |
|
||||||
| clojure | ✓ | | | `clojure-lsp` |
|
| clojure | ✓ | | | `clojure-lsp` |
|
||||||
| cmake | ✓ | ✓ | ✓ | `cmake-language-server` |
|
| cmake | ✓ | ✓ | ✓ | `cmake-language-server` |
|
||||||
|
| codeql | ✓ | ✓ | | `codeql` |
|
||||||
| comment | ✓ | | | |
|
| comment | ✓ | | | |
|
||||||
| common-lisp | ✓ | | ✓ | `cl-lsp` |
|
| common-lisp | ✓ | | ✓ | `cl-lsp` |
|
||||||
| cpon | ✓ | | ✓ | |
|
| cpon | ✓ | | ✓ | |
|
||||||
|
@ -80,6 +81,7 @@
|
||||||
| gowork | ✓ | | | `gopls` |
|
| gowork | ✓ | | | `gopls` |
|
||||||
| gpr | ✓ | | | `ada_language_server` |
|
| gpr | ✓ | | | `ada_language_server` |
|
||||||
| graphql | ✓ | ✓ | | `graphql-lsp` |
|
| graphql | ✓ | ✓ | | `graphql-lsp` |
|
||||||
|
| gren | ✓ | ✓ | | |
|
||||||
| groovy | ✓ | | | |
|
| groovy | ✓ | | | |
|
||||||
| gts | ✓ | ✓ | ✓ | `typescript-language-server`, `vscode-eslint-language-server`, `ember-language-server` |
|
| gts | ✓ | ✓ | ✓ | `typescript-language-server`, `vscode-eslint-language-server`, `ember-language-server` |
|
||||||
| hare | ✓ | | | |
|
| hare | ✓ | | | |
|
||||||
|
|
|
@ -36,7 +36,7 @@ tree-sitter.workspace = true
|
||||||
once_cell = "1.20"
|
once_cell = "1.20"
|
||||||
arc-swap = "1"
|
arc-swap = "1"
|
||||||
regex = "1"
|
regex = "1"
|
||||||
bitflags = "2.6"
|
bitflags.workspace = true
|
||||||
ahash = "0.8.11"
|
ahash = "0.8.11"
|
||||||
hashbrown = { version = "0.14.5", features = ["raw"] }
|
hashbrown = { version = "0.14.5", features = ["raw"] }
|
||||||
dunce = "1.0"
|
dunce = "1.0"
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -30,7 +30,7 @@ log = "0.4"
|
||||||
# cloning/compiling tree-sitter grammars
|
# cloning/compiling tree-sitter grammars
|
||||||
cc = { version = "1" }
|
cc = { version = "1" }
|
||||||
threadpool = { version = "1.0" }
|
threadpool = { version = "1.0" }
|
||||||
tempfile = "3.14.0"
|
tempfile.workspace = true
|
||||||
dunce = "1.0.5"
|
dunce = "1.0.5"
|
||||||
|
|
||||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
||||||
|
|
|
@ -6,14 +6,6 @@ const MAJOR: &str = env!("CARGO_PKG_VERSION_MAJOR");
|
||||||
const MINOR: &str = env!("CARGO_PKG_VERSION_MINOR");
|
const MINOR: &str = env!("CARGO_PKG_VERSION_MINOR");
|
||||||
const PATCH: &str = env!("CARGO_PKG_VERSION_PATCH");
|
const PATCH: &str = env!("CARGO_PKG_VERSION_PATCH");
|
||||||
|
|
||||||
fn get_calver() -> String {
|
|
||||||
if PATCH == "0" {
|
|
||||||
format!("{MAJOR}.{MINOR}")
|
|
||||||
} else {
|
|
||||||
format!("{MAJOR}.{MINOR}.{PATCH}")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let git_hash = Command::new("git")
|
let git_hash = Command::new("git")
|
||||||
.args(["rev-parse", "HEAD"])
|
.args(["rev-parse", "HEAD"])
|
||||||
|
@ -23,7 +15,17 @@ fn main() {
|
||||||
.and_then(|x| String::from_utf8(x.stdout).ok())
|
.and_then(|x| String::from_utf8(x.stdout).ok())
|
||||||
.or_else(|| option_env!("HELIX_NIX_BUILD_REV").map(|s| s.to_string()));
|
.or_else(|| option_env!("HELIX_NIX_BUILD_REV").map(|s| s.to_string()));
|
||||||
|
|
||||||
let calver = get_calver();
|
let minor = if MINOR.len() == 1 {
|
||||||
|
// Print single-digit months in '0M' format
|
||||||
|
format!("0{MINOR}")
|
||||||
|
} else {
|
||||||
|
MINOR.to_string()
|
||||||
|
};
|
||||||
|
let calver = if PATCH == "0" {
|
||||||
|
format!("{MAJOR}.{minor}")
|
||||||
|
} else {
|
||||||
|
format!("{MAJOR}.{minor}.{PATCH}")
|
||||||
|
};
|
||||||
let version: Cow<_> = match &git_hash {
|
let version: Cow<_> = match &git_hash {
|
||||||
Some(git_hash) => format!("{} ({})", calver, &git_hash[..8]).into(),
|
Some(git_hash) => format!("{} ({})", calver, &git_hash[..8]).into(),
|
||||||
None => calver.into(),
|
None => calver.into(),
|
||||||
|
|
|
@ -21,9 +21,9 @@ keywords = ["language", "server", "lsp", "vscode", "lsif"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bitflags = "2.6.0"
|
bitflags.workspace = true
|
||||||
serde = { version = "1.0.217", features = ["derive"] }
|
serde = { version = "1.0.217", features = ["derive"] }
|
||||||
serde_json = "1.0.134"
|
serde_json = "1.0.135"
|
||||||
serde_repr = "0.1"
|
serde_repr = "0.1"
|
||||||
url = {version = "2.5.4", features = ["serde"]}
|
url = {version = "2.5.4", features = ["serde"]}
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ globset = "0.4.15"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
tokio = { version = "1.42", features = ["rt", "rt-multi-thread", "io-util", "io-std", "time", "process", "macros", "fs", "parking_lot", "sync"] }
|
tokio = { version = "1.43", features = ["rt", "rt-multi-thread", "io-util", "io-std", "time", "process", "macros", "fs", "parking_lot", "sync"] }
|
||||||
tokio-stream = "0.1.17"
|
tokio-stream = "0.1.17"
|
||||||
parking_lot = "0.12.3"
|
parking_lot = "0.12.3"
|
||||||
arc-swap = "1"
|
arc-swap = "1"
|
||||||
|
|
|
@ -17,7 +17,7 @@ etcetera = "0.8"
|
||||||
ropey = { version = "1.6.1", default-features = false }
|
ropey = { version = "1.6.1", default-features = false }
|
||||||
which = "7.0"
|
which = "7.0"
|
||||||
regex-cursor = "0.1.4"
|
regex-cursor = "0.1.4"
|
||||||
bitflags = "2.6"
|
bitflags.workspace = true
|
||||||
once_cell = "1.19"
|
once_cell = "1.19"
|
||||||
regex-automata = "0.4.9"
|
regex-automata = "0.4.9"
|
||||||
|
|
||||||
|
@ -28,4 +28,4 @@ windows-sys = { version = "0.59", features = ["Win32_Foundation", "Win32_Securit
|
||||||
rustix = { version = "0.38", features = ["fs"] }
|
rustix = { version = "0.38", features = ["fs"] }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
tempfile = "3.14"
|
tempfile.workspace = true
|
||||||
|
|
|
@ -59,7 +59,7 @@ content_inspector = "0.2.4"
|
||||||
thiserror.workspace = true
|
thiserror.workspace = true
|
||||||
|
|
||||||
# opening URLs
|
# opening URLs
|
||||||
open = "5.3.1"
|
open = "5.3.2"
|
||||||
url = "2.5.4"
|
url = "2.5.4"
|
||||||
|
|
||||||
# config
|
# config
|
||||||
|
@ -85,5 +85,5 @@ helix-loader = { path = "../helix-loader" }
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
smallvec = "1.13"
|
smallvec = "1.13"
|
||||||
indoc = "2.0.5"
|
indoc = "2.0.5"
|
||||||
tempfile = "3.14.0"
|
tempfile.workspace = true
|
||||||
same-file = "1.0.1"
|
same-file = "1.0.1"
|
||||||
|
|
|
@ -30,9 +30,7 @@ use helix_core::{
|
||||||
object, pos_at_coords,
|
object, pos_at_coords,
|
||||||
regex::{self, Regex},
|
regex::{self, Regex},
|
||||||
search::{self, CharMatcher},
|
search::{self, CharMatcher},
|
||||||
selection,
|
selection, shellwords, surround,
|
||||||
shellwords::{self, Args},
|
|
||||||
surround,
|
|
||||||
syntax::{BlockCommentToken, LanguageServerFeature},
|
syntax::{BlockCommentToken, LanguageServerFeature},
|
||||||
text_annotations::{Overlay, TextAnnotations},
|
text_annotations::{Overlay, TextAnnotations},
|
||||||
textobject,
|
textobject,
|
||||||
|
@ -209,7 +207,7 @@ use helix_view::{align_view, Align};
|
||||||
pub enum MappableCommand {
|
pub enum MappableCommand {
|
||||||
Typable {
|
Typable {
|
||||||
name: String,
|
name: String,
|
||||||
args: String,
|
args: Vec<String>,
|
||||||
doc: String,
|
doc: String,
|
||||||
},
|
},
|
||||||
Static {
|
Static {
|
||||||
|
@ -244,17 +242,15 @@ impl MappableCommand {
|
||||||
pub fn execute(&self, cx: &mut Context) {
|
pub fn execute(&self, cx: &mut Context) {
|
||||||
match &self {
|
match &self {
|
||||||
Self::Typable { name, args, doc: _ } => {
|
Self::Typable { name, args, doc: _ } => {
|
||||||
|
let args: Vec<Cow<str>> = args.iter().map(Cow::from).collect();
|
||||||
if let Some(command) = typed::TYPABLE_COMMAND_MAP.get(name.as_str()) {
|
if let Some(command) = typed::TYPABLE_COMMAND_MAP.get(name.as_str()) {
|
||||||
let mut cx = compositor::Context {
|
let mut cx = compositor::Context {
|
||||||
editor: cx.editor,
|
editor: cx.editor,
|
||||||
jobs: cx.jobs,
|
jobs: cx.jobs,
|
||||||
scroll: None,
|
scroll: None,
|
||||||
};
|
};
|
||||||
|
if let Err(e) = (command.fun)(&mut cx, &args[..], PromptEvent::Validate) {
|
||||||
if let Err(err) =
|
cx.editor.set_error(format!("{}", e));
|
||||||
(command.fun)(&mut cx, Args::from(args), PromptEvent::Validate)
|
|
||||||
{
|
|
||||||
cx.editor.set_error(format!("{err}"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -628,15 +624,21 @@ impl std::str::FromStr for MappableCommand {
|
||||||
|
|
||||||
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
||||||
if let Some(suffix) = s.strip_prefix(':') {
|
if let Some(suffix) = s.strip_prefix(':') {
|
||||||
let (name, args) = suffix.split_once(' ').unwrap_or((suffix, ""));
|
let mut typable_command = suffix.split(' ').map(|arg| arg.trim());
|
||||||
|
let name = typable_command
|
||||||
|
.next()
|
||||||
|
.ok_or_else(|| anyhow!("Expected typable command name"))?;
|
||||||
|
let args = typable_command
|
||||||
|
.map(|s| s.to_owned())
|
||||||
|
.collect::<Vec<String>>();
|
||||||
typed::TYPABLE_COMMAND_MAP
|
typed::TYPABLE_COMMAND_MAP
|
||||||
.get(name)
|
.get(name)
|
||||||
.map(|cmd| MappableCommand::Typable {
|
.map(|cmd| MappableCommand::Typable {
|
||||||
name: cmd.name.to_owned(),
|
name: cmd.name.to_owned(),
|
||||||
doc: format!(":{} {:?}", cmd.name, args),
|
doc: format!(":{} {:?}", cmd.name, args),
|
||||||
args: args.to_string(),
|
args,
|
||||||
})
|
})
|
||||||
.ok_or_else(|| anyhow!("No TypableCommand named '{}'", name))
|
.ok_or_else(|| anyhow!("No TypableCommand named '{}'", s))
|
||||||
} else if let Some(suffix) = s.strip_prefix('@') {
|
} else if let Some(suffix) = s.strip_prefix('@') {
|
||||||
helix_view::input::parse_macro(suffix).map(|keys| Self::Macro {
|
helix_view::input::parse_macro(suffix).map(|keys| Self::Macro {
|
||||||
name: s.to_string(),
|
name: s.to_string(),
|
||||||
|
@ -3101,12 +3103,11 @@ fn buffer_picker(cx: &mut Context) {
|
||||||
})
|
})
|
||||||
.with_preview(|editor, meta| {
|
.with_preview(|editor, meta| {
|
||||||
let doc = &editor.documents.get(&meta.id)?;
|
let doc = &editor.documents.get(&meta.id)?;
|
||||||
let &view_id = doc.selections().keys().next()?;
|
let lines = doc.selections().values().next().map(|selection| {
|
||||||
let line = doc
|
let cursor_line = selection.primary().cursor_line(doc.text().slice(..));
|
||||||
.selection(view_id)
|
(cursor_line, cursor_line)
|
||||||
.primary()
|
});
|
||||||
.cursor_line(doc.text().slice(..));
|
Some((meta.id.into(), lines))
|
||||||
Some((meta.id.into(), Some((line, line))))
|
|
||||||
});
|
});
|
||||||
cx.push_layer(Box::new(overlaid(picker)));
|
cx.push_layer(Box::new(overlaid(picker)));
|
||||||
}
|
}
|
||||||
|
@ -3311,7 +3312,7 @@ pub fn command_palette(cx: &mut Context) {
|
||||||
.iter()
|
.iter()
|
||||||
.map(|cmd| MappableCommand::Typable {
|
.map(|cmd| MappableCommand::Typable {
|
||||||
name: cmd.name.to_owned(),
|
name: cmd.name.to_owned(),
|
||||||
args: String::new(),
|
args: Vec::new(),
|
||||||
doc: cmd.doc.to_owned(),
|
doc: cmd.doc.to_owned(),
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
@ -3532,6 +3533,7 @@ fn open(cx: &mut Context, open: Open) {
|
||||||
let text = doc.text().slice(..);
|
let text = doc.text().slice(..);
|
||||||
let contents = doc.text();
|
let contents = doc.text();
|
||||||
let selection = doc.selection(view.id);
|
let selection = doc.selection(view.id);
|
||||||
|
let mut offs = 0;
|
||||||
|
|
||||||
let mut ranges = SmallVec::with_capacity(selection.len());
|
let mut ranges = SmallVec::with_capacity(selection.len());
|
||||||
|
|
||||||
|
@ -3608,7 +3610,7 @@ fn open(cx: &mut Context, open: Open) {
|
||||||
let text = text.repeat(count);
|
let text = text.repeat(count);
|
||||||
|
|
||||||
// calculate new selection ranges
|
// calculate new selection ranges
|
||||||
let pos = above_next_line_end_index + above_next_line_end_width;
|
let pos = offs + above_next_line_end_index + above_next_line_end_width;
|
||||||
let comment_len = continue_comment_token
|
let comment_len = continue_comment_token
|
||||||
.map(|token| token.len() + 1) // `+ 1` for the extra space added
|
.map(|token| token.len() + 1) // `+ 1` for the extra space added
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
|
@ -3621,6 +3623,9 @@ fn open(cx: &mut Context, open: Open) {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// update the offset for the next range
|
||||||
|
offs += text.chars().count();
|
||||||
|
|
||||||
(
|
(
|
||||||
above_next_line_end_index,
|
above_next_line_end_index,
|
||||||
above_next_line_end_index,
|
above_next_line_end_index,
|
||||||
|
@ -4385,19 +4390,13 @@ fn yank_joined_impl(editor: &mut Editor, separator: &str, register: char) {
|
||||||
let (view, doc) = current!(editor);
|
let (view, doc) = current!(editor);
|
||||||
let text = doc.text().slice(..);
|
let text = doc.text().slice(..);
|
||||||
|
|
||||||
let separator = if separator.is_empty() {
|
|
||||||
doc.line_ending.as_str()
|
|
||||||
} else {
|
|
||||||
separator
|
|
||||||
};
|
|
||||||
|
|
||||||
let selection = doc.selection(view.id);
|
let selection = doc.selection(view.id);
|
||||||
let selections = selection.len();
|
let selections = selection.len();
|
||||||
let joined = selection
|
let joined = selection
|
||||||
.fragments(text)
|
.fragments(text)
|
||||||
.fold(String::new(), |mut acc, fragment| {
|
.fold(String::new(), |mut acc, fragment| {
|
||||||
if !acc.is_empty() {
|
if !acc.is_empty() {
|
||||||
acc.push_str(&shellwords::unescape(separator));
|
acc.push_str(separator);
|
||||||
}
|
}
|
||||||
acc.push_str(&fragment);
|
acc.push_str(&fragment);
|
||||||
acc
|
acc
|
||||||
|
@ -4844,7 +4843,7 @@ fn join_selections_impl(cx: &mut Context, select_space: bool) {
|
||||||
changes.reserve(lines.len());
|
changes.reserve(lines.len());
|
||||||
|
|
||||||
let first_line_idx = slice.line_to_char(start);
|
let first_line_idx = slice.line_to_char(start);
|
||||||
let first_line_idx = skip_while(slice, first_line_idx, |ch| matches!(ch, ' ' | 't'))
|
let first_line_idx = skip_while(slice, first_line_idx, |ch| matches!(ch, ' ' | '\t'))
|
||||||
.unwrap_or(first_line_idx);
|
.unwrap_or(first_line_idx);
|
||||||
let first_line = slice.slice(first_line_idx..);
|
let first_line = slice.slice(first_line_idx..);
|
||||||
let mut current_comment_token = comment_tokens
|
let mut current_comment_token = comment_tokens
|
||||||
|
|
|
@ -109,7 +109,6 @@ fn dap_callback<T, F>(
|
||||||
jobs.callback(callback);
|
jobs.callback(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: transition to `shellwords::Args` instead of `Option<Vec<Cow>>>`
|
|
||||||
pub fn dap_start_impl(
|
pub fn dap_start_impl(
|
||||||
cx: &mut compositor::Context,
|
cx: &mut compositor::Context,
|
||||||
name: Option<&str>,
|
name: Option<&str>,
|
||||||
|
@ -313,7 +312,6 @@ pub fn dap_restart(cx: &mut Context) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: transition to `shellwords::Args` instead of `Vec<String>`
|
|
||||||
fn debug_parameter_prompt(
|
fn debug_parameter_prompt(
|
||||||
completions: Vec<DebugConfigCompletion>,
|
completions: Vec<DebugConfigCompletion>,
|
||||||
config_name: String,
|
config_name: String,
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -597,14 +597,18 @@ mod tests {
|
||||||
let expectation = KeyTrie::Node(KeyTrieNode::new(
|
let expectation = KeyTrie::Node(KeyTrieNode::new(
|
||||||
"",
|
"",
|
||||||
hashmap! {
|
hashmap! {
|
||||||
key => KeyTrie::Sequence(vec![
|
key => KeyTrie::Sequence(vec!{
|
||||||
MappableCommand::select_all,
|
MappableCommand::select_all,
|
||||||
MappableCommand::Typable {
|
MappableCommand::Typable {
|
||||||
name: "pipe".to_string(),
|
name: "pipe".to_string(),
|
||||||
args: String::from("sed -E 's/\\s+$//g'"),
|
args: vec!{
|
||||||
doc: String::new(),
|
"sed".to_string(),
|
||||||
|
"-E".to_string(),
|
||||||
|
"'s/\\s+$//g'".to_string()
|
||||||
|
},
|
||||||
|
doc: "".to_string(),
|
||||||
},
|
},
|
||||||
])
|
})
|
||||||
},
|
},
|
||||||
vec![key],
|
vec![key],
|
||||||
));
|
));
|
||||||
|
|
|
@ -665,6 +665,14 @@ async fn test_join_selections_comment() -> anyhow::Result<()> {
|
||||||
))
|
))
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
|
test((
|
||||||
|
"#[|\t// Join comments
|
||||||
|
\t// with indent]#",
|
||||||
|
":lang go<ret>J",
|
||||||
|
"#[|\t// Join comments with indent]#",
|
||||||
|
))
|
||||||
|
.await?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -184,6 +184,127 @@ async fn test_open_above() -> anyhow::Result<()> {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[tokio::test(flavor = "multi_thread")]
|
||||||
|
async fn test_open_above_with_multiple_cursors() -> anyhow::Result<()> {
|
||||||
|
// the primary cursor is also in the top line
|
||||||
|
test((
|
||||||
|
indoc! {"#[H|]#elix
|
||||||
|
#(i|)#s
|
||||||
|
#(c|)#ool"},
|
||||||
|
"O",
|
||||||
|
indoc! {
|
||||||
|
"#[\n|]#
|
||||||
|
Helix
|
||||||
|
#(\n|)#
|
||||||
|
is
|
||||||
|
#(\n|)#
|
||||||
|
cool
|
||||||
|
"
|
||||||
|
},
|
||||||
|
))
|
||||||
|
.await?;
|
||||||
|
|
||||||
|
// now with some additional indentation
|
||||||
|
test((
|
||||||
|
indoc! {"····#[H|]#elix
|
||||||
|
····#(i|)#s
|
||||||
|
····#(c|)#ool"}
|
||||||
|
.replace("·", " "),
|
||||||
|
":indent-style 4<ret>O",
|
||||||
|
indoc! {
|
||||||
|
"····#[\n|]#
|
||||||
|
····Helix
|
||||||
|
····#(\n|)#
|
||||||
|
····is
|
||||||
|
····#(\n|)#
|
||||||
|
····cool
|
||||||
|
"
|
||||||
|
}
|
||||||
|
.replace("·", " "),
|
||||||
|
))
|
||||||
|
.await?;
|
||||||
|
|
||||||
|
// the first line is within a comment, the second not.
|
||||||
|
// However, if we open above, the first newly added line should start within a comment
|
||||||
|
// while the other should be a normal line
|
||||||
|
test((
|
||||||
|
indoc! {"fn main() {
|
||||||
|
// #[VIP|]# comment
|
||||||
|
l#(e|)#t yes = false;
|
||||||
|
}"},
|
||||||
|
":lang rust<ret>O",
|
||||||
|
indoc! {"fn main() {
|
||||||
|
// #[\n|]#
|
||||||
|
// VIP comment
|
||||||
|
#(\n|)#
|
||||||
|
let yes = false;
|
||||||
|
}"},
|
||||||
|
))
|
||||||
|
.await?;
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
#[tokio::test(flavor = "multi_thread")]
|
||||||
|
async fn test_open_below_with_multiple_cursors() -> anyhow::Result<()> {
|
||||||
|
// the primary cursor is also in the top line
|
||||||
|
test((
|
||||||
|
indoc! {"#[H|]#elix
|
||||||
|
#(i|)#s
|
||||||
|
#(c|)#ool"},
|
||||||
|
"o",
|
||||||
|
indoc! {"Helix
|
||||||
|
#[\n|]#
|
||||||
|
is
|
||||||
|
#(\n|)#
|
||||||
|
cool
|
||||||
|
#(\n|)#
|
||||||
|
"
|
||||||
|
},
|
||||||
|
))
|
||||||
|
.await?;
|
||||||
|
|
||||||
|
// now with some additional indentation
|
||||||
|
test((
|
||||||
|
indoc! {"····#[H|]#elix
|
||||||
|
····#(i|)#s
|
||||||
|
····#(c|)#ool"}
|
||||||
|
.replace("·", " "),
|
||||||
|
":indent-style 4<ret>o",
|
||||||
|
indoc! {
|
||||||
|
"····Helix
|
||||||
|
····#[\n|]#
|
||||||
|
····is
|
||||||
|
····#(\n|)#
|
||||||
|
····cool
|
||||||
|
····#(\n|)#
|
||||||
|
"
|
||||||
|
}
|
||||||
|
.replace("·", " "),
|
||||||
|
))
|
||||||
|
.await?;
|
||||||
|
|
||||||
|
// the first line is within a comment, the second not.
|
||||||
|
// However, if we open below, the first newly added line should start within a comment
|
||||||
|
// while the other should be a normal line
|
||||||
|
test((
|
||||||
|
indoc! {"fn main() {
|
||||||
|
// #[VIP|]# comment
|
||||||
|
l#(e|)#t yes = false;
|
||||||
|
}"},
|
||||||
|
":lang rust<ret>o",
|
||||||
|
indoc! {"fn main() {
|
||||||
|
// VIP comment
|
||||||
|
// #[\n|]#
|
||||||
|
let yes = false;
|
||||||
|
#(\n|)#
|
||||||
|
}"},
|
||||||
|
))
|
||||||
|
.await?;
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
/// NOTE: To make the `open_above` comment-aware, we're setting the language for each test to rust.
|
/// NOTE: To make the `open_above` comment-aware, we're setting the language for each test to rust.
|
||||||
#[tokio::test(flavor = "multi_thread")]
|
#[tokio::test(flavor = "multi_thread")]
|
||||||
async fn test_open_above_with_comments() -> anyhow::Result<()> {
|
async fn test_open_above_with_comments() -> anyhow::Result<()> {
|
||||||
|
|
|
@ -18,7 +18,7 @@ default = ["crossterm"]
|
||||||
helix-view = { path = "../helix-view", features = ["term"] }
|
helix-view = { path = "../helix-view", features = ["term"] }
|
||||||
helix-core = { path = "../helix-core" }
|
helix-core = { path = "../helix-core" }
|
||||||
|
|
||||||
bitflags = "2.6"
|
bitflags.workspace = true
|
||||||
cassowary = "0.3"
|
cassowary = "0.3"
|
||||||
unicode-segmentation = "1.12"
|
unicode-segmentation = "1.12"
|
||||||
crossterm = { version = "0.28", optional = true }
|
crossterm = { version = "0.28", optional = true }
|
||||||
|
|
|
@ -29,4 +29,4 @@ log = "0.4"
|
||||||
git = ["gix"]
|
git = ["gix"]
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
tempfile = "3.14"
|
tempfile.workspace = true
|
||||||
|
|
|
@ -9,6 +9,7 @@ rust-version.workspace = true
|
||||||
categories.workspace = true
|
categories.workspace = true
|
||||||
repository.workspace = true
|
repository.workspace = true
|
||||||
homepage.workspace = true
|
homepage.workspace = true
|
||||||
|
temp.worspace = true
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
|
@ -24,13 +25,13 @@ helix-lsp = { path = "../helix-lsp" }
|
||||||
helix-dap = { path = "../helix-dap" }
|
helix-dap = { path = "../helix-dap" }
|
||||||
helix-vcs = { path = "../helix-vcs" }
|
helix-vcs = { path = "../helix-vcs" }
|
||||||
|
|
||||||
bitflags = "2.6"
|
bitflags.workspace = true
|
||||||
anyhow = "1"
|
anyhow = "1"
|
||||||
crossterm = { version = "0.28", optional = true }
|
crossterm = { version = "0.28", optional = true }
|
||||||
|
|
||||||
tempfile = "3.14"
|
|
||||||
same-file = "1.0.1"
|
same-file = "1.0.1"
|
||||||
filetime = "0.2"
|
filetime = "0.2"
|
||||||
|
tempfile = "3.14"
|
||||||
|
|
||||||
# Conversion traits
|
# Conversion traits
|
||||||
once_cell = "1.20"
|
once_cell = "1.20"
|
||||||
|
|
|
@ -980,7 +980,13 @@ impl Document {
|
||||||
{
|
{
|
||||||
use std::process::Stdio;
|
use std::process::Stdio;
|
||||||
let text = self.text().clone();
|
let text = self.text().clone();
|
||||||
|
|
||||||
let mut process = tokio::process::Command::new(&fmt_cmd);
|
let mut process = tokio::process::Command::new(&fmt_cmd);
|
||||||
|
|
||||||
|
if let Some(doc_dir) = self.path.as_ref().and_then(|path| path.parent()) {
|
||||||
|
process.current_dir(doc_dir);
|
||||||
|
}
|
||||||
|
|
||||||
process
|
process
|
||||||
.args(fmt_args)
|
.args(fmt_args)
|
||||||
.stdin(Stdio::piped())
|
.stdin(Stdio::piped())
|
||||||
|
|
|
@ -21,6 +21,7 @@ cl-lsp = { command = "cl-lsp", args = [ "stdio" ] }
|
||||||
clangd = { command = "clangd" }
|
clangd = { command = "clangd" }
|
||||||
clojure-lsp = { command = "clojure-lsp" }
|
clojure-lsp = { command = "clojure-lsp" }
|
||||||
cmake-language-server = { command = "cmake-language-server" }
|
cmake-language-server = { command = "cmake-language-server" }
|
||||||
|
codeql = { command = "codeql", args = ["execute", "language-server", "--check-errors=ON_CHANGE"] }
|
||||||
crystalline = { command = "crystalline", args = ["--stdio"] }
|
crystalline = { command = "crystalline", args = ["--stdio"] }
|
||||||
cs = { command = "cs", args = ["launch", "--contrib", "smithy-language-server", "--", "0"] }
|
cs = { command = "cs", args = ["launch", "--contrib", "smithy-language-server", "--", "0"] }
|
||||||
csharp-ls = { command = "csharp-ls" }
|
csharp-ls = { command = "csharp-ls" }
|
||||||
|
@ -487,6 +488,8 @@ name = "jsonc"
|
||||||
scope = "source.json"
|
scope = "source.json"
|
||||||
injection-regex = "jsonc"
|
injection-regex = "jsonc"
|
||||||
file-types = ["jsonc", { glob = "tsconfig.json" }]
|
file-types = ["jsonc", { glob = "tsconfig.json" }]
|
||||||
|
comment-token = "//"
|
||||||
|
block-comment-tokens = { start = "/*", end = "*/" }
|
||||||
grammar = "json"
|
grammar = "json"
|
||||||
language-servers = [ "vscode-json-language-server" ]
|
language-servers = [ "vscode-json-language-server" ]
|
||||||
auto-format = true
|
auto-format = true
|
||||||
|
@ -1292,7 +1295,7 @@ formatter = { command = "dune", args = ["format-dune-file"] }
|
||||||
name = "lua"
|
name = "lua"
|
||||||
injection-regex = "lua"
|
injection-regex = "lua"
|
||||||
scope = "source.lua"
|
scope = "source.lua"
|
||||||
file-types = ["lua"]
|
file-types = ["lua", "rockspec"]
|
||||||
shebangs = ["lua", "luajit"]
|
shebangs = ["lua", "luajit"]
|
||||||
roots = [".luarc.json", ".luacheckrc", ".stylua.toml", "selene.toml", ".git"]
|
roots = [".luarc.json", ".luacheckrc", ".stylua.toml", "selene.toml", ".git"]
|
||||||
comment-token = "--"
|
comment-token = "--"
|
||||||
|
@ -1347,7 +1350,7 @@ source = { git = "https://github.com/ikatyang/tree-sitter-vue", rev = "91fe27547
|
||||||
[[language]]
|
[[language]]
|
||||||
name = "yaml"
|
name = "yaml"
|
||||||
scope = "source.yaml"
|
scope = "source.yaml"
|
||||||
file-types = ["yml", "yaml", { glob = ".prettierrc" }, { glob = ".clangd" }, { glob = ".clang-format" }]
|
file-types = ["yml", "yaml", { glob = ".prettierrc" }, { glob = ".clangd" }, { glob = ".clang-format" }, { glob = ".clang-tidy" }]
|
||||||
comment-token = "#"
|
comment-token = "#"
|
||||||
indent = { tab-width = 2, unit = " " }
|
indent = { tab-width = 2, unit = " " }
|
||||||
language-servers = [ "yaml-language-server", "ansible-language-server" ]
|
language-servers = [ "yaml-language-server", "ansible-language-server" ]
|
||||||
|
@ -2897,7 +2900,7 @@ indent = { tab-width = 2, unit = " " }
|
||||||
|
|
||||||
[[grammar]]
|
[[grammar]]
|
||||||
name = "matlab"
|
name = "matlab"
|
||||||
source = { git = "https://github.com/acristoffers/tree-sitter-matlab", rev = "6071891a8c39600203eba20513666cf93b4d650a" }
|
source = { git = "https://github.com/acristoffers/tree-sitter-matlab", rev = "b0a0198b182574cd3ca0447264c83331901b9338" }
|
||||||
|
|
||||||
[[language]]
|
[[language]]
|
||||||
name = "ponylang"
|
name = "ponylang"
|
||||||
|
@ -4033,3 +4036,32 @@ indent = { tab-width = 4, unit = " " }
|
||||||
[[grammar]]
|
[[grammar]]
|
||||||
name = "nginx"
|
name = "nginx"
|
||||||
source = { git = "https://gitlab.com/joncoole/tree-sitter-nginx", rev = "b4b61db443602b69410ab469c122c01b1e685aa0" }
|
source = { git = "https://gitlab.com/joncoole/tree-sitter-nginx", rev = "b4b61db443602b69410ab469c122c01b1e685aa0" }
|
||||||
|
|
||||||
|
[[language]]
|
||||||
|
name = "codeql"
|
||||||
|
scope = "source.ql"
|
||||||
|
file-types = ["ql", "qll"]
|
||||||
|
comment-token = "//"
|
||||||
|
block-comment-tokens = { start = "/*", end = "*/" }
|
||||||
|
indent = { tab-width = 2, unit = " " }
|
||||||
|
injection-regex = "codeql"
|
||||||
|
grammar = "ql"
|
||||||
|
language-servers = ["codeql"]
|
||||||
|
|
||||||
|
[[grammar]]
|
||||||
|
name = "ql"
|
||||||
|
source = { git = "https://github.com/tree-sitter/tree-sitter-ql", rev = "1fd627a4e8bff8c24c11987474bd33112bead857" }
|
||||||
|
|
||||||
|
[[language]]
|
||||||
|
name = "gren"
|
||||||
|
scope = "source.gren"
|
||||||
|
injection-regex = "gren"
|
||||||
|
file-types = ["gren"]
|
||||||
|
roots = ["gren.json"]
|
||||||
|
comment-tokens = "--"
|
||||||
|
block-comment-tokens = { start = "{-", end = "-}" }
|
||||||
|
indent = { tab-width = 4, unit = " " }
|
||||||
|
|
||||||
|
[[grammar]]
|
||||||
|
name = "gren"
|
||||||
|
source = { git = "https://github.com/MaeBrooks/tree-sitter-gren", rev = "76554f4f2339f5a24eed19c58f2079b51c694152" }
|
||||||
|
|
104
runtime/queries/codeql/highlights.scm
Normal file
104
runtime/queries/codeql/highlights.scm
Normal file
|
@ -0,0 +1,104 @@
|
||||||
|
[
|
||||||
|
"and"
|
||||||
|
"any"
|
||||||
|
"as"
|
||||||
|
"asc"
|
||||||
|
"avg"
|
||||||
|
"by"
|
||||||
|
"class"
|
||||||
|
"concat"
|
||||||
|
"count"
|
||||||
|
"desc"
|
||||||
|
"else"
|
||||||
|
"exists"
|
||||||
|
"extends"
|
||||||
|
"forall"
|
||||||
|
"forex"
|
||||||
|
"from"
|
||||||
|
"if"
|
||||||
|
"implements"
|
||||||
|
"implies"
|
||||||
|
"import"
|
||||||
|
"in"
|
||||||
|
"instanceof"
|
||||||
|
"max"
|
||||||
|
"min"
|
||||||
|
"module"
|
||||||
|
"newtype"
|
||||||
|
"not"
|
||||||
|
"or"
|
||||||
|
"order"
|
||||||
|
"rank"
|
||||||
|
"select"
|
||||||
|
"strictconcat"
|
||||||
|
"strictcount"
|
||||||
|
"strictsum"
|
||||||
|
"sum"
|
||||||
|
"then"
|
||||||
|
"where"
|
||||||
|
|
||||||
|
(false)
|
||||||
|
(predicate)
|
||||||
|
(result)
|
||||||
|
(specialId)
|
||||||
|
(super)
|
||||||
|
(this)
|
||||||
|
(true)
|
||||||
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"boolean"
|
||||||
|
"float"
|
||||||
|
"int"
|
||||||
|
"date"
|
||||||
|
"string"
|
||||||
|
] @type.builtin
|
||||||
|
|
||||||
|
(annotName) @attribute
|
||||||
|
|
||||||
|
[
|
||||||
|
"<"
|
||||||
|
"<="
|
||||||
|
"="
|
||||||
|
">"
|
||||||
|
">="
|
||||||
|
"-"
|
||||||
|
"!="
|
||||||
|
"/"
|
||||||
|
"*"
|
||||||
|
"%"
|
||||||
|
"+"
|
||||||
|
"::"
|
||||||
|
] @operator
|
||||||
|
|
||||||
|
[
|
||||||
|
"("
|
||||||
|
")"
|
||||||
|
"{"
|
||||||
|
"}"
|
||||||
|
"["
|
||||||
|
"]"
|
||||||
|
] @punctuation.bracket
|
||||||
|
|
||||||
|
[
|
||||||
|
","
|
||||||
|
"|"
|
||||||
|
] @punctuation.delimiter
|
||||||
|
|
||||||
|
(className) @type
|
||||||
|
|
||||||
|
(varName) @variable
|
||||||
|
|
||||||
|
(integer) @constant.numeric.integer
|
||||||
|
(float) @constant.numeric.float
|
||||||
|
|
||||||
|
(string) @string
|
||||||
|
|
||||||
|
(aritylessPredicateExpr (literalId) @function)
|
||||||
|
(predicateName) @function
|
||||||
|
|
||||||
|
[
|
||||||
|
(line_comment)
|
||||||
|
(block_comment)
|
||||||
|
(qldoc)
|
||||||
|
] @comment
|
16
runtime/queries/codeql/textobjects.scm
Normal file
16
runtime/queries/codeql/textobjects.scm
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
(qldoc) @comment.around
|
||||||
|
(block_comment) @comment.around
|
||||||
|
(line_comment) @comment.inside
|
||||||
|
(line_comment)+ @comment.around
|
||||||
|
|
||||||
|
(classlessPredicate
|
||||||
|
((varDecl) @parameter.inside . ","?) @parameter.around
|
||||||
|
(body "{" (_)* @function.inside "}")) @function.around
|
||||||
|
(memberPredicate
|
||||||
|
((varDecl) @parameter.inside . ","?) @parameter.around
|
||||||
|
(body "{" (_)* @function.inside "}")) @function.around
|
||||||
|
|
||||||
|
(dataclass
|
||||||
|
("{" (_)* @class.inside "}")?) @class.around
|
||||||
|
(datatype) @class.around
|
||||||
|
(datatypeBranch) @class.around
|
|
@ -16,8 +16,31 @@
|
||||||
(#match? @variable.builtin "^(arguments|module|console|window|document)$")
|
(#match? @variable.builtin "^(arguments|module|console|window|document)$")
|
||||||
(#is-not? local))
|
(#is-not? local))
|
||||||
|
|
||||||
((identifier) @function.builtin
|
(call_expression
|
||||||
(#eq? @function.builtin "require")
|
(identifier) @function.builtin
|
||||||
|
(#any-of? @function.builtin
|
||||||
|
"eval"
|
||||||
|
"fetch"
|
||||||
|
"isFinite"
|
||||||
|
"isNaN"
|
||||||
|
"parseFloat"
|
||||||
|
"parseInt"
|
||||||
|
"decodeURI"
|
||||||
|
"decodeURIComponent"
|
||||||
|
"encodeURI"
|
||||||
|
"encodeURIComponent"
|
||||||
|
"require"
|
||||||
|
"alert"
|
||||||
|
"prompt"
|
||||||
|
"btoa"
|
||||||
|
"atob"
|
||||||
|
"confirm"
|
||||||
|
"structuredClone"
|
||||||
|
"setTimeout"
|
||||||
|
"clearTimeout"
|
||||||
|
"setInterval"
|
||||||
|
"clearInterval"
|
||||||
|
"queueMicrotask")
|
||||||
(#is-not? local))
|
(#is-not? local))
|
||||||
|
|
||||||
; Function and method definitions
|
; Function and method definitions
|
||||||
|
|
81
runtime/queries/gren/highlights.scm
Normal file
81
runtime/queries/gren/highlights.scm
Normal file
|
@ -0,0 +1,81 @@
|
||||||
|
; Keywords
|
||||||
|
[
|
||||||
|
"if"
|
||||||
|
"then"
|
||||||
|
"else"
|
||||||
|
"let"
|
||||||
|
"in"
|
||||||
|
] @keyword.control
|
||||||
|
(when) @keyword.control
|
||||||
|
(is) @keyword.control
|
||||||
|
|
||||||
|
(colon) @keyword.operator
|
||||||
|
(backslash) @keyword
|
||||||
|
(as) @keyword
|
||||||
|
(port) @keyword
|
||||||
|
(exposing) @keyword
|
||||||
|
(alias) @keyword
|
||||||
|
(infix) @keyword
|
||||||
|
|
||||||
|
(arrow) @keyword.operator
|
||||||
|
(dot) @keyword.operator
|
||||||
|
|
||||||
|
(type_annotation(lower_case_identifier) @function)
|
||||||
|
(port_annotation(lower_case_identifier) @function)
|
||||||
|
(file (value_declaration (function_declaration_left(lower_case_identifier) @function)))
|
||||||
|
|
||||||
|
(field name: (lower_case_identifier) @attribute)
|
||||||
|
(field_access_expr(lower_case_identifier) @attribute)
|
||||||
|
|
||||||
|
(operator_identifier) @keyword.operator
|
||||||
|
(eq) @keyword.operator.assignment
|
||||||
|
|
||||||
|
[
|
||||||
|
"("
|
||||||
|
")"
|
||||||
|
"["
|
||||||
|
"]"
|
||||||
|
"{"
|
||||||
|
"}"
|
||||||
|
] @punctuation.bracket
|
||||||
|
|
||||||
|
"|" @keyword
|
||||||
|
"," @punctuation.delimiter
|
||||||
|
|
||||||
|
[
|
||||||
|
"|>"
|
||||||
|
] @keyword
|
||||||
|
|
||||||
|
|
||||||
|
(import) @keyword.control.import
|
||||||
|
(module) @keyword.other
|
||||||
|
|
||||||
|
(number_constant_expr) @constant.numeric
|
||||||
|
|
||||||
|
(type) @type
|
||||||
|
|
||||||
|
(type_declaration(upper_case_identifier) @type)
|
||||||
|
(type_ref) @type
|
||||||
|
(type_alias_declaration name: (upper_case_identifier) @type)
|
||||||
|
|
||||||
|
(union_pattern constructor: (upper_case_qid (upper_case_identifier) @label (dot) (upper_case_identifier) @variable.other.member))
|
||||||
|
(union_pattern constructor: (upper_case_qid (upper_case_identifier) @variable.other.member))
|
||||||
|
|
||||||
|
(union_variant(upper_case_identifier) @variable.other.member)
|
||||||
|
(value_expr name: (value_qid (upper_case_identifier) @label))
|
||||||
|
(value_expr (upper_case_qid (upper_case_identifier) @label (dot) (upper_case_identifier) @variable.other.member))
|
||||||
|
(value_expr(upper_case_qid(upper_case_identifier)) @variable.other.member)
|
||||||
|
|
||||||
|
; comments
|
||||||
|
(line_comment) @comment
|
||||||
|
(block_comment) @comment
|
||||||
|
|
||||||
|
; strings
|
||||||
|
(string_escape) @constant.character.escape
|
||||||
|
|
||||||
|
(open_quote) @string
|
||||||
|
(close_quote) @string
|
||||||
|
(regular_string_part) @string
|
||||||
|
|
||||||
|
(open_char) @constant.character
|
||||||
|
(close_char) @constant.character
|
14
runtime/queries/gren/locals.scm
Normal file
14
runtime/queries/gren/locals.scm
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
(value_declaration) @local.scope
|
||||||
|
(type_alias_declaration) @local.scope
|
||||||
|
(type_declaration) @local.scope
|
||||||
|
(type_annotation) @local.scope
|
||||||
|
(port_annotation) @local.scope
|
||||||
|
(infix_declaration) @local.scope
|
||||||
|
(let_in_expr) @local.scope
|
||||||
|
|
||||||
|
(function_declaration_left (lower_pattern (lower_case_identifier)) @local.definition)
|
||||||
|
(function_declaration_left (lower_case_identifier) @local.definition)
|
||||||
|
|
||||||
|
(value_expr(value_qid(upper_case_identifier)) @local.reference)
|
||||||
|
(value_expr(value_qid(lower_case_identifier)) @local.reference)
|
||||||
|
(type_ref (upper_case_qid) @local.reference)
|
19
runtime/queries/gren/tags.scm
Normal file
19
runtime/queries/gren/tags.scm
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
(value_declaration (function_declaration_left (lower_case_identifier) @name)) @definition.function
|
||||||
|
|
||||||
|
(function_call_expr (value_expr (value_qid) @name)) @reference.function
|
||||||
|
(exposed_value (lower_case_identifier) @name) @reference.function
|
||||||
|
(type_annotation ((lower_case_identifier) @name) (colon)) @reference.function
|
||||||
|
|
||||||
|
(type_declaration ((upper_case_identifier) @name) ) @definition.type
|
||||||
|
|
||||||
|
(type_ref (upper_case_qid (upper_case_identifier) @name)) @reference.type
|
||||||
|
(exposed_type (upper_case_identifier) @name) @reference.type
|
||||||
|
|
||||||
|
(type_declaration (union_variant (upper_case_identifier) @name)) @definition.union
|
||||||
|
|
||||||
|
(value_expr (upper_case_qid (upper_case_identifier) @name)) @reference.union
|
||||||
|
|
||||||
|
|
||||||
|
(module_declaration
|
||||||
|
(upper_case_qid (upper_case_identifier)) @name
|
||||||
|
) @definition.module
|
56
runtime/queries/gren/textobjects.scm
Normal file
56
runtime/queries/gren/textobjects.scm
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
|
||||||
|
(line_comment) @comment.inside
|
||||||
|
(line_comment)+ @comment.around
|
||||||
|
(block_comment) @comment.inside
|
||||||
|
(block_comment)+ @comment.around
|
||||||
|
|
||||||
|
((type_annotation)?
|
||||||
|
(value_declaration
|
||||||
|
(function_declaration_left (lower_case_identifier))
|
||||||
|
(eq)
|
||||||
|
(_) @function.inside
|
||||||
|
)
|
||||||
|
) @function.around
|
||||||
|
|
||||||
|
(parenthesized_expr
|
||||||
|
(anonymous_function_expr
|
||||||
|
(
|
||||||
|
(arrow)
|
||||||
|
(_) @function.inside
|
||||||
|
)
|
||||||
|
)
|
||||||
|
) @function.around
|
||||||
|
|
||||||
|
(value_declaration
|
||||||
|
(function_declaration_left
|
||||||
|
(lower_pattern
|
||||||
|
(lower_case_identifier) @parameter.inside @parameter.around
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
(value_declaration
|
||||||
|
(function_declaration_left
|
||||||
|
(pattern) @parameter.inside @parameter.around
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
(value_declaration
|
||||||
|
(function_declaration_left
|
||||||
|
(record_pattern
|
||||||
|
(lower_pattern
|
||||||
|
(lower_case_identifier) @parameter.inside
|
||||||
|
)
|
||||||
|
) @parameter.around
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
(parenthesized_expr
|
||||||
|
(anonymous_function_expr
|
||||||
|
(
|
||||||
|
(backslash)
|
||||||
|
(pattern) @parameter.inside
|
||||||
|
(arrow)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
|
@ -7,6 +7,255 @@
|
||||||
(char) @constant.character
|
(char) @constant.character
|
||||||
(string) @string
|
(string) @string
|
||||||
|
|
||||||
|
(exp_apply
|
||||||
|
(exp_name
|
||||||
|
(variable) @function.builtin
|
||||||
|
(#any-of? @function.builtin
|
||||||
|
; built in functions from the Haskell prelude (https://hackage.haskell.org/package/base-4.21.0.0/docs/Prelude.html)
|
||||||
|
; basic data types
|
||||||
|
"not"
|
||||||
|
"maybe"
|
||||||
|
"either"
|
||||||
|
|
||||||
|
; tuples
|
||||||
|
"fst"
|
||||||
|
"snd"
|
||||||
|
"curry"
|
||||||
|
"uncurry"
|
||||||
|
|
||||||
|
; Ord
|
||||||
|
"compare"
|
||||||
|
"min"
|
||||||
|
"max"
|
||||||
|
|
||||||
|
; Enum
|
||||||
|
"succ"
|
||||||
|
"pred"
|
||||||
|
"toEnum"
|
||||||
|
"fromEnum"
|
||||||
|
"enumFrom"
|
||||||
|
"enumFromThen"
|
||||||
|
"enumFromThenTo"
|
||||||
|
|
||||||
|
; Num
|
||||||
|
"negate"
|
||||||
|
"abs"
|
||||||
|
"signum"
|
||||||
|
"fromInteger"
|
||||||
|
|
||||||
|
; Real
|
||||||
|
"toRational"
|
||||||
|
|
||||||
|
; Integral
|
||||||
|
"quot"
|
||||||
|
"rem"
|
||||||
|
"div"
|
||||||
|
"mod"
|
||||||
|
"quotRem"
|
||||||
|
"divMod"
|
||||||
|
"toInteger"
|
||||||
|
|
||||||
|
; Fractional
|
||||||
|
"recip"
|
||||||
|
"fromRational"
|
||||||
|
|
||||||
|
; Floating
|
||||||
|
"exp"
|
||||||
|
"log"
|
||||||
|
"sqrt"
|
||||||
|
"logBase"
|
||||||
|
"sin"
|
||||||
|
"cos"
|
||||||
|
"tan"
|
||||||
|
"asin"
|
||||||
|
"acos"
|
||||||
|
"atan"
|
||||||
|
"sinh"
|
||||||
|
"cosh"
|
||||||
|
"tanh"
|
||||||
|
"asinh"
|
||||||
|
"acosh"
|
||||||
|
"atanh"
|
||||||
|
|
||||||
|
; RealFrac
|
||||||
|
"properFraction"
|
||||||
|
"truncate"
|
||||||
|
"round"
|
||||||
|
"ceiling"
|
||||||
|
"floor"
|
||||||
|
|
||||||
|
; RealFloat
|
||||||
|
"floatRadix"
|
||||||
|
"floatDigits"
|
||||||
|
"floatRange"
|
||||||
|
"decodeFloat"
|
||||||
|
"encodeFloat"
|
||||||
|
"exponent"
|
||||||
|
"significand"
|
||||||
|
"scaleFloat"
|
||||||
|
"isNaN"
|
||||||
|
"isInfinite"
|
||||||
|
"isDenormalized"
|
||||||
|
"isNegativeZero"
|
||||||
|
"isIEEE"
|
||||||
|
"atan2"
|
||||||
|
|
||||||
|
; Numeric functions
|
||||||
|
"subtract"
|
||||||
|
"even"
|
||||||
|
"odd"
|
||||||
|
"gcd"
|
||||||
|
"lcm"
|
||||||
|
"fromIntegral"
|
||||||
|
"realToFrac"
|
||||||
|
|
||||||
|
; Monoid
|
||||||
|
"mempty"
|
||||||
|
"mconcat"
|
||||||
|
"mappend"
|
||||||
|
|
||||||
|
; Functor
|
||||||
|
"fmap"
|
||||||
|
|
||||||
|
; Applicative
|
||||||
|
"liftA2"
|
||||||
|
"pure"
|
||||||
|
|
||||||
|
; Monad
|
||||||
|
"return"
|
||||||
|
|
||||||
|
; MonadFail
|
||||||
|
"fail"
|
||||||
|
"mapM_"
|
||||||
|
"sequence_"
|
||||||
|
|
||||||
|
; Foldable
|
||||||
|
"foldMap"
|
||||||
|
"foldr"
|
||||||
|
"foldl"
|
||||||
|
"foldl'"
|
||||||
|
"foldr1"
|
||||||
|
"foldl1"
|
||||||
|
"elem"
|
||||||
|
"maximum"
|
||||||
|
"minimum"
|
||||||
|
"sum"
|
||||||
|
"product"
|
||||||
|
|
||||||
|
; Traversable
|
||||||
|
"traverse"
|
||||||
|
"sequenceA"
|
||||||
|
"mapM"
|
||||||
|
"sequence"
|
||||||
|
|
||||||
|
; miscellaneous
|
||||||
|
"id"
|
||||||
|
"const"
|
||||||
|
"flip"
|
||||||
|
"until"
|
||||||
|
"asTypeOf"
|
||||||
|
"error"
|
||||||
|
"errorWithoutStackTrace"
|
||||||
|
"undefined"
|
||||||
|
|
||||||
|
; List
|
||||||
|
"map"
|
||||||
|
"filter"
|
||||||
|
"head"
|
||||||
|
"last"
|
||||||
|
"tail"
|
||||||
|
"init"
|
||||||
|
"null"
|
||||||
|
"length"
|
||||||
|
"reverse"
|
||||||
|
|
||||||
|
; Foldable
|
||||||
|
"and"
|
||||||
|
"or"
|
||||||
|
"any"
|
||||||
|
"all"
|
||||||
|
"concat"
|
||||||
|
"concatMap"
|
||||||
|
|
||||||
|
; Building lists
|
||||||
|
"scanl"
|
||||||
|
"scanl1"
|
||||||
|
"scanr"
|
||||||
|
"scanr1"
|
||||||
|
|
||||||
|
; Infinite lists
|
||||||
|
"iterate"
|
||||||
|
"repeat"
|
||||||
|
"replicate"
|
||||||
|
"cycle"
|
||||||
|
|
||||||
|
; Sublists
|
||||||
|
"take"
|
||||||
|
"drop"
|
||||||
|
"takeWhile"
|
||||||
|
"dropWhile"
|
||||||
|
"span"
|
||||||
|
"break"
|
||||||
|
"splitAt"
|
||||||
|
|
||||||
|
; Searching lists
|
||||||
|
"notElem"
|
||||||
|
"lookup"
|
||||||
|
|
||||||
|
; zipping and unzipping
|
||||||
|
"zip"
|
||||||
|
"zip3"
|
||||||
|
"zipWith"
|
||||||
|
"zipWith3"
|
||||||
|
"unzip"
|
||||||
|
"unzip3"
|
||||||
|
|
||||||
|
; String
|
||||||
|
"lines"
|
||||||
|
"words"
|
||||||
|
"unlines"
|
||||||
|
"unwords"
|
||||||
|
|
||||||
|
; Converting to String
|
||||||
|
"show"
|
||||||
|
"showList"
|
||||||
|
"shows"
|
||||||
|
"showChar"
|
||||||
|
"showString"
|
||||||
|
"showParen"
|
||||||
|
|
||||||
|
; Converting from String
|
||||||
|
"readsPrec"
|
||||||
|
"readList"
|
||||||
|
"reads"
|
||||||
|
"readParen"
|
||||||
|
"read"
|
||||||
|
"lex"
|
||||||
|
|
||||||
|
; Input and output
|
||||||
|
"putChar"
|
||||||
|
"putStr"
|
||||||
|
"putStrLn"
|
||||||
|
"print"
|
||||||
|
"getChar"
|
||||||
|
"getLine"
|
||||||
|
"getContents"
|
||||||
|
"interact"
|
||||||
|
|
||||||
|
; Files
|
||||||
|
"readFile"
|
||||||
|
"writeFile"
|
||||||
|
"appendFile"
|
||||||
|
"readIO"
|
||||||
|
"readLn"
|
||||||
|
|
||||||
|
; Exception handling
|
||||||
|
"ioError"
|
||||||
|
"userError")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
(con_unit) @constant.builtin ; unit, as in ()
|
(con_unit) @constant.builtin ; unit, as in ()
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
[
|
[
|
||||||
|
(arguments_statement)
|
||||||
(if_statement)
|
(if_statement)
|
||||||
(for_statement)
|
(for_statement)
|
||||||
(while_statement)
|
(while_statement)
|
||||||
|
|
|
@ -63,6 +63,14 @@
|
||||||
(#any-of? @type.enum.variant.builtin "Some" "None" "Ok" "Err"))
|
(#any-of? @type.enum.variant.builtin "Some" "None" "Ok" "Err"))
|
||||||
|
|
||||||
|
|
||||||
|
(call_expression
|
||||||
|
(identifier) @function.builtin
|
||||||
|
(#any-of? @function.builtin
|
||||||
|
"drop"
|
||||||
|
"size_of"
|
||||||
|
"size_of_val"
|
||||||
|
"align_of"
|
||||||
|
"align_of_val"))
|
||||||
|
|
||||||
((type_identifier) @type.builtin
|
((type_identifier) @type.builtin
|
||||||
(#any-of?
|
(#any-of?
|
||||||
|
@ -311,6 +319,8 @@
|
||||||
((identifier) @type
|
((identifier) @type
|
||||||
(#match? @type "^[A-Z]"))
|
(#match? @type "^[A-Z]"))
|
||||||
|
|
||||||
|
(never_type "!" @type)
|
||||||
|
|
||||||
; -------
|
; -------
|
||||||
; Functions
|
; Functions
|
||||||
; -------
|
; -------
|
||||||
|
@ -453,6 +463,7 @@
|
||||||
; Remaining Identifiers
|
; Remaining Identifiers
|
||||||
; -------
|
; -------
|
||||||
|
|
||||||
|
; We do not style ? as an operator on purpose as it allows styling ? differently, as many highlighters do. @operator.special might have been a better scope, but @special is already documented so the change would break themes (including the intent of the default theme)
|
||||||
"?" @special
|
"?" @special
|
||||||
|
|
||||||
(type_identifier) @type
|
(type_identifier) @type
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
"operator" = "text"
|
"operator" = "text"
|
||||||
"punctuation" = "text"
|
"punctuation" = "text"
|
||||||
"punctuation.delimiter" = "text"
|
"punctuation.delimiter" = "text"
|
||||||
"special" = "text"
|
"special" = "light_blue"
|
||||||
"string" = "orange"
|
"string" = "orange"
|
||||||
"string.regexp" = "gold"
|
"string.regexp" = "gold"
|
||||||
"tag" = "blue2"
|
"tag" = "blue2"
|
||||||
|
@ -72,9 +72,10 @@
|
||||||
"ui.bufferline.background" = { bg = "background" }
|
"ui.bufferline.background" = { bg = "background" }
|
||||||
"ui.text" = { fg = "text" }
|
"ui.text" = { fg = "text" }
|
||||||
"ui.text.focus" = { fg = "white" }
|
"ui.text.focus" = { fg = "white" }
|
||||||
"ui.text.directory" = { fg = "blue3" }
|
"ui.text.directory" = { fg = "blue2" }
|
||||||
"ui.text.inactive" = { fg = "dark_gray" }
|
"ui.text.inactive" = { fg = "dark_gray" }
|
||||||
"ui.virtual.whitespace" = { fg = "#3e3e3d" }
|
"ui.virtual.whitespace" = { fg = "#3e3e3d" }
|
||||||
|
"ui.virtual.wrap" = { fg = "#3e3e3d" }
|
||||||
"ui.virtual.ruler" = { bg = "borders" }
|
"ui.virtual.ruler" = { bg = "borders" }
|
||||||
"ui.virtual.indent-guide" = { fg = "dark_gray4" }
|
"ui.virtual.indent-guide" = { fg = "dark_gray4" }
|
||||||
"ui.virtual.inlay-hint" = { fg = "dark_gray5"}
|
"ui.virtual.inlay-hint" = { fg = "dark_gray5"}
|
||||||
|
|
Loading…
Reference in a new issue