Skip to content

Commit 54c5bfe

Browse files
Add setting for typescript.preferences.preferTypeOnlyAutoImports (#4933)
Co-authored-by: Jen-Chieh Shen <[email protected]>
1 parent 74e5739 commit 54c5bfe

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

clients/lsp-javascript.el

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,12 @@ workspace."
517517
:type 'boolean
518518
:package-version '(lsp-mode . "6.1"))
519519

520+
(defcustom lsp-typescript-prefer-type-only-auto-imports nil
521+
"Prefer to put the `type` keyword before auto-generated imports,
522+
when they are used only in a type checking context."
523+
:type 'boolean
524+
:package-version '(lsp-mode . "9.0.1"))
525+
520526
(defcustom lsp-javascript-preferences-quote-style "auto" nil
521527
:type '(choice
522528
(const "auto")
@@ -711,6 +717,7 @@ name (e.g. `data' variable passed as `data' parameter)."
711717
("typescript.locale" lsp-typescript-locale)
712718
("typescript.npm" lsp-typescript-npm)
713719
("typescript.preferences.importModuleSpecifier" lsp-typescript-preferences-import-module-specifier)
720+
("typescript.preferences.preferTypeOnlyAutoImports" lsp-typescript-prefer-type-only-auto-imports t)
714721
("typescript.preferences.importModuleSpecifierEnding" lsp-typescript-preferences-import-module-specifier-ending)
715722
("typescript.preferences.quoteStyle" lsp-typescript-preferences-quote-style)
716723
("typescript.preferences.renameShorthandProperties" lsp-typescript-preferences-rename-shorthand-properties t)

0 commit comments

Comments
 (0)