Skip to content

Commit 9c522bb

Browse files
committed
Add includeCompletionsForModuleExports option
1 parent 6cf6b86 commit 9c522bb

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

lib/main/typescriptBuffer.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,9 @@ export class TypescriptBuffer {
169169
formatOptions: options.formatCodeOptions,
170170
preferences: {
171171
includeCompletionsWithInsertText: true,
172-
includeCompletionsForModuleExports: false,
172+
includeCompletionsForModuleExports: atom.config.get(
173+
"atom-typescript.includeCompletionsForModuleExports",
174+
),
173175
quotePreference: "auto",
174176
disableSuggestions: atom.config.get("atom-typescript.disableSuggestions"),
175177
},

lib/typings/atom-config.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ declare module "atom" {
2020
"atom-typescript.sigHelpPosition": "top" | "bottom"
2121
"atom-typescript.sigHelpDisplayOnChange": boolean
2222
"atom-typescript.autocompleteParens": boolean
23+
"atom-typescript.includeCompletionsForModuleExports": boolean
2324
"atom-typescript.tsdkPath": string
2425
"atom-typescript.ignoredDiagnosticCodes": string[]
2526
"atom-typescript.ignoreUnusedSuggestionDiagnostics": boolean
@@ -52,6 +53,7 @@ declare module "atom" {
5253
sigHelpPosition: "top" | "bottom"
5354
sigHelpDisplayOnChange: boolean
5455
autocompleteParens: boolean
56+
includeCompletionsForModuleExports: boolean
5557
tsdkPath: string
5658
ignoredDiagnosticCodes: string[]
5759
ignoreUnusedSuggestionDiagnostics: boolean

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,12 @@
163163
"default": false,
164164
"order": 65
165165
},
166+
"includeCompletionsForModuleExports": {
167+
"description": "If enabled, TypeScript will search through all external modules' exports and add them to the completions list. This affects lone identifier completions but not completions on the right hand side of `obj.`.",
168+
"type": "boolean",
169+
"default": false,
170+
"order": 66
171+
},
166172
"tsdkPath": {
167173
"title": "Path to default TypeScript SDK",
168174
"description": "TypeScript SDK found at the specified path will be preferred over the bundled one if TypeScript is not installed in node_modules as a project dependency. Ignored when empty",

0 commit comments

Comments
 (0)