From f4f003fce49f67390464a61656c503a057fe5da0 Mon Sep 17 00:00:00 2001 From: mrtnvgr Date: Wed, 8 Mar 2023 22:00:15 +0700 Subject: [PATCH] add @lsp.type highlight groups (add support for lsp semantic token groups) --- lua/rose-pine/theme.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lua/rose-pine/theme.lua b/lua/rose-pine/theme.lua index 99c7dc1..5004793 100644 --- a/lua/rose-pine/theme.lua +++ b/lua/rose-pine/theme.lua @@ -261,6 +261,18 @@ function M._load(options) h('@type', { link = 'Type' }) h('@variable', { fg = p.text, italic = maybe.italic }) h('@variable.builtin', { fg = p.love }) + h('@namespace', { link = '@include' }) + + -- LSP Semantic Token Groups + h('@lsp.type.enum', { link = '@type' }) + h('@lsp.type.keyword', { link = '@keyword' }) + h('@lsp.type.interface', { link = '@interface' }) + h('@lsp.type.namespace', { link = '@namespace' }) + h('@lsp.type.parameter', { link = '@parameter' }) + h('@lsp.type.property', { link = '@property' }) + h('@lsp.type.variable', {}) -- use treesitter styles for regular variables + h('@lsp.typemod.function.defaultLibrary', { link = 'Special' }) + h('@lsp.typemod.variable.defaultLibrary', { link = '@variable.builtin' }) -- vim.lsp.buf.document_highlight() h('LspReferenceText', { bg = p.highlight_med })