Improve JSON editor for iOS

This commit is contained in:
世界
2025-11-26 22:25:52 +08:00
parent 264c37218c
commit 3f1c716a0a
18 changed files with 3129 additions and 17 deletions
@@ -0,0 +1,11 @@
import Runestone
import TreeSitterJSON5
import TreeSitterJSON5Queries
public extension TreeSitterLanguage {
static var json5: TreeSitterLanguage {
let highlightsQuery = TreeSitterLanguage.Query(contentsOf: TreeSitterJSON5Queries.Query.highlightsFileURL)
let injectionsQuery = TreeSitterLanguage.Query(contentsOf: TreeSitterJSON5Queries.Query.injectionsFileURL)
return TreeSitterLanguage(tree_sitter_json5(), highlightsQuery: highlightsQuery, injectionsQuery: injectionsQuery, indentationScopes: .json5)
}
}