> On Nov 16, 2022, at 12:02 PM, Theodor Thornhill <theo@thornhill.no> wrote: > > Yuan Fu <casouri@gmail.com> writes: > >> I noticed that the new fontification is much busier than cc-mode, so hereâs >> some of my thoughts: >> > > Yeah, I just made it very colorful mostly to prove the point that we > have very granular control. I think Randys patch was very good, because > imo _most_ of the noise is the bracket/pointer/operators etc. That seems to be a trend for tree-sitter fontification ;-) Neovim does similar things. >> >> :language mode >> :override t >> :feature 'expression >> '((assignment_expression >> left: (identifier) @font-lock-variable-name-face) >> >> I think assignment should be isolated out to an âassignmentâ feature, >> where we highlight the lhs target of the assignment: the identifier, >> the field, etc. For example, the assignment group in Python [1] >> > > Sure! > >> >> (call_expression >> function: (identifier) @font-lock-function-name-face) >> >> (field_expression >> field: (field_identifier) @font-lock-variable-name-face) >> >> (field_expression >> argument: (identifier) @font-lock-variable-name-face >> field: (field_identifier) @font-lock-variable-name-face) >> >> (pointer_expression >> argument: (identifier) @font-lock-variable-name-face)) >> >> They highlight every single use of functions and fields, so they should be >> level 3. (And Iâll disable them personally :-) Highlighting the field and >> the functions should be two different features IMO. > > Yep, I agree! Go ahead :-) I should clarify that I âAnd Iâll disable them personallyâ meant âIâll disable them in my personal configâ, but anyway. > >> >> :language mode >> :override t >> :feature 'statement >> '((expression_statement (identifier) @font-lock-variable-name-face) >> (labeled_statement >> label: (statement_identifier) @font-lock-type-face)) >> > > stuff like: > ``` > add_edge: // <- this thing > gx += WINDOW_LEFT_EDGE_X (w); > gy += WINDOW_TOP_EDGE_Y (w); > > store_rect: // <- and this thing > STORE_NATIVE_RECT (*rect, gx, gy, width, height); > > ``` > > I think you should just tweak it like you want. I think it's very > time-consuming creating separate patches and bug-reports for small > tweaks and maintenance issues. I trust your judgment here, though I > also think that Randy had some nice ideas :) > > Just hack away! Thanks! Will do. Yuan
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4