Skip to content

Commit 8410ab3

Browse files
committed
feat: Enable suggestions.displayImportedInfo to short-format by default
1 parent 5c9ff75 commit 8410ab3

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/configurationType.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,9 @@ export type Configuration = {
115115
*/
116116
'suggestions.keywordsInsertText': 'none' | 'space'
117117
/**
118-
* Will be `format-short` by default in future as super useful!
119-
* Requires TypeScript 5.0+
118+
* Wether to show module name from which completion comes (inserted at start of completion detail)
120119
* @recommended
121-
* @default disable
120+
* @default short-format
122121
*/
123122
'suggestions.displayImportedInfo': 'disable' | 'short-format' | 'long-format'
124123
/**

typescript/src/completions/displayImportedInfo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default (entries: ts.CompletionEntry[]) => {
99
for (const entry of entries) {
1010
const { symbol } = entry
1111
if (!symbol) continue
12-
const [node] = symbol.getDeclarations() ?? []
12+
const [node] = symbol.declarations ?? []
1313
if (!node) continue
1414
let importDeclaration: ts.ImportDeclaration | undefined
1515
if (ts.isImportSpecifier(node) && ts.isNamedImports(node.parent) && ts.isImportDeclaration(node.parent.parent.parent)) {

0 commit comments

Comments
 (0)