From d4f54a75167ac651b83136a652199cc99760eaf1 Mon Sep 17 00:00:00 2001 From: Adrian Wilkins Date: Thu, 13 Feb 2025 14:35:03 +0000 Subject: [PATCH] Make the base LSP label more like others MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The base entry had an label with the LSP client name in parentheses, which pushes the range to the right, making it more likely that the range will leave the edge of the viewport. Since the range is more useful information than the LSP client, change the base label format to be more like the others. This also improves the appearance of the tree. e.g. ``` └╴1 ACCOUNT-ENTRY-VIEW VIEW OF DLP-ACCOUNT-ENTRY (natls) [105, 3] becomes highlighted v---v └╴1 ACCOUNT-ENTRY-VIEW VIEW OF DLP-ACCOUNT-ENTRY [105, 3] natls ``` --- lua/trouble/sources/lsp.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/trouble/sources/lsp.lua b/lua/trouble/sources/lsp.lua index 76eb43bf..855040dd 100644 --- a/lua/trouble/sources/lsp.lua +++ b/lua/trouble/sources/lsp.lua @@ -77,7 +77,7 @@ M.config = { { "filename", format = "{file_icon} {filename} {count}" }, }, sort = { "filename", "pos", "text" }, - format = "{text:ts} ({item.client}) {pos}", + format = "{text:ts} {pos} {hl:Title}{item.client:Title}{hl}", }, lsp = { desc = "LSP definitions, references, implementations, type definitions, and declarations",