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

Rewrite Package for 2.0.0 #22

Merged
merged 1 commit into from
May 17, 2024
Merged

Rewrite Package for 2.0.0 #22

merged 1 commit into from
May 17, 2024

Conversation

deathaxe
Copy link
Collaborator

@deathaxe deathaxe commented May 8, 2024

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 Fix CI syntax tests #20 and Fix package name in resource files #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+

@deathaxe deathaxe mentioned this pull request May 8, 2024
@UltraInstinct05
Copy link
Contributor

@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
Copy link
Collaborator Author

deathaxe commented May 8, 2024

Fully understandable. Maintainer rights would be fine as well.

@UltraInstinct05
Copy link
Contributor

@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.

This commit 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

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, ...).
@deathaxe
Copy link
Collaborator Author

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 wbond/package_control_channel#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
Copy link

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

@deathaxe
Copy link
Collaborator Author

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.

@deathaxe deathaxe merged commit c6e43d0 into Sublime-Instincts:master May 17, 2024
3 checks passed
@deathaxe deathaxe deleted the feat/refactor branch May 17, 2024 18:22
deathaxe added a commit that referenced this pull request May 17, 2024
This commit 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

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, ...).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment