From d311e6f9ea880b3673d5ca96d1f76a0f820cf1e5 Mon Sep 17 00:00:00 2001 From: Aron Griffis Date: Wed, 18 Oct 2023 14:29:34 -0400 Subject: [PATCH] feat(typescript): remove unused imports --- 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 = {