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,18 +1,42 @@
|
|||
(id_selector (id_name) @CssIdentifier)
|
||||
(id_selector (id_name)) @CssIdSelector
|
||||
(tag_name) @HtmlTagName
|
||||
;extends
|
||||
|
||||
(class_selector (class_name) @CssClassName)
|
||||
(selectors (pseudo_class_selector (class_name) @cssPseudoClass))
|
||||
; CSS Selectors - ID selectors (#my-id)
|
||||
; Priority: Must override default @constant capture
|
||||
(id_selector "#" @punctuation.delimiter)
|
||||
(id_selector (id_name) @CssIdentifier (#set! priority 200))
|
||||
|
||||
; CSS Selectors - Class selectors (.my-class)
|
||||
(class_selector "." @punctuation.delimiter)
|
||||
(class_selector (class_name) @CssClassName (#set! priority 200))
|
||||
|
||||
; CSS Selectors - Pseudo-class selectors (:hover, :focus, etc.)
|
||||
(pseudo_class_selector ":" @punctuation.delimiter)
|
||||
(pseudo_class_selector (class_name) @cssPseudoClass (#set! priority 200))
|
||||
|
||||
; CSS Selectors - Pseudo-element selectors (::before, ::after)
|
||||
(pseudo_element_selector "::" @punctuation.delimiter)
|
||||
(pseudo_element_selector (tag_name) @cssPseudoElement (#set! priority 200))
|
||||
|
||||
; CSS Selectors - Nesting selector (&)
|
||||
(nesting_selector) @cssNestingSelector
|
||||
|
||||
; need to find out how to make this more specific?
|
||||
; CSS Selectors - Universal selector (*)
|
||||
(universal_selector) @CssUniversalSelector
|
||||
|
||||
((property_name) (_)) @CssProp
|
||||
; CSS Selectors - Tag/element selectors (div, p, etc.)
|
||||
(tag_name) @HtmlTagName
|
||||
|
||||
(unit) @CssUnit
|
||||
; CSS Properties
|
||||
((property_name) @CssProp)
|
||||
|
||||
; CSS Property values
|
||||
(declaration (property_name) (_) @CssPropertyValue)
|
||||
|
||||
(media_statement (feature_query (feature_name) @cssMediaFeatureName (_ (unit) @cssMediaQueryValueUnit) @cssMediaQueryValue) @cssMediaQuery)
|
||||
; CSS Units (px, em, rem, %, etc.)
|
||||
(unit) @CssUnit
|
||||
|
||||
; CSS Media queries
|
||||
(media_statement
|
||||
(feature_query
|
||||
(feature_name) @cssMediaFeatureName
|
||||
(_ (unit) @cssMediaQueryValueUnit) @cssMediaQueryValue) @cssMediaQuery)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue