Command to remove all unused typescript imports #4550
Unanswered
alexandersokolow
asked this question in
Q&A
Replies: 2 comments 4 replies
-
nnoremap <leader>gi :call CocAction('runCommand', 'editor.action.organizeImport')<CR> |
Beta Was this translation helpful? Give feedback.
2 replies
-
Hi i have a question, you said when you run (coc-codeaction-cursor), how do you run it. I can't make that work i have lua config and use the remappings in the example configuration but it doesnt work.
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When I run (coc-codeaction-cursor) cursor over an unused import in a typescript file, a quickfix is available under the name of "Delete all unused imports", which does what I want.
However, I would like to create a vim binding to trigger this quickfix (if it is available), without having to hover over the list and press the corresponding index.
I already echoed the list of codeActions to a file & found the fixId "unusedIdentifier_deleteImports". Is there some way to apply a fix with this id?
Beta Was this translation helpful? Give feedback.
All reactions