Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: clojure-emacs/clojure-ts-mode
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
Loading
...
head repository: clojure-emacs/clojure-ts-mode
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: regular-expression-font-locking
Choose a head ref
Loading
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Aug 27, 2023

  1. Highlight regular expressions with tree-sitter-regex grammar

    This grammar is bundled in nixos by default and seems good enough for
    java regular expressions. It is also maintained under the tree-sitter
    github org so is "official".
    
    In order to property identify the #" and closing " characters we have to
    parse them with the clojure grammar (in case the regex grammar is not
    available) and again with the regex grammar as part of the actual
    pattern. This could be avoided if either the clojure grammar captured a
    node for the inner contents of the regex literal, or the
    treesit-range-settings supported some kind of offest argument like the
    neovim tree-sitter mechanisms do.
    
    Should address issue #11
    
    I think that multiple parsers per buffer may be too buggy to use right
    now. There are situations where no regex will be present on in a buffer,
    but the entire buffer will be highlighted as a regular expression. This
    functionality probably needs upstream work in Emacs before we can merge
    this into the main branch of clojure-ts-mode
    dannyfreeman committed Aug 27, 2023
    Configuration menu
    Copy the full SHA
    29eff34 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e905c3f View commit details
    Browse the repository at this point in the history
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.