Skip to content

Syntax highlightning incorrectly recognizes def form #128

Open

Description

@KGOH

Syntax highlightning incorrectly recognizes def form and highlights the first argument of any function which name starts with "def". Notice the highlight of the 'k argument on the screenshot below
Screenshot 2024-10-06 at 14 07 18

Activity

  1. tonsky commented on Oct 6, 2024

    @tonsky
    Owner

    That is unfortunate, but that’s part of design. This way we can support all past and future def* forms. Any suggestions?

  2. KGOH commented on Oct 7, 2024

    @KGOH
    ContributorAuthor

    maybe make a setting?
    like ["*.def.*"]
    And I'll change it in my config to ["*.defn", "*.def", "*.deftest", "*.defn-"]

  3. tonsky commented on Oct 7, 2024

    @tonsky
    Owner

    Can’t, this goes into syntax highlighting, no settings there

  4. KGOH commented on Oct 7, 2024

    @KGOH
    ContributorAuthor
  5. tonsky commented on Oct 7, 2024

    @tonsky
    Owner

    This wouldn’t work for rum/defc, rum/defcs and humble’s ui/defcomp for example

  6. KGOH commented on Oct 7, 2024

    @KGOH
    ContributorAuthor

    @tonsky add them too :) this will make a subtle advert for your libs

    And then wait for requests to add some other def* forms to your syntax rules. I doubt that this will be a frequent chore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions