This article explains the difference between residency and eligibility for citizenship.
The residency has its own rules. Generally, unless you are an EU citizen, you need a justification for an application for residency (eg work, study, business, research, family reunion, etc.). Simply staying in Slovakia as a resident without any local engagement, eg for the purposes of retirement, is not possible. However, if you have a Certificate of Slovak Living Abroad (SLAC), you can gain residency in Slovakia regardless of the purpose of your stay. This is typically very useful for pensioners or those who do not wish to create deeper ties for tax or other purposes.