From 466e69bbb91f179a63888dcf349a1fee8ec2d35e Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 27 Sep 2021 23:10:00 +0000
Subject: [PATCH 01/10] build(deps): bump tokio from 1.11.0 to 1.12.0

Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.11.0 to 1.12.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.11.0...tokio-1.12.0)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
---
 Cargo.lock           | 4 ++--
 helix-lsp/Cargo.toml | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock
index 2f586cb1..dbf1de4c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1057,9 +1057,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
 
 [[package]]
 name = "tokio"
-version = "1.11.0"
+version = "1.12.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b4efe6fc2395938c8155973d7be49fe8d03a843726e285e100a8a383cc0154ce"
+checksum = "c2c2416fdedca8443ae44b4527de1ea633af61d8f7169ffa6e72c5b53d24efcc"
 dependencies = [
  "autocfg",
  "bytes",
diff --git a/helix-lsp/Cargo.toml b/helix-lsp/Cargo.toml
index d3252af8..2fd77e43 100644
--- a/helix-lsp/Cargo.toml
+++ b/helix-lsp/Cargo.toml
@@ -23,5 +23,5 @@ lsp-types = { version = "0.89", features = ["proposed"] }
 serde = { version = "1.0", features = ["derive"] }
 serde_json = "1.0"
 thiserror = "1.0"
-tokio = { version = "1.11", features = ["rt", "rt-multi-thread", "io-util", "io-std", "time", "process", "macros", "fs", "parking_lot"] }
+tokio = { version = "1.12", features = ["rt", "rt-multi-thread", "io-util", "io-std", "time", "process", "macros", "fs", "parking_lot"] }
 tokio-stream = "0.1.7"

From d68cff837fff02decbefa3d62f7570c02042a9bc Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 27 Sep 2021 23:10:10 +0000
Subject: [PATCH 02/10] build(deps): bump lsp-types from 0.89.2 to 0.90.0

Bumps [lsp-types](https://github.com/gluon-lang/lsp-types) from 0.89.2 to 0.90.0.
- [Release notes](https://github.com/gluon-lang/lsp-types/releases)
- [Changelog](https://github.com/gluon-lang/lsp-types/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gluon-lang/lsp-types/compare/v0.89.2...v0.90.0)

---
updated-dependencies:
- dependency-name: lsp-types
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
---
 Cargo.lock           | 4 ++--
 helix-lsp/Cargo.toml | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock
index dbf1de4c..7d16883e 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -582,9 +582,9 @@ dependencies = [
 
 [[package]]
 name = "lsp-types"
-version = "0.89.2"
+version = "0.90.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "852e0dedfd52cc32325598b2631e0eba31b7b708959676a9f837042f276b09a2"
+checksum = "a7404037aab080771c90b0a499836d9d8a10336ecd07badf969567b65c6d51a1"
 dependencies = [
  "bitflags",
  "serde",
diff --git a/helix-lsp/Cargo.toml b/helix-lsp/Cargo.toml
index 2fd77e43..b4c8c139 100644
--- a/helix-lsp/Cargo.toml
+++ b/helix-lsp/Cargo.toml
@@ -19,7 +19,7 @@ futures-executor = "0.3"
 futures-util = { version = "0.3", features = ["std", "async-await"], default-features = false }
 jsonrpc-core = { version = "18.0", default-features = false } # don't pull in all of futures
 log = "0.4"
-lsp-types = { version = "0.89", features = ["proposed"] }
+lsp-types = { version = "0.90", features = ["proposed"] }
 serde = { version = "1.0", features = ["derive"] }
 serde_json = "1.0"
 thiserror = "1.0"

From e47632114a92dbabc2f9d41bedb455e13996924e Mon Sep 17 00:00:00 2001
From: Omnikar <omkar.subramaniam@icloud.com>
Date: Wed, 29 Sep 2021 08:07:16 -0400
Subject: [PATCH 03/10] Fix swapped selection rotation docs in `keymap.md`
 (#792)

---
 book/src/keymap.md | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/book/src/keymap.md b/book/src/keymap.md
index 78bac0cf..156b1d99 100644
--- a/book/src/keymap.md
+++ b/book/src/keymap.md
@@ -88,10 +88,10 @@
 | `,`      | Keep only the primary selection                                   | `keep_primary_selection`             |
 | `C`      | Copy selection onto the next line                                 | `copy_selection_on_next_line`        |
 | `Alt-C`  | Copy selection onto the previous line                             | `copy_selection_on_prev_line`        |
-| `(`      | Rotate main selection forward                                     | `rotate_selections_backward`         |
-| `)`      | Rotate main selection backward                                    | `rotate_selections_forward`          |
-| `Alt-(`  | Rotate selection contents forward                                 | `rotate_selection_contents_backward` |
-| `Alt-)`  | Rotate selection contents backward                                | `rotate_selection_contents_forward`  |
+| `(`      | 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`                        |
 | `X`      | Extend selection to line bounds (line-wise selection)             | `extend_to_line_bounds`              |

From 4a92a79da44997acf3f289d530069da7f7e6dbb1 Mon Sep 17 00:00:00 2001
From: Dylan Richardson <Dylan@Neatmaps.com>
Date: Sat, 2 Oct 2021 18:41:52 -0500
Subject: [PATCH 04/10] global search: show file names as relative paths (#802)

This commit fixes #786
---
 helix-term/src/commands.rs | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index 26f599bd..35f28212 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -1291,6 +1291,7 @@ fn global_search(cx: &mut Context) {
 
     cx.push_layer(Box::new(prompt));
 
+    let root = find_root(None).unwrap_or_else(|| PathBuf::from("./"));
     let show_picker = async move {
         let all_matches: Vec<(usize, PathBuf)> =
             UnboundedReceiverStream::new(all_matches_rx).collect().await;
@@ -1302,7 +1303,13 @@ fn global_search(cx: &mut Context) {
                 }
                 let picker = FilePicker::new(
                     all_matches,
-                    move |(_line_num, path)| path.to_str().unwrap().into(),
+                    move |(_line_num, path)| {
+                        path.strip_prefix(&root)
+                            .unwrap_or(path)
+                            .to_str()
+                            .unwrap()
+                            .into()
+                    },
                     move |editor: &mut Editor, (line_num, path), action| {
                         match editor.open(path.into(), action) {
                             Ok(_) => {}

From 0af8928d630ada730402ad182e8d36a5db06a142 Mon Sep 17 00:00:00 2001
From: Ray Gervais <raygervais@hotmail.ca>
Date: Sat, 2 Oct 2021 21:13:53 -0400
Subject: [PATCH 05/10] adds: nord colortheme (#799)

---
 runtime/themes/nord.toml | 84 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 84 insertions(+)
 create mode 100644 runtime/themes/nord.toml

diff --git a/runtime/themes/nord.toml b/runtime/themes/nord.toml
new file mode 100644
index 00000000..c6a0e172
--- /dev/null
+++ b/runtime/themes/nord.toml
@@ -0,0 +1,84 @@
+# Author : RayGervais<raygervais@hotmail.ca>
+
+# "ui.linenr.selected" = { fg = "#d8dee9" }
+# "ui.text.focus" = { fg = "#e5ded6", modifiers= ["bold"] }
+# "ui.menu.selected" = { fg = "#e5ded6", bg = "#313f4e" }
+
+# "info" = "#b48ead"
+# "hint" = "#a3be8c"
+
+# Polar Night
+# nord0 - background color
+"ui.background" = { bg = "#2e3440" }
+"ui.statusline.inactive" = { fg = "#d8dEE9", bg = "#2e3440" }
+
+
+# nord1 - status bars, panels, modals, autocompletion
+"ui.statusline" = { fg = "#88c0d0", bg = "#3b4252" }
+"ui.popup" = { bg = "#232d38" }
+"ui.window" = { bg = "#232d38" }
+"ui.help" = { bg = "#232d38", fg = "#e5ded6" }
+
+# nord2 - active line, highlighting
+"ui.selection" = { bg = "#434c5e" }
+"ui.cursor.match" = { bg = "434c5e" }
+
+# nord3 - comments
+"comment" = "#4c566a"
+"ui.linenr" = { fg = "#4c566a" }
+
+# Snow Storm
+# nord4 - cursor, variables, constants, attributes, fields
+"ui.cursor.primary" = { fg = "#d8dee9", modifiers = ["reversed"] }
+"attribute" = "#d8dee9"
+"variable"  = "#d8dee9"
+"constant"  = "#d8dee9"
+"variable.builtin" = "#d8dee9"
+"constant.builtin" = "#d8dee9"
+"namespace" = "#d8dee9"
+
+# nord5 - suble UI text
+
+# nord6 - base text, punctuation
+"ui.text" = { fg = "#eceff4" }
+"punctuation" = "#eceff4"
+
+# Frost
+# nord7 - classes, types, primiatives
+"type" = "#8fbcbb"
+"type.builtin" = { fg = "#8fbcbb"}
+"label" = "#8fbcbb"
+
+# nord8 - declaration, methods, routines
+"constructor" = "#88c0d0"
+"function" = "#88c0d0"
+"function.macro" = { fg = "#88c0d0" }
+"function.builtin" = { fg = "#88c0d0" }
+
+# nord9 - operator, tags, units, punctuations
+"punctuation.delimiter" = "#81a1c1"
+"operator" = { fg = "#81a1c1" }
+"property" = "#81a1c1"
+
+# nord10 - keywords, special
+"keyword" = { fg = "#5e81ac" }
+"keyword.directive" = "#5e81ac"
+"variable.parameter" = "#5e81ac"
+
+# Aurora
+# nord11 - error
+"error" = "#bf616a"
+
+# nord12 - annotations, decorators
+"special" = "#d08770"
+"module" = "#d08770"
+
+# nord13 - warnings, escape characters, regex
+"warning" = "#ebcb8b"
+"escape" = { fg = "#ebcb8b" }
+
+# nord14 - strings
+"string" = "#a3be8c"
+
+# nord15 - integer, floating point
+"number" = "#b48ead"

From 7e958e1834f555724bb73db0091d66365abd63a3 Mon Sep 17 00:00:00 2001
From: Irevoire <irevoire@protonmail.ch>
Date: Sun, 3 Oct 2021 04:41:41 +0200
Subject: [PATCH 06/10] Add a bunch of aliases (#797)

* add a bunch of aliases

* apply code review from archseer
---
 helix-term/src/commands.rs | 91 ++++++++++++++++++--------------------
 1 file changed, 44 insertions(+), 47 deletions(-)

diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index 35f28212..673d06af 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -1492,7 +1492,7 @@ mod cmd {
     #[derive(Clone)]
     pub struct TypableCommand {
         pub name: &'static str,
-        pub alias: Option<&'static str>,
+        pub aliases: &'static [&'static str],
         pub doc: &'static str,
         // params, flags, helper, completer
         pub fun: fn(&mut compositor::Context, &[&str], PromptEvent) -> anyhow::Result<()>,
@@ -2092,252 +2092,252 @@ mod cmd {
     pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
         TypableCommand {
             name: "quit",
-            alias: Some("q"),
+            aliases: &["q"],
             doc: "Close the current view.",
             fun: quit,
             completer: None,
         },
         TypableCommand {
             name: "quit!",
-            alias: Some("q!"),
+            aliases: &["q!"],
             doc: "Close the current view.",
             fun: force_quit,
             completer: None,
         },
         TypableCommand {
             name: "open",
-            alias: Some("o"),
+            aliases: &["o"],
             doc: "Open a file from disk into the current view.",
             fun: open,
             completer: Some(completers::filename),
         },
         TypableCommand {
             name: "write",
-            alias: Some("w"),
+            aliases: &["w"],
             doc: "Write changes to disk. Accepts an optional path (:write some/path.txt)",
             fun: write,
             completer: Some(completers::filename),
         },
         TypableCommand {
             name: "new",
-            alias: Some("n"),
+            aliases: &["n"],
             doc: "Create a new scratch buffer.",
             fun: new_file,
             completer: Some(completers::filename),
         },
         TypableCommand {
             name: "format",
-            alias: Some("fmt"),
+            aliases: &["fmt"],
             doc: "Format the file using a formatter.",
             fun: format,
             completer: None,
         },
         TypableCommand {
             name: "indent-style",
-            alias: None,
+            aliases: &[],
             doc: "Set the indentation style for editing. ('t' for tabs or 1-8 for number of spaces.)",
             fun: set_indent_style,
             completer: None,
         },
         TypableCommand {
             name: "line-ending",
-            alias: None,
+            aliases: &[],
             doc: "Set the document's default line ending. Options: crlf, lf, cr, ff, nel.",
             fun: set_line_ending,
             completer: None,
         },
         TypableCommand {
             name: "earlier",
-            alias: Some("ear"),
+            aliases: &["ear"],
             doc: "Jump back to an earlier point in edit history. Accepts a number of steps or a time span.",
             fun: earlier,
             completer: None,
         },
         TypableCommand {
             name: "later",
-            alias: Some("lat"),
+            aliases: &["lat"],
             doc: "Jump to a later point in edit history. Accepts a number of steps or a time span.",
             fun: later,
             completer: None,
         },
         TypableCommand {
             name: "write-quit",
-            alias: Some("wq"),
+            aliases: &["wq", "x"],
             doc: "Writes changes to disk and closes the current view. Accepts an optional path (:wq some/path.txt)",
             fun: write_quit,
             completer: Some(completers::filename),
         },
         TypableCommand {
             name: "write-quit!",
-            alias: Some("wq!"),
+            aliases: &["wq!", "x!"],
             doc: "Writes changes to disk and closes the current view forcefully. Accepts an optional path (:wq! some/path.txt)",
             fun: force_write_quit,
             completer: Some(completers::filename),
         },
         TypableCommand {
             name: "write-all",
-            alias: Some("wa"),
+            aliases: &["wa"],
             doc: "Writes changes from all views to disk.",
             fun: write_all,
             completer: None,
         },
         TypableCommand {
             name: "write-quit-all",
-            alias: Some("wqa"),
+            aliases: &["wqa", "xa"],
             doc: "Writes changes from all views to disk and close all views.",
             fun: write_all_quit,
             completer: None,
         },
         TypableCommand {
             name: "write-quit-all!",
-            alias: Some("wqa!"),
+            aliases: &["wqa!", "xa!"],
             doc: "Writes changes from all views to disk and close all views forcefully (ignoring unsaved changes).",
             fun: force_write_all_quit,
             completer: None,
         },
         TypableCommand {
             name: "quit-all",
-            alias: Some("qa"),
+            aliases: &["qa"],
             doc: "Close all views.",
             fun: quit_all,
             completer: None,
         },
         TypableCommand {
             name: "quit-all!",
-            alias: Some("qa!"),
+            aliases: &["qa!"],
             doc: "Close all views forcefully (ignoring unsaved changes).",
             fun: force_quit_all,
             completer: None,
         },
         TypableCommand {
             name: "theme",
-            alias: None,
+            aliases: &[],
             doc: "Change the theme of current view. Requires theme name as argument (:theme <name>)",
             fun: theme,
             completer: Some(completers::theme),
         },
         TypableCommand {
             name: "clipboard-yank",
-            alias: None,
+            aliases: &[],
             doc: "Yank main selection into system clipboard.",
             fun: yank_main_selection_to_clipboard,
             completer: None,
         },
         TypableCommand {
             name: "clipboard-yank-join",
-            alias: None,
+            aliases: &[],
             doc: "Yank joined selections into system clipboard. A separator can be provided as first argument. Default value is newline.", // FIXME: current UI can't display long doc.
             fun: yank_joined_to_clipboard,
             completer: None,
         },
         TypableCommand {
             name: "primary-clipboard-yank",
-            alias: None,
+            aliases: &[],
             doc: "Yank main selection into system primary clipboard.",
             fun: yank_main_selection_to_primary_clipboard,
             completer: None,
         },
         TypableCommand {
             name: "primary-clipboard-yank-join",
-            alias: None,
+            aliases: &[],
             doc: "Yank joined selections into system primary clipboard. A separator can be provided as first argument. Default value is newline.", // FIXME: current UI can't display long doc.
             fun: yank_joined_to_primary_clipboard,
             completer: None,
         },
         TypableCommand {
             name: "clipboard-paste-after",
-            alias: None,
+            aliases: &[],
             doc: "Paste system clipboard after selections.",
             fun: paste_clipboard_after,
             completer: None,
         },
         TypableCommand {
             name: "clipboard-paste-before",
-            alias: None,
+            aliases: &[],
             doc: "Paste system clipboard before selections.",
             fun: paste_clipboard_before,
             completer: None,
         },
         TypableCommand {
             name: "clipboard-paste-replace",
-            alias: None,
+            aliases: &[],
             doc: "Replace selections with content of system clipboard.",
             fun: replace_selections_with_clipboard,
             completer: None,
         },
         TypableCommand {
             name: "primary-clipboard-paste-after",
-            alias: None,
+            aliases: &[],
             doc: "Paste primary clipboard after selections.",
             fun: paste_primary_clipboard_after,
             completer: None,
         },
         TypableCommand {
             name: "primary-clipboard-paste-before",
-            alias: None,
+            aliases: &[],
             doc: "Paste primary clipboard before selections.",
             fun: paste_primary_clipboard_before,
             completer: None,
         },
         TypableCommand {
             name: "primary-clipboard-paste-replace",
-            alias: None,
+            aliases: &[],
             doc: "Replace selections with content of system primary clipboard.",
             fun: replace_selections_with_primary_clipboard,
             completer: None,
         },
         TypableCommand {
             name: "show-clipboard-provider",
-            alias: None,
+            aliases: &[],
             doc: "Show clipboard provider name in status bar.",
             fun: show_clipboard_provider,
             completer: None,
         },
         TypableCommand {
             name: "change-current-directory",
-            alias: Some("cd"),
+            aliases: &["cd"],
             doc: "Change the current working directory (:cd <dir>).",
             fun: change_current_directory,
             completer: Some(completers::directory),
         },
         TypableCommand {
             name: "show-directory",
-            alias: Some("pwd"),
+            aliases: &["pwd"],
             doc: "Show the current working directory.",
             fun: show_current_directory,
             completer: None,
         },
         TypableCommand {
             name: "encoding",
-            alias: None,
+            aliases: &[],
             doc: "Set encoding based on `https://encoding.spec.whatwg.org`",
             fun: set_encoding,
             completer: None,
         },
         TypableCommand {
             name: "reload",
-            alias: None,
+            aliases: &[],
             doc: "Discard changes and reload from the source file.",
             fun: reload,
             completer: None,
         },
         TypableCommand {
             name: "tree-sitter-scopes",
-            alias: None,
+            aliases: &[],
             doc: "Display tree sitter scopes, primarily for theming and development.",
             fun: tree_sitter_scopes,
             completer: None,
         },
         TypableCommand {
             name: "vsplit",
-            alias: Some("vs"),
+            aliases: &["vs"],
             doc: "Open the file in a vertical split.",
             fun: vsplit,
             completer: Some(completers::filename),
         },
         TypableCommand {
             name: "hsplit",
-            alias: Some("sp"),
+            aliases: &["hs", "sp"],
             doc: "Open the file in a horizontal split.",
             fun: hsplit,
             completer: Some(completers::filename),
@@ -2345,16 +2345,13 @@ mod cmd {
     ];
 
     pub static COMMANDS: Lazy<HashMap<&'static str, &'static TypableCommand>> = Lazy::new(|| {
-        let mut map = HashMap::new();
-
-        for cmd in TYPABLE_COMMAND_LIST {
-            map.insert(cmd.name, cmd);
-            if let Some(alias) = cmd.alias {
-                map.insert(alias, cmd);
-            }
-        }
-
-        map
+        TYPABLE_COMMAND_LIST
+            .into_iter()
+            .flat_map(|cmd| {
+                std::iter::once((cmd.name, cmd))
+                    .chain(cmd.aliases.into_iter().map(move |&alias| (alias, cmd)))
+            })
+            .collect()
     });
 }
 

From c4ae17dfd4d2c0eba2d3f7a6011a9b7c33bff114 Mon Sep 17 00:00:00 2001
From: Irevoire <tamo@meilisearch.com>
Date: Sun, 3 Oct 2021 05:40:33 +0200
Subject: [PATCH 07/10] fix clippy warnings (#804)

---
 helix-term/src/commands.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index 673d06af..ec76c81d 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -2346,10 +2346,10 @@ mod cmd {
 
     pub static COMMANDS: Lazy<HashMap<&'static str, &'static TypableCommand>> = Lazy::new(|| {
         TYPABLE_COMMAND_LIST
-            .into_iter()
+            .iter()
             .flat_map(|cmd| {
                 std::iter::once((cmd.name, cmd))
-                    .chain(cmd.aliases.into_iter().map(move |&alias| (alias, cmd)))
+                    .chain(cmd.aliases.iter().map(move |&alias| (alias, cmd)))
             })
             .collect()
     });

From 0e06c10d8cb45f698bacc7b212b8c5d1ab200700 Mon Sep 17 00:00:00 2001
From: voroskoi <60064214+voroskoi@users.noreply.github.com>
Date: Tue, 5 Oct 2021 05:18:15 +0200
Subject: [PATCH 08/10] Zig tree-sitter rework (#811)

- update tree-sitter-zig subproject
- use highlights.scm from upstream, just use helix scopes
- update indents.toml, this one actually works
---
 helix-syntax/languages/tree-sitter-zig |   2 +-
 runtime/queries/zig/highlights.scm     | 211 +++++++++++++++----------
 runtime/queries/zig/indents.toml       |   9 +-
 3 files changed, 130 insertions(+), 92 deletions(-)

diff --git a/helix-syntax/languages/tree-sitter-zig b/helix-syntax/languages/tree-sitter-zig
index 049162be..1f27fd1d 160000
--- a/helix-syntax/languages/tree-sitter-zig
+++ b/helix-syntax/languages/tree-sitter-zig
@@ -1 +1 @@
-Subproject commit 049162bea8a44e1a4acd01b06e1c8672d9231a86
+Subproject commit 1f27fd1dfe7f352408f01b4894c7825f3a1d6c47
diff --git a/runtime/queries/zig/highlights.scm b/runtime/queries/zig/highlights.scm
index 5a3d62dc..404a8682 100644
--- a/runtime/queries/zig/highlights.scm
+++ b/runtime/queries/zig/highlights.scm
@@ -4,82 +4,89 @@
   (line_comment)
 ] @comment
 
-; field in top level decl, and in struct, union...
-(ContainerField
-  (IDENTIFIER) @property
-  (SuffixExpr (IDENTIFIER) @type)?
-)
+[
+  variable: (IDENTIFIER)
+  variable_type_function: (IDENTIFIER)
+] @variable
 
-; error.OutOfMemory;
-(SuffixExpr
-  "error"
-  "."
-  (IDENTIFIER) @constant
-)
+parameter: (IDENTIFIER) @variable.parameter
 
-; var x: IDENTIFIER
-type: (SuffixExpr (IDENTIFIER) @type)
+[
+  field_member: (IDENTIFIER)
+  field_access: (IDENTIFIER)
+] @variable.property
 
-; IDENTIFIER{}
-constructor: (SuffixExpr (IDENTIFIER) @constructor)
-
-; fields
-(FieldInit (IDENTIFIER) @property)
-
-; foo.bar.baz.function() calls
+;; assume TitleCase is a type
 (
-  (SuffixOp
-    (IDENTIFIER) @function
-  )
-  .
-  (FnCallArguments)
-)
-
-; function() calls
-(
-  (
-    (IDENTIFIER) @function
-  )
-  .
-  (FnCallArguments)
-)
-
-; functionn decl
-(FnProto
-  (IDENTIFIER) @function
-  (SuffixExpr (IDENTIFIER) @type)?
-  ("!")? @function.macro
-)
-
-; function parameters and types
-(ParamDecl
-  (IDENTIFIER) @variable.parameter
-  ":"
   [
-    (ParamType (SuffixExpr (IDENTIFIER) @type))
-    (ParamType)
-  ]
+    variable_type_function: (IDENTIFIER)
+    field_access: (IDENTIFIER)
+    parameter: (IDENTIFIER)
+  ] @type
+  (#match? @type "^[A-Z]([a-z]+[A-Za-z0-9]*)*$")
+)
+;; assume camelCase is a function
+(
+  [
+    variable_type_function: (IDENTIFIER)
+    field_access: (IDENTIFIER)
+    parameter: (IDENTIFIER)
+  ] @function
+  (#match? @function "^[a-z]+([A-Z][a-z0-9]*)+$")
 )
 
-; switch
-(SwitchItem
-  (SuffixExpr
-    "."
-    .
-    (IDENTIFIER) @constant
-  )
+;; assume all CAPS_1 is a constant
+(
+  [
+    variable_type_function: (IDENTIFIER)
+    field_access: (IDENTIFIER)
+  ] @constant
+  (#match? @constant "^[A-Z][A-Z_0-9]+$")
 )
 
+[
+  function_call: (IDENTIFIER)
+  function: (IDENTIFIER)
+] @function
+
+exception: "!" @function.macro
+
+(
+  (IDENTIFIER) @variable.builtin
+  (#eq? @variable.builtin "_")
+)
+
+(PtrTypeStart "c" @variable.builtin)
+
+(
+  (ContainerDeclType
+    [
+      (ErrorUnionExpr)
+      "enum"
+    ]
+  )
+  (ContainerField (IDENTIFIER) @constant)
+)
+
+field_constant: (IDENTIFIER) @constant
+
+(BUILTINIDENTIFIER) @function.builtin
+
+((BUILTINIDENTIFIER) @keyword.control.import
+  (#any-of? @keyword.control.import "@import" "@cImport"))
+
 (INTEGER) @number
 
 (FLOAT) @number
 
 [
-  (STRINGLITERAL)
+  (LINESTRING)
   (STRINGLITERALSINGLE)
 ] @string
 
-(CHAR_LITERAL) @string
+(CHAR_LITERAL) @constant.character
+(EscapeSequence) @escape
+(FormatSequence) @string.special
 
 [
   "allowzero"
@@ -95,6 +102,9 @@ constructor: (SuffixExpr (IDENTIFIER) @constructor)
 [
   "true"
   "false"
+] @constant.builtin.boolean
+
+[
   "undefined"
   "unreachable"
   "null"
@@ -104,21 +114,18 @@ constructor: (SuffixExpr (IDENTIFIER) @constructor)
   "else"
   "if"
   "switch"
+] @keyword.control.conditional
+
+[
   "for"
   "while"
-  "return"
-  "break"
-  "continue"
-  "defer"
-  "errdefer"
-  "async"
-  "nosuspend"
-  "await"
-  "suspend"
-  "resume"
-  "try"
-  "catch"
-] @keyword.control
+] @keyword.control.repeat
+
+[
+  "or"
+  "and"
+  "orelse"
+] @operator
 
 [
   "struct"
@@ -127,21 +134,48 @@ constructor: (SuffixExpr (IDENTIFIER) @constructor)
   "error"
   "packed"
   "opaque"
-  "test"
-  "usingnamespace"
-  "export"
-  "extern"
-  "const"
-  "var"
-  "comptime"
-  "threadlocal"
 ] @keyword
 
 [
-  "pub"
+  "try"
+  "error"
+  "catch"
+] @function.macro
+
+; VarDecl
+[
+  "comptime"
+  "threadlocal"
   "fn"
 ] @keyword.function
 
+[
+  "const"
+  "var"
+  "test"
+  "pub"
+  "usingnamespace"
+] @keyword
+
+[
+  "return"
+  "break"
+  "continue"
+] @keyword.control
+
+; Macro
+[
+  "defer"
+  "errdefer"
+  "async"
+  "nosuspend"
+  "await"
+  "suspend"
+  "resume"
+  "export"
+  "extern"
+] @function.macro
+
 ; PrecProc
 [
   "inline"
@@ -149,10 +183,9 @@ constructor: (SuffixExpr (IDENTIFIER) @constructor)
   "asm"
   "callconv"
   "noalias"
-] @attribute
+] @keyword.directive
 
 [
-  (BUILTINIDENTIFIER)
   "linksection"
   "align"
 ] @function.builtin
@@ -164,9 +197,6 @@ constructor: (SuffixExpr (IDENTIFIER) @constructor)
   (AdditionOp)
   (MultiplyOp)
   (PrefixOp)
-  "or"
-  "and"
-  "orelse"
   "*"
   "**"
   "->"
@@ -174,6 +204,7 @@ constructor: (SuffixExpr (IDENTIFIER) @constructor)
   ".?"
   ".*"
   "="
+  "?"
 ] @operator
 
 [
@@ -186,6 +217,9 @@ constructor: (SuffixExpr (IDENTIFIER) @constructor)
 [
   ".."
   "..."
+] @punctuation.special
+
+[
   "["
   "]"
   "("
@@ -195,4 +229,7 @@ constructor: (SuffixExpr (IDENTIFIER) @constructor)
   (Payload "|")
   (PtrPayload "|")
   (PtrIndexPayload "|")
-] @punctuation
+] @punctuation.bracket
+
+; Error
+(ERROR) @keyword
diff --git a/runtime/queries/zig/indents.toml b/runtime/queries/zig/indents.toml
index e119078b..88f88e16 100644
--- a/runtime/queries/zig/indents.toml
+++ b/runtime/queries/zig/indents.toml
@@ -1,8 +1,9 @@
 indent = [
- "block",
- "match_block",
- "arguments",
- "parameters"
+ "Block",
+ "BlockExpr",
+ "ContainerDecl",
+ "SwitchExpr",
+ "InitList"
 ]
 
 outdent = [

From 97b24fd91e5496800b10824ebb3c2383b8c29886 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 5 Oct 2021 12:18:25 +0900
Subject: [PATCH 09/10] build(deps): bump similar from 2.0.0 to 2.1.0 (#812)

Bumps [similar](https://github.com/mitsuhiko/similar) from 2.0.0 to 2.1.0.
- [Release notes](https://github.com/mitsuhiko/similar/releases)
- [Changelog](https://github.com/mitsuhiko/similar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mitsuhiko/similar/compare/2.0.0...2.1.0)

---
updated-dependencies:
- dependency-name: similar
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
 Cargo.lock            | 4 ++--
 helix-core/Cargo.toml | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock
index 7d16883e..320670fe 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -949,9 +949,9 @@ dependencies = [
 
 [[package]]
 name = "similar"
-version = "2.0.0"
+version = "2.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6bf11003835e462f07851028082d2a1c89d956180ce4b4b50e07fb085ec4131a"
+checksum = "2e24979f63a11545f5f2c60141afe249d4f19f84581ea2138065e400941d83d3"
 
 [[package]]
 name = "slab"
diff --git a/helix-core/Cargo.toml b/helix-core/Cargo.toml
index 2b963676..ba6bea6a 100644
--- a/helix-core/Cargo.toml
+++ b/helix-core/Cargo.toml
@@ -30,7 +30,7 @@ regex = "1"
 serde = { version = "1.0", features = ["derive"] }
 toml = "0.5"
 
-similar = "2.0"
+similar = "2.1"
 
 etcetera = "0.3"
 

From 8925fdd6f3afa3532c928a5c6e1357bc15201d8a Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 5 Oct 2021 12:18:37 +0900
Subject: [PATCH 10/10] build(deps): bump smallvec from 1.6.1 to 1.7.0 (#813)

Bumps [smallvec](https://github.com/servo/rust-smallvec) from 1.6.1 to 1.7.0.
- [Release notes](https://github.com/servo/rust-smallvec/releases)
- [Commits](https://github.com/servo/rust-smallvec/compare/v1.6.1...v1.7.0)

---
updated-dependencies:
- dependency-name: smallvec
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
 Cargo.lock            | 4 ++--
 helix-core/Cargo.toml | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock
index 320670fe..a3f7ff8f 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -970,9 +970,9 @@ dependencies = [
 
 [[package]]
 name = "smallvec"
-version = "1.6.1"
+version = "1.7.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e"
+checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309"
 
 [[package]]
 name = "str-buf"
diff --git a/helix-core/Cargo.toml b/helix-core/Cargo.toml
index ba6bea6a..34cbba9f 100644
--- a/helix-core/Cargo.toml
+++ b/helix-core/Cargo.toml
@@ -16,7 +16,7 @@ include = ["src/**/*", "README.md"]
 helix-syntax = { version = "0.4", path = "../helix-syntax" }
 
 ropey = "1.3"
-smallvec = "1.4"
+smallvec = "1.7"
 tendril = "0.4.2"
 unicode-segmentation = "1.8"
 unicode-width = "0.1"