Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve highlights across languages #2910

Merged

Commits on Jun 28, 2022

  1. Configuration menu
    Copy the full SHA
    fdc3cfc View commit details
    Browse the repository at this point in the history
  2. erlang: highlight unary '#' as punctuation.bracket

    The '#' character may either be interpreted as a map when used
    like so:
    
        %% Example 1
        #{a => b}
    
    Or as an operator which updates an existing map when the left-hand
    side is an expression:
    
        %% Example 2
        MyMap#{a => b}
    
    This commit changes the highlight to `punctuation.bracket` when used
    as a character in a literal map (example 1) and keeps the `operator`
    highlight when used for updating (example 2).
    the-mikedavis committed Jun 28, 2022
    Configuration menu
    Copy the full SHA
    913b673 View commit details
    Browse the repository at this point in the history

Commits on Jun 29, 2022

  1. Configuration menu
    Copy the full SHA
    dd82c64 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    84b5188 View commit details
    Browse the repository at this point in the history
  3. rust: fix highlight corner-cases

    * add punctuation highlights for commas as in function parameters
    * remove stray `variable.parameter` highlight
        * I couldn't find any regressions from this and it fixes an
          edge case I ran into (but sadly did not record 😓)
    * highlight `fn` as `keyword.function`
        * the theme docs have `fn` as an example so it seems fitting
    the-mikedavis committed Jun 29, 2022
    Configuration menu
    Copy the full SHA
    521547e View commit details
    Browse the repository at this point in the history
  4. edoc: prevent rogue punctuation highlights

    Punctuation highlights would show up outside of where they
    were valid, for example using parentheses in some text. This
    change prevents that by gating the captures to being under
    the named nodes in which they are valid.
    the-mikedavis committed Jun 29, 2022
    Configuration menu
    Copy the full SHA
    53f2f58 View commit details
    Browse the repository at this point in the history
  5. html: highlight punctuation

    * `/>` as in self-closing tags like `<hr/>`
    * `=` as in the separator between attribute name and value `<a href="bar">`
    the-mikedavis committed Jun 29, 2022
    Configuration menu
    Copy the full SHA
    141ce7f View commit details
    Browse the repository at this point in the history
  6. replace module captures with namespace

    `module` is undocumented and does not exist in other themes. The
    equivalent existing scope based on usage (Elixir for example) is
    `namespace`.
    the-mikedavis committed Jun 29, 2022
    Configuration menu
    Copy the full SHA
    07e9d5f View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b6e2ea3 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    4a4a671 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    0a143b6 View commit details
    Browse the repository at this point in the history
  10. tsq: update parser to fix escaping double quotes

    This includes a fix for the new HTML highlights introduced a few
    parent commits back:
    
        ["\"" (attribute_name)] @string
    
    Would get tripped up and the entire line would be highlighted as
    a string. Now `\"` is a valid escape.
    
    I'm switching to my fork as the primary repo as the upstream hasn't
    been touched in over a year (mostly because stability afaict) but
    it has no watchers currently so I'm not hopeful that my PR will
    be merged.
    the-mikedavis committed Jun 29, 2022
    Configuration menu
    Copy the full SHA
    b757da9 View commit details
    Browse the repository at this point in the history

Commits on Jun 30, 2022

  1. git-commit: fix highlight edge cases

    * branch message with current branch and diverged branch has been
      added to the parser
    * scissors used in verbose commits are marked as a punctuation
      delimiter
        * we could use comment instead since they're visually the
          same but IMO this works better
    the-mikedavis committed Jun 30, 2022
    Configuration menu
    Copy the full SHA
    52a14b4 View commit details
    Browse the repository at this point in the history
  2. erlang: highlight records with macro names

    You might use a macro like `?MODULE` to name a record:
    
        -record(?MODULE, {a, b, c}).
    
    With this fix, the record fields correctly get `variable.other.member`
    highlights.
    the-mikedavis committed Jun 30, 2022
    Configuration menu
    Copy the full SHA
    709eb14 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c916ceb View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    00e5fa7 View commit details
    Browse the repository at this point in the history