fix not work witk javascriptjsx filetype

This commit is contained in:
Qiming Zhao 2020-11-24 12:32:07 +08:00
parent c08e52f97e
commit 2acdb233c6
2 changed files with 7 additions and 7 deletions

View file

@ -2,8 +2,8 @@
* Copyright (c) Microsoft Corporation. All rights reserved. * Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information. * 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 { commands, DiagnosticKind, disposeAll, languages, Uri, workspace } from 'coc.nvim'
import { Uri, workspace, commands, events, languages, DiagnosticKind, ServiceStat, disposeAll } from 'coc.nvim' import { CodeActionKind, Diagnostic, DiagnosticSeverity, Disposable } from 'vscode-languageserver-protocol'
import { CachedNavTreeResponse } from './features/baseCodeLensProvider' import { CachedNavTreeResponse } from './features/baseCodeLensProvider'
import CompletionItemProvider from './features/completionItemProvider' import CompletionItemProvider from './features/completionItemProvider'
import DefinitionProvider from './features/definitionProvider' import DefinitionProvider from './features/definitionProvider'
@ -15,24 +15,24 @@ import Folding from './features/folding'
import FormattingProvider from './features/formatting' import FormattingProvider from './features/formatting'
import HoverProvider from './features/hover' import HoverProvider from './features/hover'
import ImplementationsCodeLensProvider from './features/implementationsCodeLens' import ImplementationsCodeLensProvider from './features/implementationsCodeLens'
import ImportfixProvider from './features/importFix'
import InstallModuleProvider from './features/moduleInstall'
// import TagCompletionProvider from './features/tagCompletion' // import TagCompletionProvider from './features/tagCompletion'
import QuickfixProvider from './features/quickfix' import QuickfixProvider from './features/quickfix'
import ImportfixProvider from './features/importFix'
import RefactorProvider from './features/refactor' import RefactorProvider from './features/refactor'
import ReferenceProvider from './features/references' import ReferenceProvider from './features/references'
import ReferencesCodeLensProvider from './features/referencesCodeLens' import ReferencesCodeLensProvider from './features/referencesCodeLens'
import RenameProvider from './features/rename' import RenameProvider from './features/rename'
import SignatureHelpProvider from './features/signatureHelp' import SignatureHelpProvider from './features/signatureHelp'
import SmartSelection from './features/smartSelect'
import UpdateImportsOnFileRenameHandler from './features/updatePathOnRename' import UpdateImportsOnFileRenameHandler from './features/updatePathOnRename'
import WatchBuild from './features/watchBuild' import WatchBuild from './features/watchBuild'
import WorkspaceSymbolProvider from './features/workspaceSymbols' import WorkspaceSymbolProvider from './features/workspaceSymbols'
import SmartSelection from './features/smartSelect' import { OrganizeImportsCodeActionProvider } from './organizeImports'
import TypeScriptServiceClient from './typescriptServiceClient' import TypeScriptServiceClient from './typescriptServiceClient'
import InstallModuleProvider from './features/moduleInstall'
import API from './utils/api' import API from './utils/api'
import { LanguageDescription } from './utils/languageDescription' import { LanguageDescription } from './utils/languageDescription'
import TypingsStatus from './utils/typingsStatus' import TypingsStatus from './utils/typingsStatus'
import { OrganizeImportsCodeActionProvider } from './organizeImports'
const suggestionSetting = 'suggestionActions.enabled' const suggestionSetting = 'suggestionActions.enabled'

View file

@ -33,7 +33,7 @@ export const standardLanguageDescriptions: LanguageDescription[] = [
id: 'javascript', id: 'javascript',
diagnosticSource: 'ts', diagnosticSource: 'ts',
diagnosticOwner: 'typescript', diagnosticOwner: 'typescript',
modeIds: [languageModeIds.javascript, languageModeIds.javascriptreact], modeIds: [languageModeIds.javascript, languageModeIds.javascriptreact, languageModeIds.javascriptjsx],
diagnosticLanguage: DiagnosticLanguage.JavaScript, diagnosticLanguage: DiagnosticLanguage.JavaScript,
configFile: 'jsconfig.json' configFile: 'jsconfig.json'
} }