Skip to content
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

Add new snippets #5

Open
Woetfin opened this issue Apr 3, 2023 · 3 comments · May be fixed by #25
Open

Add new snippets #5

Woetfin opened this issue Apr 3, 2023 · 3 comments · May be fixed by #25
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@Woetfin
Copy link
Contributor

Woetfin commented Apr 3, 2023

Add new snippets

This thread can be used to mention any snippets that you would like to see added to the VS Code extension.

Snippets confirmed to be added

shortcut description snippet
when Add a when-tag that is used within case-tags {% when "" %}
newpage Add a newpage tag to signify the start of a new page {% newpage %}
currencyconfiguration Add opening and closing currencyconfiguration-tags with the possible attributes {% currencyconfiguration negative_format:"-xxx" zero_format:"0" precision:3 delimiter:" " separator:"," %}content{% endcurrencyconfiguration %}
endcurrencyconfiguration Only add closing currencyconfiguration-tag {% endcurrencyconfiguration %}
int add the INT type conversion function INT(content)
max add the MAX function to return the largest value in an array of values MAX(value_1;value_2)
min add the MIN function to return the smallest value in an array of values MIN(value_1;value_2)
localized add the localized filter localized
localize: add the localize attribute localize:true
date:"%d/%m/%Y" add the filter for standard BE date formatting (DD/MM/YYYY) date:"%d/%m/%Y"
date:"%F" add the filter for ISO date formatting (YYYY-MM-DD) date:"%F"

Add snippets for general drops

For each method of the CompanyDrop we will add snippets so developers get a proposal of all possible methods on a drop when they're typing.

Some examples:

shortcut description snippet
company.name access the company name of the current company company.name
company.vat_identifier access the company number of the current company company.vat_identifier
company.company_type access the company form / legal form of the current company company.company_type
... ... ...

Add this for each method of the CompanyDrop, the PeriodDrop, the AccountsDrop, the ReconciliationsDrop, the PeopleDrop and the UserDrop

@Woetfin Woetfin added the enhancement New feature or request label Apr 3, 2023
@Woetfin Woetfin self-assigned this Apr 3, 2023
@Woetfin Woetfin changed the title Missing snippets Add new snippets Jul 10, 2023
@Woetfin Woetfin assigned Toby-Masters-SF and unassigned Woetfin Jul 11, 2023
@Woetfin Woetfin added the documentation Improvements or additions to documentation label Jul 12, 2023
@Toby-Masters-SF Toby-Masters-SF linked a pull request Aug 25, 2023 that will close this issue
10 tasks
@Toby-Masters-SF Toby-Masters-SF linked a pull request Aug 25, 2023 that will close this issue
10 tasks
@Snakefin
Copy link

Snakefin commented Nov 6, 2023

Also @Toby-Masters-SF , can you make sure the focus of an include tag, is on the second part of the code (instead of the first)?

See https://silverfin.slack.com/archives/C0376K9NNTS/p1699267659006959

@robindeclercq
Copy link

Also include this one please 🙏
https://silverfin.slack.com/archives/C01KFA05WPM/p1706878379603819

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants