Skip to content

Commit

Permalink
Merge pull request #39 from deathaxe/feat/refactor-syntax
Browse files Browse the repository at this point in the history
Refactor Syntax
  • Loading branch information
braver authored Oct 28, 2024
2 parents 4c9713c + e341e43 commit aeb6874
Show file tree
Hide file tree
Showing 119 changed files with 7,027 additions and 3,695 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/syntax_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ jobs:
strategy:
matrix:
include:
- build: 4142
packages: v4142
- build: 4170
packages: v4170
- build: 4173
packages: v4173
- build: 4152
packages: v4152
- build: 4169
packages: v4169
- build: 4180
packages: v4180
- build: latest
packages: master
steps:
- uses: actions/checkout@v4
- uses: SublimeText/syntax-test-action@v2
Expand Down
329 changes: 329 additions & 0 deletions Completions/Twig Filters.sublime-completions
Original file line number Diff line number Diff line change
@@ -0,0 +1,329 @@
{
"scope": "source.twig meta.filter",
"completions": [
{
"trigger": "abs",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Returns the absolute value.",
},
{
"trigger": "batch",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Batches items by returning a list of lists with the given number of items.",
},
{
"trigger": "capitalize",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Capitalizes a value.",
},
{
"trigger": "column",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Returns the values from a single column in the input array.",
},
{
"trigger": "convert_encoding",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Converts a string from one encoding to another.",
},
{
"trigger": "country_name",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Returns the country name given its ISO-3166 two-letter code.",
},
{
"trigger": "currency_name",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Returns the currency name given its three-letter code.",
},
{
"trigger": "currency_symbol",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Returns the currency symbol given its three-letter code.",
},
{
"trigger": "data_uri",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Generates a URL using the data scheme as defined in RFC 2397.",
},
{
"trigger": "date",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Formats a date to a given format.",
},
{
"trigger": "date_modify",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Modifies a date with a given modifier string.",
},
{
"trigger": "default",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Returns the passed default value if the value is undefined or empty.",
},
{
"trigger": "escape",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Escapes a string using strategies that depend on the context.",
},
{
"trigger": "filter",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Filters elements of a sequence or a mapping using an arrow function.",
},
{
"trigger": "first",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Returns the first element of a sequence, a mapping, or a string.",
},
{
"trigger": "format",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Formats a given string by replacing the placeholders.",
},
{
"trigger": "format_currency",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Formats a number as a currency.",
},
{
"trigger": "format_date",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Formats a date.",
},
{
"trigger": "format_datetime",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Formats a date time.",
},
{
"trigger": "format_number",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Formats a number.",
},
{
"trigger": "format_time",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Formats the given time.",
},
{
"trigger": "html_to_markdown",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Converts a block of HTML to Markdown.",
},
{
"trigger": "inline_css",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Inlines CSS styles in HTML documents.",
},
{
"trigger": "inky_to_html",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Processes an inky email template.",
},
{
"trigger": "join",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Returns a string which is the concatenation of the items of a sequence.",
},
{
"trigger": "json_encode",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Returns the JSON representation of a value.",
},
{
"trigger": "keys",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Returns the keys of an array.",
},
{
"trigger": "language_name",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Returns the language name given its two-letter code.",
},
{
"trigger": "last",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Returns the last element of a sequence, a mapping, or a string.",
},
{
"trigger": "length",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Returns the number of items of a sequence, mapping or a string.",
},
{
"trigger": "locale_name",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Returns the locale name given its two-letter code.",
},
{
"trigger": "lower",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Converts a value to lowercase.",
},
{
"trigger": "map",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Applies an arrow function to the elements of a sequence or a mapping.",
},
{
"trigger": "markdown_to_html",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Converts a block of Markdown to HTML.",
},
{
"trigger": "merge",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Merges an array with another array.",
},
{
"trigger": "nl2br",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Inserts HTML line breaks before all newlines in a string.",
},
{
"trigger": "number_format",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Formats numbers.",
},
{
"trigger": "raw",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Marks the value as being <b>safe</b>.",
},
{
"trigger": "reduce",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Iteratively reduces a sequence or a mapping to a single value using an arrow function.",
},
{
"trigger": "replace",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Formats a given string by replacing the placeholders.",
},
{
"trigger": "reverse",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Reverses a sequence, a mapping, or a string.",
},
{
"trigger": "round",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Rounds a number to a given precision.",
},
{
"trigger": "slice",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Extracts a slice of a sequence, a mapping, or a string.",
},
{
"trigger": "slug",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Transforms a given string into another string that only includes safe ASCII characters.",
},
{
"trigger": "sort",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Sorts an array.",
},
{
"trigger": "spaceless",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Remove whitespace between HTML tags.",
},
{
"trigger": "split",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Splits a string by the given delimiter and returns a list of strings.",
},
{
"trigger": "striptags",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Strips SGML/XML tags and replace adjacent whitespace by one space.",
},
{
"trigger": "timezone_name",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Returns the timezone name given a timezone identifier.",
},
{
"trigger": "title",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Returns a titlecased version of the value.",
},
{
"trigger": "trim",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Strips whitespace from beginning & end of a string.",
},
{
"trigger": "u",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Wraps a text in a Unicode object.",
},
{
"trigger": "upper",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Converts a value to uppercase.",
},
{
"trigger": "url_encode",
"kind": ["namespace", "f", "Twig Filter"],
"annotation": "Twig Filter",
"details": "Percent encodes a given string as URL segment or an array.",
},
],
}
Loading

0 comments on commit aeb6874

Please sign in to comment.