summaryrefslogtreecommitdiff
path: root/cli/lsp/lsp_custom.rs
diff options
context:
space:
mode:
authorhaturau <135221985+haturatu@users.noreply.github.com>2024-11-20 01:20:47 +0900
committerGitHub <noreply@github.com>2024-11-20 01:20:47 +0900
commit85719a67e59c7aa45bead26e4942d7df8b1b42d4 (patch)
treeface0aecaac53e93ce2f23b53c48859bcf1a36ec /cli/lsp/lsp_custom.rs
parent67697bc2e4a62a9670699fd18ad0dd8efc5bd955 (diff)
parent186b52731c6bb326c4d32905c5e732d082e83465 (diff)
Merge branch 'denoland:main' into main
Diffstat (limited to 'cli/lsp/lsp_custom.rs')
-rw-r--r--cli/lsp/lsp_custom.rs30
1 files changed, 27 insertions, 3 deletions
diff --git a/cli/lsp/lsp_custom.rs b/cli/lsp/lsp_custom.rs
index 5f485db7a..b570b6d0e 100644
--- a/cli/lsp/lsp_custom.rs
+++ b/cli/lsp/lsp_custom.rs
@@ -46,6 +46,30 @@ pub struct DiagnosticBatchNotificationParams {
pub messages_len: usize,
}
+#[derive(Debug, Deserialize, Serialize)]
+#[serde(rename_all = "camelCase")]
+pub struct DenoConfigurationData {
+ pub scope_uri: lsp::Uri,
+ pub workspace_root_scope_uri: Option<lsp::Uri>,
+ pub deno_json: Option<lsp::TextDocumentIdentifier>,
+ pub package_json: Option<lsp::TextDocumentIdentifier>,
+}
+
+#[derive(Debug, Deserialize, Serialize)]
+#[serde(rename_all = "camelCase")]
+pub struct DidRefreshDenoConfigurationTreeNotificationParams {
+ pub data: Vec<DenoConfigurationData>,
+}
+
+pub enum DidRefreshDenoConfigurationTreeNotification {}
+
+impl lsp::notification::Notification
+ for DidRefreshDenoConfigurationTreeNotification
+{
+ type Params = DidRefreshDenoConfigurationTreeNotificationParams;
+ const METHOD: &'static str = "deno/didRefreshDenoConfigurationTree";
+}
+
#[derive(Debug, Eq, Hash, PartialEq, Copy, Clone, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub enum DenoConfigurationChangeType {
@@ -88,13 +112,15 @@ pub struct DidChangeDenoConfigurationNotificationParams {
pub changes: Vec<DenoConfigurationChangeEvent>,
}
+// TODO(nayeemrmn): This is being replaced by
+// `DidRefreshDenoConfigurationTreeNotification` for Deno > v2.0.0. Remove it
+// soon.
pub enum DidChangeDenoConfigurationNotification {}
impl lsp::notification::Notification
for DidChangeDenoConfigurationNotification
{
type Params = DidChangeDenoConfigurationNotificationParams;
-
const METHOD: &'static str = "deno/didChangeDenoConfiguration";
}
@@ -102,7 +128,6 @@ pub enum DidUpgradeCheckNotification {}
impl lsp::notification::Notification for DidUpgradeCheckNotification {
type Params = DidUpgradeCheckNotificationParams;
-
const METHOD: &'static str = "deno/didUpgradeCheck";
}
@@ -125,6 +150,5 @@ pub enum DiagnosticBatchNotification {}
impl lsp::notification::Notification for DiagnosticBatchNotification {
type Params = DiagnosticBatchNotificationParams;
-
const METHOD: &'static str = "deno/internalTestDiagnosticBatch";
}