Skip to content

JSON language features broken. TreeSitter grammar.json. no error #284

@RedCMD

Description

@RedCMD

Trying to open a TreeSitter grammar.json file freezes all JSON language features without error
https://github.com/RedCMD/Lag-Syntax-Highlighter/blob/main/_test/grammar.json

Steps to Reproduce:

  1. Create new file
  2. Assign JSON
  3. Copy-paste code snippet
  4. notice once the schema loads, all JSON language features stop working
    Hover, format, intellisense, diagnostics etc
{
	"$schema": "https://tree-sitter.github.io/tree-sitter/assets/schemas/grammar.schema.json",
	"name": "laggy-schema",
	"rules": {
		"json": {
			"type": "REPEAT",
			"content": {
				"type": "REPEAT",
				"content": {
					"type": "REPEAT",
					"content": {
						"type": "REPEAT",
						"content": {
							"type": "REPEAT",
							"content": {
								"type": "REPEAT",
								"content": {
									"type": "REPEAT",
									"content": {
										"type": "REPEAT",
										"content": {
											"type": "REPEAT",
											"content": {
												"type": "REPEAT",
												"content": {
													"type": "REPEAT",
													"content": {
														"type": "REPEAT",
														"content": {
															"type": "REPEAT",
															"content": {
																"type": "REPEAT",
																"content": {
																	"type": "REPEAT",
																	"content": {
																		"type": "REPEAT",
																		"content": {
																			"type": "BLANK"
																		}
																	}
																}
															}
														}
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
}

Does this issue occur when all extensions are disabled?: Yes

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bughelp wantedIssues identified as good community contribution opportunities

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions