nvim/lua/paper-tonic-modern/groups/lsp.lua

81 lines
3.5 KiB
Lua

-- Paper Tonic Modern - LSP Highlight Groups
-- LSP diagnostics, references, and UI elements
local c = require('paper-tonic-modern.colors')
return {
-- ============================================================================
-- LSP Diagnostics
-- ============================================================================
-- Error diagnostics (fluorescent hot pink)
DiagnosticError = { fg = c.diag_error }, -- Hot pink #ff0066
DiagnosticUnderlineError = { sp = c.diag_error, undercurl = true },
DiagnosticSignError = { fg = c.diag_error, bg = c.bg },
DiagnosticFloatingError = { fg = c.diag_error },
DiagnosticVirtualTextError = { fg = c.diag_error }, -- No background
-- Warning diagnostics (fluorescent orange)
DiagnosticWarn = { fg = c.diag_warn }, -- Fluorescent orange #ff6600
DiagnosticUnderlineWarn = { sp = c.diag_warn, undercurl = true },
DiagnosticSignWarn = { fg = c.diag_warn, bg = c.bg },
DiagnosticFloatingWarn = { fg = c.diag_warn },
DiagnosticVirtualTextWarn = { fg = c.diag_warn }, -- No background
-- Info diagnostics (bright fluorescent cyan)
DiagnosticInfo = { fg = c.diag_info }, -- Bright cyan #00ccff
DiagnosticUnderlineInfo = { sp = c.diag_info, underline = true },
DiagnosticSignInfo = { fg = c.diag_info, bg = c.bg },
DiagnosticFloatingInfo = { fg = c.diag_info },
DiagnosticVirtualTextInfo = { fg = c.diag_info }, -- No background
-- Hint diagnostics (softer fluorescent cyan)
DiagnosticHint = { fg = c.diag_hint }, -- Soft cyan #66e0ff
DiagnosticUnderlineHint = { sp = c.diag_hint, underline = true },
DiagnosticSignHint = { fg = c.diag_hint, bg = c.bg },
DiagnosticFloatingHint = { fg = c.diag_hint },
DiagnosticVirtualTextHint = { fg = c.diag_hint }, -- No background
-- ============================================================================
-- LSP References (document highlight)
-- ============================================================================
-- Text under cursor (current symbol)
LspReferenceText = { bg = c.bg_hl_special_weak }, -- Subtle cyan #e0eaff
-- Read references (where symbol is read)
LspReferenceRead = { bg = c.bg_hl_special }, -- Cyan #d4f0ff
-- Write references (where symbol is written/modified)
LspReferenceWrite = { bg = c.bg_hl_special_strong }, -- Strong cyan #a3e0ff
-- ============================================================================
-- LSP Signature Help
-- ============================================================================
LspSignatureActiveParameter = { fg = c.primary_strong, bold = true },
-- ============================================================================
-- LSP Semantic Tokens (fallback groups)
-- ============================================================================
-- These are fallback groups for LSP semantic tokens
-- TreeSitter groups take precedence when both are available
['@lsp.type.class'] = '@type',
['@lsp.type.decorator'] = '@function',
['@lsp.type.enum'] = '@type',
['@lsp.type.enumMember'] = '@constant',
['@lsp.type.function'] = '@function',
['@lsp.type.interface'] = '@type',
['@lsp.type.macro'] = '@macro',
['@lsp.type.method'] = '@function.method',
['@lsp.type.namespace'] = '@module',
['@lsp.type.parameter'] = '@variable.parameter',
['@lsp.type.property'] = '@property',
['@lsp.type.struct'] = '@type',
['@lsp.type.type'] = '@type',
['@lsp.type.typeParameter'] = '@type',
['@lsp.type.variable'] = '@variable',
}