[Themes] Suggest only properties and attributes that are supported by the class

Open
#277 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
tooling

Research direction

Read the Sublime Text themes documentation linked in the issue and trace how PackageDev currently provides property and attribute suggestions for JSON theme rules. Verify the tab_label examples: suggest only transient and hover without attributes, and the supported shadow, font, and fg properties after transient is present.

Written by the indexing model from the issue text.

Description

enhancement

As defined in https://www.sublimetext.com/docs/3/themes.html#elements, each class supports only a set of attributes and propeties, and not all of them.
PackageDev provides all properties and attributes regardless of whether the class actually supports them.
It would be handy if PacckageDev limited the suggestion provided in a rule to the properties and attributes supported by the class.
For example

{
    "class": "tab_label",
    "attributes": |
}

It should suggest transient and hover.

{
    "class": "tab_label",
    "attributes": ["transient"]
    |
}

It should provide shadow and font properties and fg·

Dominant language
Python
Stars
455
Forks
86
Avg merge
7d 10h
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from SublimeText/PackageDev

All issues in SublimeText/PackageDev

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.