From b3afc8e6a424ef1f8cd1375fd28580ab6a06eba7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B3=D0=BE=D1=80=20=D0=9C=D0=B0=D1=80=D1=82=D1=8B?= =?UTF-8?q?=D0=BD=D0=BE=D0=B2?= <48406064+mrtnvgr@users.noreply.github.com> Date: Wed, 8 Mar 2023 22:09:04 +0700 Subject: [PATCH] add @lsp.type highlight groups (add support for lsp semantic token groups) (#141) --- 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 })