From 544c228af3ce79da8053049464af67bb7f84b5f1 Mon Sep 17 00:00:00 2001 From: tkhg <28704185+tkhg@users.noreply.github.com> Date: Fri, 5 Jan 2024 10:16:39 +0800 Subject: [PATCH] feat: add wrap_long_lines option for diagnostic (#1372) --- lua/lspsaga/diagnostic/show.lua | 2 ++ lua/lspsaga/init.lua | 1 + 2 files changed, 3 insertions(+) diff --git a/lua/lspsaga/diagnostic/show.lua b/lua/lspsaga/diagnostic/show.lua index 2e07b44e1..b18b6a410 100644 --- a/lua/lspsaga/diagnostic/show.lua +++ b/lua/lspsaga/diagnostic/show.lua @@ -84,6 +84,7 @@ function sd:layout_normal() ['number'] = false, ['relativenumber'] = false, ['stc'] = '', + ['wrap'] = diag_conf.wrap_long_lines }) :wininfo() api.nvim_win_set_height(self.winid, 10) @@ -151,6 +152,7 @@ function sd:layout_float(opt) :winopt({ ['conceallevel'] = 2, ['concealcursor'] = 'niv', + ['wrap'] = diag_conf.wrap_long_lines }) :winhl('DiagnosticShowNormal', 'DiagnosticShowBorder') :wininfo() diff --git a/lua/lspsaga/init.lua b/lua/lspsaga/init.lua index 9575442fc..93c4b78d1 100644 --- a/lua/lspsaga/init.lua +++ b/lua/lspsaga/init.lua @@ -33,6 +33,7 @@ local default_config = { max_show_height = 0.6, text_hl_follow = true, border_follow = true, + wrap_long_lines = true, extend_relatedInformation = false, diagnostic_only_current = false, keys = {