Try these steps and see if the device is recognized.
First check if you have Developer Options in the Settings Menu of your device.
If not - (Please know that in flagship nexus devices running 4.2 and later Android OS this option is hidden by Google on purpose)
How to Enable developer options - Go to Settings --> About Phone --> Build Number (Tap the build number 7 times) this should enable your Developer Option
Turn on USB Debugging
Connect your Nexus 5 to your computer using the USB cable.
If at this point Eclipse do not recognize it. Try to start a command prompt on Windows by pressing Ctrl + R and type cmd and enter.
Navigate to where you have installed your Android SDK folder where you have your adb.exe.
For me this is at C:\Program Files (x86)\Android\android-sdk\platform-tools\
Do a cd C:\Program Files (x86)\Android\android-sdk\platform-tools
- enter
then type adb devices
while your nexus 5 is attached to your computer. this should restart the adb server killing any stale session. At this point you should receive instructions on your device about RSA fingerprint etc. Just accept it and Eclipse should be able to communicate with your device.
Edit:
You may need to install adb drivers after following aforementioned procedure. Download universal adb driver installer from here and execute it. It would automatically detect your phone model and will install drivers.
Happy Coding..