Merge branch 'master' of https://github.com/helix-editor/helix into tree_explore

pull/9/head
wongjiahau 1 year ago
commit 8379669742

105
Cargo.lock generated

@ -51,9 +51,9 @@ dependencies = [
[[package]]
name = "anyhow"
version = "1.0.69"
version = "1.0.68"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800"
checksum = "2cb2f989d18dd141ab8ae82f64d1a8cdd37e0840f73a406896cf5e99502fab61"
[[package]]
name = "arc-swap"
@ -169,9 +169,9 @@ dependencies = [
[[package]]
name = "cc"
version = "1.0.79"
version = "1.0.78"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"
checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d"
[[package]]
name = "cfg-if"
@ -440,9 +440,9 @@ checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797"
[[package]]
name = "encoding_rs"
version = "0.8.32"
version = "0.8.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394"
checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b"
dependencies = [
"cfg-if",
]
@ -456,6 +456,27 @@ dependencies = [
"encoding_rs",
]
[[package]]
name = "errno"
version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1"
dependencies = [
"errno-dragonfly",
"libc",
"winapi",
]
[[package]]
name = "errno-dragonfly"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf"
dependencies = [
"cc",
"libc",
]
[[package]]
name = "error-code"
version = "2.3.1"
@ -1465,6 +1486,16 @@ dependencies = [
"winapi",
]
[[package]]
name = "io-lifetimes"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7d6c6f8c91b4b9ed43484ad1a938e393caf35960fce7f82a040497207bd8e9e"
dependencies = [
"libc",
"windows-sys",
]
[[package]]
name = "itoa"
version = "1.0.4"
@ -1511,6 +1542,12 @@ dependencies = [
"cc",
]
[[package]]
name = "linux-raw-sys"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4"
[[package]]
name = "lock_api"
version = "0.4.9"
@ -1656,9 +1693,9 @@ dependencies = [
[[package]]
name = "once_cell"
version = "1.17.1"
version = "1.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3"
checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66"
[[package]]
name = "output_vt100"
@ -1870,15 +1907,6 @@ version = "0.6.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848"
[[package]]
name = "remove_dir_all"
version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7"
dependencies = [
"winapi",
]
[[package]]
name = "ropey"
version = "1.6.0"
@ -1898,6 +1926,20 @@ dependencies = [
"semver",
]
[[package]]
name = "rustix"
version = "0.36.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d4fdebc4b395b7fbb9ab11e462e20ed9051e7b16e42d24042c776eca0ac81b03"
dependencies = [
"bitflags",
"errno",
"io-lifetimes",
"libc",
"linux-raw-sys",
"windows-sys",
]
[[package]]
name = "rustversion"
version = "1.0.9"
@ -1959,9 +2001,9 @@ dependencies = [
[[package]]
name = "serde_json"
version = "1.0.93"
version = "1.0.91"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cad406b69c91885b5107daf2c29572f6c8cdb3c66826821e286c533490c0bc76"
checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883"
dependencies = [
"itoa",
"ryu",
@ -2009,9 +2051,9 @@ checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012"
[[package]]
name = "signal-hook"
version = "0.3.15"
version = "0.3.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "732768f1176d21d09e076c23a93123d40bba92d50c4058da34d45c8de8e682b9"
checksum = "a253b5e89e2698464fc26b545c9edceb338e18a89effeeecfea192c3025be29d"
dependencies = [
"libc",
"signal-hook-registry",
@ -2131,16 +2173,15 @@ dependencies = [
[[package]]
name = "tempfile"
version = "3.3.0"
version = "3.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4"
checksum = "af18f7ae1acd354b992402e9ec5864359d693cd8a79dcbef59f76891701c1e95"
dependencies = [
"cfg-if",
"fastrand",
"libc",
"redox_syscall",
"remove_dir_all",
"winapi",
"rustix",
"windows-sys",
]
[[package]]
@ -2304,9 +2345,9 @@ dependencies = [
[[package]]
name = "toml"
version = "0.7.2"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7afcae9e3f0fe2c370fd4657108972cbb2fa9db1b9f84849cefd80741b01cb6"
checksum = "772c1426ab886e7362aedf4abc9c0d1348a979517efedfc25862944d10137af0"
dependencies = [
"serde",
"serde_spanned",
@ -2325,9 +2366,9 @@ dependencies = [
[[package]]
name = "toml_edit"
version = "0.19.3"
version = "0.19.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e6a7712b49e1775fb9a7b998de6635b299237f48b404dde71704f2e0e7f37e5"
checksum = "90a238ee2e6ede22fb95350acc78e21dc40da00bb66c0334bde83de4ed89424e"
dependencies = [
"indexmap",
"nom8",
@ -2400,9 +2441,9 @@ dependencies = [
[[package]]
name = "unicode-segmentation"
version = "1.10.1"
version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36"
checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a"
[[package]]
name = "unicode-width"

@ -30,7 +30,7 @@
| eex | ✓ | | | |
| ejs | ✓ | | | |
| elixir | ✓ | ✓ | ✓ | `elixir-ls` |
| elm | ✓ | | | `elm-language-server` |
| elm | ✓ | | | `elm-language-server` |
| elvish | ✓ | | | `elvish` |
| env | ✓ | | | |
| erb | ✓ | | | |
@ -85,6 +85,7 @@
| meson | ✓ | | ✓ | |
| mint | | | | `mint` |
| msbuild | ✓ | | ✓ | |
| nasm | ✓ | ✓ | | |
| nickel | ✓ | | ✓ | `nls` |
| nix | ✓ | | | `nil` |
| nu | ✓ | | | |
@ -125,6 +126,7 @@
| sshclientconfig | ✓ | | | |
| starlark | ✓ | ✓ | | |
| svelte | ✓ | | | `svelteserver` |
| sway | ✓ | ✓ | ✓ | `forc` |
| swift | ✓ | | | `sourcekit-lsp` |
| tablegen | ✓ | ✓ | ✓ | |
| task | ✓ | | | |

@ -29,38 +29,38 @@
> NOTE: Unlike Vim, `f`, `F`, `t` and `T` are not confined to the current line.
| Key | Description | Command |
| ----- | ----------- | ------- |
| `h`, `Left` | Move left | `move_char_left` |
| `j`, `Down` | Move down | `move_line_down` |
| `k`, `Up` | Move up | `move_line_up` |
| `l`, `Right` | Move right | `move_char_right` |
| `w` | Move next word start | `move_next_word_start` |
| `b` | Move previous word start | `move_prev_word_start` |
| `e` | Move next word end | `move_next_word_end` |
| `W` | Move next WORD start | `move_next_long_word_start` |
| `B` | Move previous WORD start | `move_prev_long_word_start` |
| `E` | Move next WORD end | `move_next_long_word_end` |
| `t` | Find 'till next char | `find_till_char` |
| `f` | Find next char | `find_next_char` |
| `T` | Find 'till previous char | `till_prev_char` |
| `F` | Find previous char | `find_prev_char` |
| `G` | Go to line number `<n>` | `goto_line` |
| `Alt-.` | Repeat last motion (`f`, `t` or `m`) | `repeat_last_motion` |
| `Home` | Move to the start of the line | `goto_line_start` |
| `End` | Move to the end of the line | `goto_line_end` |
| `Ctrl-b`, `PageUp` | Move page up | `page_up` |
| `Ctrl-f`, `PageDown` | Move page down | `page_down` |
| `Ctrl-u` | Move half page up | `half_page_up` |
| `Ctrl-d` | Move half page down | `half_page_down` |
| `Ctrl-i` | Jump forward on the jumplist | `jump_forward` |
| `Ctrl-o` | Jump backward on the jumplist | `jump_backward` |
| `Ctrl-s` | Save the current selection to the jumplist | `save_selection` |
| Key | Description | Command |
| -------------------- | ------------------------------------------ | --------------------------- |
| `h`, `Left` | Move left | `move_char_left` |
| `j`, `Down` | Move down | `move_line_down` |
| `k`, `Up` | Move up | `move_line_up` |
| `l`, `Right` | Move right | `move_char_right` |
| `w` | Move next word start | `move_next_word_start` |
| `b` | Move previous word start | `move_prev_word_start` |
| `e` | Move next word end | `move_next_word_end` |
| `W` | Move next WORD start | `move_next_long_word_start` |
| `B` | Move previous WORD start | `move_prev_long_word_start` |
| `E` | Move next WORD end | `move_next_long_word_end` |
| `t` | Find 'till next char | `find_till_char` |
| `f` | Find next char | `find_next_char` |
| `T` | Find 'till previous char | `till_prev_char` |
| `F` | Find previous char | `find_prev_char` |
| `G` | Go to line number `<n>` | `goto_line` |
| `Alt-.` | Repeat last motion (`f`, `t` or `m`) | `repeat_last_motion` |
| `Home` | Move to the start of the line | `goto_line_start` |
| `End` | Move to the end of the line | `goto_line_end` |
| `Ctrl-b`, `PageUp` | Move page up | `page_up` |
| `Ctrl-f`, `PageDown` | Move page down | `page_down` |
| `Ctrl-u` | Move half page up | `half_page_up` |
| `Ctrl-d` | Move half page down | `half_page_down` |
| `Ctrl-i` | Jump forward on the jumplist | `jump_forward` |
| `Ctrl-o` | Jump backward on the jumplist | `jump_backward` |
| `Ctrl-s` | Save the current selection to the jumplist | `save_selection` |
### Changes
| Key | Description | Command |
| ----- | ----------- | ------- |
| ----------- | -------------------------------------------------------------------- | ------------------------- |
| `r` | Replace with a character | `replace` |
| `R` | Replace with yanked text | `replace_with_yanked` |
| `~` | Switch case of the selected text | `switch_case` |
@ -95,68 +95,67 @@
#### Shell
| Key | Description | Command |
| ------ | ----------- | ------- |
| Key | Description | Command |
| ----------------------- | -------------------------------------------------------------------------------- | --------------------- |
| <code>&#124;</code> | Pipe each selection through shell command, replacing with output | `shell_pipe` |
| <code>Alt-&#124;</code> | Pipe each selection into shell command, ignoring output | `shell_pipe_to` |
| `!` | Run shell command, inserting output before each selection | `shell_insert_output` |
| `Alt-!` | Run shell command, appending output after each selection | `shell_append_output` |
| `$` | Pipe each selection into shell command, keep selections where command returned 0 | `shell_keep_pipe` |
| `!` | Run shell command, inserting output before each selection | `shell_insert_output` |
| `Alt-!` | Run shell command, appending output after each selection | `shell_append_output` |
| `$` | Pipe each selection into shell command, keep selections where command returned 0 | `shell_keep_pipe` |
### Selection manipulation
| Key | Description | Command |
| ----- | ----------- | ------- |
| `s` | Select all regex matches inside selections | `select_regex` |
| `S` | Split selection into subselections on regex matches | `split_selection` |
| `Alt-s` | Split selection on newlines | `split_selection_on_newline` |
| `Alt-_ ` | Merge consecutive selections | `merge_consecutive_selections` |
| `&` | Align selection in columns | `align_selections` |
| `_` | Trim whitespace from the selection | `trim_selections` |
| `;` | Collapse selection onto a single cursor | `collapse_selection` |
| `Alt-;` | Flip selection cursor and anchor | `flip_selections` |
| `Alt-:` | Ensures the selection is in forward direction | `ensure_selections_forward` |
| `,` | Keep only the primary selection | `keep_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` |
| `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 forward | `rotate_selections_forward` |
| `Alt-(` | Rotate selection contents backward | `rotate_selection_contents_backward` |
| `Alt-)` | Rotate selection contents forward | `rotate_selection_contents_forward` |
| `%` | Select entire file | `select_all` |
| `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` |
| `Alt-x` | Shrink selection to line bounds (line-wise selection) | `shrink_to_line_bounds` |
| `J` | Join lines inside selection | `join_selections` |
| `Alt-J` | Join lines inside selection and select the inserted space | `join_selections_space` |
| `K` | Keep selections matching the regex | `keep_selections` |
| `Alt-K` | Remove selections matching the regex | `remove_selections` |
| `Ctrl-c` | Comment/uncomment the selections | `toggle_comments` |
| `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-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` |
| Key | Description | Command |
| -------------------- | ------------------------------------------------------------- | ------------------------------------ |
| `s` | Select all regex matches inside selections | `select_regex` |
| `S` | Split selection into subselections on regex matches | `split_selection` |
| `Alt-s` | Split selection on newlines | `split_selection_on_newline` |
| `Alt-_ ` | Merge consecutive selections | `merge_consecutive_selections` |
| `&` | Align selection in columns | `align_selections` |
| `_` | Trim whitespace from the selection | `trim_selections` |
| `;` | Collapse selection onto a single cursor | `collapse_selection` |
| `Alt-;` | Flip selection cursor and anchor | `flip_selections` |
| `Alt-:` | Ensures the selection is in forward direction | `ensure_selections_forward` |
| `,` | Keep only the primary selection | `keep_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` |
| `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 forward | `rotate_selections_forward` |
| `Alt-(` | Rotate selection contents backward | `rotate_selection_contents_backward` |
| `Alt-)` | Rotate selection contents forward | `rotate_selection_contents_forward` |
| `%` | Select entire file | `select_all` |
| `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` |
| `Alt-x` | Shrink selection to line bounds (line-wise selection) | `shrink_to_line_bounds` |
| `J` | Join lines inside selection | `join_selections` |
| `Alt-J` | Join lines inside selection and select the inserted space | `join_selections_space` |
| `K` | Keep selections matching the regex | `keep_selections` |
| `Alt-K` | Remove selections matching the regex | `remove_selections` |
| `Ctrl-c` | Comment/uncomment the selections | `toggle_comments` |
| `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-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` |
### Search
Search commands all operate on the `/` register by default. Use `"<char>` to operate on a different one.
| Key | Description | Command |
| ----- | ----------- | ------- |
| `/` | Search for regex pattern | `search` |
| `?` | Search for previous pattern | `rsearch` |
| `n` | Select next search match | `search_next` |
| `N` | Select previous search match | `search_prev` |
| `*` | Use current selection as the search pattern | `search_selection` |
| Key | Description | Command |
| --- | ------------------------------------------- | ------------------ |
| `/` | Search for regex pattern | `search` |
| `?` | Search for previous pattern | `rsearch` |
| `n` | Select next search match | `search_next` |
| `N` | Select previous search match | `search_prev` |
| `*` | Use current selection as the search pattern | `search_selection` |
### Minor modes
These sub-modes are accessible from normal mode and typically switch back to normal mode after a command.
| Key | Description | Command |
| ----- | ----------- | ------- |
| -------- | -------------------------------------------------- | -------------- |
| `v` | Enter [select (extend) mode](#select--extend-mode) | `select_mode` |
| `g` | Enter [goto mode](#goto-mode) | N/A |
| `m` | Enter [match mode](#match-mode) | N/A |
@ -179,9 +178,8 @@ normal mode) is persistent; use the Escape key to return to normal mode after
usage (useful when you're simply looking over text and not actively editing
it).
| Key | Description | Command |
| ----- | ----------- | ------- |
| -------------------- | --------------------------------------------------------- | ------------------- |
| `z`, `c` | Vertically center the line | `align_view_center` |
| `t` | Align the line to the top of the screen | `align_view_top` |
| `b` | Align the line to the bottom of the screen | `align_view_bottom` |
@ -199,26 +197,26 @@ Accessed by typing `g` in [normal mode](#normal-mode).
Jumps to various locations.
| Key | Description | Command |
| ----- | ----------- | ------- |
| `g` | Go to line number `<n>` else start of file | `goto_file_start` |
| `e` | Go to the end of the file | `goto_last_line` |
| `f` | Go to files in the selection | `goto_file` |
| `h` | Go to the start of the line | `goto_line_start` |
| `l` | Go to the end of the line | `goto_line_end` |
| `s` | Go to first non-whitespace character of the line | `goto_first_nonwhitespace` |
| `t` | Go to the top of the screen | `goto_window_top` |
| `c` | Go to the middle of the screen | `goto_window_center` |
| `b` | Go to the bottom of the screen | `goto_window_bottom` |
| `d` | Go to definition (**LSP**) | `goto_definition` |
| `y` | Go to type definition (**LSP**) | `goto_type_definition` |
| `r` | Go to references (**LSP**) | `goto_reference` |
| `i` | Go to implementation (**LSP**) | `goto_implementation` |
| `a` | Go to the last accessed/alternate file | `goto_last_accessed_file` |
| `m` | Go to the last modified/alternate file | `goto_last_modified_file` |
| `n` | Go to next buffer | `goto_next_buffer` |
| `p` | Go to previous buffer | `goto_previous_buffer` |
| `.` | Go to last modification in current file | `goto_last_modification` |
| Key | Description | Command |
| --- | ------------------------------------------------ | -------------------------- |
| `g` | Go to line number `<n>` else start of file | `goto_file_start` |
| `e` | Go to the end of the file | `goto_last_line` |
| `f` | Go to files in the selection | `goto_file` |
| `h` | Go to the start of the line | `goto_line_start` |
| `l` | Go to the end of the line | `goto_line_end` |
| `s` | Go to first non-whitespace character of the line | `goto_first_nonwhitespace` |
| `t` | Go to the top of the screen | `goto_window_top` |
| `c` | Go to the middle of the screen | `goto_window_center` |
| `b` | Go to the bottom of the screen | `goto_window_bottom` |
| `d` | Go to definition (**LSP**) | `goto_definition` |
| `y` | Go to type definition (**LSP**) | `goto_type_definition` |
| `r` | Go to references (**LSP**) | `goto_reference` |
| `i` | Go to implementation (**LSP**) | `goto_implementation` |
| `a` | Go to the last accessed/alternate file | `goto_last_accessed_file` |
| `m` | Go to the last modified/alternate file | `goto_last_modified_file` |
| `n` | Go to next buffer | `goto_next_buffer` |
| `p` | Go to previous buffer | `goto_previous_buffer` |
| `.` | Go to last modification in current file | `goto_last_modification` |
#### Match mode
@ -228,7 +226,7 @@ See the relevant section in [Usage](./usage.md) for an explanation about
[surround](./usage.md#surround) and [textobject](./usage.md#textobjects) usage.
| Key | Description | Command |
| ----- | ----------- | ------- |
| ---------------- | ----------------------------------------------- | -------------------------- |
| `m` | Goto matching bracket (**TS**) | `match_brackets` |
| `s` `<char>` | Surround current selection with `<char>` | `surround_add` |
| `r` `<from><to>` | Replace surround character `<from>` with `<to>` | `surround_replace` |
@ -245,7 +243,7 @@ Accessed by typing `Ctrl-w` in [normal mode](#normal-mode).
This layer is similar to Vim keybindings as Kakoune does not support window.
| Key | Description | Command |
| ----- | ------------- | ------- |
| ---------------------- | ---------------------------------------------------- | ----------------- |
| `w`, `Ctrl-w` | Switch to next window | `rotate_view` |
| `v`, `Ctrl-v` | Vertical right split | `vsplit` |
| `s`, `Ctrl-s` | Horizontal bottom split | `hsplit` |
@ -268,30 +266,32 @@ Accessed by typing `Space` in [normal mode](#normal-mode).
This layer is a kludge of mappings, mostly pickers.
| Key | Description | Command |
| ----- | ----------- | ------- |
| `f` | Open file picker | `file_picker` |
| `F` | Open file picker at current working directory | `file_picker_in_current_directory` |
| `b` | Open buffer picker | `buffer_picker` |
| `j` | Open jumplist picker | `jumplist_picker` |
| `k` | Show documentation for item under cursor in a [popup](#popup) (**LSP**) | `hover` |
| `s` | Open document symbol picker (**LSP**) | `symbol_picker` |
| `S` | Open workspace symbol picker (**LSP**) | `workspace_symbol_picker` |
| `d` | Open document diagnostics picker (**LSP**) | `diagnostics_picker` |
| `D` | Open workspace diagnostics picker (**LSP**) | `workspace_diagnostics_picker` |
| `r` | Rename symbol (**LSP**) | `rename_symbol` |
| `a` | Apply code action (**LSP**) | `code_action` |
| `'` | Open last fuzzy picker | `last_picker` |
| `w` | Enter [window mode](#window-mode) | N/A |
| `p` | Paste system clipboard after selections | `paste_clipboard_after` |
| `P` | Paste system clipboard before selections | `paste_clipboard_before` |
| `y` | Join and yank selections to clipboard | `yank_joined_to_clipboard` |
| `Y` | Yank main selection to clipboard | `yank_main_selection_to_clipboard` |
| `R` | Replace selections by clipboard contents | `replace_selections_with_clipboard` |
| `/` | Global search in workspace folder | `global_search` |
| `?` | Open command palette | `command_palette` |
| `e` | Open or focus explorer | `toggle_or_focus_explorer` |
| `E` | Reveal current file in explorer | `reveal_current_file` |
| Key | Description | Command |
| --- | ----------------------------------------------------------------------- | ------------------------------------------ |
| `f` | Open file picker | `file_picker` |
| `F` | Open file picker at current working directory | `file_picker_in_current_directory` |
| `b` | Open buffer picker | `buffer_picker` |
| `j` | Open jumplist picker | `jumplist_picker` |
| `g` | Debug (experimental) | N/A |
| `k` | Show documentation for item under cursor in a [popup](#popup) (**LSP**) | `hover` |
| `s` | Open document symbol picker (**LSP**) | `symbol_picker` |
| `S` | Open workspace symbol picker (**LSP**) | `workspace_symbol_picker` |
| `d` | Open document diagnostics picker (**LSP**) | `diagnostics_picker` |
| `D` | Open workspace diagnostics picker (**LSP**) | `workspace_diagnostics_picker` |
| `r` | Rename symbol (**LSP**) | `rename_symbol` |
| `a` | Apply code action (**LSP**) | `code_action` |
| `h` | Select symbol references (**LSP**) | `select_references_to_symbol_under_cursor` |
| `'` | Open last fuzzy picker | `last_picker` |
| `w` | Enter [window mode](#window-mode) | N/A |
| `p` | Paste system clipboard after selections | `paste_clipboard_after` |
| `P` | Paste system clipboard before selections | `paste_clipboard_before` |
| `y` | Join and yank selections to clipboard | `yank_joined_to_clipboard` |
| `Y` | Yank main selection to clipboard | `yank_main_selection_to_clipboard` |
| `R` | Replace selections by clipboard contents | `replace_selections_with_clipboard` |
| `/` | Global search in workspace folder | `global_search` |
| `?` | Open command palette | `command_palette` |
| `e` | Reveal current file in explorer | `reveal_current_file` |
| `E` | Open or focus explorer | `toggle_or_focus_explorer` |
> TIP: Global search displays results in a fuzzy picker, use `Space + '` to bring it back up after opening a file.
@ -300,7 +300,7 @@ This layer is a kludge of mappings, mostly pickers.
Displays documentation for item under cursor.
| Key | Description |
| ---- | ----------- |
| -------- | ----------- |
| `Ctrl-u` | Scroll up |
| `Ctrl-d` | Scroll down |
@ -309,7 +309,7 @@ Displays documentation for item under cursor.
Mappings in the style of [vim-unimpaired](https://github.com/tpope/vim-unimpaired).
| Key | Description | Command |
| ----- | ----------- | ------- |
| -------- | -------------------------------------------- | --------------------- |
| `]d` | Go to next diagnostic (**LSP**) | `goto_next_diag` |
| `[d` | Go to previous diagnostic (**LSP**) | `goto_prev_diag` |
| `]D` | Go to last diagnostic in document (**LSP**) | `goto_last_diag` |
@ -342,33 +342,33 @@ escaping from insert mode to normal mode. For this reason, new users are
strongly encouraged to learn the modal editing paradigm to get the smoothest
experience.
| Key | Description | Command |
| ----- | ----------- | ------- |
| `Escape` | Switch to normal mode | `normal_mode` |
| `Ctrl-s` | Commit undo checkpoint | `commit_undo_checkpoint` |
| `Ctrl-x` | Autocomplete | `completion` |
| `Ctrl-r` | Insert a register content | `insert_register` |
| `Ctrl-w`, `Alt-Backspace` | Delete previous word | `delete_word_backward` |
| `Alt-d`, `Alt-Delete` | Delete next word | `delete_word_forward` |
| `Ctrl-u` | Delete to start of line | `kill_to_line_start` |
| `Ctrl-k` | Delete to end of line | `kill_to_line_end` |
| `Ctrl-h`, `Backspace` | Delete previous char | `delete_char_backward` |
| `Ctrl-d`, `Delete` | Delete next char | `delete_char_forward` |
| `Ctrl-j`, `Enter` | Insert new line | `insert_newline` |
| Key | Description | Command |
| ------------------------- | ------------------------- | ------------------------ |
| `Escape` | Switch to normal mode | `normal_mode` |
| `Ctrl-s` | Commit undo checkpoint | `commit_undo_checkpoint` |
| `Ctrl-x` | Autocomplete | `completion` |
| `Ctrl-r` | Insert a register content | `insert_register` |
| `Ctrl-w`, `Alt-Backspace` | Delete previous word | `delete_word_backward` |
| `Alt-d`, `Alt-Delete` | Delete next word | `delete_word_forward` |
| `Ctrl-u` | Delete to start of line | `kill_to_line_start` |
| `Ctrl-k` | Delete to end of line | `kill_to_line_end` |
| `Ctrl-h`, `Backspace` | Delete previous char | `delete_char_backward` |
| `Ctrl-d`, `Delete` | Delete next char | `delete_char_forward` |
| `Ctrl-j`, `Enter` | Insert new line | `insert_newline` |
These keys are not recommended, but are included for new users less familiar
with modal editors.
| Key | Description | Command |
| ----- | ----------- | ------- |
| `Up` | Move to previous line | `move_line_up` |
| `Down` | Move to next line | `move_line_down` |
| `Left` | Backward a char | `move_char_left` |
| `Right` | Forward a char | `move_char_right` |
| `PageUp` | Move one page up | `page_up` |
| `PageDown` | Move one page down | `page_down` |
| `Home` | Move to line start | `goto_line_start` |
| `End` | Move to line end | `goto_line_end_newline` |
| Key | Description | Command |
| ---------- | --------------------- | ----------------------- |
| `Up` | Move to previous line | `move_line_up` |
| `Down` | Move to next line | `move_line_down` |
| `Left` | Backward a char | `move_char_left` |
| `Right` | Forward a char | `move_char_right` |
| `PageUp` | Move one page up | `page_up` |
| `PageDown` | Move one page down | `page_down` |
| `Home` | Move to line start | `goto_line_start` |
| `End` | Move to line end | `goto_line_end_newline` |
If you want to disable them in insert mode as you become more comfortable with modal editing, you can use
the following in your `config.toml`:
@ -402,47 +402,47 @@ you to selectively add search terms to your selections.
Keys to use within picker. Remapping currently not supported.
| Key | Description |
| ----- | ------------- |
| `Shift-Tab`, `Up`, `Ctrl-p` | Previous entry |
| `Tab`, `Down`, `Ctrl-n` | Next entry |
| `PageUp`, `Ctrl-u` | Page up |
| `PageDown`, `Ctrl-d` | Page down |
| `Home` | Go to first entry |
| `End` | Go to last entry |
| `Enter` | Open selected |
| `Ctrl-s` | Open horizontally |
| `Ctrl-v` | Open vertically |
| `Ctrl-t` | Toggle preview |
| `Escape`, `Ctrl-c` | Close picker |
| Key | Description |
| --------------------------- | ----------------- |
| `Shift-Tab`, `Up`, `Ctrl-p` | Previous entry |
| `Tab`, `Down`, `Ctrl-n` | Next entry |
| `PageUp`, `Ctrl-u` | Page up |
| `PageDown`, `Ctrl-d` | Page down |
| `Home` | Go to first entry |
| `End` | Go to last entry |
| `Enter` | Open selected |
| `Ctrl-s` | Open horizontally |
| `Ctrl-v` | Open vertically |
| `Ctrl-t` | Toggle preview |
| `Escape`, `Ctrl-c` | Close picker |
## Prompt
Keys to use within prompt, Remapping currently not supported.
| Key | Description |
| ----- | ------------- |
| `Escape`, `Ctrl-c` | Close prompt |
| `Alt-b`, `Ctrl-Left` | Backward a word |
| `Ctrl-b`, `Left` | Backward a char |
| `Alt-f`, `Ctrl-Right` | Forward a word |
| `Ctrl-f`, `Right` | Forward a char |
| `Ctrl-e`, `End` | Move prompt end |
| `Ctrl-a`, `Home` | Move prompt start |
| `Ctrl-w`, `Alt-Backspace`, `Ctrl-Backspace` | Delete previous word |
| `Alt-d`, `Alt-Delete`, `Ctrl-Delete` | Delete next word |
| `Ctrl-u` | Delete to start of line |
| `Ctrl-k` | Delete to end of line |
| `Backspace`, `Ctrl-h` | Delete previous char |
| `Delete`, `Ctrl-d` | Delete next char |
| `Ctrl-s` | Insert a word under doc cursor, may be changed to Ctrl-r Ctrl-w later |
| `Ctrl-p`, `Up` | Select previous history |
| `Ctrl-n`, `Down` | Select next history |
| `Ctrl-r` | Insert the content of the register selected by following input char |
| `Tab` | Select next completion item |
| `BackTab` | Select previous completion item |
| `Enter` | Open selected |
| Key | Description |
| ------------------------------------------- | --------------------------------------------------------------------- |
| `Escape`, `Ctrl-c` | Close prompt |
| `Alt-b`, `Ctrl-Left` | Backward a word |
| `Ctrl-b`, `Left` | Backward a char |
| `Alt-f`, `Ctrl-Right` | Forward a word |
| `Ctrl-f`, `Right` | Forward a char |
| `Ctrl-e`, `End` | Move prompt end |
| `Ctrl-a`, `Home` | Move prompt start |
| `Ctrl-w`, `Alt-Backspace`, `Ctrl-Backspace` | Delete previous word |
| `Alt-d`, `Alt-Delete`, `Ctrl-Delete` | Delete next word |
| `Ctrl-u` | Delete to start of line |
| `Ctrl-k` | Delete to end of line |
| `Backspace`, `Ctrl-h` | Delete previous char |
| `Delete`, `Ctrl-d` | Delete next char |
| `Ctrl-s` | Insert a word under doc cursor, may be changed to Ctrl-r Ctrl-w later |
| `Ctrl-p`, `Up` | Select previous history |
| `Ctrl-n`, `Down` | Select next history |
| `Ctrl-r` | Insert the content of the register selected by following input char |
| `Tab` | Select next completion item |
| `BackTab` | Select previous completion item |
| `Enter` | Open selected |
# File explorer
Press `?` to see keymaps. Remapping currently not supported.
Press `?` to see keymaps. Remapping currently not supported.

@ -16,22 +16,6 @@
"type": "github"
}
},
"devshell": {
"flake": false,
"locked": {
"lastModified": 1667210711,
"narHash": "sha256-IoErjXZAkzYWHEpQqwu/DeRNJGFdR7X2OGbkhMqMrpw=",
"owner": "numtide",
"repo": "devshell",
"rev": "96a9dd12b8a447840cc246e17a47b81a4268bba7",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "devshell",
"type": "github"
}
},
"dream2nix": {
"inputs": {
"alejandra": [
@ -42,10 +26,12 @@
],
"crane": "crane",
"devshell": [
"nci"
],
"flake-parts": [
"nci",
"devshell"
"parts"
],
"flake-parts": "flake-parts",
"flake-utils-pre-commit": [
"nci"
],
@ -70,14 +56,17 @@
],
"pre-commit-hooks": [
"nci"
],
"pruned-racket-catalog": [
"nci"
]
},
"locked": {
"lastModified": 1671323629,
"narHash": "sha256-9KHTPjIDjfnzZ4NjpE3gGIVHVHopy6weRDYO/7Y3hF8=",
"lastModified": 1677289985,
"narHash": "sha256-lUp06cTTlWubeBGMZqPl9jODM99LpWMcwxRiscFAUJg=",
"owner": "nix-community",
"repo": "dream2nix",
"rev": "2d7d68505c8619410df2c6b6463985f97cbcba6e",
"rev": "28b973a8d4c30cc1cbb3377ea2023a76bc3fb889",
"type": "github"
},
"original": {
@ -86,24 +75,6 @@
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1668450977,
"narHash": "sha256-cfLhMhnvXn6x1vPm+Jow3RiFAUSCw/l1utktCw5rVA4=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "d591857e9d7dd9ddbfba0ea02b43b927c3c0f1fa",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": {
"locked": {
"lastModified": 1659877975,
@ -119,23 +90,40 @@
"type": "github"
}
},
"mk-naked-shell": {
"flake": false,
"locked": {
"lastModified": 1676572903,
"narHash": "sha256-oQoDHHUTxNVSURfkFcYLuAK+btjs30T4rbEUtCUyKy8=",
"owner": "yusdacra",
"repo": "mk-naked-shell",
"rev": "aeca9f8aa592f5e8f71f407d081cb26fd30c5a57",
"type": "github"
},
"original": {
"owner": "yusdacra",
"repo": "mk-naked-shell",
"type": "github"
}
},
"nci": {
"inputs": {
"devshell": "devshell",
"dream2nix": "dream2nix",
"mk-naked-shell": "mk-naked-shell",
"nixpkgs": [
"nixpkgs"
],
"parts": "parts",
"rust-overlay": [
"rust-overlay"
]
},
"locked": {
"lastModified": 1671430291,
"narHash": "sha256-UIc7H8F3N8rK72J/Vj5YJdV72tvDvYjH+UPsOFvlcsE=",
"lastModified": 1677297103,
"narHash": "sha256-ArlJIbp9NGV9yvhZdV0SOUFfRlI/kHeKoCk30NbSiLc=",
"owner": "yusdacra",
"repo": "nix-cargo-integration",
"rev": "b1b0d38b8c3b0d0e6a38638d5bbe10b0bc67522c",
"rev": "a79272a2cb0942392bb3a5bf9a3ec6bc568795b2",
"type": "github"
},
"original": {
@ -146,11 +134,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1671359686,
"narHash": "sha256-3MpC6yZo+Xn9cPordGz2/ii6IJpP2n8LE8e/ebUXLrs=",
"lastModified": 1677063315,
"narHash": "sha256-qiB4ajTeAOVnVSAwCNEEkoybrAlA+cpeiBxLobHndE8=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "04f574a1c0fde90b51bf68198e2297ca4e7cccf4",
"rev": "988cc958c57ce4350ec248d2d53087777f9e1949",
"type": "github"
},
"original": {
@ -163,11 +151,11 @@
"nixpkgs-lib": {
"locked": {
"dir": "lib",
"lastModified": 1665349835,
"narHash": "sha256-UK4urM3iN80UXQ7EaOappDzcisYIuEURFRoGQ/yPkug=",
"lastModified": 1675183161,
"narHash": "sha256-Zq8sNgAxDckpn7tJo7V1afRSk2eoVbu3OjI1QklGLNg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "34c5293a71ffdb2fe054eb5288adc1882c1eb0b1",
"rev": "e1e1b192c1a5aab2960bf0a0bd53a2e8124fa18e",
"type": "github"
},
"original": {
@ -178,10 +166,50 @@
"type": "github"
}
},
"parts": {
"inputs": {
"nixpkgs-lib": [
"nci",
"nixpkgs"
]
},
"locked": {
"lastModified": 1675933616,
"narHash": "sha256-/rczJkJHtx16IFxMmAWu5nNYcSXNg1YYXTHoGjLrLUA=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "47478a4a003e745402acf63be7f9a092d51b83d7",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"parts_2": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1675933616,
"narHash": "sha256-/rczJkJHtx16IFxMmAWu5nNYcSXNg1YYXTHoGjLrLUA=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "47478a4a003e745402acf63be7f9a092d51b83d7",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"root": {
"inputs": {
"nci": "nci",
"nixpkgs": "nixpkgs",
"parts": "parts_2",
"rust-overlay": "rust-overlay"
}
},
@ -193,11 +221,11 @@
]
},
"locked": {
"lastModified": 1671416426,
"narHash": "sha256-kpSH1Jrxfk2qd0pRPJn1eQdIOseGv5JuE+YaOrqU9s4=",
"lastModified": 1677292251,
"narHash": "sha256-D+6q5Z2MQn3UFJtqsM5/AvVHi3NXKZTIMZt1JGq/spA=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "fbaaff24f375ac25ec64268b0a0d63f91e474b7d",
"rev": "34cdbf6ad480ce13a6a526f57d8b9e609f3d65dc",
"type": "github"
},
"original": {

@ -12,16 +12,10 @@
inputs.nixpkgs.follows = "nixpkgs";
inputs.rust-overlay.follows = "rust-overlay";
};
parts.url = "github:hercules-ci/flake-parts";
};
outputs = {
self,
nixpkgs,
nci,
...
}: let
lib = nixpkgs.lib;
ncl = nci.lib.nci-lib;
outputs = inp: let
mkRootPath = rel:
builtins.path {
path = "${toString ./.}/${rel}";
@ -32,6 +26,12 @@
".envrc"
".ignore"
".github"
".gitignore"
"logo.svg"
"logo_dark.svg"
"logo_light.svg"
"rust-toolchain.toml"
"rustfmt.toml"
"runtime"
"screenshot.png"
"book"
@ -46,6 +46,7 @@
"flake.lock"
];
ignorePaths = path: type: let
inherit (inp.nixpkgs) lib;
# split the nix store path into its components
components = lib.splitString "/" path;
# drop off the `/nix/hash-source` section from the path
@ -61,123 +62,107 @@
# filter out unnecessary paths
filter = ignorePaths;
};
outputs = nci.lib.makeOutputs {
root = ./.;
config = common: {
outputs = {
# rename helix-term to helix since it's our main package
rename = {"helix-term" = "helix";};
# Set default app to hx (binary is from helix-term release build)
# Set default package to helix-term release build
defaults = {
app = "hx";
package = "helix";
};
};
cCompiler.package = with common.pkgs;
if stdenv.isLinux
then gcc
else clang;
shell = {
packages = with common.pkgs;
[lld_13 cargo-flamegraph rust-analyzer]
++ (lib.optional (stdenv.isx86_64 && stdenv.isLinux) cargo-tarpaulin)
++ (lib.optional stdenv.isLinux lldb)
++ (lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.CoreFoundation);
env = [
{
name = "HELIX_RUNTIME";
eval = "$PWD/runtime";
}
{
name = "RUST_BACKTRACE";
value = "1";
}
in
inp.parts.lib.mkFlake {inputs = inp;} {
imports = [inp.nci.flakeModule];
systems = [
"x86_64-linux"
"x86_64-darwin"
"aarch64-linux"
"aarch64-darwin"
"i686-linux"
];
perSystem = {
config,
pkgs,
lib,
...
}: let
makeOverridableHelix = old: config: let
grammars = pkgs.callPackage ./grammars.nix config;
runtimeDir = pkgs.runCommand "helix-runtime" {} ''
mkdir -p $out
ln -s ${mkRootPath "runtime"}/* $out
rm -r $out/grammars
ln -s ${grammars} $out/grammars
'';
helix-wrapped =
pkgs.runCommand
old.name
{
name = "RUSTFLAGS";
eval =
if common.pkgs.stdenv.isLinux
then "$RUSTFLAGS\" -C link-arg=-fuse-ld=lld -C target-cpu=native -Clink-arg=-Wl,--no-rosegment\""
else "$RUSTFLAGS";
inherit (old) pname version;
meta = old.meta or {};
passthru =
(old.passthru or {})
// {
unwrapped = old;
};
nativeBuildInputs = [pkgs.makeWrapper];
makeWrapperArgs = config.makeWrapperArgs or [];
}
];
};
};
pkgConfig = common: {
helix-term = let
# Wrap helix with runtime
wrapper = _: old: let
inherit (common) pkgs;
makeOverridableHelix = old: config: let
grammars = pkgs.callPackage ./grammars.nix config;
runtimeDir = pkgs.runCommand "helix-runtime" {} ''
mkdir -p $out
ln -s ${mkRootPath "runtime"}/* $out
rm -r $out/grammars
ln -s ${grammars} $out/grammars
'';
helix-wrapped =
common.internal.pkgsSet.utils.wrapDerivation old
{
nativeBuildInputs = [pkgs.makeWrapper];
makeWrapperArgs = config.makeWrapperArgs or [];
}
''
rm -rf $out/bin
mkdir -p $out/bin
ln -sf ${old}/bin/* $out/bin/
wrapProgram "$out/bin/hx" ''${makeWrapperArgs[@]} --set HELIX_RUNTIME "${runtimeDir}"
'';
in
helix-wrapped
''
cp -rs --no-preserve=mode,ownership ${old} $out
wrapProgram "$out/bin/hx" ''${makeWrapperArgs[@]} --set HELIX_RUNTIME "${runtimeDir}"
'';
in
helix-wrapped
// {
override = makeOverridableHelix old;
passthru =
helix-wrapped.passthru
// {
override = makeOverridableHelix old;
passthru = helix-wrapped.passthru // {wrapper = wrapper {};};
wrapper = old: makeOverridableHelix old config;
};
in
makeOverridableHelix old {};
in {
inherit wrapper;
overrides.fix-build.overrideAttrs = prev: {
src = filteredSource;
# disable fetching and building of tree-sitter grammars in the helix-term build.rs
HELIX_DISABLE_AUTO_GRAMMAR_BUILD = "1";
buildInputs = ncl.addBuildInputs prev [common.config.cCompiler.package.cc.lib];
# link languages and theme toml files since helix-term expects them (for tests)
preConfigure = ''
${prev.preConfigure or ""}
${
lib.concatMapStringsSep
"\n"
(path: "ln -sf ${mkRootPath path} ..")
["languages.toml" "theme.toml" "base16_theme.toml"]
}
'';
checkPhase = ":";
meta.mainProgram = "hx";
};
stdenv =
if pkgs.stdenv.isLinux
then pkgs.stdenv
else pkgs.clangStdenv;
rustFlagsEnv =
if stdenv.isLinux
then ''$RUSTFLAGS -C link-arg=-fuse-ld=lld -C target-cpu=native -Clink-arg=-Wl,--no-rosegment''
else "$RUSTFLAGS";
in {
# by default NCI adds rust-analyzer component, but helix toolchain doesn't have rust-analyzer
nci.toolchains.shell.components = ["rust-src" "rustfmt" "clippy"];
nci.projects."helix-project".relPath = "";
nci.crates."helix-term" = {
overrides = {
add-meta.override = _: {meta.mainProgram = "hx";};
add-inputs.overrideAttrs = prev: {
buildInputs = (prev.buildInputs or []) ++ [stdenv.cc.cc.lib];
};
disable-grammar-builds = {
# disable fetching and building of tree-sitter grammars in the helix-term build.rs
HELIX_DISABLE_AUTO_GRAMMAR_BUILD = "1";
};
disable-tests = {checkPhase = ":";};
set-stdenv.override = _: {inherit stdenv;};
set-filtered-src.override = _: {src = filteredSource;};
};
};
packages.helix-unwrapped = config.nci.outputs."helix-term".packages.release;
packages.helix-unwrapped-dev = config.nci.outputs."helix-term".packages.dev;
packages.helix = makeOverridableHelix config.packages.helix-unwrapped {};
packages.helix-dev = makeOverridableHelix config.packages.helix-unwrapped-dev {};
packages.default = config.packages.helix;
devShells.default = config.nci.outputs."helix-project".devShell.overrideAttrs (old: {
nativeBuildInputs =
(old.nativeBuildInputs or [])
++ (with pkgs; [lld_13 cargo-flamegraph rust-analyzer])
++ (lib.optional (stdenv.isx86_64 && stdenv.isLinux) pkgs.cargo-tarpaulin)
++ (lib.optional stdenv.isLinux pkgs.lldb)
++ (lib.optional stdenv.isDarwin pkgs.darwin.apple_sdk.frameworks.CoreFoundation);
shellHook = ''
export HELIX_RUNTIME="$PWD/runtime"
export RUST_BACKTRACE="1"
export RUSTFLAGS="${rustFlagsEnv}"
'';
});
};
};
in
outputs
// {
packages =
lib.mapAttrs
(
system: packages:
packages
// {
helix-unwrapped = packages.helix.passthru.unwrapped;
helix-unwrapped-dev = packages.helix-dev.passthru.unwrapped;
}
)
outputs.packages;
};
nixConfig = {
extra-substituters = ["https://helix.cachix.org"];

@ -12,10 +12,6 @@ include = ["src/**/*", "README.md"]
default-run = "hx"
rust-version = "1.57"
[package.metadata.nix]
build = true
app = true
[features]
default = ["git"]
unicode-lines = ["helix-core/unicode-lines"]
@ -79,6 +75,6 @@ helix-loader = { version = "0.6", path = "../helix-loader" }
[dev-dependencies]
smallvec = "1.10"
indoc = "2.0.0"
tempfile = "3.3.0"
tempfile = "3.4.0"
pretty_assertions = "1.3.0"
build-fs-tree = "0.4.1"

@ -25,4 +25,4 @@ log = "0.4"
git = ["git-repository"]
[dev-dependencies]
tempfile = "3.3"
tempfile = "3.4"

@ -52,6 +52,20 @@ args = { attachCommands = [ "platform select remote-gdb-server", "platform conne
name = "rust"
source = { git = "https://github.com/tree-sitter/tree-sitter-rust", rev = "0431a2c60828731f27491ee9fdefe25e250ce9c9" }
[[language]]
name = "sway"
scope = "source.sway"
injection-regex = "sway"
file-types = ["sw"]
language-server = { command = "forc", args = ["lsp"] }
roots = ["Forc.toml", "Forc.lock"]
indent = { tab-width = 4, unit = " " }
comment-token = "//"
[[grammar]]
name = "sway"
source = { git = "https://github.com/FuelLabs/tree-sitter-sway", rev = "e491a005ee1d310f4c138bf215afd44cfebf959c" }
[[language]]
name = "toml"
scope = "source.toml"
@ -1026,7 +1040,7 @@ indent = { tab-width = 2, unit = " " }
[[grammar]]
name = "markdown"
source = { git = "https://github.com/MDeiml/tree-sitter-markdown", rev = "a7de4be29783a6e25f3240c90afea52f2417faa3", subpath = "tree-sitter-markdown" }
source = { git = "https://github.com/MDeiml/tree-sitter-markdown", rev = "7e7aa9a25ca9729db9fe22912f8f47bdb403a979", subpath = "tree-sitter-markdown" }
[[language]]
name = "markdown.inline"
@ -1038,7 +1052,7 @@ grammar = "markdown_inline"
[[grammar]]
name = "markdown_inline"
source = { git = "https://github.com/MDeiml/tree-sitter-markdown", rev = "a7de4be29783a6e25f3240c90afea52f2417faa3", subpath = "tree-sitter-markdown-inline" }
source = { git = "https://github.com/MDeiml/tree-sitter-markdown", rev = "7e7aa9a25ca9729db9fe22912f8f47bdb403a979", subpath = "tree-sitter-markdown-inline" }
[[language]]
name = "dart"
@ -2204,3 +2218,16 @@ comment-token = "#"
[[grammar]]
name = "po"
source = { git = "https://github.com/erasin/tree-sitter-po", rev = "417cee9abb2053ed26b19e7de972398f2da9b29e" }
[[language]]
name = "nasm"
scope = "source.nasm"
file-types = ["asm", "s", "S", "nasm"]
injection-regex = "n?asm"
roots = []
comment-token = ";"
indent = { tab-width = 8, unit = " " }
[[grammar]]
name = "nasm"
source = { git = "https://github.com/naclsn/tree-sitter-nasm", rev = "a0db15db6fcfb1bf2cc8702500e55e558825c48b" }

@ -0,0 +1,63 @@
(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
(tuple_pattern
(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)
)
)
)

@ -1,2 +1,4 @@
((html_tag) @injection.content (#set! injection.language "html") (#set! injection.include-unnamed-children))
((latex_block) @injection.content (#set! injection.language "latex") (#set! injection.include-unnamed-children))

@ -39,7 +39,7 @@
(list_marker_parenthesis)
] @markup.list.numbered
(thematic_break) @punctuation.delimiter
(thematic_break) @punctuation.special
[
(block_continuation)
@ -51,3 +51,9 @@
] @string.escape
(block_quote) @markup.quote
(pipe_table_row
"|" @punctuation.special)
(pipe_table_header
"|" @punctuation.special)
(pipe_table_delimiter_row) @punctuation.special

@ -0,0 +1,126 @@
(comment) @comment
(label) @label
(preproc_expression) @keyword.directive
[
(line_here_token)
(section_here_token)
] @variable.builtin
(unary_expression
operator: _ @operator)
(binary_expression
operator: _ @operator)
(conditional_expression
"?" @operator
":" @operator)
[
":"
","
] @punctuation.delimiter
[
"("
")"
"["
"]"
"{"
"}"
] @punctuation.bracket
(instruction_prefix) @keyword
(actual_instruction
instruction: (word) @function)
(call_syntax_expression
base: (word) @function)
(size_hint) @type
(struc_declaration
name: (word) @type)
(struc_instance
name: (word) @type)
(effective_address
hint: _ @type)
(effective_address
segment: _ @constant.builtin)
(register) @constant.builtin
(number_literal) @constant.numeric.integer
(string_literal) @string
(float_literal) @constant.numeric.float
(packed_bcd_literal) @constant.numeric.integer
((word) @constant
(#match? @constant "^[A-Z_][?A-Z_0-9]+$"))
((word) @constant.builtin
(#match? @constant.builtin "^__\\?[A-Z_a-z0-9]+\\?__$"))
(word) @variable
(preproc_arg) @keyword.directive
[
(preproc_def)
(preproc_function_def)
(preproc_undef)
(preproc_alias)
(preproc_multiline_macro)
(preproc_multiline_unmacro)
(preproc_if)
(preproc_rotate)
(preproc_rep_loop)
(preproc_include)
(preproc_pathsearch)
(preproc_depend)
(preproc_use)
(preproc_push)
(preproc_pop)
(preproc_repl)
(preproc_arg)
(preproc_stacksize)
(preproc_local)
(preproc_reporting)
(preproc_pragma)
(preproc_line)
(preproc_clear)
] @keyword.directive
[
(pseudo_instruction_dx)
(pseudo_instruction_resx)
(pseudo_instruction_incbin_command)
(pseudo_instruction_equ_command)
(pseudo_instruction_times_prefix)
(pseudo_instruction_alignx_macro)
] @function.special
[
(assembl_directive_target)
(assembl_directive_defaults)
(assembl_directive_sections)
(assembl_directive_absolute)
(assembl_directive_symbols)
(assembl_directive_common)
(assembl_directive_symbolfixes)
(assembl_directive_cpu)
(assembl_directive_floathandling)
(assembl_directive_org)
(assembl_directive_sectalign)
(assembl_directive_primitive_target)
(assembl_directive_primitive_defaults)
(assembl_directive_primitive_sections)
(assembl_directive_primitive_absolute)
(assembl_directive_primitive_symbols)
(assembl_directive_primitive_common)
(assembl_directive_primitive_symbolfixes)
(assembl_directive_primitive_cpu)
(assembl_directive_primitive_floathandling)
(assembl_directive_primitive_org)
(assembl_directive_primitive_sectalign)
(assembl_directive_primitive_warning)
(assembl_directive_primitive_map)
] @keyword

@ -0,0 +1,2 @@
((comment) @injection.content
(#set! injection.language "comment"))

@ -0,0 +1,15 @@
(preproc_multiline_macro
body: (body) @function.inside) @function.around
(struc_declaration
body: (struc_declaration_body) @class.inside) @class.around
(struc_instance
body: (struc_instance_body) @class.inside) @class.around
(preproc_function_def_parameters
(word) @parameter.inside)
(call_syntax_arguments
(_) @parameter.inside)
(operand) @parameter.inside
(comment) @comment.inside
(comment)+ @comment.around

@ -0,0 +1,336 @@
; -------
; Tree-Sitter doesn't allow overrides in regards to captures,
; though it is possible to affect the child node of a captured
; node. Thus, the approach here is to flip the order so that
; overrides are unnecessary.
; -------
; -------
; Types
; -------
; ---
; Primitives
; ---
(escape_sequence) @constant.character.escape
(primitive_type) @type.builtin
(boolean_literal) @constant.builtin.boolean
(integer_literal) @constant.numeric.integer
(float_literal) @constant.numeric.float
(char_literal) @constant.character
[
(string_literal)
(raw_string_literal)
] @string
[
(line_comment)
(block_comment)
] @comment
; ---
; Extraneous
; ---
(self) @variable.builtin
(enum_variant (identifier) @type.enum.variant)
(field_initializer
(field_identifier) @variable.other.member)
(shorthand_field_initializer
(identifier) @variable.other.member)
(shorthand_field_identifier) @variable.other.member
(loop_label
"'" @label
(identifier) @label)
; ---
; Punctuation
; ---
[
"::"
"."
";"
","
] @punctuation.delimiter
[
"("
")"
"["
"]"
"{"
"}"
"#"
] @punctuation.bracket
(type_arguments
[
"<"
">"
] @punctuation.bracket)
(type_parameters
[
"<"
">"
] @punctuation.bracket)
(closure_parameters
"|" @punctuation.bracket)
; ---
; Variables
; ---
(let_declaration
pattern: [
((identifier) @variable)
((tuple_pattern
(identifier) @variable))
])
; It needs to be anonymous to not conflict with `call_expression` further below.
(_
value: (field_expression
value: (identifier)? @variable
field: (field_identifier) @variable.other.member))
(parameter
pattern: (identifier) @variable.parameter)
(closure_parameters
(identifier) @variable.parameter)
; -------
; Keywords
; -------
(for_expression
"for" @keyword.control.repeat)
((identifier) @keyword.control
(#match? @keyword.control "^yield$"))
"in" @keyword.control
[
"match"
"if"
"else"
] @keyword.control.conditional
[
"while"
] @keyword.control.repeat
[
"break"
"continue"
"return"
] @keyword.control.return
[
"contract"
"script"
"predicate"
] @keyword.other
"use" @keyword.control.import
(dep_item "dep" @keyword.control.import !body)
(use_as_clause "as" @keyword.control.import)
(type_cast_expression "as" @keyword.operator)
[
"as"
"pub"
"dep"
"abi"
"impl"
"where"
"trait"
"for"
] @keyword
[
"struct"
"enum"
"storage"
"configurable"
] @keyword.storage.type
"let" @keyword.storage
"fn" @keyword.function
"abi" @keyword.function
(mutable_specifier) @keyword.storage.modifier.mut
(reference_type "&" @keyword.storage.modifier.ref)
(self_parameter "&" @keyword.storage.modifier.ref)
[
"const"
"ref"
"deref"
"move"
] @keyword.storage.modifier
; TODO: variable.mut to highlight mutable identifiers via locals.scm
; -------
; Guess Other Types
; -------
((identifier) @constant
(#match? @constant "^[A-Z][A-Z\\d_]*$"))
; ---
; PascalCase identifiers in call_expressions (e.g. `Ok()`)
; are assumed to be enum constructors.
; ---
(call_expression
function: [
((identifier) @type.enum.variant
(#match? @type.enum.variant "^[A-Z]"))
(scoped_identifier
name: ((identifier) @type.enum.variant
(#match? @type.enum.variant "^[A-Z]")))
])
; ---
; Assume that types in match arms are enums and not
; tuple structs. Same for `if let` expressions.
; ---
(match_pattern
(scoped_identifier
name: (identifier) @constructor))
(tuple_struct_pattern
type: [
((identifier) @constructor)
(scoped_identifier
name: (identifier) @constructor)
])
(struct_pattern
type: [
((type_identifier) @constructor)
(scoped_type_identifier
name: (type_identifier) @constructor)
])
; ---
; Other PascalCase identifiers are assumed to be structs.
; ---
((identifier) @type
(#match? @type "^[A-Z]"))
; -------
; Functions
; -------
(call_expression
function: [
((identifier) @function)
(scoped_identifier
name: (identifier) @function)
(field_expression
field: (field_identifier) @function)
])
(generic_function
function: [
((identifier) @function)
(scoped_identifier
name: (identifier) @function)
(field_expression
field: (field_identifier) @function.method)
])
(function_item
name: (identifier) @function)
(function_signature_item
name: (identifier) @function)
; -------
; Operators
; -------
[
"*"
"'"
"->"
"=>"
"<="
"="
"=="
"!"
"!="
"%"
"%="
"&"
"&="
"&&"
"|"
"|="
"||"
"^"
"^="
"*"
"*="
"-"
"-="
"+"
"+="
"/"
"/="
">"
"<"
">="
">>"
"<<"
">>="
"<<="
"@"
".."
"..="
"'"
] @operator
; -------
; Paths
; -------
(use_declaration
argument: (identifier) @namespace)
(use_wildcard
(identifier) @namespace)
(dep_item
name: (identifier) @namespace)
(scoped_use_list
path: (identifier)? @namespace)
(use_list
(identifier) @namespace)
(use_as_clause
path: (identifier)? @namespace
alias: (identifier) @namespace)
; ---
; Remaining Paths
; ---
(scoped_identifier
path: (identifier)? @namespace
name: (identifier) @namespace)
(scoped_type_identifier
path: (identifier) @namespace)
; -------
; Remaining Identifiers
; -------
"?" @special
(type_identifier) @type
(identifier) @variable
(field_identifier) @variable.other.member

@ -0,0 +1,71 @@
[
(use_list)
(block)
(match_block)
(arguments)
(parameters)
(declaration_list)
(field_declaration_list)
(field_initializer_list)
(struct_pattern)
(tuple_pattern)
(unit_expression)
(enum_variant_list)
(call_expression)
(binary_expression)
(field_expression)
(tuple_expression)
(array_expression)
(where_clause)
(token_tree)
] @indent
[
"}"
"]"
")"
] @outdent
; Indent the right side of assignments.
; The #not-same-line? predicate is required to prevent an extra indent for e.g.
; an else-clause where the previous if-clause starts on the same line as the assignment.
(assignment_expression
.
(_) @expr-start
right: (_) @indent
(#not-same-line? @indent @expr-start)
(#set! "scope" "all")
)
(compound_assignment_expr
.
(_) @expr-start
right: (_) @indent
(#not-same-line? @indent @expr-start)
(#set! "scope" "all")
)
(let_declaration
.
(_) @expr-start
value: (_) @indent
alternative: (_)? @indent
(#not-same-line? @indent @expr-start)
(#set! "scope" "all")
)
(if_expression
.
(_) @expr-start
condition: (_) @indent
(#not-same-line? @indent @expr-start)
(#set! "scope" "all")
)
; Some field expressions where the left part is a multiline expression are not
; indented by cargo fmt.
; Because this multiline expression might be nested in an arbitrary number of
; field expressions, this can only be matched using a Regex.
(field_expression
value: (_) @val
"." @outdent
(#match? @val "(\\A[^\\n\\r]+\\([\\t ]*(\\n|\\r).*)|(\\A[^\\n\\r]*\\{[\\t ]*(\\n|\\r))")
)

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

@ -0,0 +1,17 @@
; Scopes
[
(function_item)
(closure_expression)
(block)
] @local.scope
; Definitions
(parameter
(identifier) @local.definition)
(closure_parameters (identifier) @local.definition)
; References
(identifier) @local.reference

@ -0,0 +1,52 @@
(function_item
body: (_) @function.inside) @function.around(closure_expression body: (_) @function.inside) @function.around
(struct_item
body: (_) @class.inside) @class.around
(enum_item
body: (_) @class.inside) @class.around
(trait_item
body: (_) @class.inside) @class.around
(impl_item
body: (_) @class.inside) @class.around
(parameters
((_) @parameter.inside . ","? @parameter.around) @parameter.around)
(type_parameters
((_) @parameter.inside . ","? @parameter.around) @parameter.around)
(type_arguments
((_) @parameter.inside . ","? @parameter.around) @parameter.around)
(closure_parameters
((_) @parameter.inside . ","? @parameter.around) @parameter.around)
(arguments
((_) @parameter.inside . ","? @parameter.around) @parameter.around)
[
(line_comment)
(block_comment)
] @comment.inside
(line_comment)+ @comment.around
(block_comment) @comment.around
(; #[test]
(attribute_item
(attribute
(identifier) @_test_attribute))
; allow other attributes like #[should_panic] and comments
[
(attribute_item)
(line_comment)
]*
; the test function
(function_item
body: (_) @test.inside) @test.around
(#eq? @_test_attribute "test"))

@ -0,0 +1,169 @@
# Author: Mofiqul Islam <mofi0islam@gmail.com>
"attribute" = "orange_4"
"type" = "teal_2"
"type.builtin" = "teal_2"
"constructor" = "blue_2"
"constant" = "violet_2"
"constant.builtin" = { fg = "violet_2", modifiers = ["bold"] }
"constant.character" = "teal_3"
"constant.numeric" = { fg = "teal_3", modifiers = ["bold"] }
"constant.character.escape" = "violet_2"
"string" = "teal_2"
"string.regexp" = "purple_2"
"string.special" = "blue_2"
"comment" = "dark_2"
"variable" = "light_4"
"variable.parameter" = "orange_2"
"variable.builtin" = "orange_2"
"variable.other" = "teal_2"
"variable.other.member" = "teal_2"
"label" = "purple_2"
"punctuation" = "light_4"
"punctuation.delimiter" = "light_4"
"punctuation.bracket" = "light_4"
"punctuation.special" = "red_3"
"keyword" = { fg = "orange_2", modifiers = ["bold"] }
"keyword.control" = { fg = "orange_2", modifiers = ["bold"] }
"keyword.operator" = "purple_2"
"keyword.directive" = { fg = "orange_2", modifiers = ["bold"] }
"keyword.function" = "orange_2"
"keyword.storage" = { fg = "orange_2", modifiers = ["bold"] }
"operator" = "purple_2"
"function" = "blue_2"
"function.builtin" = "blue_2"
"function.macro" = { fg = "blue_2", modifiers = ["bold"] }
"function.special" = { fg = "blue_2", modifiers = ["bold"] }
"tag" = "teal_2"
"namespace" = "orange_2"
"markup" = "light_4"
"markup.heading" = { fg = "teal_2", modifiers = ["bold"] }
"markup.list" = { fg = "orange_2", modifiers = ["bold"] }
"markup.bold" = { fg = "light_4", modifiers = ["bold"] }
"markup.italic" = { fg = "light_4", modifiers = ["italic"] }
"markup.link" = { fg = "blue_3", modifiers = ["underlined"] }
"markup.quote" = { fg = "light_3", modifiers = ["italic"] }
"diff.plus" = "teal_3"
"diff.minus" = "red_1"
"diff.delta" = "orange_3"
"diff.delta.moved" = "orange_2"
"ui.background" = { fg = "light_4", bg = "libadwaita_dark" }
"ui.background.separator" = { fg = "split_and_borders", bg = "libadwaita_dark" }
"ui.cursor" = { fg = "libadwaita_dark", bg = "light_5" }
"ui.cursor.insert" = { fg = "libadwaita_dark", bg = "light_5" }
"ui.cursor.select" = { fg = "libadwaita_dark", bg = "light_5" }
"ui.cursor.match" = { fg = "libadwaita_dark", bg = "blue_2" }
"ui.cursor.primary" = { fg = "libadwaita_dark", bg = "light_7" }
"ui.linenr" = "dark_2"
"ui.linenr.selected" = { fg = "light_7", bg = "libadwaita_dark_alt", modifiers = [
"bold",
] }
"ui.statusline" = { fg = "light_4", bg = "libadwaita_dark_alt" }
"ui.statusline.inactive" = { fg = "light_4", bg = "libadwaita_dark_alt" }
"ui.statusline.insert" = { fg = "light_4", bg = "teal_4" }
"ui.statusline.select" = { fg = "light_4", bg = "blue_4" }
"ui.popup" = { bg = "libadwaita_popup" }
"ui.window" = "split_and_borders"
"ui.help" = { bg = "libadwaita_dark_alt" }
"ui.text" = "light_4"
"ui.virtual" = "dark_1"
"ui.menu" = { fg = "light_4", bg = "libadwaita_popup" }
"ui.menu.selected" = { fg = "light_4", bg = "blue_5" }
"ui.menu.scroll" = { fg = "light_7", bg = "dark_3" }
"ui.selection" = { bg = "blue_7" }
"ui.selection.primary" = { bg = "blue_7" }
"ui.cursorline.primary" = { bg = "libadwaita_dark_alt" }
"warning" = "yellow_2"
"error" = "red_4"
"info" = "purple_2"
"hint" = "blue_2"
"diagnostic.hint" = { fg = "blue_2", modifiers = ["dim"] }
"diagnostic.info" = { fg = "purple_2", modifiers = ["dim"] }
"diagnostic.error" = { fg = "red_4", modifiers = ["underlined"] }
"diagnostic.warning" = { fg = "yellow_2", modifiers = ["underlined"] }
[palette]
blue_1 = "#99C1F1"
blue_2 = "#62A0EA"
blue_3 = "#3584E4"
blue_4 = "#1C71D8"
blue_5 = "#1A5FB4"
blue_6 = "#1B497E"
blue_7 = "#193D66"
brown_1 = "#CDAB8F"
brown_2 = "#B5835A"
brown_3 = "#986A44"
brown_4 = "#865E3C"
brown_5 = "#63452C"
chameleon_3 = "#4E9A06"
dark_1 = "#77767B"
dark_2 = "#5E5C64"
dark_3 = "#504E55"
dark_4 = "#3D3846"
dark_5 = "#241F31"
dark_6 = "#000000"
dark_7 = "#1c1c1c"
green_1 = "#8FF0A4"
green_2 = "#57E389"
green_3 = "#33D17A"
green_4 = "#2EC27E"
green_5 = "#26A269"
green_6 = "#1F7F56"
green_7 = "#1C6849"
libadwaita_dark = "#1D1D1D"
libadwaita_dark_alt = "#303030"
libadwaita_popup = "#282828"
light_1 = "#FFFFFF"
light_2 = "#FCFCFC"
light_3 = "#F6F5F4"
light_4 = "#DEDDDA"
light_5 = "#C0BFBC"
light_6 = "#B0AFAC"
light_7 = "#9A9996"
orange_1 = "#FFBE6F"
orange_2 = "#FFA348"
orange_3 = "#FF7800"
orange_4 = "#E66100"
orange_5 = "#C64600"
purple_1 = "#DC8ADD"
purple_2 = "#C061CB"
purple_3 = "#9141AC"
purple_4 = "#813D9C"
purple_5 = "#613583"
red_1 = "#F66151"
red_2 = "#ED333B"
red_3 = "#E01B24"
red_4 = "#C01C28"
red_5 = "#A51D2D"
teal_1 = "#93DDC2"
teal_2 = "#5BC8AF"
teal_3 = "#33B2A4"
teal_4 = "#26A1A2"
teal_5 = "#218787"
violet_2 = "#7D8AC7"
violet_3 = "#6362C8"
violet_4 = "#4E57BA"
yellow_1 = "#F9F06B"
yellow_2 = "#F8E45C"
yellow_3 = "#F6D32D"
yellow_4 = "#F5C211"
yellow_5 = "#E5A50A"
yellow_6 = "#D38B09"
split_and_borders = "#4F4F4F"

@ -103,10 +103,10 @@
"ui.menu" = { fg = "overlay2", bg = "surface0" }
"ui.menu.selected" = { fg = "text", bg = "surface1", modifiers = ["bold"] }
"diagnostic.error" = { fg = "red", underline = { color = "red", style = "curl" } }
"diagnostic.warning" = { fg = "yellow", underline = { color = "yellow", style = "curl" } }
"diagnostic.info" = { fg = "sky", underline = { color = "sky", style = "curl" } }
"diagnostic.hint" = { fg = "teal", underline = { color = "teal", style = "curl" } }
"diagnostic.error" = { underline = { color = "red", style = "curl" } }
"diagnostic.warning" = { underline = { color = "yellow", style = "curl" } }
"diagnostic.info" = { underline = { color = "sky", style = "curl" } }
"diagnostic.hint" = { underline = { color = "teal", style = "curl" } }
error = "red"
warning = "yellow"

@ -0,0 +1,114 @@
# Author: Isotoxal <isotoxal@proton.me>
"attribute" = { fg = "blue" }
"comment" = { fg = "comment", modifiers = ["italic"] }
"constant" = { fg = "cyan" }
"constant.builtin.boolean" = { fg = "cyan" }
"constant.character" = { fg = "blue" }
"constant.numeric.float" = { fg = "black-light" }
"constant.builtin" = { fg = "blue" }
"constant.numeric" = { fg = "yellow" }
"constructor" = { fg = "blue" }
"function" = { fg = "red" }
"function.builtin" = { fg = "cyan-light" }
"function.macro" = { fg = "green" }
"function.method" = { fg = "blue-light" }
"keyword" = { fg = "blue" }
"keyword.function" = { fg = "blue" }
"keyword.operator" = { fg = "blue-light" }
"keyword.control.conditional" = { fg = "red" }
"keyword.control.import" = { fg = "red-light" }
"keyword.control.return" = { fg = "blue" }
"keyword.control.repeat" = { fg = "yellow-light" }
"keyword.control.exception" = { fg = "black-light" }
"label" = { fg = "blue" }
"namespace" = { fg = "red-light" }
"operator" = { fg = "white" }
#"parameter.reference" = { fg = "red-light" }
#"property" = { fg = "red" }
"punctuation.bracket" = { fg = "white" }
"punctuation.delimiter" = { fg = "white" }
"punctuation.special" = { fg = "white" }
"string" = { fg = "green" }
"string.escape" = { fg = "blue" }
"string.regex" = { fg = "green" }
"string.special" = { fg = "blue" }
"string.special.symbol" = { fg = "red" }
"tag" = { fg = "blue" }
"type" = { fg = "yellow" }
"type.builtin" = { fg = "yellow" }
"variable" = { fg = "white" }
"variable.builtin" = { fg = "blue" }
"variable.parameter" = { fg = "red" }
"variable.other.member" = { fg = "red" }
"diff.plus" = { fg = "blue" }
"diff.delta" = { fg = "magenta" }
"diff.minus" = { fg = "red" }
"ui.background" = { fg = "foreground", bg = "background" }
"ui.cursor" = { modifiers = ["reversed"] }
"ui.cursorline.primary" = { bg = "cursorline" }
"ui.help" = { fg = "foreground", bg = "contrast" }
"ui.linenr" = { fg = "comment" }
"ui.linenr.selected" = { fg = "foreground" }
"ui.menu" = { fg = "foreground", bg = "contrast" }
"ui.menu.selected" = { bg = "black" }
"ui.popup" = { fg = "foreground", bg = "contrast" }
"ui.selection" = { bg = "black" }
"ui.selection.primary" = { bg = "black" }
"ui.statusline" = { fg = "foreground", bg = "background" }
"ui.statusline.inactive" = { fg = "foreground", bg = "background" }
"ui.statusline.normal" = { fg = "white", bg = "background" }
"ui.statusline.insert" = { fg = "blue", bg = "background" }
"ui.statusline.select" = { fg = "cyan", bg = "magenta" }
"ui.text" = { fg = "foreground" }
"ui.text.focus" = { fg = "blue" }
"ui.virtual.ruler" = { bg = "cursorline" }
"ui.virtual.whitespace" = { fg = "comment" }
"ui.virtual.wrap" = { fg = "comment" }
"ui.virtual.indent-guide" = { fg = "comment" }
"ui.window" = { fg = "black" }
"error" = { fg = "red" }
"hint" = { fg = "green" }
"warning" = { fg = "yellow" }
"info" = { fg = "blue" }
"diagnostic.error" = { underline = { style = "curl", color = "red" } }
"diagnostic.warning" = { underline = { style = "curl", color = "yellow" } }
"diagnostic.info" = { underline = { style = "curl", color = "blue" } }
"diagnostic.hint" = { underline = { style = "curl", color = "green" } }
"special" = { fg = "red-light" }
"markup.heading" = { fg = "blue", modifiers = ["bold"] }
"markup.list" = { fg = "cyan" }
"markup.bold" = { fg = "magenta", modifiers = ["bold"] }
"markup.italic" = { fg = "yellow", modifiers = ["italic"] }
"markup.strikethrough" = { modifiers = ["crossed_out"] }
"markup.link.url" = { fg = "green" }
"markup.link.text" = { fg = "black-light" }
"markup.quote" = { fg = "yellow", modifiers = ["italic"] }
"markup.raw" = { fg = "cyan" }
[palette]
black = "#232a2d"
red = "#e57474"
green = "#8ccf7e"
yellow = "#e5c76b"
blue = "#67b0e8"
magenta = "#c47fd5"
cyan = "#6cbfbf"
white = "#b3b9b8"
black-light = "#2d3437"
red-light = "#ef7e7e"
green-light = "#96d988"
yellow-light = "#f4d67a"
blue-light = "#71baf2"
magenta-light = "#ce89df"
cyan-light = "#67cbe7"
white-light = "#bdc3c2"
comment = "#404749"
contrast = "#161d1f"
background = "#141b1e"
foreground = "#dadada"
cursorline = "#2c3333"

@ -14,9 +14,8 @@
"ui.linenr" = { fg = "sumiInk4" }
"ui.linenr.selected" = { fg = "roninYellow" }
"ui.virtual" = "sumiInk4"
"ui.virtual.ruler" = { bg = "sumiInk2" }
"ui.virtual.whitespace" = "waveBlue1"
"ui.virtual.indent-guide" = "sumiInk4"
"ui.statusline" = { fg = "oldWhite", bg = "sumiInk0" }
"ui.statusline.inactive" = { fg = "fujiGray", bg = "sumiInk0" }
@ -24,8 +23,9 @@
"ui.statusline.insert" = { fg = "sumiInk0", bg = "autumnGreen", modifiers = ["bold"] }
"ui.statusline.select" = { fg = "sumiInk0", bg = "oniViolet", modifiers = ["bold"] }
"ui.bufferline" = { fg = "oldWhite", bg = "sumiInk0" }
"ui.bufferline.inactive" = { fg = "fujiGray", bg = "sumiInk0" }
"ui.bufferline" = { fg = "fujiGray", bg = "sumiInk0" }
"ui.bufferline.active" = { fg = "oldWhite", bg = "sumiInk0" }
"ui.bufferline.background" = { bg = "sumiInk0" }
"ui.popup" = { fg = "fujiWhite", bg = "sumiInk0" }
"ui.window" = { fg = "sumiInk0" }
@ -33,14 +33,16 @@
"ui.text" = "fujiWhite"
"ui.text.focus" = { fg = "fujiWhite", bg = "waveBlue1", modifiers = ["bold"] }
"ui.cursor" = { fg = "waveBlue1", bg = "fujiWhite"}
"ui.cursor.primary" = { fg = "waveBlue1", bg = "seaFoam" }
"ui.cursor.match" = { fg = "seaFoam", modifiers = ["bold"] }
"ui.cursor" = { fg = "waveBlue1", bg = "waveAqua2"}
"ui.cursor.primary" = { fg = "waveBlue1", bg = "fujiWhite" }
"ui.cursor.match" = { fg = "waveRed", modifiers = ["bold"] }
"ui.highlight" = { fg = "fujiWhite", bg = "waveBlue2" }
"ui.menu" = { fg = "fujiWhite", bg = "sumiInk0" }
"ui.menu.selected" = { fg = "fujiWhite", bg = "waveBlue1", modifiers = ["bold"] }
"ui.menu" = { fg = "fujiWhite", bg = "waveBlue1" }
"ui.menu.selected" = { fg = "fujiWhite", bg = "waveBlue2", modifiers = ["bold"] }
"ui.menu.scroll" = { fg = "oldWhite", bg = "waveBlue1" }
"ui.cursorline.primary" = { bg = "sumiInk3"}
"ui.cursorcolumn.primary" = { bg = "sumiInk3" }
"diagnostic.error" = { underline = { color = "samuraiRed", style = "curl" } }
"diagnostic.warning" = { underline = { color = "roninYellow", style = "curl" } }
@ -58,12 +60,16 @@ hint = "dragonBlue"
"diff.delta" = "autumnYellow"
## Syntax highlighting
"attribute" = "waveRed"
"type" = "waveAqua2"
"constructor" = "springBlue"
"constant" = "surimiOrange"
"constant.numeric" = "sakuraPink"
"constant.character.escape" = "springBlue"
"string" = "springGreen"
"string.regexp" = "boatYellow2"
"string.special.url" = "springBlue"
"string.special.symbol" = "oniViolet"
"comment" = "fujiGray"
"variable" = "fujiWhite"
"variable.builtin" = "waveRed"
@ -71,37 +77,36 @@ hint = "dragonBlue"
"variable.other.member" = "carpYellow"
"label" = "springBlue"
"punctuation" = "springViolet2"
"punctuation.delimiter" = "springViolet2"
"punctuation.bracket" = "springViolet2"
"keyword" = "oniViolet"
"keyword.control.return" = "peachRed"
"keyword.control.exception" = "peachRed"
"keyword.directive" = "peachRed"
"operator" = "boatYellow2"
"function" = "crystalBlue"
"function.builtin" = "peachRed"
"function.builtin" = "springBlue"
"function.macro" = "waveRed"
"tag" = "springBlue"
"tag" = "waveAqua2"
"namespace" = "surimiOrange"
"attribute" = "peachRed"
"constructor" = "springBlue"
"module" = "waveAqua2"
"special" = "peachRed"
## Markup modifiers
"markup.heading.marker" = "fujiGray"
"markup.heading.marker" = "springViolet2"
"markup.heading.1" = { fg = "surimiOrange", modifiers = ["bold"] }
"markup.heading.2" = { fg = "carpYellow", modifiers = ["bold"] }
"markup.heading.3" = { fg = "waveAqua2", modifiers = ["bold"] }
"markup.heading.4" = { fg = "springGreen", modifiers = ["bold"] }
"markup.heading.5" = { fg = "waveRed", modifiers = ["bold"] }
"markup.heading.6" = { fg = "autumnRed", modifiers = ["bold"] }
"markup.list" = "oniViolet"
"markup.heading.4" = { fg = "lightBlue", modifiers = ["bold"] }
"markup.heading.5" = { fg = "oniViolet", modifiers = ["bold"] }
"markup.heading.6" = { fg = "springViolet1", modifiers = ["bold"] }
"markup.list.numbered" = "sakuraPink"
"markup.list.unnumbered" = "waveRed"
"markup.bold" = { modifiers = ["bold"] }
"markup.italic" = { modifiers = ["italic"] }
"markup.strikethrough" = { modifiers = ["crossed_out"] }
"markup.link.url" = { fg = "springBlue", modifiers = ["underlined"] }
"markup.link.text" = "crystalBlue"
"markup.quote" = "seaFoam"
"markup.raw" = "seaFoam"
"markup.link.url" = { fg = "springBlue", underline.style = "line" }
"markup.link.label" = "surimiOrange"
"markup.quote" = "springViolet1"
"markup.raw" = "springGreen"
[palette]
seaFoam = "#C7CCD1" # custom lighter foreground

Loading…
Cancel
Save