Keep in mind that an HSA is most advantageous when used for health expenses. To me, using it strictly as an investment vehicle only makes sense if you've already maximized your other tax advantaged options.
If you anticipate any larger medical expenses in the near or even distant future (child birth, major dental work, knee replacement, insulin medication, etc.) an HSA could save you a lot and serve as a cushion for your emergency fund. Don't be afraid to use it for medical expenses or feel like you're robbing from your retirement plan. Using the HSA for non-medical expenses in retirement is a worst case scenario for your money (yes, the worst case is you live a long, healthy life).
As for where does it fall in your current priorities, that depends a lot on you. If you have regular, predictable medical expenses, put in at least that amount regardless. Otherwise, here are some questions to consider:
Do you have a family history of medical problems?
Do you intend to have a family in the future?
Is the total in the HSA currently less than your annual out-of-pocket insurance costs?
Is your current debt at low interest rates (<7%)?
Are you contributing enough to your 401(k) to get the full employer match?
Are you fully maxing out your 401(k)?
Are you maxing out your Roth IRA?
The more you answered yes, the more I would prioritize your HSA.
For me personally, HSA maximizing comes after 401(k) to employer match, maximizing Roth IRA, and accelerated student debt repayment, but before maximizing 401(k) and house down-payment savings.
Good luck.
(Edited to rephrase out-of-pocket expenses question to give the appropriate answer.)