diff --git a/Cargo.lock b/Cargo.lock index 98c531af9d7a..466f500ce37d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -212,9 +212,9 @@ dependencies = [ [[package]] name = "etcetera" -version = "0.3.2" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "016b04fd1e94fb833d432634245c9bb61cf1c7409668a0e7d4c3ab00c5172dec" +checksum = "d017fce18e4e9bfa75e1db51f49f4487bd3f8a7df509b24a46474a956ee962fd" dependencies = [ "cfg-if", "dirs-next", @@ -928,9 +928,9 @@ dependencies = [ [[package]] name = "signal-hook" -version = "0.3.13" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "647c97df271007dcea485bb74ffdb57f2e683f1306c854f468a0c244badabf2d" +checksum = "a253b5e89e2698464fc26b545c9edceb338e18a89effeeecfea192c3025be29d" dependencies = [ "libc", "signal-hook-registry", diff --git a/helix-core/Cargo.toml b/helix-core/Cargo.toml index ab937f0b1e8b..9973516b5336 100644 --- a/helix-core/Cargo.toml +++ b/helix-core/Cargo.toml @@ -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] diff --git a/helix-loader/Cargo.toml b/helix-loader/Cargo.toml index c8cbf6d10f03..3a900f4ac856 100644 --- a/helix-loader/Cargo.toml +++ b/helix-loader/Cargo.toml @@ -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" diff --git a/helix-lsp/src/transport.rs b/helix-lsp/src/transport.rs index 6e28094d196b..6102c6c8e2d5 100644 --- a/helix-lsp/src/transport.rs +++ b/helix-lsp/src/transport.rs @@ -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(()) } diff --git a/languages.toml b/languages.toml index d529958fcf9e..1e23871f23db 100644 --- a/languages.toml +++ b/languages.toml @@ -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" diff --git a/runtime/queries/sshclientconfig/highlights.scm b/runtime/queries/sshclientconfig/highlights.scm deleted file mode 100644 index 83a212a20a42..000000000000 --- a/runtime/queries/sshclientconfig/highlights.scm +++ /dev/null @@ -1,324 +0,0 @@ -(host) @keyword -(host_value) @identifier - -(match) @keyword -(match_value) @identifier - -(add_keys_to_agent) @keyword -(add_keys_to_agent_value) @boolean - -(address_family) @keyword -(address_family_value) @type - -(batch_mode) @keyword -(batch_mode_value) @boolean - -(bind_address) @keyword -(bind_address_value) @string - -(bind_interface) @keyword -(bind_interface_value) @string - -(canonical_domains) @keyword -(canonical_domains_value) @identifier - -(canonicalize_fallback_local) @keyword -(canonicalize_fallback_local_value) @boolean - -(canonicalize_hostname) @keyword -(canonicalize_hostname_value) @boolean - -(canonicalize_max_dots) @keyword -(canonicalize_max_dots_value) @number - -(canonicalize_permitted_cnames) @keyword -(canonicalize_permitted_cnames_value) @identifier - -(ca_signature_algorithms) @keyword -(ca_signature_algorithms_value) @identifier - -(certificate_file) @keyword -(certificate_file_value) @file - -(challenge_response_authentication) @keyword -(challenge_response_authentication_value) @boolean - -(check_host_ip) @keyword -(check_host_ip_value) @boolean - -(cipher) @keyword -(cipher_value) @identifier - -(ciphers) @keyword -(ciphers_value) @identifier - -(clear_all_forwardings) @keyword -(clear_all_forwardings_value) @boolean - -(comment) @comment - -(compression) @keyword -(compression_value) @boolean - -(connect_timeout) @keyword -(connect_timeout_value) @number - -(connection_attempts) @keyword -(connection_attempts_value) @number - -(control_master) @keyword -(control_master_value) @type - -(control_path) @keyword -(control_path_value) @file - -(control_persist) @keyword -(control_persist_value) @type - -(dynamic_forward) @keyword -(dynamic_forward_value) @string - -(enable_ssh_keysign) @keyword -(enable_ssh_keysign_value) @boolean - -(escape_char) @keyword -(escape_char_value) @string - -(exit_on_forward_failure) @keyword -(exit_on_forward_failure_value) @boolean - -(fingerprint_hash) @keyword -(fingerprint_hash_value) @identifier - -(fork_after_authentication) @keyword -(fork_after_authentication_value) @boolean - -(forward_agent) @keyword -(forward_agent_value) @boolean - -(forward_x11) @keyword -(forward_x11_value) @boolean - -(forward_x11_timeout) @keyword -(forward_x11_timeout_value) @time - -(forward_x11_trusted) @keyword -(forward_x11_trusted_value) @boolean - -(gateway_ports) @keyword -(gateway_ports_value) @boolean - -(global_known_hosts_file) @keyword -(global_known_hosts_file_value) @file - -(gssapi_authentication) @keyword -(gssapi_authentication_value) @boolean - -(gssapi_client_identity) @keyword -(gssapi_client_identity_value) @string - -(gssapi_delegate_credentials) @keyword -(gssapi_delegate_credentials_value) @boolean - -(gssapi_kex_algorithms) @keyword -(gssapi_kex_algorithms_value) @identifier - -(gssapi_key_exchange) @keyword -(gssapi_key_exchange_value) @boolean - -(gssapi_renewal_forces_rekey) @keyword -(gssapi_renewal_forces_rekey_value) @boolean - -(gssapi_server_identity) @keyword -(gssapi_server_identity_value) @string - -(gssapi_trust_dns) @keyword -(gssapi_trust_dns_value) @boolean - -(hash_known_hosts) @keyword -(hash_known_hosts_value) @boolean - -(host_key_algorithms) @keyword -(host_key_algorithms_value) @identifier - -(host_key_alias) @keyword -(host_key_alias_value) @string - -(hostbased_accepted_algorithms) @keyword -(hostbased_accepted_algorithms_value) @identifier - -(hostbased_authentication) @keyword -(hostbased_authentication_value) @boolean - -(hostname) @keyword -(hostname_value) @string - -(identities_only) @keyword -(identities_only_value) @boolean - -(identity_agent) @keyword -(identity_agent_value) @string - -(identity_file) @keyword -(identity_file_value) @file - -(ignore_unknown) @keyword -(ignore_unknown_value) @string - -(include) @keyword -(include_value) @file - -(ip_qos) @keyword -(ip_qos_value) @type - -(kbd_interactive_authentication) @keyword -(kbd_interactive_authentication_value) @boolean - -(kbd_interactive_devices) @keyword -(kbd_interactive_devices_value) @type - -(kex_algorithms) @keyword -(kex_algorithms_value) @identifier - -(known_hosts_command) @keyword -(known_hosts_command_value) @string - -(local_command) @keyword -(local_command_value) @string - -(local_forward) @keyword -(local_forward_value) @string - -(log_level) @keyword -(log_level_value) @type - -(log_verbose) @keyword -(log_verbose_value) @string - -(macs) @keyword -(macs_value) @identifier - -(no_host_authentication_for_localhost) @keyword -(no_host_authentication_for_localhost_value) @boolean - -(number_of_password_prompts) @keyword -(number_of_password_prompts_value) @number - -(password_authentication) @keyword -(password_authentication_value) @boolean - -(permit_local_command) @keyword -(permit_local_command_value) @boolean - -(permit_remote_open) @keyword -(permit_remote_open_value) @string - -(pkcs11_provider) @keyword -(pkcs11_provider_value) @string - -(port) @keyword -(port_value) @number - -(preferred_authentications) @keyword -(preferred_authentications_value) @type - -(protocol) @keyword -(protocol_value) @number - -(proxy_command) @keyword -(proxy_command_value) @string - -(proxy_jump) @keyword -(proxy_jump_value) @string - -(proxy_use_fdpass) @keyword -(proxy_use_fdpass_value) @boolean - -(pubkey_accepted_algorithms) @keyword -(pubkey_accepted_algorithms_value) @identifier - -(pubkey_accepted_key_types) @keyword -(pubkey_accepted_key_types_value) @identifier - -(pubkey_authentication) @keyword -(pubkey_authentication_value) @boolean - -(rekey_limit) @keyword -(rekey_limit_value) @string - -(remote_command) @keyword -(remote_command_value) @string - -(remote_forward) @keyword -(remote_forward_value) @string - -(request_tty) @keyword -(request_tty_value) @type - -(revoked_host_keys) @keyword -(revoked_host_keys_value) @file - -(security_key_provider) @keyword -(security_key_provider_value) @string - -(send_env) @keyword -(send_env_value) @string - -(server_alive_count_max) @keyword -(server_alive_count_max_value) @number - -(server_alive_interval) @keyword -(server_alive_interval_value) @number - -(session_type) @keyword -(session_type_value) @type - -(set_env) @keyword -(set_env_value) @string - -(stdin_null) @keyword -(stdin_null_value) @boolean - -(stream_local_bind_mask) @keyword -(stream_local_bind_mask_value) @string - -(stream_local_bind_unlink) @keyword -(stream_local_bind_unlink_value) @boolean - -(strict_host_key_checking) @keyword -(strict_host_key_checking_value) @type - -(syslog_facility) @keyword -(syslog_facility_value) @type - -(tcp_keep_alive) @keyword -(tcp_keep_alive_value) @boolean -(keep_alive) @keyword -(keep_alive_value) @boolean - -(tunnel) @keyword -(tunnel_value) @type - -(tunnel_device) @keyword -(tunnel_device_value) @string - -(update_host_keys) @keyword -(update_host_keys_value) @type - -(use_keychain) @keyword -(use_keychain_value) @boolean - -(user) @keyword -(user_value) @string - -(user_known_hosts_file) @keyword -(user_known_hosts_file_value) @file - -(verify_host_key_dns) @keyword -(verify_host_key_dns_value) @type - -(visual_host_key) @keyword -(visual_host_key_value) @boolean - -(xauth_location) @keyword -(xauth_location_value) @file diff --git a/runtime/themes/snazzy.toml b/runtime/themes/snazzy.toml new file mode 100644 index 000000000000..c0547f33b614 --- /dev/null +++ b/runtime/themes/snazzy.toml @@ -0,0 +1,68 @@ +# Author : Sebastian Zivota +# Author : Timothy DeHerrera +"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"