Refactor Paper Tonic Modern colorscheme and enhance semantic highlighting
- Updated highlights.scm to improve CSS, HTML, and data attribute captures with higher priority. - Added a new Lua function to display highlight group and color information under the cursor. - Expanded editor, semantic, syntax, and TreeSitter highlight groups for better visual consistency across languages. - Created test files for PHP, HTML, CSS, and Lua to validate syntax highlighting. - Implemented a shell script to test semantic highlights in a Neovim session. - Simplified colorscheme loading process by removing unnecessary plugin specifications.
This commit is contained in:
parent
61400a7c9b
commit
3ad385e285
16 changed files with 1121 additions and 63 deletions
|
|
@ -1,9 +1,225 @@
|
|||
-- Paper Tonic Modern - Syntax Highlight Groups
|
||||
-- Traditional Vim syntax groups
|
||||
|
||||
local colors = require('paper-tonic-modern.colors')
|
||||
local c = require('paper-tonic-modern.colors')
|
||||
|
||||
return {
|
||||
-- Syntax groups (to be implemented in Phase 11.4)
|
||||
Comment = { fg = colors.fg_weak },
|
||||
-- ============================================================================
|
||||
-- Text Analysis
|
||||
-- ============================================================================
|
||||
|
||||
Comment = { fg = c.fg_weaker, italic = true, bold = true },
|
||||
|
||||
-- ============================================================================
|
||||
-- Literals
|
||||
-- ============================================================================
|
||||
|
||||
Constant = { fg = c.fg_strong, italic = true },
|
||||
String = { fg = c.fg_strong, italic = true },
|
||||
Character = 'String',
|
||||
Number = 'String',
|
||||
Boolean = 'String',
|
||||
Float = 'Number',
|
||||
|
||||
-- ============================================================================
|
||||
-- Identifiers
|
||||
-- ============================================================================
|
||||
|
||||
Identifier = { fg = c.primary_weak, bold = true },
|
||||
Function = { fg = c.primary_strong, bold = true },
|
||||
|
||||
-- ============================================================================
|
||||
-- Syntax
|
||||
-- ============================================================================
|
||||
|
||||
Statement = { fg = c.fg_weak },
|
||||
Conditional = { fg = c.fg_strong, bold = true },
|
||||
Repeat = 'Conditional',
|
||||
Label = { fg = c.fg_stronger, bold = true },
|
||||
Operator = { fg = c.fg, bold = true },
|
||||
Keyword = { fg = c.fg_weaker, bold = true },
|
||||
Exception = { fg = c.fg_exception, bold = true },
|
||||
|
||||
-- ============================================================================
|
||||
-- Preprocessor
|
||||
-- ============================================================================
|
||||
|
||||
PreProc = { fg = c.fg_weak },
|
||||
Include = { fg = c.fg_weak, bold = true },
|
||||
Define = 'Include',
|
||||
Macro = { fg = c.fg, bold = true },
|
||||
PreCondit = 'Macro',
|
||||
|
||||
-- ============================================================================
|
||||
-- Types
|
||||
-- ============================================================================
|
||||
|
||||
Type = { fg = c.primary, bold = true },
|
||||
StorageClass = { fg = c.primary },
|
||||
Structure = 'StorageClass',
|
||||
Typedef = 'StorageClass',
|
||||
|
||||
-- ============================================================================
|
||||
-- Special
|
||||
-- ============================================================================
|
||||
|
||||
Special = { fg = c.primary_stronger },
|
||||
SpecialChar = { fg = c.primary_stronger, bold = true },
|
||||
Tag = { fg = c.primary_strong, bold = true },
|
||||
Delimiter = { fg = c.fg_weaker },
|
||||
SpecialComment = { fg = c.fg_exception, bold = true },
|
||||
Debug = 'WarningMsg',
|
||||
|
||||
-- ============================================================================
|
||||
-- Miscellaneous
|
||||
-- ============================================================================
|
||||
|
||||
Underlined = { underline = true },
|
||||
Ignore = { fg = c.fg_weak },
|
||||
Error = { fg = c.alert_strong, bold = true },
|
||||
Todo = { fg = c.alert_strong },
|
||||
|
||||
-- ============================================================================
|
||||
-- Language-Specific: CSS
|
||||
-- ============================================================================
|
||||
|
||||
cssAtRule = 'Label',
|
||||
cssAttr = 'Keyword',
|
||||
cssAttrComma = 'Delimiter',
|
||||
cssAttrRegion = 'Keyword',
|
||||
cssBraces = 'Delimiter',
|
||||
cssClassName = { fg = c.c2 },
|
||||
cssClassNameDot = 'Delimiter',
|
||||
cssFlexibleBoxAttr = 'cssAttr',
|
||||
cssFunctionComma = 'Delimiter',
|
||||
cssImportant = 'Exception',
|
||||
cssProp = { fg = c.primary_weak },
|
||||
cssPseudoClass = { fg = c.c2_weak },
|
||||
cssPseudoClassId = 'Operator',
|
||||
cssSelectorOp = 'Operator',
|
||||
cssTagName = 'htmlTagName',
|
||||
cssUnitDecorators = 'Type',
|
||||
|
||||
-- SCSS
|
||||
scssAmpersand = 'cssNestingSelector',
|
||||
scssAttribute = 'Delimiter',
|
||||
scssBoolean = 'Boolean',
|
||||
scssDefault = 'Keyword',
|
||||
scssElse = 'scssIf',
|
||||
scssMixinName = 'Function',
|
||||
scssIf = 'PreCondit',
|
||||
scssInclude = 'Include',
|
||||
scssSelectorChar = 'Delimiter',
|
||||
scssDefinition = 'PreProc',
|
||||
scssSelectorName = 'cssClassName',
|
||||
scssVariable = 'Define',
|
||||
scssVariableAssignment = 'Operator',
|
||||
|
||||
-- Custom CSS (from custom queries)
|
||||
cssIdentifier = { fg = c.c2_strong, bold = true },
|
||||
cssIdSelector = 'SpecialChar',
|
||||
cssNestingSelector = { fg = c.c2_strong },
|
||||
cssUniversalSelector = 'SpecialChar',
|
||||
cssPropertyValue = { fg = c.fg, bold = true },
|
||||
cssMediaQuery = 'Function',
|
||||
cssMediaQueryValue = 'cssAtRule',
|
||||
cssMediaQueryValueUnit = 'cssMediaQueryValue',
|
||||
cssMediaFeatureName = 'cssMediaQuery',
|
||||
cssUnit = 'Delimiter',
|
||||
|
||||
-- ============================================================================
|
||||
-- Language-Specific: HTML
|
||||
-- ============================================================================
|
||||
|
||||
htmlArg = 'Label',
|
||||
htmlBold = { bold = true },
|
||||
htmlTitle = { fg = c.fg_stronger, bold = true },
|
||||
htmlEndTag = 'htmlTag',
|
||||
htmlH1 = 'markdownH1',
|
||||
htmlH2 = 'markdownH2',
|
||||
htmlH3 = 'markdownH3',
|
||||
htmlH4 = 'markdownH4',
|
||||
htmlH5 = 'markdownH5',
|
||||
htmlH6 = 'markdownH6',
|
||||
htmlItalic = { italic = true },
|
||||
htmlSpecialTagName = 'Keyword',
|
||||
htmlTag = { fg = c.c3 },
|
||||
htmlTagName = { fg = c.c3 },
|
||||
htmlTagN = 'htmlTagName',
|
||||
|
||||
-- ============================================================================
|
||||
-- Language-Specific: Lua
|
||||
-- ============================================================================
|
||||
|
||||
luaBraces = 'Structure',
|
||||
luaBrackets = 'Delimiter',
|
||||
luaBuiltin = 'Keyword',
|
||||
luaComma = 'Delimiter',
|
||||
luaFuncArgName = 'Identifier',
|
||||
luaFuncCall = 'Function',
|
||||
luaFuncKeyword = 'Type',
|
||||
luaFuncName = 'Function',
|
||||
luaFuncParens = 'Delimiter',
|
||||
luaFuncTable = 'Structure',
|
||||
luaIn = 'Repeat',
|
||||
luaLocal = 'Type',
|
||||
luaParens = 'Delimiter',
|
||||
|
||||
-- ============================================================================
|
||||
-- Language-Specific: Markdown
|
||||
-- ============================================================================
|
||||
|
||||
markdownH1 = { fg = c.primary_strong, bold = true },
|
||||
markdownH2 = { fg = c.primary, bold = true },
|
||||
markdownH3 = { fg = c.primary_weak, bold = true },
|
||||
markdownH4 = { fg = c.primary_weak },
|
||||
markdownH5 = { fg = c.primary_weak },
|
||||
markdownH6 = { fg = c.primary_weak },
|
||||
markdownBold = { bold = true },
|
||||
markdownItalic = { italic = true },
|
||||
markdownCode = { fg = c.fg_strong },
|
||||
markdownCodeBlock = 'markdownCode',
|
||||
markdownCodeDelimiter = 'Delimiter',
|
||||
markdownUrl = { fg = c.c3, underline = true },
|
||||
markdownLink = { fg = c.primary },
|
||||
markdownLinkText = { fg = c.primary },
|
||||
|
||||
-- ============================================================================
|
||||
-- Language-Specific: JSON
|
||||
-- ============================================================================
|
||||
|
||||
jsonBraces = 'luaBraces',
|
||||
jsonEscape = 'SpecialChar',
|
||||
jsonKeywordMatch = 'Operator',
|
||||
jsonNull = 'Constant',
|
||||
jsonQuote = 'Delimiter',
|
||||
jsonString = 'String',
|
||||
jsonStringSQError = 'Exception',
|
||||
|
||||
-- ============================================================================
|
||||
-- Language-Specific: JavaScript/TypeScript
|
||||
-- ============================================================================
|
||||
|
||||
jsFuncBlock = 'Function',
|
||||
jsObjectKey = 'Type',
|
||||
jsReturn = 'Keyword',
|
||||
jsVariableDef = 'Identifier',
|
||||
|
||||
-- ============================================================================
|
||||
-- Language-Specific: PHP
|
||||
-- ============================================================================
|
||||
|
||||
phpVarSelector = 'Identifier',
|
||||
phpIdentifier = 'Identifier',
|
||||
phpFunction = 'Function',
|
||||
phpClass = 'Type',
|
||||
phpKeyword = 'Keyword',
|
||||
phpSuperglobal = 'Special',
|
||||
phpMemberSelector = 'Operator',
|
||||
|
||||
-- ============================================================================
|
||||
-- Noise (low-priority syntax elements)
|
||||
-- ============================================================================
|
||||
|
||||
Noise = { fg = c.fg_weaker },
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue