question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`templates_suffix`: "extension prefix" rather than suffix

See original GitHub issue

Changing the file extension has real disadvantages on editors as they are not recognized anymore.

There are extensions taking care of syntax highlighting.
But there are still problems with the editor configuration.

I’ve an EditorConfig so I could modify that.
But it’s annoying and not pretty.

So, wouldn’t it be better to use an “extension prefix”? (.tmpl.py instead of .py.tmpl)
Or as I saw in another issue, just processing all files. Or the more flexible, allow to define patterns to include (e.g. ["*.py", "*.html", ".env"] or regex (^\.env$)|(\.(py|html)$)).

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
pawamoycommented, Feb 1, 2021

@ppo wouldn’t .jinja.py be recognized as Python only (not Python+Jinja)? And therefore syntax highlighting could break easily?

1reaction
mazdakbcommented, Feb 24, 2021

I am creating a Django boilerplate project, similar to Cookiecutter Django but with copier. Changing the extension (to .tmpl or anything else) can also break dependabot which looks for specific files in a designated directory. Therefore I cannot keep the dependencies of the required libraries in template up to date as it’s possible with cookiecutter. I can imagine any arbitrary tool which works like dependabot might break.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Prefix and suffix for naming in extensions - Business Central
In this article. In your extension, the name of each new application object (table, page, codeunit), must contain a prefix or suffix. This...
Read more >
Thoughts on element prefix vs. suffix - Dynamics 365 Community
I'm not going to dispute the argument that prefixes are better; I've seen teams using various approaches and I'm fine with most of...
Read more >
Templates - Shopify.dev
JSON, JSON templates are data files with the .json file extension. ... Instead, data is stored directly in the template, which improves the...
Read more >
Add a Final URL suffix - Google Ads Help
In Google Ads, the "final URL suffix" field allows you to enter parameters that will be attached to the end of your landing...
Read more >
Appendix A: Prefix / Suffix / Title Abbreviations
Appendix A: Prefix / Suffix / Title Abbreviations ... Extended. Extd. Extension ... There should never be more than one active MA address...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found