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

"Symbol excludes" interfere with custom symbol preferences #56

Closed
mitranim opened this issue Jan 12, 2019 · 4 comments
Closed

"Symbol excludes" interfere with custom symbol preferences #56

mitranim opened this issue Jan 12, 2019 · 4 comments

Comments

@mitranim
Copy link

I want to add class names to the indexed symbol list. The bundled Symbol Index Excludes.tmPreferences interferes, causing them to be excluded. There's no obvious way to override that.

Bundled symbol settings should be whitelist-based, not blacklist-based. As far as I can tell, these excludes don't even do anything by default. What's the reasoning behind them?

If we agree on removing or replacing this blacklist, I'm willing to do a PR.

@braver
Copy link
Member

braver commented Jan 12, 2019

@mitranim the blacklist could very well be a remnant from previous iterations. If you want to look into what they do or don't do, and have a reasonable test to support that we can safely remove them... let's just remove them.

@mitranim
Copy link
Author

mitranim commented Jan 13, 2019

Well, I don't have a "test" per se, but I'm fairly confident that it does nothing.

The only settings it could be overriding are Sublime's defaults from Default/Indexed Symbol List.tmPreferences:

<dict>
    <key>scope</key>
    <string>entity.name.function, entity.name.type</string>
    <key>settings</key>
    <dict>
        <key>showInIndexedSymbolList</key>
        <string>1</string>
    </dict>
</dict>

Here's our Symbol Index Excludes.tmPreferences:

<dict>
    <key>scope</key>
    <string>source.sass meta.selector, source.scss meta.selector</string>
    <key>settings</key>
    <dict>
        <key>showInIndexedSymbolList</key>
        <integer>0</integer>
    </dict>
</dict>

There's no overlap. Like you said, probably a leftover. Should I do a PR, or will you make the change?

On an unrelated note, after posting the PR I ended up replacing this package with a stripped-down version to get rid of the bundled completions and hotkeys. They were really messing with my workflow. It would be great if that stuff was opt-in.

@braver
Copy link
Member

braver commented Jan 13, 2019

I’ll make the change, thanks for the info. I just never looked into it too deeply.

With regards to the defaults (keybindings etc), there is no single right answer. We already have thousands of installs, so we can’t change anything here anyway. I personally don’t like shipping keybindings, but the reality is that most people who use Sublime don’t know anything about how it works or how to customize it. More so, seemingly, with users of front-end/webdev packages. There is an expectation for it to work well out of the box. Advanced users like you and me probably end up forking, tweaking and manually installing packages. I’d rather have that than complicating maintenance with settings or whatever.

Top tip: You can override any file in any package using Package Resource Viewer. That way you should be able to remove the completions for instance, without having to do a manual install.

@braver braver closed this as completed in 82fc39f Jan 13, 2019
@mitranim
Copy link
Author

Nice, thank you.

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

No branches or pull requests

2 participants