Skip to content

Commit

Permalink
add typescript user preferences to the schema (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
rchl authored Aug 14, 2021
1 parent 3cbff41 commit 334a747
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 2 deletions.
11 changes: 10 additions & 1 deletion LSP-typescript.sublime-settings
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@
],
},
],
"initializationOptions": {},
"initializationOptions": {
"logVerbosity": "off",
"plugins": [],
"preferences": {
"allowRenameOfImportPath": true,
"includeCompletionsForImportStatements": true,
"includeCompletionsForModuleExports": true,
"includeCompletionsWithInsertText": true,
}
},
"settings": {},
}
68 changes: 67 additions & 1 deletion sublime-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@
"type": "object",
"additionalProperties": false,
"properties": {
"logVerbosity": {
"hostInfo": {
"type": "string",
"markdownDescription": "Information about the host, for example `Emacs 24.4` or `Sublime Text version 3075`. This value is only relevant when using `yarn pnp` which might apply special logic for certain values."
},
"logVerbosity": {
"enum": ["off", "terse", "normal", "requesttime", "verbose"],
"description": "Verbosity of the logging."
},
"plugins": {
Expand All @@ -42,6 +46,68 @@
}
]
}
},
"preferences": {
"type": "object",
"properties": {
"disableSuggestions": {
"type": "boolean",
},
"quotePreference": {
"enum": ["auto", "double", "single"],
},
"includeCompletionsForModuleExports": {
"type": "boolean",
"markdownDescription": "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.`."
},
"includeCompletionsForImportStatements": {
"type": "boolean",
"markdownDescription": "Enables auto-import-style completions on partially-typed import statements. E.g., allows `import write|` to be completed to `import { writeFile } from \"fs\"`."
},
"includeCompletionsWithSnippetText": {
"type": "boolean",
"markdownDescription": "Allows completions to be formatted with snippet text, indicated by `CompletionItem[\"isSnippet\"]`."
},
"includeCompletionsWithInsertText": {
"type": "boolean",
"markdownDescription": "If enabled, the completion list will include completions with invalid identifier names. For those entries, The `insertText` and `replacementSpan` properties will be set to change from `.x` property access to `[\"x\"]`."
},
"includeAutomaticOptionalChainCompletions": {
"type": "boolean",
"markdownDescription": "Unless this option is `false`, or `includeCompletionsWithInsertText` is not enabled, member completion lists triggered with `.` will include entries on potentially-null and potentially-undefined values, with insertion text to replace preceding `.` tokens with `?.`."
},
"importModuleSpecifierPreference": {
"enum": ["shortest", "project-relative", "relative", "non-relative"],
},
"importModuleSpecifierEnding": {
"enum": ["auto", "minimal", "index", "js"],
"markdownDescription": "Determines whether we import `foo/index.ts` as \"foo\", \"foo/index\", or \"foo/index.js\"."
},
"allowTextChangesInNewFiles": {
"type": "boolean",
},
"lazyConfiguredProjectsFromExternalProject": {
"type": "boolean",
},
"providePrefixAndSuffixTextForRename": {
"type": "boolean",
},
"provideRefactorNotApplicableReason": {
"type": "boolean",
},
"allowRenameOfImportPath": {
"type": "boolean",
},
"includePackageJsonAutoImports": {
"enum": ["auto", "on", "off"],
},
"displayPartsForJSDoc": {
"type": "boolean",
},
"generateReturnInDocTemplate": {
"type": "boolean",
},
}
}
}
}
Expand Down

0 comments on commit 334a747

Please sign in to comment.