Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "lsp-types"
version = "0.97.0"
authors = ["Markus Westerlind <[email protected]>", "Bruno Medeiros <[email protected]>"]
edition = "2018"
edition = "2024"
description = "Types for interaction with a language server, using VSCode's Language Server Protocol"

repository = "https://github.com/gluon-lang/lsp-types"
Expand All @@ -15,11 +15,11 @@ keywords = ["language", "server", "lsp", "vscode", "lsif"]
license = "MIT"

[dependencies]
bitflags = "1.0.1"
serde = { version = "1.0.34", features = ["derive"] }
serde_json = "1.0.50"
bitflags = "2.9.0"
serde = { version = "1.0.219", features = ["derive"] }
serde_json = "1.0.140"
serde_repr = "0.1"
fluent-uri = "0.1.4"
fluent-uri = "0.3.2"

[features]
default = []
Expand Down
4 changes: 2 additions & 2 deletions src/inline_value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ pub struct InlineValueEvaluatableExpression {
/// - directly as a text value (class InlineValueText).
/// - as a name to use for a variable lookup (class InlineValueVariableLookup)
/// - as an evaluatable expression (class InlineValueEvaluatableExpression)
/// The InlineValue types combines all inline value types into one type.
/// The InlineValue types combines all inline value types into one type.
///
/// @since 3.17.0
#[derive(Debug, Eq, PartialEq, Clone, Deserialize, Serialize)]
Expand Down Expand Up @@ -184,8 +184,8 @@ pub struct InlineValueWorkspaceClientCapabilities {
#[cfg(test)]
mod tests {
use super::*;
use crate::tests::test_serialization;
use crate::Position;
use crate::tests::test_serialization;

#[test]
fn inline_values() {
Expand Down
3 changes: 2 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ extern crate bitflags;

use std::{collections::HashMap, fmt::Debug};

use serde::{de, de::Error, Deserialize, Serialize};
use serde::{Deserialize, Serialize, de, de::Error};
use serde_json::Value;

pub use uri::Uri;
Expand Down Expand Up @@ -2386,6 +2386,7 @@ pub struct RelativePattern {
pub type Pattern = String;

bitflags! {
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Ord, PartialOrd)]
pub struct WatchKind: u8 {
/// Interested in create events.
const Create = 1;
Expand Down
2 changes: 1 addition & 1 deletion src/notification.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use super::*;

use serde::{de::DeserializeOwned, Serialize};
use serde::{Serialize, de::DeserializeOwned};

pub trait Notification {
type Params: DeserializeOwned + Serialize + Send + Sync + 'static;
Expand Down
2 changes: 1 addition & 1 deletion src/request.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use super::*;

use serde::{de::DeserializeOwned, Serialize};
use serde::{Serialize, de::DeserializeOwned};

pub trait Request {
type Params: DeserializeOwned + Serialize + Send + Sync + 'static;
Expand Down
8 changes: 4 additions & 4 deletions src/uri.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::{hash::Hash, ops::Deref, str::FromStr};

use serde::{de::Error, Deserialize, Serialize};
use serde::{Deserialize, Serialize, de::Error};

/// Newtype struct around `fluent_uri::Uri<String>` with serialization implementations that use `as_str()` and 'from_str()' respectively.
#[derive(Debug, Clone)]
Expand All @@ -21,9 +21,9 @@ impl<'de> Deserialize<'de> for Uri {
D: serde::Deserializer<'de>,
{
let string = String::deserialize(deserializer)?;
fluent_uri::Uri::<String>::parse_from(string)
fluent_uri::Uri::<String>::parse(string)
.map(Uri)
.map_err(|(_, error)| Error::custom(error.to_string()))
.map_err(|err| Error::custom(err.to_string()))
}
}

Expand All @@ -40,7 +40,7 @@ impl PartialOrd for Uri {
}

impl FromStr for Uri {
type Err = fluent_uri::ParseError;
type Err = fluent_uri::error::ParseError;

fn from_str(s: &str) -> Result<Self, Self::Err> {
// TOUCH-UP:
Expand Down