Skip to content

Commit 519fc82

Browse files
committed
feat: add lsp semantic tokens
1 parent 910b8c2 commit 519fc82

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

lua/zenbones/specs/dark.lua

+16
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@ local function generate(p, opt)
168168
DiagnosticWarn { WarningMsg },
169169
DiagnosticInfo { fg = p.water },
170170
DiagnosticHint { fg = p.blossom },
171+
DiagnosticDeprecated { DiagnosticWarn },
172+
DiagnosticUnnecessary { DiagnosticWarn },
171173

172174
DiagnosticSignError { SignColumn, fg = DiagnosticError.fg },
173175
DiagnosticSignWarn { SignColumn, fg = DiagnosticWarn.fg },
@@ -265,6 +267,20 @@ local function generate(p, opt)
265267
sym "@text.literal.markdown" { Type },
266268
sym "@text.uri.markdown" { SpecialComment },
267269

270+
-- LSP Semantic Token Groups
271+
sym "@lsp.type.comment" { sym "@comment" },
272+
sym "@lsp.type.enum" { sym "@type" },
273+
sym "@lsp.type.keyword" { sym "@keyword" },
274+
sym "@lsp.type.namespace" { sym "@namespace" },
275+
sym "@lsp.type.parameter" { sym "@parameter" },
276+
sym "@lsp.type.property" { sym "@property" },
277+
sym "@lsp.typemod.method.defaultLibrary" { sym "@function.builtin" },
278+
sym "@lsp.typemod.function.defaultLibrary" { sym "@function.builtin" },
279+
sym "@lsp.typemod.operator.injected" { sym "@operator" },
280+
sym "@lsp.typemod.string.injected" { sym "@string" },
281+
sym "@lsp.typemod.variable.defaultLibrary" { sym "@variable.builtin" },
282+
sym "@lsp.typemod.variable.injected" { sym "@variable" },
283+
268284
-- Syntax
269285
diffAdded { fg = p.leaf },
270286
diffRemoved { fg = p.rose },

lua/zenbones/specs/light.lua

+16
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@ local function generate(p, opt)
168168
DiagnosticWarn { WarningMsg },
169169
DiagnosticInfo { fg = p.water },
170170
DiagnosticHint { fg = p.blossom },
171+
DiagnosticDeprecated { DiagnosticWarn },
172+
DiagnosticUnnecessary { DiagnosticWarn },
171173

172174
DiagnosticSignError { SignColumn, fg = DiagnosticError.fg },
173175
DiagnosticSignWarn { SignColumn, fg = DiagnosticWarn.fg },
@@ -265,6 +267,20 @@ local function generate(p, opt)
265267
sym "@text.literal.markdown" { Type },
266268
sym "@text.uri.markdown" { SpecialComment },
267269

270+
-- LSP Semantic Token Groups
271+
sym "@lsp.type.comment" { sym "@comment" },
272+
sym "@lsp.type.enum" { sym "@type" },
273+
sym "@lsp.type.keyword" { sym "@keyword" },
274+
sym "@lsp.type.namespace" { sym "@namespace" },
275+
sym "@lsp.type.parameter" { sym "@parameter" },
276+
sym "@lsp.type.property" { sym "@property" },
277+
sym "@lsp.typemod.method.defaultLibrary" { sym "@function.builtin" },
278+
sym "@lsp.typemod.function.defaultLibrary" { sym "@function.builtin" },
279+
sym "@lsp.typemod.operator.injected" { sym "@operator" },
280+
sym "@lsp.typemod.string.injected" { sym "@string" },
281+
sym "@lsp.typemod.variable.defaultLibrary" { sym "@variable.builtin" },
282+
sym "@lsp.typemod.variable.injected" { sym "@variable" },
283+
268284
-- Syntax
269285
diffAdded { fg = p.leaf },
270286
diffRemoved { fg = p.rose },

0 commit comments

Comments
 (0)