feat(diagnostics): enhance diagnostics display, dynamic virtual text like VS Code Error Lens
Hi there! π
This PR introduces a small enhancement to the diagnostic experience in Neovim.
Instead of keeping the diagnostics always in virtual text or virtual lines, this new setup dynamically switches between the two based on the current mode:
Insert mode: diagnostics are shown inline using virtual text β similar to the behavior of the Error Lens extension in VS Code.
Normal mode: diagnostics switch to virtual lines below the affected code, offering a cleaner and more elegant overview.
This approach provides real-time feedback while coding and a less intrusive display when navigating the code. It's a feature that requires a plugin in editors like VS Code, but here itβs done natively with just a bit of Lua! π
I believe this improves the overall developer experience by making diagnostics both more immediate and more readable.
Let me know what you think β open to suggestions!
Thanks π