From 6eada1ad12c1e7f2c426f1b7f4b66ce9472479d2 Mon Sep 17 00:00:00 2001 From: Jesse Atkinson Date: Thu, 5 Aug 2021 22:56:13 -0700 Subject: [PATCH] Update `TextDocument` import statements Warning from tsserver: ``` [tsserver 6385] [I] 'TextDocument' is deprecated ``` If you take a look at the actual `@deprecated` jsdocs it asks you to "Use the text document from the new vscode-languageserver-textdocument package." --- src/tvp/feature.ts | 3 ++- src/tvp/model.ts | 3 ++- src/tvp/provider.ts | 3 ++- src/tvp/treeview.ts | 3 ++- src/tvp/treeviews.ts | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/tvp/feature.ts b/src/tvp/feature.ts index b833c98..0defd4a 100644 --- a/src/tvp/feature.ts +++ b/src/tvp/feature.ts @@ -23,9 +23,10 @@ import { Position, RequestType, RPCMessageType, - TextDocument, TextDocumentPositionParams, } from "vscode-languageserver-protocol"; +import { TextDocument } from "vscode-languageserver-textdocument"; + import { TreeViewProvider } from "./provider"; export class TreeViewFeature implements DynamicFeature { diff --git a/src/tvp/model.ts b/src/tvp/model.ts index 7ba61a2..68dff12 100644 --- a/src/tvp/model.ts +++ b/src/tvp/model.ts @@ -1,6 +1,7 @@ import { MetalsTreeViewNode } from "metals-languageclient"; import { Disposable, Emitter } from "vscode-jsonrpc"; -import { Position, TextDocument } from "vscode-languageserver-types"; +import { Position } from "vscode-languageserver-types"; +import { TextDocument } from "vscode-languageserver-textdocument"; import { TreeViewProvider } from "./provider"; import { groupBy } from "./utils"; diff --git a/src/tvp/provider.ts b/src/tvp/provider.ts index 6d4c9b4..4d6afd6 100644 --- a/src/tvp/provider.ts +++ b/src/tvp/provider.ts @@ -3,7 +3,8 @@ import { MetalsTreeViewNode, } from "metals-languageclient"; import { Event } from "vscode-jsonrpc"; -import { Position, TextDocument } from "vscode-languageserver-protocol"; +import { Position } from "vscode-languageserver-protocol"; +import { TextDocument } from "vscode-languageserver-textdocument"; export interface TreeViewProvider { viewId: string; diff --git a/src/tvp/treeview.ts b/src/tvp/treeview.ts index 6da2d1a..6408492 100644 --- a/src/tvp/treeview.ts +++ b/src/tvp/treeview.ts @@ -6,7 +6,8 @@ import { WorkspaceConfiguration, } from "coc.nvim"; import * as log4js from "log4js"; -import { Position, TextDocument } from "vscode-languageserver-types"; +import { Position } from "vscode-languageserver-types"; +import { TextDocument } from "vscode-languageserver-textdocument"; import { Node, NodeView, TreeModel, TreeModelUpdate } from "./model"; import { sequence } from "./utils"; diff --git a/src/tvp/treeviews.ts b/src/tvp/treeviews.ts index e11e78a..5286dbc 100644 --- a/src/tvp/treeviews.ts +++ b/src/tvp/treeviews.ts @@ -1,7 +1,8 @@ import { NeovimClient as Neovim, Tabpage, Window } from "@chemzqm/neovim"; import { Disposable, workspace, WorkspaceConfiguration } from "coc.nvim"; import * as log4js from "log4js"; -import { Position, TextDocument } from "vscode-languageserver-types"; +import { Position } from "vscode-languageserver-types"; +import { TextDocument } from "vscode-languageserver-textdocument"; import { TreeModel } from "./model"; import { TreeView, TreeViewDescription } from "./treeview"; import { sequence } from "./utils";