Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add: diagnostic virtual text wrapping mode option #449

Merged
merged 2 commits into from
Feb 8, 2024

Conversation

TheDreadedAndy
Copy link
Contributor

There's currently not a way to configure the wrapping mode of diagnostic virtual text. This prevents users from configuring diagnostics like the default in neovim, which is after the line containing the error and truncated when too long.

This PR adds a configuration option that lets the wrapping mode be forced to either 'wrap' or 'truncate', or kept as it was before this PR ('default', the default value, which uses 'wrap' for 'after' and 'truncate' for 'above' and 'below').

@TheDreadedAndy
Copy link
Contributor Author

Just a note: It seems vims virtual text behavior with 'after' + 'truncate' is a little odd. It will keep appending to the line until the first text must be truncated, then any future text will go on the next line until it needs to be truncated, etc.

Example:

def foo(): E> An error E> Another err...
E> A third error E> A long fourth err...

@yegappan yegappan merged commit fa7c75c into yegappan:main Feb 8, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants