Sublime-Instincts / BetterJinja

A Sublime Text package that provides enhanced syntax highlighting, completions, snippets & more for Jinja templates.
https://packagecontrol.io/packages/Jinja2
MIT License
15 stars 4 forks source link

Rewrite Package for 2.0.0 #22

Closed deathaxe closed 5 months ago

deathaxe commented 5 months ago

Fixes #2 Fixes #4 Fixes #7 Fixes #12 Resolves #13 Fixes #14 Fixes #16

Superseeds #10, #17

This PR is basically a complete rewrite of the whole package with every aspect being touched, while re-using as much of it as possible.

Supported template languages are: CSS, JavaScript, JSON, HTML, Markdown, XML, YAML

Syntax definitions extend bundled ones from ST4152+.

  1. Package is re-structured to better organize all the supported syntaxes.

  2. Snippets (and other resources) are indented using tabs as spaces don't play well with tab-indented target documents.

    E.g.: If snippets would be indented with spaces but committed to a document using tabs, spaces would remain and cause mixed indentation. Tabs are however converted to the correct number of spaces, when committed to a document using spaces for indentation.

  3. a snippet for each tag is added so typing e.g. "if" and hitting tab expands to equivalent {% if ... %} tag.

  4. Previous Jinja.sublime-syntax is mainly re-used but improved in various aspects by re-using patterns from Python syntax. It is renamed to "Text (Jinja)" and can be used for templates, which no dedicated syntax is shipped for (e.g.: LaTeX, ...).


Note: I'd also be happy to continue maintanance in SublimeText org as it already collects various templating syntaxes and more. I'd also like to rename the repo to match the package name to avoid confusion.

It may cause some conflicts, but I'd suggest to

  1. merge #20 and #21 first and release a 1.1.1
  2. create a st4107 branch for the final 1.1.1 release
  3. continue with master and update package_control_channel as this PR requires ST4152+
UltraInstinct05 commented 5 months ago

@deathaxe First of all, thanks for all your work here. It's appreciated.

Unfortunately my $DAY_JOB affords me little time to work on ST packages. I can offer you maintainer/admin rights for this repository (similar to how I provided @braver the rights for the BetterTwig repository in this organization) so that you can make new releases as you see fit.

deathaxe commented 5 months ago

Fully understandable. Maintainer rights would be fine as well.

UltraInstinct05 commented 5 months ago

@deathaxe I have sent you a invite for maintainer access to this repository. Once you accept it, you should be able to merge PR's, triage issue and make releases.

deathaxe commented 5 months ago

OK, a 1.1.1 is released and some further tweaks to this branch have been made, including a rebase upon latest master.

Required changes to package_control_channel are pending at https://github.com/wbond/package_control_channel/pull/8918.

I'll leave this open for a while in case someone wants to take a closer look and/or make further suggestions to the current state as it is a rather big change in many aspects.

FichteFoll commented 5 months ago

Alternatively, we could also adopt this package under the @SublimeText org. (just throwing this in)

deathaxe commented 5 months ago

I like the idea of gathering widly used packages under SublimeText org as a kind of extension to sublimehq/Packages repo in general as well as grouping all LSP stuff under sublimelsp org.

Depends on whether Ashwin is ok to move the repo.