From 47cdd23e509acbd4e235dde511ccbe482ae5a566 Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Mon, 28 Apr 2025 09:44:23 -0400 Subject: [PATCH 1/2] LSP: Fix `Client::supports_feature` check for 'colorProvider' The old check would allow sending textDocument/documentColor requests when the server declared `{"colorProvider": false}` in its capabilities as this was `Some`: Some(ColorProviderCapability::Simple(false)) The Julia language server sets this explicitly to `false` in the wild. --- helix-lsp/src/client.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/helix-lsp/src/client.rs b/helix-lsp/src/client.rs index f82751051..01b1b2c39 100644 --- a/helix-lsp/src/client.rs +++ b/helix-lsp/src/client.rs @@ -356,7 +356,14 @@ impl Client { capabilities.inlay_hint_provider, Some(OneOf::Left(true) | OneOf::Right(InlayHintServerCapabilities::Options(_))) ), - LanguageServerFeature::DocumentColors => capabilities.color_provider.is_some(), + LanguageServerFeature::DocumentColors => matches!( + capabilities.color_provider, + Some( + ColorProviderCapability::Simple(true) + | ColorProviderCapability::ColorProvider(_) + | ColorProviderCapability::Options(_) + ) + ), } } From fbc4e5798e8a6d493bc74bc18d35ebf91006baef Mon Sep 17 00:00:00 2001 From: RoloEdits Date: Mon, 28 Apr 2025 07:48:54 -0700 Subject: [PATCH 2/2] chore(msrv): bump from 1.76 to 1.82 (#13275) Co-authored-by: Michael Davis --- .github/workflows/build.yml | 2 +- Cargo.toml | 2 +- helix-event/src/test.rs | 1 + helix-lsp-types/src/lib.rs | 4 ++-- helix-stdx/tests/path.rs | 6 +----- rust-toolchain.toml | 2 +- 6 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5cdc795fc..90630aeb3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,7 @@ on: - cron: "00 01 * * *" env: - MSRV: "1.76" + MSRV: "1.82" # This key can be changed to bust the cache of tree-sitter grammars. GRAMMAR_CACHE_VERSION: "" diff --git a/Cargo.toml b/Cargo.toml index 667a83967..2e8bace50 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -56,4 +56,4 @@ categories = ["editor"] repository = "https://github.com/helix-editor/helix" homepage = "https://helix-editor.com" license = "MPL-2.0" -rust-version = "1.76" +rust-version = "1.82" diff --git a/helix-event/src/test.rs b/helix-event/src/test.rs index a1283ada1..5a66471ef 100644 --- a/helix-event/src/test.rs +++ b/helix-event/src/test.rs @@ -56,6 +56,7 @@ fn smoke_test() { } #[test] +#[allow(dead_code)] fn dynamic() { events! { Event3 {} diff --git a/helix-lsp-types/src/lib.rs b/helix-lsp-types/src/lib.rs index 41c483f42..fd668de5f 100644 --- a/helix-lsp-types/src/lib.rs +++ b/helix-lsp-types/src/lib.rs @@ -2568,9 +2568,9 @@ pub enum Documentation { /// /// The pair of a language and a value is an equivalent to markdown: /// -/// ```${language} +///
```${language}
 /// ${value}
-/// ```
+/// ```
#[derive(Debug, Eq, PartialEq, Clone, Deserialize, Serialize)] #[serde(untagged)] pub enum MarkedString { diff --git a/helix-stdx/tests/path.rs b/helix-stdx/tests/path.rs index ebc35f028..1e530ce0e 100644 --- a/helix-stdx/tests/path.rs +++ b/helix-stdx/tests/path.rs @@ -1,10 +1,6 @@ #![cfg(windows)] -use std::{ - env::set_current_dir, - error::Error, - path::{Component, Path, PathBuf}, -}; +use std::{env::set_current_dir, error::Error, path::Component}; use helix_stdx::path; use tempfile::Builder; diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 70e85c40b..74c6fc7a2 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.76.0" +channel = "1.82.0" components = ["rustfmt", "rust-src", "clippy"]