summaryrefslogtreecommitdiffstats
path: root/vendor/lsp-types/src
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/lsp-types/src')
-rw-r--r--vendor/lsp-types/src/lib.rs5
-rw-r--r--vendor/lsp-types/src/semantic_tokens.rs32
2 files changed, 33 insertions, 4 deletions
diff --git a/vendor/lsp-types/src/lib.rs b/vendor/lsp-types/src/lib.rs
index 503264d19..6a4f544d2 100644
--- a/vendor/lsp-types/src/lib.rs
+++ b/vendor/lsp-types/src/lib.rs
@@ -985,7 +985,7 @@ pub type DocumentSelector = Vec<DocumentFilter>;
// ========================= Actual Protocol =========================
-#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
+#[derive(Debug, PartialEq, Clone, Deserialize, Serialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct InitializeParams {
/// The process Id of the parent process that started
@@ -1099,6 +1099,7 @@ pub struct GotoCapability {
pub dynamic_registration: Option<bool>,
/// The client supports additional metadata in the form of definition links.
+ #[serde(skip_serializing_if = "Option::is_none")]
pub link_support: Option<bool>,
}
@@ -1781,7 +1782,7 @@ pub struct ServerCapabilities {
#[serde(skip_serializing_if = "Option::is_none")]
pub type_definition_provider: Option<TypeDefinitionProviderCapability>,
- /// the server provides goto implementation support.
+ /// The server provides goto implementation support.
#[serde(skip_serializing_if = "Option::is_none")]
pub implementation_provider: Option<ImplementationProviderCapability>,
diff --git a/vendor/lsp-types/src/semantic_tokens.rs b/vendor/lsp-types/src/semantic_tokens.rs
index 70e593190..f1b6d53d2 100644
--- a/vendor/lsp-types/src/semantic_tokens.rs
+++ b/vendor/lsp-types/src/semantic_tokens.rs
@@ -10,8 +10,7 @@ use crate::{
/// A set of predefined token types. This set is not fixed
/// and clients can specify additional token types via the
/// corresponding client capabilities.
-///
-/// @since 3.16.0
+/// since @3.16.0
#[derive(Debug, Eq, PartialEq, Hash, PartialOrd, Clone, Deserialize, Serialize)]
pub struct SemanticTokenType(Cow<'static, str>);
@@ -39,6 +38,10 @@ impl SemanticTokenType {
pub const REGEXP: SemanticTokenType = SemanticTokenType::new("regexp");
pub const OPERATOR: SemanticTokenType = SemanticTokenType::new("operator");
+ /// since @3.17.0
+ #[cfg(feature = "proposed")]
+ pub const DECORATOR: SemanticTokenType = SemanticTokenType::new("decorator");
+
pub const fn new(tag: &'static str) -> Self {
SemanticTokenType(Cow::Borrowed(tag))
}
@@ -365,6 +368,31 @@ pub struct SemanticTokensClientCapabilities {
/// Whether the client supports tokens that can span multiple lines.
#[serde(skip_serializing_if = "Option::is_none")]
pub multiline_token_support: Option<bool>,
+
+ /// Whether the client allows the server to actively cancel a
+ /// semantic token request, e.g. supports returning
+ /// ErrorCodes.ServerCancelled. If a server does the client
+ /// needs to retrigger the request.
+ ///
+ /// since @3.17.0
+ #[cfg(feature = "proposed")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub server_cancel_support: Option<bool>,
+
+
+ /// Whether the client uses semantic tokens to augment existing
+ /// syntax tokens. If set to `true` client side created syntax
+ /// tokens and semantic tokens are both used for colorization. If
+ /// set to `false` the client only uses the returned semantic tokens
+ /// for colorization.
+ ///
+ /// If the value is `undefined` then the client behavior is not
+ /// specified.
+ ///
+ /// @since 3.17.0
+ #[cfg(feature = "proposed")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub augments_syntax_tokens: Option<bool>,
}
#[derive(Debug, Eq, PartialEq, Clone, Default, Deserialize, Serialize)]