autoload/lsp/diag.vim | 4 ++++ autoload/lsp/options.vim | 4 ++++ diff --git a/autoload/lsp/diag.vim b/autoload/lsp/diag.vim index 6e24a12cc4a48411868a728763b428516971020f..acf073679462bd4b17bc9863ea7c98ed178bbd6e 100644 --- a/autoload/lsp/diag.vim +++ b/autoload/lsp/diag.vim @@ -267,6 +267,10 @@ diag_wrap = 'wrap' diag_symbol = 'E>' endif + if lspOpts.diagVirtualTextWrap != 'default' + diag_wrap = lspOpts.diagVirtualTextWrap + endif + var signs: list> = [] var diags: list> = diagsMap[bnr].sortedDiagnostics var inlineHLprops: list>> = [[], [], [], [], []] diff --git a/autoload/lsp/options.vim b/autoload/lsp/options.vim index 18e23dd1b29071e0b73a549e03b01d2ef3a87fab..50697a3bec9b29cc675bbd852df605f758bf8abf 100644 --- a/autoload/lsp/options.vim +++ b/autoload/lsp/options.vim @@ -70,6 +70,10 @@ # Alignment of virtual diagnostic text, when showDiagWithVirtualText is true # Allowed values: 'above' | 'below' | 'after' (default is 'above') diagVirtualTextAlign: 'above', + # Wrapping of virtual diagnostic text, when showDiagWithVirtualText is true. + # Allowed valuse: 'default' | 'truncate' | 'wrap' (default is 'default') + diagVirtualTextWrap: 'default', + # Suppress adding a new line on completion selection with noNewlineInCompletion: false,