When you file for bankruptcy, you are required to list all your assets and creditors. You cannot pick and choose which creditors you want to continue to pay and which ones you want to discharge in your bankruptcy.
If you have a zero balance at the time of filing your case, the credit card does not need to be listed. However, your creditors will sometimes close the account even if you do not have a balance because the credit bureaus will notify them that you have filed for bankruptcy.
If keeping one credit line open is important to you, you might want to call the creditor directly and ask if they would close your account or leave it open if you had a zero balance at the time of filing your case.
Additionally, if you have paid any creditor over six hundred dollars, ninety days prior to filing your case that would also need to be listed. If one creditor is paid but not others, that is considered a preferential treatment of that creditor and the trustee could look to that creditor for payment. For example, if you paid one creditor three thousand dollars, ninety days prior to filing your case, the trustee could go after that one creditor for the three thousand dollars to collect and distribute to your other creditors.
The good news is that you can typically get credit very quickly post-filing or open a secured credit line to rebuild your credit. Since you will have more disposable income and no debt after filing, hopefully credit will only need to be used on a limited basis. When you pay your credit lines on time that will definitely help to rebound your credit after filing.