summaryrefslogtreecommitdiff
path: root/cli/lsp/analysis.rs
diff options
context:
space:
mode:
authorhvithrafn <darinmorrison@gmail.com>2021-01-29 12:34:33 -0700
committerGitHub <noreply@github.com>2021-01-29 14:34:33 -0500
commit013b8fe606ba146ad9f7d15a8a3a0e05defb0a12 (patch)
treeb889128da4f1cb43fabe204ad875ea698f520d67 /cli/lsp/analysis.rs
parent11dd6f201378fe04cccadb46b7054cc2f791dda8 (diff)
Update lspower dependency (#9179)
Diffstat (limited to 'cli/lsp/analysis.rs')
-rw-r--r--cli/lsp/analysis.rs22
1 files changed, 11 insertions, 11 deletions
diff --git a/cli/lsp/analysis.rs b/cli/lsp/analysis.rs
index 9081ce2ef..12f738382 100644
--- a/cli/lsp/analysis.rs
+++ b/cli/lsp/analysis.rs
@@ -11,9 +11,9 @@ use crate::tools::lint::create_linter;
use deno_core::error::AnyError;
use deno_core::ModuleSpecifier;
use deno_lint::rules;
-use lspower::lsp_types;
-use lspower::lsp_types::Position;
-use lspower::lsp_types::Range;
+use lspower::lsp;
+use lspower::lsp::Position;
+use lspower::lsp::Range;
use std::collections::HashMap;
use std::rc::Rc;
@@ -77,14 +77,14 @@ pub fn get_lint_references(
pub fn references_to_diagnostics(
references: Vec<Reference>,
-) -> Vec<lsp_types::Diagnostic> {
+) -> Vec<lsp::Diagnostic> {
references
.into_iter()
.map(|r| match r.category {
- Category::Lint { message, code, .. } => lsp_types::Diagnostic {
+ Category::Lint { message, code, .. } => lsp::Diagnostic {
range: r.range,
- severity: Some(lsp_types::DiagnosticSeverity::Warning),
- code: Some(lsp_types::NumberOrString::String(code)),
+ severity: Some(lsp::DiagnosticSeverity::Warning),
+ code: Some(lsp::NumberOrString::String(code)),
code_description: None,
source: Some("deno-lint".to_string()),
message,
@@ -270,12 +270,12 @@ mod tests {
let actual = as_lsp_range(&fixture);
assert_eq!(
actual,
- lsp_types::Range {
- start: lsp_types::Position {
+ lsp::Range {
+ start: lsp::Position {
line: 0,
character: 2,
},
- end: lsp_types::Position {
+ end: lsp::Position {
line: 1,
character: 0,
},
@@ -293,7 +293,7 @@ mod tests {
Router,
Status,
} from "https://deno.land/x/oak@v6.3.2/mod.ts";
-
+
// @deno-types="https://deno.land/x/types/react/index.d.ts";
import * as React from "https://cdn.skypack.dev/react";
"#;