Merge branch 'master'

change-detection
trivernis 2 years ago
commit 1e1967308d
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -1,3 +1,3 @@
[toolchain]
channel = "1.59.0"
channel = "1.61.0"
components = ["rustfmt", "rust-src"]

35
Cargo.lock generated

@ -485,7 +485,6 @@ dependencies = [
"log",
"once_cell",
"pulldown-cmark",
"retain_mut",
"serde",
"serde_json",
"signal-hook",
@ -731,9 +730,9 @@ dependencies = [
[[package]]
name = "once_cell"
version = "1.14.0"
version = "1.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2f7254b99e31cad77da24b08ebf628882739a608578bb1bcdfc1f9c21260d7c0"
checksum = "e82dad04139b71a90c080c8463fe0dc7902db5192d939bd0950f074d014339e1"
[[package]]
name = "parking_lot"
@ -884,12 +883,6 @@ dependencies = [
"winapi",
]
[[package]]
name = "retain_mut"
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4389f1d5789befaf6029ebd9f7dac4af7f7e3d61b69d4f30e2ac02b57e7712b0"
[[package]]
name = "ropey"
version = "1.5.0"
@ -923,18 +916,18 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
[[package]]
name = "serde"
version = "1.0.144"
version = "1.0.145"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f747710de3dcd43b88c9168773254e809d8ddbdf9653b84e2554ab219f17860"
checksum = "728eb6351430bccb993660dfffc5a72f91ccc1295abaa8ce19b27ebe4f75568b"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.144"
version = "1.0.145"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94ed3a816fb1d101812f83e789f888322c34e291f894f19590dc310963e87a00"
checksum = "81fa1584d3d1bcacd84c277a0dfe21f5b0f6accf4a23d04d4c6d61f1af522b4c"
dependencies = [
"proc-macro2",
"quote",
@ -1118,18 +1111,18 @@ dependencies = [
[[package]]
name = "thiserror"
version = "1.0.35"
version = "1.0.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c53f98874615aea268107765aa1ed8f6116782501d18e53d08b471733bea6c85"
checksum = "0a99cb8c4b9a8ef0e7907cd3b617cc8dc04d571c4e73c8ae403d80ac160bb122"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "1.0.35"
version = "1.0.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8b463991b4eab2d801e724172285ec4195c650e8ec79b149e6c2a8e6dd3f783"
checksum = "3a891860d3c8d66fec8e73ddb3765f90082374dbaaa833407b904a94f1a7eb43"
dependencies = [
"proc-macro2",
"quote",
@ -1203,9 +1196,9 @@ dependencies = [
[[package]]
name = "tokio-stream"
version = "0.1.9"
version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df54d54117d6fdc4e4fea40fe1e4e566b3505700e148a6827e59b34b0d2600d9"
checksum = "f6edf2d6bc038a43d31353570e27270603f4648d18f5ed10c0e179abe43255af"
dependencies = [
"futures-core",
"pin-project-lite",
@ -1248,9 +1241,9 @@ checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992"
[[package]]
name = "unicode-general-category"
version = "0.5.1"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1218098468b8085b19a2824104c70d976491d247ce194bbd9dc77181150cdfd6"
checksum = "2281c8c1d221438e373249e065ca4989c4c36952c211ff21a0ee91c44a3869e7"
[[package]]
name = "unicode-ident"

@ -383,9 +383,9 @@ Keys to use within picker. Remapping currently not supported.
| Key | Description |
| ----- | ------------- |
| `Tab`, `Up`, `Ctrl-p` | Previous entry |
| `Shift-Tab`, `Up`, `Ctrl-p` | Previous entry |
| `Tab`, `Down`, `Ctrl-n` | Next entry |
| `PageUp`, `Ctrl-u` | Page up |
| `Shift-tab`, `Down`, `Ctrl-n`| Next entry |
| `PageDown`, `Ctrl-d` | Page down |
| `Home` | Go to first entry |
| `End` | Go to last entry |

@ -61,6 +61,7 @@ These configuration keys are available:
| `config` | Language Server configuration |
| `grammar` | The tree-sitter grammar to use (defaults to the value of `name`) |
| `formatter` | The formatter for the language, it will take precedence over the lsp when defined. The formatter must be able to take the original file as input from stdin and write the formatted file to stdout |
| `max-line-length` | Maximum line length. Used for the `:reflow` command |
### Language Server configuration

@ -37,6 +37,12 @@ contributors are strongly encouraged to write integration tests for their code.
Existing tests can be used as examples. Helpers can be found in
[helpers.rs][helpers.rs]
## Minimum Stable Rust Version (MSRV) Policy
Helix follows the MSRV of Firefox.
The current MSRV and future changes to the MSRV are listed in the [Firefox documentation].
[Firefox documentation]: https://firefox-source-docs.mozilla.org/writing-rust-code/update-policy.html
[good-first-issue]: https://github.com/helix-editor/helix/labels/E-easy
[log-file]: https://github.com/helix-editor/helix/wiki/FAQ#access-the-log-file
[architecture.md]: ./architecture.md

@ -2,7 +2,7 @@
stdenv,
lib,
runCommandLocal,
runCommandNoCC,
runCommand,
yj,
includeGrammarIf ? _: true,
...
@ -115,7 +115,7 @@
builtins.map (grammar: "ln -s ${grammar.artifact}/${grammar.name}.so $out/${grammar.name}.so")
builtGrammars;
in
runCommandNoCC "consolidated-helix-grammars" {} ''
runCommand "consolidated-helix-grammars" {} ''
mkdir -p $out
${builtins.concatStringsSep "\n" grammarLinks}
''

@ -22,11 +22,11 @@ smallvec = "1.9"
smartstring = "1.0.1"
unicode-segmentation = "1.10"
unicode-width = "0.1"
unicode-general-category = "0.5"
unicode-general-category = "0.6"
# slab = "0.4.2"
slotmap = "1.0"
tree-sitter = "0.20"
once_cell = "1.14"
once_cell = "1.15"
arc-swap = "1"
regex = "1"

@ -46,10 +46,42 @@ pub fn find_first_non_whitespace_char(line: RopeSlice) -> Option<usize> {
/// * Git repository root if no marker detected
/// * Top-most folder containing a root marker if not git repository detected
/// * Current working directory as fallback
pub fn find_root(root: Option<&str>, root_markers: &[String]) -> Option<std::path::PathBuf> {
helix_loader::find_root_impl(root, root_markers)
.first()
.cloned()
pub fn find_root(root: Option<&str>, root_markers: &[String]) -> std::path::PathBuf {
let current_dir = std::env::current_dir().expect("unable to determine current directory");
let root = match root {
Some(root) => {
let root = std::path::Path::new(root);
if root.is_absolute() {
root.to_path_buf()
} else {
current_dir.join(root)
}
}
None => current_dir.clone(),
};
let mut top_marker = None;
for ancestor in root.ancestors() {
if root_markers
.iter()
.any(|marker| ancestor.join(marker).exists())
{
top_marker = Some(ancestor);
}
if ancestor.join(".git").is_dir() {
// Top marker is repo root if not root marker was detected yet
if top_marker.is_none() {
top_marker = Some(ancestor);
}
// Don't go higher than repo if we're in one
break;
}
}
// Return the found top marker or the current_dir as fallback
top_marker.map_or(current_dir, |a| a.to_path_buf())
}
pub use ropey::{str_utils, Rope, RopeBuilder, RopeSlice};

@ -19,7 +19,7 @@ serde = { version = "1.0", features = ["derive"] }
toml = "0.5"
etcetera = "0.4"
tree-sitter = "0.20"
once_cell = "1.14"
once_cell = "1.15"
log = "0.4"
# TODO: these two should be on !wasm32 only

@ -59,7 +59,7 @@ pub fn config_dir() -> PathBuf {
}
pub fn local_config_dirs() -> Vec<PathBuf> {
let directories = find_root_impl(None, &[".helix".to_string()])
let directories = find_local_config_dirs()
.into_iter()
.map(|path| path.join(".helix"))
.collect();
@ -90,32 +90,16 @@ pub fn log_file() -> PathBuf {
cache_dir().join("helix.log")
}
pub fn find_root_impl(root: Option<&str>, root_markers: &[String]) -> Vec<PathBuf> {
pub fn find_local_config_dirs() -> Vec<PathBuf> {
let current_dir = std::env::current_dir().expect("unable to determine current directory");
let mut directories = Vec::new();
let root = match root {
Some(root) => {
let root = std::path::Path::new(root);
if root.is_absolute() {
root.to_path_buf()
} else {
current_dir.join(root)
}
}
None => current_dir,
};
for ancestor in root.ancestors() {
// don't go higher than repo
for ancestor in current_dir.ancestors() {
if ancestor.join(".git").is_dir() {
// Use workspace if detected from marker
directories.push(ancestor.to_path_buf());
// Don't go higher than repo if we're in one
break;
} else if root_markers
.iter()
.any(|marker| ancestor.join(marker).exists())
{
} else if ancestor.join(".helix").is_dir() {
directories.push(ancestor.to_path_buf());
}
}

@ -23,5 +23,5 @@ serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
thiserror = "1.0"
tokio = { version = "1.21", features = ["rt", "rt-multi-thread", "io-util", "io-std", "time", "process", "macros", "fs", "parking_lot", "sync"] }
tokio-stream = "0.1.9"
tokio-stream = "0.1.10"
which = "4.2"

@ -34,7 +34,7 @@ pub struct Client {
pub(crate) capabilities: OnceCell<lsp::ServerCapabilities>,
offset_encoding: OffsetEncoding,
config: Option<Value>,
root_path: Option<std::path::PathBuf>,
root_path: std::path::PathBuf,
root_uri: Option<lsp::Url>,
workspace_folders: Vec<lsp::WorkspaceFolder>,
req_timeout: u64,
@ -74,9 +74,7 @@ impl Client {
let root_path = find_root(None, root_markers);
let root_uri = root_path
.clone()
.and_then(|root| lsp::Url::from_file_path(root).ok());
let root_uri = lsp::Url::from_file_path(root_path.clone()).ok();
// TODO: support multiple workspace folders
let workspace_folders = root_uri
@ -281,10 +279,7 @@ impl Client {
workspace_folders: Some(self.workspace_folders.clone()),
// root_path is obsolete, but some clients like pyright still use it so we specify both.
// clients will prefer _uri if possible
root_path: self
.root_path
.clone()
.and_then(|path| path.to_str().map(|path| path.to_owned())),
root_path: self.root_path.to_str().map(|path| path.to_owned()),
root_uri: self.root_uri.clone(),
initialization_options: self.config.clone(),
capabilities: lsp::ClientCapabilities {

@ -32,7 +32,7 @@ helix-dap = { version = "0.6", path = "../helix-dap" }
helix-loader = { version = "0.6", path = "../helix-loader" }
anyhow = "1"
once_cell = "1.14"
once_cell = "1.15"
which = "4.2"
@ -67,9 +67,6 @@ serde = { version = "1.0", features = ["derive"] }
grep-regex = "0.1.10"
grep-searcher = "0.1.10"
# Remove once retain_mut lands in stable rust
retain_mut = "0.1.7"
[target.'cfg(not(windows))'.dependencies] # https://github.com/vorner/signal-hook/issues/100
signal-hook-tokio = { version = "0.3", features = ["futures-v0_3"] }

@ -1764,6 +1764,8 @@ fn search_selection(cx: &mut Context) {
.selection(view.id)
.iter()
.map(|selection| regex::escape(&selection.fragment(contents)))
.collect::<HashSet<_>>() // Collect into hashset to deduplicate identical regexes
.into_iter()
.collect::<Vec<_>>()
.join("|");
@ -2227,8 +2229,9 @@ fn append_mode(cx: &mut Context) {
}
fn file_picker(cx: &mut Context) {
// We don't specify language markers, root will be the root of the current git repo
let root = find_root(None, &[]).unwrap_or_else(|| PathBuf::from("./"));
// We don't specify language markers, root will be the root of the current
// git repo or the current dir if we're not in a repo
let root = find_root(None, &[]);
let picker = ui::file_picker(root, &cx.editor.config());
cx.push_layer(Box::new(overlayed(picker)));
}

@ -144,14 +144,70 @@ impl DerefMut for KeyTrieNode {
}
}
#[derive(Debug, Clone, PartialEq, Deserialize)]
#[serde(untagged)]
#[derive(Debug, Clone, PartialEq)]
pub enum KeyTrie {
Leaf(MappableCommand),
Sequence(Vec<MappableCommand>),
Node(KeyTrieNode),
}
impl<'de> Deserialize<'de> for KeyTrie {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(KeyTrieVisitor)
}
}
struct KeyTrieVisitor;
impl<'de> serde::de::Visitor<'de> for KeyTrieVisitor {
type Value = KeyTrie;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
write!(formatter, "a command, list of commands, or sub-keymap")
}
fn visit_str<E>(self, command: &str) -> Result<Self::Value, E>
where
E: serde::de::Error,
{
command
.parse::<MappableCommand>()
.map(KeyTrie::Leaf)
.map_err(E::custom)
}
fn visit_seq<S>(self, mut seq: S) -> Result<Self::Value, S::Error>
where
S: serde::de::SeqAccess<'de>,
{
let mut commands = Vec::new();
while let Some(command) = seq.next_element::<&str>()? {
commands.push(
command
.parse::<MappableCommand>()
.map_err(serde::de::Error::custom)?,
)
}
Ok(KeyTrie::Sequence(commands))
}
fn visit_map<M>(self, mut map: M) -> Result<Self::Value, M::Error>
where
M: serde::de::MapAccess<'de>,
{
let mut mapping = HashMap::new();
let mut order = Vec::new();
while let Some((key, value)) = map.next_entry::<KeyEvent, KeyTrie>()? {
mapping.insert(key, value);
order.push(key);
}
Ok(KeyTrie::Node(KeyTrieNode::new("", mapping, order)))
}
}
impl KeyTrie {
pub fn node(&self) -> Option<&KeyTrieNode> {
match *self {

@ -365,13 +365,8 @@ impl<T: Item> Picker<T> {
.map(|(index, _option)| (index, 0)),
);
} else if pattern.starts_with(&self.previous_pattern) {
// TODO: remove when retain_mut is in stable rust
#[allow(unused_imports, deprecated)]
use retain_mut::RetainMut;
// optimization: if the pattern is a more specific version of the previous one
// then we can score the filtered set.
#[allow(unstable_name_collisions)]
self.matches.retain_mut(|(index, score)| {
let option = &self.options[*index];
let text = option.sort_text(&self.editor_data);

@ -22,7 +22,7 @@ helix-dap = { version = "0.6", path = "../helix-dap" }
crossterm = { version = "0.25", optional = true }
# Conversion traits
once_cell = "1.14"
once_cell = "1.15"
url = "2"
arc-swap = { version = "1.5.1" }

@ -99,7 +99,7 @@ scope = "source.elixir"
injection-regex = "(elixir|ex)"
file-types = ["ex", "exs", "mix.lock"]
shebangs = ["elixir"]
roots = []
roots = ["mix.exs", "mix.lock"]
comment-token = "#"
language-server = { command = "elixir-ls" }
config = { elixirLS.dialyzerEnabled = false }
@ -1287,7 +1287,7 @@ name = "eex"
scope = "source.eex"
injection-regex = "eex"
file-types = ["eex"]
roots = []
roots = ["mix.exs", "mix.lock"]
indent = { tab-width = 2, unit = " " }
[[grammar]]
@ -1299,12 +1299,12 @@ name = "heex"
scope = "source.heex"
injection-regex = "heex"
file-types = ["heex"]
roots = []
roots = ["mix.exs", "mix.lock"]
indent = { tab-width = 2, unit = " " }
[[grammar]]
name = "heex"
source = { git = "https://github.com/phoenixframework/tree-sitter-heex", rev = "961bc4d2937cfd24ceb0a5a6b2da607809f8822e" }
source = { git = "https://github.com/phoenixframework/tree-sitter-heex", rev = "881f1c805f51485a26ecd7865d15c9ef8d606a78" }
[[language]]
name = "sql"

@ -1,5 +1,3 @@
; inherits: ecma
; Highlight component names differently
(jsx_opening_element ((identifier) @constructor
(#match? @constructor "^[A-Z]")))
@ -7,21 +5,33 @@
; Handle the dot operator effectively - <My.Component>
(jsx_opening_element ((nested_identifier (identifier) @tag (identifier) @constructor)))
; Highlight brackets differently
(jsx_opening_element ["<" ">"] @punctuation.bracket)
(jsx_closing_element ((identifier) @constructor
(#match? @constructor "^[A-Z]")))
; Handle the dot operator effectively - </My.Component>
(jsx_closing_element ((nested_identifier (identifier) @tag (identifier) @constructor)))
; Highlight brackets differently
(jsx_closing_element ["<" "/" ">"] @punctuation.bracket)
(jsx_self_closing_element ((identifier) @constructor
(#match? @constructor "^[A-Z]")))
; Handle the dot operator effectively - <My.Component />
(jsx_self_closing_element ((nested_identifier (identifier) @tag (identifier) @constructor)))
; TODO: also tag @punctuation.delimiter?
; Highlight brackets differently
(jsx_self_closing_element ["<" "/" ">"] @punctuation.bracket)
; Handle attribute delimiter
(jsx_attribute "=" @punctuation.delimiter)
(jsx_opening_element (identifier) @tag)
(jsx_closing_element (identifier) @tag)
(jsx_self_closing_element (identifier) @tag)
(jsx_attribute (property_identifier) @variable.other.member)
; inherits: ecma

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

@ -6,7 +6,6 @@
(call)
(class)
(case)
(do_block)
(elsif)
(if)
(hash)

@ -183,7 +183,7 @@
; -------
((identifier) @constant
(#match? @constant "^[A-Z][A-Z\\d_]+$"))
(#match? @constant "^[A-Z][A-Z\\d_]*$"))
; ---
; PascalCase identifiers in call_expressions (e.g. `Ok()`)

@ -1 +1 @@
; inherits: typescript
; inherits: jsx,typescript

@ -20,6 +20,8 @@
"diagnostic.error" = {bg="white", modifiers=["bold"]}
"diagnostic.warning" = {bg="white", modifiers=["bold"]}
"diagnostic.hint" = {bg="white", modifiers=["bold"]}
"ui.bufferline" = { fg = "indent", bg = "acme_bar_bg" }
"ui.bufferline.active" = { fg = "black", bg = "acme_bg" }
[palette]
white = "#ffffff"

@ -59,6 +59,8 @@
"diagnostic.info"= { fg = "blue", modifiers = ["underlined"] }
"diagnostic.warning"= { fg = "yellow", modifiers = ["underlined"] }
"diagnostic.error"= { fg = "red", modifiers = ["underlined"] }
"ui.bufferline" = { fg = "gray", bg = "background" }
"ui.bufferline.active" = { fg = "foreground", bg = "dark_gray" }
"special" = { fg = "orange" }

@ -59,6 +59,8 @@
"diagnostic.info"= { fg = "blue", modifiers = ["underlined"] }
"diagnostic.warning"= { fg = "yellow", modifiers = ["underlined"] }
"diagnostic.error"= { fg = "red", modifiers = ["underlined"] }
"ui.bufferline" = { fg = "gray", bg = "dark_gray" }
"ui.bufferline.active" = { fg = "dark", bg = "background" }
"special" = { fg = "orange" }
@ -76,3 +78,4 @@ magenta = "#a37acc"
orange = "#fa8d3e"
red = "#f07171"
yellow = "#ffaa33"
dark = "#131721"

@ -59,6 +59,8 @@
"diagnostic.info"= { fg = "blue", modifiers = ["underlined"] }
"diagnostic.warning"= { fg = "yellow", modifiers = ["underlined"] }
"diagnostic.error"= { fg = "red", modifiers = ["underlined"] }
"ui.bufferline" = { fg = "gray", bg = "black" }
"ui.bufferline.active" = { fg = "foreground", bg = "background" }
"special" = { fg = "orange" }

@ -60,6 +60,9 @@
"ui.explorer.focus" = { modifiers = ["reversed"] }
"ui.explorer.unfocus" = { bg = "base02" }
"ui.bufferline" = { fg = "base04", bg = "base00" }
"ui.bufferline.active" = { fg = "base06", bg = "base01" }
[palette]
base00 = "#181818" # Default Background
base01 = "#282828" # Lighter Background (Used for status bars, line number and folding marks)

@ -60,6 +60,9 @@
"ui.explorer.focus" = { modifiers = ["reversed"] }
"ui.explorer.unfocus" = { bg = "base02" }
"ui.bufferline" = { fg = "base04", bg = "base01" }
"ui.bufferline.active" = { fg = "base07", bg = "base00" }
[palette]
base00 = "#f8f8f8" # Default Background
base01 = "#e8e8e8" # Lighter Background (Used for status bars, line number and folding marks)

@ -48,6 +48,8 @@
"ui.cursorline" = { bg = "#131920" }
"ui.statusline" = { fg = "#e5ded6", bg = "#232d38" }
"ui.statusline.inactive" = { fg = "#c6b8ad", bg = "#232d38" }
"ui.bufferline" = { fg = "#627d9d", bg = "#131920" }
"ui.bufferline.active" = { fg = "#e5ded6", bg = "#232d38" }
"ui.popup" = { bg = "#232d38" }
"ui.window" = { bg = "#232d38" }
"ui.help" = { bg = "#232d38", fg = "#e5ded6" }

@ -70,6 +70,9 @@
"ui.statusline.insert" = { fg = "surface0", bg = "green", modifiers = ["bold"] }
"ui.statusline.select" = { fg = "surface0", bg = "flamingo", modifiers = ["bold"] }
"ui.bufferline" = { fg = "subtext1", bg = "mantle" }
"ui.bufferline.active" = { fg = "text", bg = "surface0", modifiers = ["bold"] }
"ui.popup" = { fg = "text", bg = "surface0" }
"ui.window" = { fg = "crust" }
"ui.help" = { fg = "overlay2", bg = "surface0" }
@ -134,4 +137,4 @@ crust = "#232634"
# derived colors by blending existing palette colors
cursorline = "#3b3f52"
secondary_cursor = "#b8a5a6"
secondary_cursor = "#b8a5a6"

@ -70,6 +70,10 @@
"ui.statusline.insert" = { fg = "surface0", bg = "green", modifiers = ["bold"] }
"ui.statusline.select" = { fg = "surface0", bg = "flamingo", modifiers = ["bold"] }
"ui.bufferline" = { fg = "overlay2", bg = "surface1", modifiers = ["italic"] }
"ui.bufferline.active" = { fg = "text", bg = "surface0", modifiers = ["bold"] }
"ui.bufferline.background" = { bg = "surface1" }
"ui.popup" = { fg = "text", bg = "surface0" }
"ui.window" = { fg = "crust" }
"ui.help" = { fg = "overlay2", bg = "surface0" }
@ -134,4 +138,4 @@ crust = "#dce0e8"
# derived colors by blending existing palette colors
cursorline = "#e9ebf1"
secondary_cursor = "#e2a99e"
secondary_cursor = "#e2a99e"

@ -70,6 +70,9 @@
"ui.statusline.insert" = { fg = "surface0", bg = "green", modifiers = ["bold"] }
"ui.statusline.select" = { fg = "surface0", bg = "flamingo", modifiers = ["bold"] }
"ui.bufferline.active" = { fg = "text", bg = "base", modifiers = ["bold"] }
"ui.bufferline" = { fg = "overlay1", bg = "mantle" }
"ui.popup" = { fg = "text", bg = "surface0" }
"ui.window" = { fg = "crust" }
"ui.help" = { fg = "overlay2", bg = "surface0" }
@ -134,4 +137,4 @@ crust = "#181926"
# derived colors by blending existing palette colors
cursorline = "#303347"
secondary_cursor = "#b6a5a7"
secondary_cursor = "#b6a5a7"

@ -70,6 +70,9 @@
"ui.statusline.insert" = { fg = "surface0", bg = "green", modifiers = ["bold"] }
"ui.statusline.select" = { fg = "surface0", bg = "flamingo", modifiers = ["bold"] }
"ui.bufferline.active" = { fg = "text", bg = "base", modifiers = ["bold"] }
"ui.bufferline" = { fg = "overlay1", bg = "mantle" }
"ui.popup" = { fg = "text", bg = "surface0" }
"ui.window" = { fg = "crust" }
"ui.help" = { fg = "overlay2", bg = "surface0" }
@ -134,4 +137,4 @@ crust = "#11111b"
# derived colors by blending existing palette colors
cursorline = "#2a2b3c"
secondary_cursor = "#b5a6a8"
secondary_cursor = "#b5a6a8"

@ -23,6 +23,8 @@
"ui.virtual.ruler" = { bg = "grey02" }
"ui.virtual.indent-guide" = "grey02"
"ui.virtual.whitespace" = "grey03"
"ui.bufferline" = { fg = "grey04", bg = "grey00" }
"ui.bufferline.active" = { fg = "grey07", bg = "grey02" }
"operator" = "grey05"
"variable" = "white"

@ -76,6 +76,10 @@
"ui.statusline" = { fg = "white", bg = "blue" }
"ui.statusline.inactive" = { fg = "white", bg = "blue" }
"ui.bufferline" = { fg = "text", bg = "widget" }
"ui.bufferline.active" = { fg = "white", bg = "blue" }
"ui.bufferline.background" = { bg = "background" }
"ui.text" = { fg = "text" }
"ui.text.focus" = { fg = "white" }

@ -53,6 +53,9 @@
'ui.statusline.normal' = { bg = 'base3' }
'ui.statusline.insert' = { bg = 'base3' }
'ui.statusline.select' = { bg = 'base3' }
'ui.bufferline' = { fg = 'gray', bg = 'base2' }
'ui.bufferline.active' = { fg = 'white', bg = 'base4' }
'ui.bufferline.background' = { bg = 'bg' }
'ui.popup' = { bg = 'bg-alt' }
'ui.window' = { fg = 'gray' }
'ui.help' = { fg = 'fg', bg = 'base2' }

@ -54,6 +54,9 @@
"ui.linenr.selected" = { fg = "gray80" }
"ui.statusline" = { fg = "black", bg = "gray75" }
"ui.statusline.inactive" = { fg = "gray20", bg = "gray90" }
"ui.bufferline" = { fg = "gray36", bg = "gray90", modifiers = ["underlined"] }
"ui.bufferline.active" = { fg = "gray0", bg = "gray99" }
"ui.bufferline.background" = { bg = "gray75" }
"ui.popup" = { fg = "black", bg = "gray97" }
"ui.popup.info" = { fg = "black", bg = "gray97" }
"ui.window" = { fg = "black" }

@ -0,0 +1,102 @@
# Author : Sven-Hendrik Haase <svenstaro@gmail.com>
# Author : Jakub Bartodziej <kubabartodziej@gmail.com>
# The theme uses the gruvbox dark palette with hard contrast: github.com/morhetz/gruvbox
"attribute" = "aqua1"
"keyword" = { fg = "red1" }
"keyword.directive" = "red0"
"namespace" = "aqua1"
"punctuation" = "orange1"
"punctuation.delimiter" = "orange1"
"operator" = "purple1"
"special" = "purple0"
"variable.other.member" = "blue1"
"variable" = "fg1"
"variable.builtin" = "orange1"
"variable.parameter" = "fg2"
"type" = "yellow1"
"type.builtin" = "yellow1"
"constructor" = { fg = "purple1", modifiers = ["bold"] }
"function" = { fg = "green1", modifiers = ["bold"] }
"function.macro" = "aqua1"
"function.builtin" = "yellow1"
"tag" = "red1"
"comment" = { fg = "gray1", modifiers = ["italic"] }
"constant" = { fg = "purple1" }
"constant.builtin" = { fg = "purple1", modifiers = ["bold"] }
"string" = "green1"
"constant.numeric" = "purple1"
"constant.character.escape" = { fg = "fg2", modifiers = ["bold"] }
"label" = "aqua1"
"module" = "aqua1"
"diff.plus" = "green1"
"diff.delta" = "orange1"
"diff.minus" = "red1"
"warning" = { fg = "orange1", bg = "bg1" }
"error" = { fg = "red1", bg = "bg1" }
"info" = { fg = "aqua1", bg = "bg1" }
"hint" = { fg = "blue1", bg = "bg1" }
"ui.background" = { bg = "bg0" }
"ui.linenr" = { fg = "bg4" }
"ui.linenr.selected" = { fg = "yellow1" }
"ui.cursorline" = { bg = "bg1" }
"ui.statusline" = { fg = "fg1", bg = "bg2" }
"ui.statusline.normal" = { fg = "fg1", bg = "bg2" }
"ui.statusline.insert" = { fg = "fg1", bg = "blue0" }
"ui.statusline.select" = { fg = "fg1", bg = "orange0" }
"ui.statusline.inactive" = { fg = "fg4", bg = "bg1" }
"ui.popup" = { bg = "bg1" }
"ui.window" = { bg = "bg1" }
"ui.help" = { bg = "bg1", fg = "fg1" }
"ui.text" = { fg = "fg1" }
"ui.text.focus" = { fg = "fg1" }
"ui.selection" = { bg = "bg3", modifiers = ["reversed"] }
"ui.cursor.primary" = { modifiers = ["reversed"] }
"ui.cursor.match" = { bg = "bg2" }
"ui.menu" = { fg = "fg1", bg = "bg2" }
"ui.menu.selected" = { fg = "bg2", bg = "blue1", modifiers = ["bold"] }
"ui.virtual.whitespace" = "bg2"
"ui.virtual.ruler" = { bg = "bg1" }
"diagnostic" = { modifiers = ["underlined"] }
"markup.heading" = "aqua1"
"markup.bold" = { modifiers = ["bold"] }
"markup.italic" = { modifiers = ["italic"] }
"markup.link.url" = { fg = "green1", modifiers = ["underlined"] }
"markup.link.text" = "red1"
"markup.raw" = "red1"
[palette]
bg0 = "#1d2021" # main background
bg1 = "#3c3836"
bg2 = "#504945"
bg3 = "#665c54"
bg4 = "#7c6f64"
fg0 = "#fbf1c7"
fg1 = "#ebdbb2" # main foreground
fg2 = "#d5c4a1"
fg3 = "#bdae93"
fg4 = "#a89984" # gray0
gray0 = "#a89984"
gray1 = "#928374"
red0 = "#cc241d" # neutral
red1 = "#fb4934" # bright
green0 = "#98971a"
green1 = "#b8bb26"
yellow0 = "#d79921"
yellow1 = "#fabd2f"
blue0 = "#458588"
blue1 = "#83a598"
purple0 = "#b16286"
purple1 = "#d3869b"
aqua0 = "#689d6a"
aqua1 = "#8ec07c"
orange0 = "#d65d0e"
orange1 = "#fe8019"

@ -10,7 +10,7 @@
"ui.statusline" = {bg="paper_bar_bg", fg="regular0"}
"ui.statusline.select" = {bg="background", fg="bright7"}
"ui.statusline.normal" = {bg="background", fg="bright3"}
"ui.statusline.inactive" = {bg="background", fg="bright0"}
"ui.statusline.inactive" = {bg="selection_foreground", fg="foreground"}
"ui.virtual.whitespace" = { fg = "regular5" }
"ui.virtual.ruler" = {bg="cursorline_background"}
"ui.cursor.match" = {bg = "regular5", fg = "regular0"}

@ -10,7 +10,7 @@
"ui.statusline" = {bg="paper_bar_bg", fg="regular0"}
"ui.statusline.select" = {bg="background", fg="bright7"}
"ui.statusline.normal" = {bg="background", fg="bright3"}
"ui.statusline.inactive" = {bg="background", fg="bright0"}
"ui.statusline.inactive" = {bg="bright0", fg="foreground"}
"ui.virtual" = "indent"
"ui.virtual.whitespace" = { fg = "regular5" }
"ui.virtual.ruler" = {bg="cursorline_background"}

@ -70,7 +70,7 @@ _________________________________________________________________
Type the d key to delete the character under the cursor.
1. Move the cursor to the line below marked -->.
1. Move the cursor to the line marked '-->' below.
2. Move the cursor to each extra character, and type d to
delete it.
@ -92,7 +92,7 @@ _________________________________________________________________
Type the i key to enter Insert mode.
1. Move the cursor to the line below marked -->.
1. Move the cursor to the line marked '-->' below.
2. Move to a place in the line which is missing text and type
i to enter Insert mode. Keys you type will now type text.
3. Enter the missing text.
@ -166,7 +166,7 @@ _________________________________________________________________
I - Insert at the start of the line.
A - Insert at the end of the line.
1. Move to anywhere in the line below marked -->.
1. Move to anywhere in the line marked '-->' below.
2. Type A (<SHIFT> + a), your cursor will move to the end of
the line and you will be able to type.
3. Type the text necessary to match the line below.
@ -181,7 +181,7 @@ _________________________________________________________________
Type o to add a newline and insert below the cursor.
Type O to add a newline and insert above the cursor.
1. Move the cursor to the line below marked -->.
1. Move the cursor to the line marked '-->' below.
2. Type o to open a line below and type your answer.
--> What is the best editor?
@ -228,7 +228,7 @@ _________________________________________________________________
it deletes all selected text. Your cursor is like a
single-character selection.
1. Move the cursor to the line below marked -->.
1. Move the cursor to the line marked '-->' below.
2. Move to the beginning of a word that needs to be deleted.
3. Type w to select until the beginning of the next word.
4. Type d to delete the selection.
@ -271,7 +271,7 @@ _________________________________________________________________
The change command deletes the current selection and enters
Insert mode, so it is a very common shorthand for di.
1. Move the cursor to the line below marked -->.
1. Move the cursor to the line marked '-->' below.
2. Move to the start of an incorrect word and type w to
select it.
3. Type c to delete the word and enter Insert mode.
@ -290,7 +290,7 @@ _________________________________________________________________
Type a number before a motion to repeat it that many times.
1. Move the cursor to the line below marked -->.
1. Move the cursor to the line marked '-->' below.
2. Type 2w to move 2 words forward.
3. Type 3e to move to the end of the third word forward.
4. Type 2b to move 2 words backwards
@ -315,7 +315,7 @@ _________________________________________________________________
In Select mode every movement will extend the selection, as
opposed to replacing it.
1. Move the cursor to the line below marked -->.
1. Move the cursor to the line marked '-->' below.
2. Move to the F of FOO and type v2w to select the two words.
3. Type d to remove the two words. Notice d returns you to
Normal mode.
@ -334,7 +334,7 @@ _________________________________________________________________
Type x to select a whole line. Type x again to select the next.
1. Move the cursor to the second line below marked -->.
1. Move the cursor to the second line marked '-->' below.
2. Type x to select the line, and d to delete it.
3. Move to the fourth line.
4. Type x twice or type 2x to select 2 lines, and d to delete.
@ -359,7 +359,7 @@ _________________________________________________________________
Sometimes, you want to deselect without having to move the
cursor(s). This can be done using the ; key.
1. Move the cursor to the line below marked -->.
1. Move the cursor to the line marked '-->' below.
2. Use the motions you have learned to move around the line,
and try using ; to deselect the text after it is selected
by the motions.
@ -400,7 +400,7 @@ _________________________________________________________________
Type u to undo. Type U to redo.
1. Move the cursor to the line below marked -->.
1. Move the cursor to the line marked '-->' below.
2. Move to the first error, and type d to delete it.
3. Type u to undo your deletion.
4. Fix all the errors on the line.
@ -424,7 +424,7 @@ _________________________________________________________________
Type p to paste the yanked selection after the cursor.
Type P to paste the yanked text before the cursor.
1. Move the cursor to the line below marked -->.
1. Move the cursor to the line marked '-->' below.
Make sure your cursor is on the "b" of banana.
2. Type w to select "banana" and y to yank it.
3. Move to the space between "2" and "3" and type p to paste.
@ -488,7 +488,7 @@ _________________________________________________________________
Type C to duplicate the cursor to the next suitable line.
1. Move the cursor to the first line below marked -->.
1. Move the cursor to the first line marked '-->' below.
2. Type C to duplicate the cursor to the next suitable line.
Notice how it skips the line in the middle. Keys you type
will now affect both cursors.
@ -510,18 +510,18 @@ _________________________________________________________________
Type s to select matches in the selection.
1. Move the cursor to the line below marked -->.
1. Move the cursor to the line marked '-->' below.
2. Type x to select the line.
3. Type s. A prompt will appear.
4. Type 'apples' and type <ENTER>. Both occurrences of
'apples' in the line will be selected.
5. You can now type c and change 'apples' to something else,
like 'oranges'.
6. Type , to remove the second cursor.
6. Type <ESC> to exit Insert mode.
7. Type , to remove the second cursor.
--> I like to eat apples since my favorite fruit is apples.
I like to eat oranges since my favourite fruit is oranges.
I like to eat oranges since my favorite fruit is oranges.
@ -533,7 +533,7 @@ _________________________________________________________________
The select command selects regular expressions, not just exact
matches, allowing you to target more complex patterns.
1. Move the cursor to the line below marked -->.
1. Move the cursor to the line marked '-->' below.
2. Select the line with x and then type s.
3. Enter ' +' to select any amount of consecutive spaces >1.
4. Type c and change the matches to single spaces.
@ -554,7 +554,7 @@ _________________________________________________________________
Type & to align the contents of the selections.
1. Move the cursor to the first line below marked -->. Place
1. Move the cursor to the first line marked '-->' below. Place
the cursor on the whitespace just after the arrow.
2. Type C four times or 4C.
3. Type W to select the numbers and brackets.
@ -622,7 +622,7 @@ _________________________________________________________________
Type t<ch> to do the same, but not including (till) a character.
Type uppercase F / T to do the same backwards.
1. Move the cursor to the line below marked -->. Place the
1. Move the cursor to the line marked '-->' below. Place the
cursor on the first dash.
2. Type f[ to select to the square bracket.
3. Type d to delete your selection.
@ -633,7 +633,7 @@ _________________________________________________________________
--> -----[Free this sentence of its brackets!]-----
--> ------Free this sentence of its dashes!------
Note: Unlike Vim, Helix doesn't limit these commands to the
Note: Unlike Vim, Helix doesn't limit these commands to the
current line. It searches for the character in the file.
=================================================================
@ -665,7 +665,7 @@ _________________________________________________________________
Type . to repeat the last insert command.
Type A-. to repeat the last f / t selection.
1. Move the cursor to the line below marked -->.
1. Move the cursor to the line marked '-->' below.
2. Make a change, insertion or appendage and repeat it with . .
3. Try using A-. with f and t, to select multiple sentences for
instance.
@ -708,7 +708,7 @@ _________________________________________________________________
Type R to replace the selection with previously yanked text.
1. Move the cursor to the line below marked -->.
1. Move the cursor to the line marked '-->' below.
2. Type w to select "watermelons" and then y to yank it.
3. Select "oranges" with w.
4. Type R to replace "oranges" with "watermelons"
@ -730,7 +730,7 @@ _________________________________________________________________
Type J to join together lines in selection.
1. Move the cursor to the line below marked -->.
1. Move the cursor to the line marked '-->' below.
2. Type x four times or 4x to select all four lines.
3. Type J to join the lines together.
@ -752,7 +752,7 @@ lines.
Type > to indent a line and < to outdent it.
1. Move the cursor to the line below marked -->.
1. Move the cursor to the line marked '-->' below.
2. Move down to the second line and type > to indent it.
3. Move to the third line and type < to outdent it.
@ -775,7 +775,7 @@ lines.
Type C-a to increment the number under selection.
Type C-x to decrement the number under selection.
1. Move the cursor to the third line below marked -->.
1. Move the cursor to the third line marked '-->' below.
2. Type C-a to increment the second point marked 2.
3. Repeat for the point marked 3.
4. Move to the last point and type C-x to decrement the 6.
@ -823,7 +823,7 @@ lines.
Type "<ch> to select register <ch>.
1. Move the cursor to the line below marked -->.
1. Move the cursor to the line marked '-->' below.
2. Type w to select "watermelons" and yank with y.
3. Type w to select "bananas".
4. Change to register b with "b and yank with y.
@ -844,7 +844,7 @@ lines.
the bottom of your screen. Type Q again to stop recording.
Type q to repeat the macro from register @ (the default).
1. Move the cursor to the first line below marked -->.
1. Move the cursor to the first line marked '-->' below.
Ensure your cursor is on the > of the arrow.
2. Type Q to start recording.
3. Edit the line to look like the bottom one.
@ -889,7 +889,7 @@ lines.
Type * to copy the primary selection into register /, setting
the search term to the selection.
1. Move the cursor to the line below marked -->.
1. Move the cursor to the line marked '-->' below.
2. Select "horse" with e and type *.
3. Use n and N to jump between the instances of "horse".
@ -908,7 +908,7 @@ lines.
of moving the selection to the next match, it adds a new
selection on each match.
1. Move the cursor to the line below marked -->.
1. Move the cursor to the line marked '-->' below.
2. Select the first "bat" and type * to set it to search.
3. Type v to enter select mode.
4. Type n to select the other "bat".
@ -975,7 +975,7 @@ lines.
Type A-, to remove the primary selection.
1. Move the cursor to the line below marked -->.
1. Move the cursor to the line marked '-->' below.
2. Select both lines with xx or 2x.
3. Type s to select, type "would" and enter.
4. Use ( and ) to cycle the primary selection and remove the
@ -996,7 +996,7 @@ lines.
Type ` to set all selected letters to lowercase.
Type Alt-` to set all selected letters to uppercase.
1. Move the cursor to the first line below marked -->.
1. Move the cursor to the first line marked '-->' below.
2. Select each wrongly capitalised or lowercase letter
and type ~ over them.
3. Move to the second line marked -->.

Loading…
Cancel
Save