Any way to check for unusual line terminator like vscode?

I’m coding in a React project and usually need to paste text from figma directly into buffer, which may result in some weird line terminator being inserted. In vscode, it’s automatically check for it and display dialog for me to remove those characters. However it’s not the case with my current neovim setup.

Have u guys seen this problem, how do u add this capability for Neovim?

I’m not familiar with this problem or feature in VSCode, but I think a good place to start might be looking at the editor.unusualLineTerminators configuration of VSCode like the popup mentions. Once you know what line terminators it looks for, you could possibly set up an autocommand in Neovim to run when you use a paste key bind. The autocommand would strip away the line terminators.

Of course, that’s a lot of work and you would need some time to write it out in Lua. I don’t know of any plugins that do this yet. If your searching didn’t turn up any results, writing it yourself might be your best option.