Skip to content

Commit 6cf6b86

Browse files
committed
Add disableSuggestions option
1 parent 8fbd1b4 commit 6cf6b86

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

lib/main/typescriptBuffer.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,12 @@ export class TypescriptBuffer {
167167
await this.state.client.execute("configure", {
168168
file: this.state.filePath,
169169
formatOptions: options.formatCodeOptions,
170+
preferences: {
171+
includeCompletionsWithInsertText: true,
172+
includeCompletionsForModuleExports: false,
173+
quotePreference: "auto",
174+
disableSuggestions: atom.config.get("atom-typescript.disableSuggestions"),
175+
},
170176
})
171177
}
172178

lib/typings/atom-config.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ declare module "atom" {
2525
"atom-typescript.ignoreUnusedSuggestionDiagnostics": boolean
2626
"atom-typescript.ignoreNonSuggestionSuggestionDiagnostics": boolean
2727
"atom-typescript.ignoredSuggestionDiagnostics": string[]
28+
"atom-typescript.disableSuggestions": boolean
2829
"atom-typescript.suppressAllDiagnostics": boolean
2930
"atom-typescript.tsFileExtensions": string[]
3031
"atom-typescript.jsFileExtensions": string[]
@@ -56,6 +57,7 @@ declare module "atom" {
5657
ignoreUnusedSuggestionDiagnostics: boolean
5758
ignoreNonSuggestionSuggestionDiagnostics: boolean
5859
ignoredSuggestionDiagnostics: string[]
60+
disableSuggestions: boolean
5961
suppressAllDiagnostics: boolean
6062
tsFileExtensions: string[]
6163
jsFileExtensions: string[]

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,12 @@
204204
"default": [],
205205
"order": 110
206206
},
207+
"disableSuggestions": {
208+
"title": "Disable all suggestions",
209+
"type": "boolean",
210+
"default": false,
211+
"order": 115
212+
},
207213
"suppressAllDiagnostics": {
208214
"title": "Suppress all diagnostics",
209215
"description": "The package will not report any problems with TypeScript. Use only if you know what you are doing",

0 commit comments

Comments
 (0)