From 631abc1721c561e0df3d2a52b1d4a6bcba02f94f Mon Sep 17 00:00:00 2001 From: Yegappan Lakshmanan Date: Sat, 18 Jan 2025 22:29:41 -0800 Subject: [PATCH] Use a single line instead of multiple lines for a List --- autoload/lsp/semantichighlight.vim | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/autoload/lsp/semantichighlight.vim b/autoload/lsp/semantichighlight.vim index 243aea9..130463b 100644 --- a/autoload/lsp/semantichighlight.vim +++ b/autoload/lsp/semantichighlight.vim @@ -172,10 +172,7 @@ def ProcessSemanticTokens(lspserver: dict, bnr: number, tokens: listhas_key(typeStr) props[typeStr] = [] endif - props[typeStr]->add([ - lnum, r.start.character + 1, - lnum, r.end.character + 1 - ]) + props[typeStr]->add([lnum, r.start.character + 1, lnum, r.end.character + 1]) i += 5 endwhile @@ -220,8 +217,7 @@ export def UpdateTokens(lspserver: dict, bnr: number, semTokens: dict) # Apply the new text properties for tokenType in TokenTypeMap->keys() if props->has_key(tokenType) - prop_add_list({bufnr: bnr, type: TokenTypeMap[tokenType]}, - props[tokenType]) + prop_add_list({bufnr: bnr, type: TokenTypeMap[tokenType]}, props[tokenType]) endif endfor enddef -- 2.48.1