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 Sophia package #8454

Merged
merged 2 commits into from
Mar 31, 2022
Merged

Add Sophia package #8454

merged 2 commits into from
Mar 31, 2022

Conversation

dincho
Copy link
Contributor

@dincho dincho commented Jan 13, 2022

  • I'm the package's author and/or maintainer.
  • I have have read the docs.
  • I have tagged a release with a semver version number.
  • My package repo has a description and a README describing what it's for and how to use it.
  • My package doesn't add context menu entries. *
  • My package doesn't add key bindings. **
  • Any commands are available via the command palette.
  • Preferences and keybindings (if any) are listed in the menu and the command palette, and open in split view.
  • If my package is a syntax it doesn't also add a color scheme. ***
  • I use .gitattributes to exclude files from the package: images, test files, sublime-project/workspace.

My package is for Sophia contract programming language for aeternity blockchain.

There are no packages like it in Package Control.

Copy link
Collaborator

@packagecontrol-bot packagecontrol-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated testing result: WARNING

Repo link: Sophia
Results help

Packages added:
  - Sophia

Processing package "Sophia"
  - WARNING: '.sublime-syntax' support has been added in build 3092 and there is no '.tmLanguage' fallback file
    - File: Sophia.sublime-syntax

Copy link
Collaborator

@packagecontrol-bot packagecontrol-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated testing result: WARNING

Repo link: Sophia
Results help

Packages added:
  - Sophia

Processing package "Sophia"
  - WARNING: '.sublime-syntax' support has been added in build 3092 and there is no '.tmLanguage' fallback file
    - File: Sophia.sublime-syntax

Copy link
Collaborator

@packagecontrol-bot packagecontrol-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated testing result: SUCCESS

Repo link: Sophia

Packages added:
  - Sophia

Processing package "Sophia"
  - All checks passed

Copy link
Collaborator

@packagecontrol-bot packagecontrol-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated testing result: SUCCESS

Repo link: Sophia

Packages added:
  - Sophia

Processing package "Sophia"
  - All checks passed

@braver
Copy link
Collaborator

braver commented Mar 9, 2022

You should end all your scopes with something specific to your syntax, e.g. .Sophia, so that other packages and syntaxes can make adjustments for your particular syntax.

@ElectricRCAircraftGuy
Copy link
Contributor

@dincho, in case you don't know what @braver is talking about, all he means is this, I think:

In this file: https://github.com/aeternity/sublime-sophia/blob/master/Sophia.sublime-syntax

Add .sophia to every single scope entry. Ex:

Change FROM this:

  brackets:
    - match: \]
      scope: punctuation.section.brackets.end
      pop: true
    - include: main

  braces:
    - match: \}
      scope: punctuation.section.braces.end
      pop: true
    - include: main

TO this:

  brackets:
    - match: \]
      scope: punctuation.section.brackets.end.sophia
      pop: true
    - include: main

  braces:
    - match: \}
      scope: punctuation.section.braces.end.sophia
      pop: true
    - include: main

This doesn't break anything for various Color Schemes, because the first matching color scheme name will be used, meaning that if a particular color scheme doesn't have an entry for punctuation.section.brackets.end.sophia, the formatting one level up at punctuation.section.brackets.end will be used instead, so long as it exists. If it doesn't exist in the color scheme, it goes up another level, and so-on, until a matching name is found, and that formatting will be used.

Adding .sophia to the end of all scopes allows color scheme maintainers and users to add customisations for your particular package by simply adding entries for your *.sophia scopes.

@ElectricRCAircraftGuy
Copy link
Contributor

ElectricRCAircraftGuy commented Mar 20, 2022

Good luck getting your package approved. I'll be submitting my own shortly, for gcode syntax highlighting. I've been studying a lot, and just learned all this stuff today.

@dincho
Copy link
Contributor Author

dincho commented Mar 22, 2022

The request seems clear and fair, I just forgot adding it in a rush, also I'm delaying a bit to service it as I'm working on other stuff right now.

@dincho
Copy link
Contributor Author

dincho commented Mar 31, 2022

@braver fixed, thank you

@braver braver merged commit bfe6d2b into wbond:master Mar 31, 2022
@dincho dincho deleted the sophia_package branch April 1, 2022 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants