diff --git a/CHANGELOG.org b/CHANGELOG.org index 29e859c92e..7e6b515a5c 100644 --- a/CHANGELOG.org +++ b/CHANGELOG.org @@ -8,6 +8,7 @@ * Added a new optional ~:action-filter~ argument when defining LSP clients that allows code action requests to be modified before they are sent to the server. This is used by the Haskell language server client to work around an ~lsp-mode~ parsing quirk that incorrectly sends ~null~ values instead of ~false~ in code action requests. * Add support for C# via the [[https://github.com/dotnet/roslyn/tree/main/src/LanguageServer][Roslyn language server]]. * Add basic support for [[https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_pullDiagnostics][pull diagnostics]] requests. + * Add support for the ~javascript.preferences.importModuleSpecifierEnding~ and ~typescript.preferences.importModuleSpecifierEnding~ preferences. ** 9.0.0 * Add language server config for QML (Qt Modeling Language) using qmlls. diff --git a/clients/lsp-javascript.el b/clients/lsp-javascript.el index cb84c3eead..0b9751ccd9 100644 --- a/clients/lsp-javascript.el +++ b/clients/lsp-javascript.el @@ -545,6 +545,26 @@ workspace." (const "non-relative")) :package-version '(lsp-mode . "6.1")) +(defcustom lsp-javascript-preferences-import-module-specifier-ending "auto" + "Preferred path ending for auto imports. +Requires using TypeScript 4.5+ in the workspace." + :type '(choice + (const "auto") + (const "minimal") + (const "index") + (const "js")) + :package-version '(lsp-mode . "9.0.1")) + +(defcustom lsp-typescript-preferences-import-module-specifier-ending "auto" + "Preferred path ending for auto imports. +Requires using TypeScript 4.5+ in the workspace." + :type '(choice + (const "auto") + (const "minimal") + (const "index") + (const "js")) + :package-version '(lsp-mode . "9.0.1")) + (defcustom lsp-javascript-preferences-rename-shorthand-properties t "Enable/disable introducing aliases for object shorthand properties during renames. Requires using TypeScript 3.4 or newer @@ -653,6 +673,7 @@ name (e.g. `data' variable passed as `data' parameter)." ("javascript.implicitProjectConfig.checkJs" lsp-javascript-implicit-project-config-check-js t) ("javascript.implicitProjectConfig.experimentalDecorators" lsp-javascript-implicit-project-config-experimental-decorators t) ("javascript.preferences.importModuleSpecifier" lsp-javascript-preferences-import-module-specifier) + ("javascript.preferences.importModuleSpecifierEnding" lsp-javascript-preferences-import-module-specifier-ending) ("javascript.preferences.quoteStyle" lsp-javascript-preferences-quote-style) ("javascript.preferences.renameShorthandProperties" lsp-javascript-preferences-rename-shorthand-properties t) ("javascript.referencesCodeLens.enabled" lsp-javascript-references-code-lens-enabled t) @@ -688,6 +709,7 @@ name (e.g. `data' variable passed as `data' parameter)." ("typescript.locale" lsp-typescript-locale) ("typescript.npm" lsp-typescript-npm) ("typescript.preferences.importModuleSpecifier" lsp-typescript-preferences-import-module-specifier) + ("typescript.preferences.importModuleSpecifierEnding" lsp-typescript-preferences-import-module-specifier-ending) ("typescript.preferences.quoteStyle" lsp-typescript-preferences-quote-style) ("typescript.preferences.renameShorthandProperties" lsp-typescript-preferences-rename-shorthand-properties t) ("typescript.referencesCodeLens.enabled" lsp-typescript-references-code-lens-enabled t)