-
-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Highlighting the beginning and end .twig #621
Comments
You likely need to create a new rule, maybe even a BH plugin, but I don't know as I don't use Twig. You would have to provide some copy/pastable example and point me at the actual syntax file you use to highlight Twig. When I have some time, I may be able to give you some pointers to lead you in the right direction. |
Thanks a lot for the answer, I provide data from the weaving settings of your plugin Bracket Setting{
"content_highlight_bar": true,
"search_in_widgets": true,
"match_only_adjacent": true,
"high_visibility_color": "__bracket__",
"auto_selection_threshold": 10,
} Tag Setting{
"tag_mode": [
{"mode": "xml", "syntax": ["XML"]},
{
"mode": "xhtml",
"syntax": [
"HTML",
"HTML 5",
"PHP",
"HTML (Jinja Templates)",
"HTML (Jinja2)",
"HTML (Rails)",
"HTML (Twig)",
"HTML (Django)",
"laravel-blade",
"blade",
"Handlebars",
"AngularJS",
"Java Server Pages (JSP)"
],
"first_line": "^[ \\t]*<\\?xml"
},
{
"mode": "html",
"syntax": [
"HTML",
"HTML 5",
"PHP",
"HTML (Jinja Templates)",
"HTML (Jinja2)",
"HTML (Rails)",
"HTML (Twig)",
"HTML (Django)",
"laravel-blade",
"blade",
"Handlebars",
"AngularJS",
"Java Server Pages (JSP)"
]
},
{
"mode": "cfml",
"syntax": ["CFML", "HTML+CFML", "ColdFusion", "ColdFusionCFC"]
}
],
"user_brackets": [
// Angle
{
"name": "angle",
"language_list": [
"HTML", "HTML 5", "XML", "PHP", "HTML (Rails)",
"HTML (Jinja Templates)", "HTML (Jinja2)", "HTML (Twig)",
"CFML", "HTML+CFML", "ColdFusion", "ColdFusionCFC",
"laravel-blade", "Handlebars", "AngularJS",
"SomeNewLanguage" // <--- New language
]
}
],
"tag_style": {
"xml": "tag",
"xhtml": "tag",
"html": "tag",
"cfml": "tag"
},
"start_tag": {
"xml": "<(%(tag_name)s)(?:(?:\\s+|(?<=['\"]))%(attributes)s)*\\s*(/?)>",
"xhtml": "<(%(tag_name)s)(?:(?:\\s+|(?<=['\"]))%(attributes)s)*\\s*(/?)>",
"html": "<(%(tag_name)s)(?:(?:\\s+|(?<=['\"]))%(attributes)s)*\\s*(/?)>",
"cfml": "<(%(tag_name)s)(?:(?:(?:\\s+|(?<=['\"]))%(attributes)s)*|(?:(?<=cfif)|(?<=cfelseif))[^>]+)\\s*(/?)>"
},
// Regex for end/closing tag. Only use a capturing group for name.
"end_tag": {
"xml": "</([\\w\\:\\.\\-]+)[^>]*>",
"xhtml": "</([\\w\\:\\.\\-]+)[^>]*>",
"html": "</([\\w\\:\\.\\-]+)[^>]*>",
"cfml": "</([\\w\\:\\.\\-]+)[^>]*>"
}
} Sublime Setting{
"theme": "Default Dark.sublime-theme",
"ignored_packages":
[
"Vintage",
],
"color_scheme": "Packages/Color Scheme - Legacy/Monokai Bright.tmTheme",
"open_files_in_new_window": "false",
"font_size": 13,
"tab_size": 2,
"word_wrap": "true",
} HTML (twig) syntax specific{
"show_line_endings": true,
}
{
"show_line_endings": true,
} If I didn't provide the data you need, I'm sorry. |
Are you using a 3rd party twig package for syntax highlighting or are you using a built-in syntax? Please specify exactly what you are using to syntax highlight Twig. Also, provide me some copy/pastable Twig code as I am not familiar with Twig and do not want to hunt down an example online. |
1.I use BetterTwig for highlighting. |
Provide an example Twig snippet that I can use for testing that doesn't require me to transcribe it from a screenshot. I don't write Twig, so you need to provide me with an example snippet. |
here is the twig code for an example
|
Okay, when I have some time, I'll take a look. |
Thank you very much |
Hi, I have a problem that I can't solve due to the fact that I don't know how to defeat it, I use BracketHighlighter in Sublime text 4154, and I can't figure out how to make the BracketHighlighter plugin highlight the beginning and end in the template.twig, please tell me how to fix it.
Screenshot:https://prnt.sc/bbNKsyB8k0Xc
The text was updated successfully, but these errors were encountered: