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
|
|
@ -364,35 +364,51 @@ Source of truth for the step-by-step rebuild. Keep this concise and up to date.
|
|||
- [x] Set up colorscheme loading mechanism
|
||||
|
||||
## Phase 11.4 — Base vim highlight groups
|
||||
- [ ] Create `lua/paper-tonic-modern/groups/editor.lua`
|
||||
- [ ] Map Paper Tonic colors to base groups: Normal, Comment, LineNr, CursorLine, etc.
|
||||
- [ ] Create `lua/paper-tonic-modern/groups/syntax.lua`
|
||||
- [ ] Map to syntax groups: Function, String, Keyword, Identifier, etc.
|
||||
- [ ] Test with simple Lua file to verify base colors work
|
||||
- [x] Create `lua/paper-tonic-modern/groups/editor.lua`
|
||||
- [x] Map Paper Tonic colors to base groups: Normal, Comment, LineNr, CursorLine, etc.
|
||||
- [x] Create `lua/paper-tonic-modern/groups/syntax.lua`
|
||||
- [x] Map to syntax groups: Function, String, Keyword, Identifier, etc.
|
||||
- [x] Test with simple Lua file to verify base colors work
|
||||
|
||||
## Phase 11.5 — Modern TreeSitter highlight groups
|
||||
- [ ] Create `lua/paper-tonic-modern/groups/treesitter.lua`
|
||||
- [ ] Map modern `@*` groups to Paper Tonic colors:
|
||||
- [x] Create `lua/paper-tonic-modern/groups/treesitter.lua`
|
||||
- [x] Map modern `@*` groups to Paper Tonic colors:
|
||||
- Core: @variable, @function, @keyword, @string, @number, @boolean, @comment
|
||||
- Types: @type, @property, @field, @parameter
|
||||
- Operators: @operator, @punctuation.delimiter, @punctuation.bracket
|
||||
- Language constructs: @keyword.function, @keyword.return, @keyword.conditional
|
||||
- [ ] Use `:help treesitter-highlight-groups` as reference
|
||||
- [ ] Test with multiple languages: Lua, PHP, JavaScript, HTML, CSS
|
||||
- [x] Use `:help treesitter-highlight-groups` as reference
|
||||
- [x] Test with multiple languages: Lua, PHP, JavaScript, HTML, CSS
|
||||
|
||||
## Phase 11.6 — Language-specific TreeSitter groups
|
||||
- [ ] Add language-specific overrides (e.g., @variable.php, @tag.html)
|
||||
- [ ] Ensure HTML tags, CSS selectors, PHP variables have appropriate colors
|
||||
- [ ] Test across primary languages (HTML, PHP, JS, CSS, Markdown)
|
||||
- [x] Add language-specific overrides (e.g., @variable.php, @tag.html)
|
||||
- [x] Ensure HTML tags, CSS selectors, PHP variables have appropriate colors
|
||||
- [x] Test across primary languages (HTML, PHP, JS, CSS, Markdown)
|
||||
- [x] Added comprehensive language-specific groups:
|
||||
- CSS/SCSS: properties, variables, functions (green c2 tones)
|
||||
- HTML: tags, attributes, delimiters (blue c3)
|
||||
- PHP: variables, functions, methods, built-ins (primary brownish-red)
|
||||
- JavaScript/TypeScript: variables, functions, properties, JSX tags (primary + blue for JSX)
|
||||
- Lua: variables, functions, built-ins (primary)
|
||||
- Markdown: headings, links, code blocks (primary for structure)
|
||||
- JSON: properties, strings, numbers (neutral)
|
||||
- Bash: variables, functions, built-ins (primary)
|
||||
|
||||
## Phase 11.7 — Semantic highlighting (custom captures)
|
||||
- [ ] Create `lua/paper-tonic-modern/groups/semantic.lua`
|
||||
- [ ] Define your custom semantic captures:
|
||||
- [x] Create `lua/paper-tonic-modern/groups/semantic.lua`
|
||||
- [x] Define your custom semantic captures:
|
||||
- @CssClassName (for CSS .class and HTML class="" - same color)
|
||||
- @CssIdentifier (for CSS #id and HTML id="" - same color)
|
||||
- @DataAttribute, @DataAttributeValue (HTML data-* attributes)
|
||||
- @cssPseudoClass, @cssNestingSelector, @CssUniversalSelector (CSS-specific)
|
||||
- [ ] Verify cross-language consistency: class names in HTML match CSS
|
||||
- [x] Verify cross-language consistency: class names in HTML match CSS
|
||||
- [x] Implemented semantic highlights:
|
||||
- CSS: @CssClassName (green c2), @CssIdentifier (strong green c2_strong), @cssPseudoClass (weak green c2_weak)
|
||||
- CSS: @cssNestingSelector (strong green), @CssUniversalSelector (SpecialChar)
|
||||
- CSS: @CssProp (primary_weak), @CssPropertyValue (bold), @CssUnit (Delimiter)
|
||||
- HTML: @ClassNameAttribute, @IdAttribute, @DataAttribute (all fg_weak for attribute names)
|
||||
- HTML: @DataAttributeValue (Function)
|
||||
- Cross-language: class values and #id values in HTML use same colors as CSS selectors
|
||||
- [ ] Test with existing custom queries (after/queries/css/highlights.scm, after/queries/html/highlights.scm)
|
||||
|
||||
## Phase 11.8 — Plugin highlight groups
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue