Skip to content

Latest commit

 

History

History
92 lines (82 loc) · 3.93 KB

README.md

File metadata and controls

92 lines (82 loc) · 3.93 KB

TmLanguage-Syntax-Highlighter

Syntax Highlighter for VSCodes JSON TextMate grammars

NEW! CallStack feature thingy

Feedback welcomed Github

Features

  • Syntax Highlighting
  • Basic Intellisense
  • Ctrl+click Definitions
  • Breadcrumbs/Outline
  • Formatting
  • Schema support
  • repository/include Call Hierarchy View
  • [F2] Rename
  • Supported in VSCode Web

Example code:
example-code

Highlights scope names with their own themed colour in realtime:
list-of-VSCode-Dark+-scopenames-and-their-colours

{
  "$schema": "https://raw.githubusercontent.com/RedCMD/TmLanguage-Syntax-Highlighter/main/vscode.tmLanguage.schema.json",
  "scopeName": "source.languageId",
  "name": "languageId",
  "patterns": [
    { "include": "#repo-item" },
    { "include": "#string" },
    { "include": "#boolean" }
  ],
  "repository": {
    "repo-item": { },
    "boolean": {
      "comment": "`\\b` is a 0-width word boundary. `$1` references capture group 1",
      "match": "\\b(true|false)\\b",
      "name": "constant.language.$1.languageId"
    },
    "string": {
      "comment": "\"begin\" & \"end\" can create a multi-line region",
      "begin": "\"",
      "end": "\"",
      "name": "string.quoted.double.languageId",
      "patterns": [
        {
          "comment": "Quad backslash required to match one literal backslash",
          "match": "\\\\.",
          "name": "constant.character.escape.languageId"
        }
      ]
    }
  }
}

For more information

Todo

  • Support unicode character insertions \u00b0
  • Allow spaces, underscores and dashes in all places inside Unicode Categorys \\p{ Let _te--r}: Github - List of unicode properties
  • Try* to fix contention between backreferences \\1 and character codes \\1
  • Detect and limit backreferences/subroutines/conditional-capture-groups \\1/\\k<1>/\\g<1>/(?(<1>)) to the actual amount of capture groups available
  • Detect all invalid character class ranges [z-a]
  • Correctly invalidate look-around capture groups inside all types of capture groups nested inside look-behind capture groups
  • Improve bracket features: Colourization, matching, autocomplete, surround
  • Limit look-behind length to 65536 characters
  • Limit all repeating quantifiers to 100000
  • Unify ways of displaying errors
  • Improve performance: Github Issue - Capturing and applying a pattern causes performance loss
  • Enable squiggle based error checking
  • Finish ctrl+click definitions and references
  • Add range formatting
  • Add hovers
  • Improve tree-sitter grammar
  • Update README.md pictures
  • Improve TextMate documentation
  • [F2] Rename
  • CodeLens