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

A formatter of TCL source code #9041

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

Rain7232
Copy link
Contributor

@Rain7232 Rain7232 commented Jan 19, 2025

  • 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. ***
  • If my package is a syntax it is named after the language it supports (without suffixes like "syntax" or "highlighting").
  • I use .gitattributes to exclude files from the package: images, test files, sublime-project/workspace.

My package is ...

There are no packages like it in Package Control.

My package is similar to ... However it should still be added because ...

@Rain7232 Rain7232 closed this Jan 19, 2025
@Rain7232 Rain7232 reopened this Jan 19, 2025
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: Tclfmt

Packages added:
  - Tclfmt

Processing package "Tclfmt"
  - All checks passed

@braver
Copy link
Collaborator

braver commented Jan 26, 2025

  • Wouldn't Fmt already support this formatter?
  • Please use edit_settings instead of open_file for your settings, like this example, and also expose your settings via the command palette.
  • Loading and accessing package settings is instant in Sublime Text. Loading the settings on plugin_loaded needlessly complicates your own code, and might in fact even prevent settings to update correctly. You can wrap loading and accessing settings like this example for convenience.
  • Please don't add unconditional context menu entries. It will appear in all files, even where your formatter won't apply, and users can't easily turn it off if they want to. Instead, create a proxy command where in the implementation you check user settings (e.g. a new setting "enable_context_menu") and the file's syntax, to decide whether the entry should be is_visible(), and then let it call the tclfmt command when triggered.
  • Your package will run on a 3.x version of Python so # -*- coding: utf-8 -*- is unnecessary. In fact you'll want to opt-in to Python 3.8 explicitly to get access to more modern features (like so.

@braver braver closed this Jan 26, 2025
@braver braver reopened this Jan 26, 2025
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: Tclfmt

Packages added:
  - Tclfmt

Processing package "Tclfmt"
  - All checks passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants