fe05e038d5
* Support tsserver.watchOptions * Improve triggerCharacters for completion * Configure command on server startup
610 lines
19 KiB
JSON
610 lines
19 KiB
JSON
{
|
||
"name": "coc-tsserver",
|
||
"version": "1.4.15",
|
||
"description": "tsserver extension for coc.nvim",
|
||
"main": "lib/index.js",
|
||
"publisher": "chemzqm",
|
||
"engines": {
|
||
"coc": "^0.0.69"
|
||
},
|
||
"repository": {
|
||
"type": "git",
|
||
"url": "https://github.com/neoclide/coc-tsserver.git"
|
||
},
|
||
"keywords": [
|
||
"coc.nvim",
|
||
"tsserver",
|
||
"typescript"
|
||
],
|
||
"scripts": {
|
||
"clean": "rimraf lib",
|
||
"build": "webpack",
|
||
"prepare": "npx npm-run-all clean build"
|
||
},
|
||
"activationEvents": [
|
||
"onLanguage:javascript",
|
||
"onLanguage:javascriptreact",
|
||
"onLanguage:javascript.jsx",
|
||
"onLanguage:typescript",
|
||
"onLanguage:typescript.tsx",
|
||
"onLanguage:typescript.jsx",
|
||
"onLanguage:typescriptreact",
|
||
"onLanguage:jsx-tags",
|
||
"onCommand:typescript.reloadProjects",
|
||
"onCommand:javascript.reloadProjects",
|
||
"onCommand:javascript.goToProjectConfig",
|
||
"onCommand:typescript.goToProjectConfig",
|
||
"onCommand:typescript.openTsServerLog",
|
||
"onCommand:tsserver.watchBuild"
|
||
],
|
||
"contributes": {
|
||
"rootPatterns": [
|
||
{
|
||
"filetype": "javascript",
|
||
"patterns": [
|
||
"package.json",
|
||
"jsconfig.json"
|
||
]
|
||
},
|
||
{
|
||
"filetype": "javascriptreact",
|
||
"patterns": [
|
||
"package.json",
|
||
"jsconfig.json"
|
||
]
|
||
},
|
||
{
|
||
"filetype": "typescript",
|
||
"patterns": [
|
||
"package.json",
|
||
"tsconfig.json"
|
||
]
|
||
},
|
||
{
|
||
"filetype": "typescriptreact",
|
||
"patterns": [
|
||
"package.json",
|
||
"tsconfig.json"
|
||
]
|
||
}
|
||
],
|
||
"commands": [
|
||
{
|
||
"title": "Reload current project",
|
||
"category": "TSServer",
|
||
"command": "tsserver.reloadProjects"
|
||
},
|
||
{
|
||
"title": "Open log file of tsserver.",
|
||
"category": "TSServer",
|
||
"command": "tsserver.openTsServerLog"
|
||
},
|
||
{
|
||
"title": "Open project config file.",
|
||
"category": "TSServer",
|
||
"command": "tsserver.goToProjectConfig"
|
||
},
|
||
{
|
||
"title": "Restart tsserver",
|
||
"category": "TSServer",
|
||
"command": "tsserver.restart"
|
||
},
|
||
{
|
||
"title": "Run `tsc --watch` for current project by use vim's job feature.",
|
||
"category": "TSServer",
|
||
"command": "tsserver.watchBuild"
|
||
},
|
||
{
|
||
"title": "Fix autofixable problems of current document.",
|
||
"category": "TSServer",
|
||
"command": "tsserver.executeAutofix"
|
||
}
|
||
],
|
||
"configuration": {
|
||
"type": "object",
|
||
"title": "Tsserver",
|
||
"properties": {
|
||
"tsserver.enable": {
|
||
"type": "boolean",
|
||
"default": true,
|
||
"description": "Enable tsserver extension"
|
||
},
|
||
"tsserver.locale": {
|
||
"type": "string",
|
||
"default": "",
|
||
"description": "Locale of tsserver"
|
||
},
|
||
"tsserver.typingsCacheLocation": {
|
||
"type": "string",
|
||
"default": "",
|
||
"description": "Folder path for cache typings"
|
||
},
|
||
"tsserver.formatOnType": {
|
||
"type": "boolean",
|
||
"default": true,
|
||
"description": "Run format on type special characters."
|
||
},
|
||
"tsserver.enableJavascript": {
|
||
"type": "boolean",
|
||
"default": true,
|
||
"description": "Use tsserver for javascript files"
|
||
},
|
||
"tsserver.ignoreLocalTsserver": {
|
||
"type": "boolean",
|
||
"default": false,
|
||
"description": "Always use tsserver module from tsserver.tsdk or tsserver extension."
|
||
},
|
||
"tsserver.maxTsServerMemory": {
|
||
"type": "number",
|
||
"default": 0,
|
||
"description": "Set the maximum amount of memory to allocate to the TypeScript server process"
|
||
},
|
||
"tsserver.watchOptions": {
|
||
"type": "object",
|
||
"description": "Configure which watching strategies should be used to keep track of files and directories. Requires using TypeScript 3.8+ in the workspace.",
|
||
"properties": {
|
||
"watchFile": {
|
||
"type": "string",
|
||
"description": "Strategy for how individual files are watched.",
|
||
"enum": [
|
||
"fixedPollingInterval",
|
||
"priorityPollingInterval",
|
||
"dynamicPriorityPolling",
|
||
"useFsEvents",
|
||
"useFsEventsOnParentDirectory"
|
||
],
|
||
"default": "useFsEvents"
|
||
},
|
||
"watchDirectory": {
|
||
"type": "string",
|
||
"description": "Strategy for how entire directory trees are watched under systems that lack recursive file-watching functionality.",
|
||
"enum": [
|
||
"fixedPollingInterval",
|
||
"dynamicPriorityPolling",
|
||
"useFsEvents"
|
||
],
|
||
"default": "useFsEvents"
|
||
},
|
||
"fallbackPolling": {
|
||
"type": "string",
|
||
"description": "When using file system events, this option specifies the polling strategy that gets used when the system runs out of native file watchers and/or doesn’t support native file watchers.",
|
||
"enum": [
|
||
"fixedPollingInterval",
|
||
"priorityPollingInterval",
|
||
"dynamicPriorityPolling"
|
||
]
|
||
},
|
||
"synchronousWatchDirectory": {
|
||
"type": "boolean",
|
||
"description": "Disable deferred watching on directories. Deferred watching is useful when lots of file changes might occur at once (e.g. a change in node_modules from running npm install), but you might want to disable it with this flag for some less-common setups."
|
||
}
|
||
}
|
||
},
|
||
"tsserver.tsdk": {
|
||
"type": "string",
|
||
"default": "",
|
||
"description": "Directory contains tsserver.js,"
|
||
},
|
||
"tsserver.npm": {
|
||
"type": "string",
|
||
"default": "",
|
||
"description": "Executable path of npm for download typings"
|
||
},
|
||
"tsserver.log": {
|
||
"type": "string",
|
||
"default": "off",
|
||
"enum": [
|
||
"normal",
|
||
"terse",
|
||
"verbose",
|
||
"off"
|
||
],
|
||
"description": "Log level of tsserver"
|
||
},
|
||
"tsserver.trace.server": {
|
||
"type": "string",
|
||
"default": "off",
|
||
"enum": [
|
||
"off",
|
||
"messages",
|
||
"verbose"
|
||
],
|
||
"description": "Trace level of tsserver"
|
||
},
|
||
"tsserver.pluginRoot": {
|
||
"type": "string",
|
||
"default": [],
|
||
"items": {
|
||
"type": "string"
|
||
},
|
||
"description": "Folder contains tsserver plugins"
|
||
},
|
||
"tsserver.debugPort": {
|
||
"type": "number",
|
||
"description": "Debug port number of tsserver"
|
||
},
|
||
"tsserver.reportStyleChecksAsWarnings": {
|
||
"type": "boolean",
|
||
"default": true
|
||
},
|
||
"tsserver.implicitProjectConfig.checkJs": {
|
||
"type": "boolean",
|
||
"default": false,
|
||
"description": "Enable checkJs for implicit project"
|
||
},
|
||
"tsserver.implicitProjectConfig.experimentalDecorators": {
|
||
"type": "boolean",
|
||
"default": false,
|
||
"description": "Enable experimentalDecorators for implicit project"
|
||
},
|
||
"tsserver.disableAutomaticTypeAcquisition": {
|
||
"type": "boolean",
|
||
"default": false,
|
||
"description": "Disable download of typings"
|
||
},
|
||
"tsserver.useBatchedBufferSync": {
|
||
"type": "boolean",
|
||
"default": true,
|
||
"description": "Use batched buffer sync support."
|
||
},
|
||
"typescript.showUnused": {
|
||
"type": "boolean",
|
||
"default": true,
|
||
"description": "Show unused variable hint."
|
||
},
|
||
"typescript.updateImportsOnFileMove.enable": {
|
||
"type": "boolean",
|
||
"default": true,
|
||
"description": "Enable update imports on file move."
|
||
},
|
||
"typescript.implementationsCodeLens.enable": {
|
||
"type": "boolean",
|
||
"default": true,
|
||
"description": "Enable codeLens for implementations"
|
||
},
|
||
"typescript.referencesCodeLens.enable": {
|
||
"type": "boolean",
|
||
"default": true,
|
||
"description": "Enable codeLens for references"
|
||
},
|
||
"typescript.preferences.importModuleSpecifier": {
|
||
"type": "string",
|
||
"default": "auto",
|
||
"description": "Preferred path style for auto imports.",
|
||
"enum": [
|
||
"non-relative",
|
||
"relative",
|
||
"auto"
|
||
]
|
||
},
|
||
"typescript.preferences.importModuleSpecifierEnding": {
|
||
"type": "string",
|
||
"enum": [
|
||
"auto",
|
||
"minimal",
|
||
"index",
|
||
"js"
|
||
],
|
||
"default": "auto",
|
||
"description": "Preferred path ending for auto imports.",
|
||
"scope": "resource"
|
||
},
|
||
"typescript.preferences.quoteStyle": {
|
||
"type": "string",
|
||
"default": "auto",
|
||
"enum": [
|
||
"auto",
|
||
"single",
|
||
"double"
|
||
]
|
||
},
|
||
"typescript.suggestionActions.enabled": {
|
||
"type": "boolean",
|
||
"default": true,
|
||
"description": "Enable/disable suggestion diagnostics for TypeScript files in the editor. Requires using TypeScript 2.8 or newer in the workspace."
|
||
},
|
||
"typescript.validate.enable": {
|
||
"type": "boolean",
|
||
"default": true,
|
||
"description": "Enable/disable TypeScript validation."
|
||
},
|
||
"typescript.suggest.enabled": {
|
||
"type": "boolean",
|
||
"default": true
|
||
},
|
||
"typescript.suggest.paths": {
|
||
"type": "boolean",
|
||
"default": true,
|
||
"description": "Enable/disable suggest paths in import statement and require calls"
|
||
},
|
||
"typescript.suggest.autoImports": {
|
||
"type": "boolean",
|
||
"default": true,
|
||
"description": "Enable/disable auto import suggests."
|
||
},
|
||
"typescript.suggest.completeFunctionCalls": {
|
||
"type": "boolean",
|
||
"default": true,
|
||
"description": "Enable snippet for method suggestion"
|
||
},
|
||
"typescript.format.enabled": {
|
||
"type": "boolean",
|
||
"default": true,
|
||
"description": "Enable format for typescript."
|
||
},
|
||
"typescript.format.insertSpaceAfterCommaDelimiter": {
|
||
"type": "boolean",
|
||
"default": true
|
||
},
|
||
"typescript.format.insertSpaceAfterConstructor": {
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"typescript.format.insertSpaceAfterSemicolonInForStatements": {
|
||
"type": "boolean",
|
||
"default": true
|
||
},
|
||
"typescript.format.insertSpaceBeforeAndAfterBinaryOperators": {
|
||
"type": "boolean",
|
||
"default": true
|
||
},
|
||
"typescript.format.insertSpaceAfterKeywordsInControlFlowStatements": {
|
||
"type": "boolean",
|
||
"default": true
|
||
},
|
||
"typescript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": {
|
||
"type": "boolean",
|
||
"default": true
|
||
},
|
||
"typescript.format.insertSpaceBeforeFunctionParenthesis": {
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": {
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": {
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": {
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": {
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": {
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"typescript.format.insertSpaceAfterTypeAssertion": {
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"typescript.format.placeOpenBraceOnNewLineForFunctions": {
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"typescript.format.placeOpenBraceOnNewLineForControlBlocks": {
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"typescript.format.semicolons": {
|
||
"type": "string",
|
||
"default": "ignore",
|
||
"description": "Defines handling of optional semicolons. Requires using TypeScript 3.7 or newer in the workspace.",
|
||
"scope": "resource",
|
||
"enum": [
|
||
"ignore",
|
||
"insert",
|
||
"remove"
|
||
]
|
||
},
|
||
"typescript.suggest.includeAutomaticOptionalChainCompletions": {
|
||
"type": "boolean",
|
||
"default": true,
|
||
"description": "Enable/disable showing completions on potentially undefined values that insert an optional chain call. Requires TS 3.7+ and strict null checks to be enabled.",
|
||
"scope": "resource"
|
||
},
|
||
"javascript.showUnused": {
|
||
"type": "boolean",
|
||
"default": true,
|
||
"description": "Show unused variable hint."
|
||
},
|
||
"javascript.updateImportsOnFileMove.enable": {
|
||
"type": "boolean",
|
||
"default": true
|
||
},
|
||
"javascript.implementationsCodeLens.enable": {
|
||
"type": "boolean",
|
||
"default": true
|
||
},
|
||
"javascript.referencesCodeLens.enable": {
|
||
"type": "boolean",
|
||
"default": true
|
||
},
|
||
"javascript.preferences.importModuleSpecifier": {
|
||
"type": "string",
|
||
"default": "auto",
|
||
"description": "Preferred path style for auto imports.",
|
||
"enum": [
|
||
"auto",
|
||
"non-relative",
|
||
"relative"
|
||
]
|
||
},
|
||
"javascript.preferences.importModuleSpecifierEnding": {
|
||
"type": "string",
|
||
"enum": [
|
||
"auto",
|
||
"minimal",
|
||
"index",
|
||
"js"
|
||
],
|
||
"default": "auto",
|
||
"description": "Preferred path ending for auto imports.",
|
||
"scope": "resource"
|
||
},
|
||
"javascript.preferences.quoteStyle": {
|
||
"type": "string",
|
||
"default": "auto",
|
||
"enum": [
|
||
"auto",
|
||
"single",
|
||
"double"
|
||
]
|
||
},
|
||
"javascript.validate.enable": {
|
||
"type": "boolean",
|
||
"default": true,
|
||
"description": "Enable/disable JavaScript validation."
|
||
},
|
||
"javascript.suggestionActions.enabled": {
|
||
"type": "boolean",
|
||
"default": true,
|
||
"description": "Enable/disable suggestion diagnostics for JavaScript files in the editor. Requires using TypeScript 2.8 or newer in the workspace."
|
||
},
|
||
"javascript.suggest.names": {
|
||
"type": "boolean",
|
||
"default": true
|
||
},
|
||
"javascript.suggest.enabled": {
|
||
"type": "boolean",
|
||
"default": true
|
||
},
|
||
"javascript.suggest.paths": {
|
||
"type": "boolean",
|
||
"default": true,
|
||
"description": "Enable/disable suggest paths in import statement and require calls"
|
||
},
|
||
"javascript.suggest.autoImports": {
|
||
"type": "boolean",
|
||
"default": true,
|
||
"description": "Enable/disable auto import suggests."
|
||
},
|
||
"javascript.suggest.completeFunctionCalls": {
|
||
"type": "boolean",
|
||
"default": true,
|
||
"description": "Enable snippet for method suggestion"
|
||
},
|
||
"javascript.format.enabled": {
|
||
"type": "boolean",
|
||
"default": true,
|
||
"description": "Enable format for javascript."
|
||
},
|
||
"javascript.format.insertSpaceAfterCommaDelimiter": {
|
||
"type": "boolean",
|
||
"default": true
|
||
},
|
||
"javascript.format.insertSpaceAfterConstructor": {
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"javascript.format.insertSpaceAfterSemicolonInForStatements": {
|
||
"type": "boolean",
|
||
"default": true
|
||
},
|
||
"javascript.format.insertSpaceBeforeAndAfterBinaryOperators": {
|
||
"type": "boolean",
|
||
"default": true
|
||
},
|
||
"javascript.format.insertSpaceAfterKeywordsInControlFlowStatements": {
|
||
"type": "boolean",
|
||
"default": true
|
||
},
|
||
"javascript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": {
|
||
"type": "boolean",
|
||
"default": true
|
||
},
|
||
"javascript.format.insertSpaceBeforeFunctionParenthesis": {
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": {
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": {
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": {
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": {
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": {
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"javascript.format.insertSpaceAfterTypeAssertion": {
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"javascript.format.placeOpenBraceOnNewLineForFunctions": {
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"javascript.format.placeOpenBraceOnNewLineForControlBlocks": {
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"javascript.suggest.includeAutomaticOptionalChainCompletions": {
|
||
"type": "boolean",
|
||
"default": true,
|
||
"description": "%configuration.suggest.includeAutomaticOptionalChainCompletions%",
|
||
"scope": "resource"
|
||
},
|
||
"javascript.format.semicolons": {
|
||
"type": "string",
|
||
"default": "ignore",
|
||
"description": "Defines handling of optional semicolons. Requires using TypeScript 3.7 or newer in the workspace.",
|
||
"scope": "resource",
|
||
"enum": [
|
||
"ignore",
|
||
"insert",
|
||
"remove"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"snippets": [
|
||
{
|
||
"language": "typescript",
|
||
"path": "./snippets/typescript.json"
|
||
},
|
||
{
|
||
"language": "typescriptreact",
|
||
"path": "./snippets/typescript.json"
|
||
}
|
||
]
|
||
},
|
||
"author": "chemzqm@gmail.com",
|
||
"license": "MIT",
|
||
"devDependencies": {
|
||
"@chemzqm/tsconfig": "^0.0.3",
|
||
"@chemzqm/tslint-config": "^1.0.18",
|
||
"@types/fast-diff": "^1.2.0",
|
||
"@types/node": "^13.11.1",
|
||
"coc.nvim": "^0.0.77",
|
||
"fast-diff": "^1.2.0",
|
||
"rimraf": "^3.0.2",
|
||
"semver": "^7.2.1",
|
||
"ts-loader": "^6.2.2",
|
||
"tslint": "^6.1.1",
|
||
"vscode-languageserver-protocol": "^3.15.3",
|
||
"webpack": "^4.42.1",
|
||
"webpack-cli": "^3.3.11",
|
||
"vscode-languageserver-textdocument": "^1.0.1",
|
||
"which": "^2.0.2"
|
||
},
|
||
"dependencies": {
|
||
"typescript": "3.8.3"
|
||
}
|
||
}
|