Skip to content

Commit

Permalink
build: remove codemirror dependency from lsp (#1998)
Browse files Browse the repository at this point in the history
`CodeMirror.Token` is identical to `ContextTokenForCodeMirror`.
see graphql/vscode-graphql#335 (comment)
  • Loading branch information
ferm10n authored Nov 7, 2021
1 parent 716cf78 commit 8869c4b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/forty-apes-retire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'graphql-language-service-interface': patch
---

remove implicit codemirror dependency
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*
*/
import { CompletionItemKind } from 'vscode-languageserver-types';
import type CodeMirror from 'codemirror';

import {
FragmentDefinitionNode,
Expand Down Expand Up @@ -60,6 +59,7 @@ import {
RuleKinds,
RuleKind,
_RuleKinds,
ContextTokenForCodeMirror,
} from 'graphql-language-service-parser';

import {
Expand Down Expand Up @@ -95,7 +95,7 @@ export function getAutocompleteSuggestions(
schema: GraphQLSchema,
queryText: string,
cursor: IPosition,
contextToken?: CodeMirror.Token,
contextToken?: ContextTokenForCodeMirror,
fragmentDefs?: FragmentDefinitionNode[] | string,
): Array<CompletionItem> {
const token: ContextToken =
Expand Down

0 comments on commit 8869c4b

Please sign in to comment.