From 8df44b3bb54483e42a27dc30a8b343acc5d5d242 Mon Sep 17 00:00:00 2001 From: Aron Griffis Date: Thu, 19 Oct 2023 14:12:48 -0400 Subject: [PATCH] feat(typescript): added remove unused imports (#1794) --- lua/lazyvim/plugins/extras/lang/typescript.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lua/lazyvim/plugins/extras/lang/typescript.lua b/lua/lazyvim/plugins/extras/lang/typescript.lua index 4af1deec..4f53ae8c 100644 --- a/lua/lazyvim/plugins/extras/lang/typescript.lua +++ b/lua/lazyvim/plugins/extras/lang/typescript.lua @@ -32,6 +32,19 @@ return { end, desc = "Organize Imports", }, + { + "cR", + function() + vim.lsp.buf.code_action({ + apply = true, + context = { + only = { "source.removeUnused.ts" }, + diagnostics = {}, + }, + }) + end, + desc = "Remove Unused Imports", + }, }, settings = { typescript = {