add typescript.suggest.objectLiteralMethodSnippets.enabled

This commit is contained in:
Qiming Zhao 2022-04-10 15:15:32 +08:00
parent 0cd99b05cc
commit 2fd4948bd5
No known key found for this signature in database
GPG key ID: 9722CD0E8D4DCB8C
3 changed files with 19 additions and 0 deletions

View file

@ -274,6 +274,11 @@ for guide of coc.nvim's configuration.
- `javascript.suggest.completeJSDocs` `typescript.suggest.completeJSDocs`: - `javascript.suggest.completeJSDocs` `typescript.suggest.completeJSDocs`:
Enable/disable suggestion to complete JSDoc comments. default: `true` Enable/disable suggestion to complete JSDoc comments. default: `true`
### Added on 1.10.1
- `typescript.suggest.objectLiteralMethodSnippets.enabled`
`javascript.suggest.objectLiteralMethodSnippets.enabled`:
Enable/disable snippet completions for methods in object literals. Requires using TypeScript 4.7+ in the workspace
Configurations are the same as with VSCode. Install Configurations are the same as with VSCode. Install
[coc-json](https://github.com/neoclide/coc-json) and try completion with [coc-json](https://github.com/neoclide/coc-json) and try completion with
`tsserver`, `typescript` or `javascript` in your `tsserver`, `typescript` or `javascript` in your

View file

@ -875,6 +875,18 @@
"type": "boolean", "type": "boolean",
"default": true, "default": true,
"description": "Enable/disable suggestion to complete JSDoc comments." "description": "Enable/disable suggestion to complete JSDoc comments."
},
"javascript.suggest.objectLiteralMethodSnippets.enabled": {
"type": "boolean",
"default": true,
"description": "Enable/disable snippet completions for methods in object literals. Requires using TypeScript 4.7+ in the workspace",
"scope": "resource"
},
"typescript.suggest.objectLiteralMethodSnippets.enabled": {
"type": "boolean",
"default": true,
"description": "Enable/disable snippet completions for methods in object literals. Requires using TypeScript 4.7+ in the workspace",
"scope": "resource"
} }
} }
}, },

View file

@ -161,6 +161,8 @@ export default class FileConfigurationManager {
paths: config.get<boolean>('paths', true), paths: config.get<boolean>('paths', true),
completeFunctionCalls: config.get<boolean>('completeFunctionCalls', true), completeFunctionCalls: config.get<boolean>('completeFunctionCalls', true),
autoImports: config.get<boolean>('autoImports', true), autoImports: config.get<boolean>('autoImports', true),
// @ts-expect-error until 4.7
includeCompletionsWithObjectLiteralMethodSnippets: config.get<boolean>('suggest.objectLiteralMethodSnippets.enabled', true),
generateReturnInDocTemplate: config.get<boolean>('jsdoc.generateReturns', true), generateReturnInDocTemplate: config.get<boolean>('jsdoc.generateReturns', true),
importStatementSuggestions: config.get<boolean>('importStatements', true), importStatementSuggestions: config.get<boolean>('importStatements', true),
includeCompletionsForImportStatements: config.get<boolean>('includeCompletionsForImportStatements', true), includeCompletionsForImportStatements: config.get<boolean>('includeCompletionsForImportStatements', true),