Can I leave SWO/TDO and TDI of J-Link floating?
I'm drawing schematics for J-Link's 9-pin JTAG/SWD connector, and I wonder if I can leave the SWO/TDO and TDI pins floating.


Yes, you can. The debugger will ignore the state of these pins, so leaving them floating is fine.

If you are only using basic SWD (i.e, no SWO and no reset), a more commonly used pattern is to break out GND, SWCLK, SWDIO, and Vcc on a 0.1" header and use flywires to connect them to a debugger. For instance, this pattern is used on some STM32 Discovery boards, as well as on many unbranded STM32 development boards.