Skip to content

Commit a0455e1

Browse files
authored
Adds remove-unused-imports to lsp-mode.el (#4774)
* Adds remove-unused-imports to lsp-mode.el * Update CHANGELOG.org * Update CHANGELOG.org * Adds removeUnsuedImports function to lsp-javascript.el * Removes removeUnusedImports from lsp-mode.el * Update CHANGELOG.org
1 parent 4e26194 commit a0455e1

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

CHANGELOG.org

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
* Drop support for emacs 27.1 and 27.2
3838
* Add ~lsp-nix-nixd-server-arguments~ to allow passing arguments to the ~nixd~ LSP.
3939
* Improve the lsp-ocaml client (see [[https://github.com/emacs-lsp/lsp-mode/issues/4731][#4731]] for the follow-up issue. MRs: [[https://github.com/emacs-lsp/lsp-mode/pull/4741][#4741]], [[https://github.com/emacs-lsp/lsp-mode/pull/4732][#4732]])
40+
* Add support for ~source.removeUnusedImports~ for lsp-javascript
4041

4142
** 9.0.0
4243
* Add language server config for QML (Qt Modeling Language) using qmlls.

clients/lsp-javascript.el

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -786,6 +786,8 @@ name (e.g. `data' variable passed as `data' parameter)."
786786
(lsp)
787787
(lsp--info "Renamed '%s' to '%s'." name (file-name-nondirectory new)))))
788788

789+
(lsp-make-interactive-code-action javascript-remove-unused-imports "source.removeUnusedImports")
790+
789791
(defun lsp-javascript-initialized? ()
790792
(when-let* ((workspace (lsp-find-workspace 'ts-ls (buffer-file-name))))
791793
(eq 'initialized (lsp--workspace-status workspace))))

0 commit comments

Comments
 (0)