mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-06 08:07:49 +00:00
Native folding matched comment node names case-sensitively and stripped delimiters character by character, so XML comments were skipped and the `<` in editor-fold tags was consumed. The frontend hardcoded its own comment prefixes. Both now strip the configured comment tokens from the language definitions, so region and editor-fold markers work in block comment languages (XML, HTML, Vue, SVG, CSS and others), and Navigate > Custom Folding lists them. Languages without a bundled grammar get a fallback for own-line markers. Rust and frontend tests share one fixture over 22 language configurations. Fixes #583
75 lines
1.2 KiB
JSON
75 lines
1.2 KiB
JSON
{
|
|
"languages": [
|
|
"xml",
|
|
"html",
|
|
"vue",
|
|
"svelte",
|
|
"css",
|
|
"java",
|
|
"rust",
|
|
"typescript",
|
|
"python",
|
|
"csharp",
|
|
"sql",
|
|
"clojure",
|
|
"erlang",
|
|
"bat",
|
|
"ocaml",
|
|
"fsharp",
|
|
"haskell",
|
|
"lua",
|
|
"cmake",
|
|
"powershell",
|
|
"julia",
|
|
"ruby"
|
|
],
|
|
"markers": [
|
|
{
|
|
"start": "region Name",
|
|
"end": "endregion",
|
|
"name": "Name"
|
|
},
|
|
{
|
|
"start": "region要折叠的内容",
|
|
"end": "endregion",
|
|
"name": "要折叠的内容"
|
|
},
|
|
{
|
|
"start": "#region \"Quoted name\"",
|
|
"end": "#endregion",
|
|
"name": "Quoted name"
|
|
},
|
|
{
|
|
"start": "REGION Mixed case",
|
|
"end": "ENDREGION",
|
|
"name": "Mixed case"
|
|
},
|
|
{
|
|
"start": "region",
|
|
"end": "endregion",
|
|
"name": ""
|
|
},
|
|
{
|
|
"start": "<editor-fold desc=\"Head 内容\">",
|
|
"end": "</editor-fold>",
|
|
"name": "Head 内容"
|
|
},
|
|
{
|
|
"start": "<editor-fold>",
|
|
"end": "</editor-fold>",
|
|
"name": ""
|
|
}
|
|
],
|
|
"invalid": [
|
|
"regional Name",
|
|
"regions.push(x)",
|
|
"endregionFoo",
|
|
"<editor-folder>",
|
|
"</editor-folder>",
|
|
"the region below",
|
|
"region_name",
|
|
"<editor-fold",
|
|
"</editor-fold"
|
|
]
|
|
}
|