Skip to content

Commit

Permalink
Merge branch 'helix-editor:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
midnightexigent authored May 18, 2022
2 parents c02dc2e + 29121a1 commit 11e1e04
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 21 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion helix-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ encoding_rs = "0.8"

chrono = { version = "0.4", default-features = false, features = ["alloc", "std"] }

etcetera = "0.3"
etcetera = "0.4"
textwrap = "0.15.0"

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion helix-loader/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ homepage = "https://helix-editor.com"
anyhow = "1"
serde = { version = "1.0", features = ["derive"] }
toml = "0.5"
etcetera = "0.3"
etcetera = "0.4"
tree-sitter = "0.20"
once_cell = "1.9"

Expand Down
29 changes: 15 additions & 14 deletions helix-lsp/src/transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,20 +215,21 @@ impl Transport {
}
};

let tx = self
.pending_requests
.lock()
.await
.remove(&id)
.expect("pending_request with id not found!");

match tx.send(result).await {
Ok(_) => (),
Err(_) => error!(
"Tried sending response into a closed channel (id={:?}), original request likely timed out",
id
),
};
if let Some(tx) = self.pending_requests.lock().await.remove(&id) {
match tx.send(result).await {
Ok(_) => (),
Err(_) => error!(
"Tried sending response into a closed channel (id={:?}), original request likely timed out",
id
),
};
} else {
log::error!(
"Discarding Language Server response without a request (id={:?}) {:?}",
id,
result
);
}

Ok(())
}
Expand Down
2 changes: 1 addition & 1 deletion languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1284,7 +1284,7 @@ injection-regex = "hare"
file-types = ["ha"]
roots = []
comment-token = "//"
indent = { tab-width = 4, unit = "\t" }
indent = { tab-width = 8, unit = "\t" }

[[grammar]]
name = "hare"
Expand Down
68 changes: 68 additions & 0 deletions runtime/themes/snazzy.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Author : Sebastian Zivota <[email protected]>
# Author : Timothy DeHerrera <[email protected]>
"comment" = { fg = "comment" }
"constant" = { fg = "purple" }
"constant.character.escape" = { fg = "magenta" }
"function" = { fg = "green" }
"keyword" = { fg = "magenta" }
"operator" = { fg = "magenta" }
"punctuation" = { fg = "foreground" }
"string" = { fg = "yellow" }
"path" = { fg = "blue" }
"string.regexp" = { fg = "red" }
"tag" = { fg = "magenta" }
"type" = { fg = "cyan", modifiers = ["italic"] }
"type.enum.variant" = { fg = "foreground", modifiers = ["italic"] }
"variable" = { fg = "foreground" }
"variable.builtin" = { fg = "cyan", modifiers = ["italic"] }
"variable.parameter" = { fg ="blue", modifiers = ["italic"] }

"diff.plus" = { fg = "green" }
"diff.delta" = { fg = "blue" }
"diff.minus" = { fg = "red" }

"ui.background" = { fg = "foreground", bg = "background" }
"ui.cursor" = { fg = "background", bg = "blue", modifiers = ["dim"] }
"ui.cursor.match" = { fg = "green", modifiers = ["underlined"] }
"ui.cursor.primary" = { fg = "background", bg = "cyan", modifier = ["dim"] }
"ui.help" = { fg = "foreground", bg = "background_dark" }
"ui.linenr" = { fg = "comment" }
"ui.linenr.selected" = { fg = "foreground" }
"ui.menu" = { fg = "foreground", bg = "background_dark" }
"ui.menu.selected" = { fg = "cyan", bg = "background_dark" }
"ui.popup" = { fg = "foreground", bg = "background_dark" }
"ui.selection" = { bg = "secondary_highlight" }
"ui.selection.primary" = { bg = "primary_highlight" }
"ui.statusline" = { fg = "foreground", bg = "background_dark" }
"ui.statusline.inactive" = { fg = "comment", bg = "background_dark" }
"ui.text" = { fg = "foreground" }
"ui.text.focus" = { fg = "cyan" }
"ui.window" = { fg = "foreground" }
"ui.virtual" = { fg = "comment" }

"error" = { fg = "red" }
"warning" = { fg = "cyan" }

"markup.heading" = { fg = "purple", modifiers = ["bold"] }
"markup.list" = "cyan"
"markup.bold" = { fg = "blue", modifiers = ["bold"] }
"markup.italic" = { fg = "yellow", modifiers = ["italic"] }
"markup.link.url" = "cyan"
"markup.link.text" = "magenta"
"markup.quote" = { fg = "yellow", modifiers = ["italic"] }
"markup.raw" = { fg = "foreground" }

[palette]
background = "#282a36"
background_dark = "#21222c"
primary_highlight = "#800049"
secondary_highlight = "#4d4f66"
foreground = "#eff0eb"
comment = "#a39e9b"
red = "#ff5c57"
blue = "#57c7ff"
yellow = "#f3f99d"
green = "#5af78e"
purple = "#bd93f9"
cyan = "#9aedfe"
magenta = "#ff6ac1"

0 comments on commit 11e1e04

Please sign in to comment.