From 2acdb233c6b90690f9a49dfdffc8a0b0e53d6764 Mon Sep 17 00:00:00 2001 From: Qiming Zhao Date: Tue, 24 Nov 2020 12:32:07 +0800 Subject: [PATCH] fix not work witk javascriptjsx filetype --- src/server/languageProvider.ts | 12 ++++++------ src/server/utils/languageDescription.ts | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/server/languageProvider.ts b/src/server/languageProvider.ts index e38c4cf..b9bb3e4 100644 --- a/src/server/languageProvider.ts +++ b/src/server/languageProvider.ts @@ -2,8 +2,8 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { Diagnostic, Disposable, CodeActionKind, DiagnosticSeverity } from 'vscode-languageserver-protocol' -import { Uri, workspace, commands, events, languages, DiagnosticKind, ServiceStat, disposeAll } from 'coc.nvim' +import { commands, DiagnosticKind, disposeAll, languages, Uri, workspace } from 'coc.nvim' +import { CodeActionKind, Diagnostic, DiagnosticSeverity, Disposable } from 'vscode-languageserver-protocol' import { CachedNavTreeResponse } from './features/baseCodeLensProvider' import CompletionItemProvider from './features/completionItemProvider' import DefinitionProvider from './features/definitionProvider' @@ -15,24 +15,24 @@ import Folding from './features/folding' import FormattingProvider from './features/formatting' import HoverProvider from './features/hover' import ImplementationsCodeLensProvider from './features/implementationsCodeLens' +import ImportfixProvider from './features/importFix' +import InstallModuleProvider from './features/moduleInstall' // import TagCompletionProvider from './features/tagCompletion' import QuickfixProvider from './features/quickfix' -import ImportfixProvider from './features/importFix' import RefactorProvider from './features/refactor' import ReferenceProvider from './features/references' import ReferencesCodeLensProvider from './features/referencesCodeLens' import RenameProvider from './features/rename' import SignatureHelpProvider from './features/signatureHelp' +import SmartSelection from './features/smartSelect' import UpdateImportsOnFileRenameHandler from './features/updatePathOnRename' import WatchBuild from './features/watchBuild' import WorkspaceSymbolProvider from './features/workspaceSymbols' -import SmartSelection from './features/smartSelect' +import { OrganizeImportsCodeActionProvider } from './organizeImports' import TypeScriptServiceClient from './typescriptServiceClient' -import InstallModuleProvider from './features/moduleInstall' import API from './utils/api' import { LanguageDescription } from './utils/languageDescription' import TypingsStatus from './utils/typingsStatus' -import { OrganizeImportsCodeActionProvider } from './organizeImports' const suggestionSetting = 'suggestionActions.enabled' diff --git a/src/server/utils/languageDescription.ts b/src/server/utils/languageDescription.ts index 6a18820..2605862 100644 --- a/src/server/utils/languageDescription.ts +++ b/src/server/utils/languageDescription.ts @@ -33,7 +33,7 @@ export const standardLanguageDescriptions: LanguageDescription[] = [ id: 'javascript', diagnosticSource: 'ts', diagnosticOwner: 'typescript', - modeIds: [languageModeIds.javascript, languageModeIds.javascriptreact], + modeIds: [languageModeIds.javascript, languageModeIds.javascriptreact, languageModeIds.javascriptjsx], diagnosticLanguage: DiagnosticLanguage.JavaScript, configFile: 'jsconfig.json' }